#Pop Quiz

1 messages · Page 1 of 1 (latest)

worn gazelle
#

No, because you aren't listening for the on_surface_renamed event

tawny tendon
#

renaming a surface does not change the index does it?

worn gazelle
#

wait no that only changes the name

slim thunder
#

you wouldn't be making this post if the answer was yes so I'm going with no

#

I'm guessing if another mod makes a surface in their on_init or something it breaks

#

not sure if before or after in terms of mod load order

worn gazelle
#

wait I was right
but not the on_surface_renamed event, it's the on_surface_imported event, since that creates a new surface

#

I think

violet siren
#

If they run after us it should be fine as we have initialized storage.surface_indexes in on_init()

violet siren
valid rose
somber fable
#

Something with indexes being re-used?

worn gazelle
violet siren
#

Because mods can add/remove surfaces (planets) in data stage

tawny tendon
tawny tendon
#

alright here's the answer:

if this mod is in a save, and you add a new mod that creates a surface in their own on_init, then this mod would not have gotten the event

prisma spoke
#

so a on_configuration_changed handler would be needed to do a full scan like in on_init

tawny tendon
#

indeed