We have turfs that trigger only on a move of an atom into the turf and carry out effects on that atom
Examples are lava and chasms which destroy/burn the atoms that move into them
Currently if an atom is spawned into that turf there is no handling, so it will appear to be immune to lava or float above the turf.
Our first somewhat naive attempt was to call moved in atom new, but this lead to issues as most new code is not setup to expect changes from moved occuring in new procs (i.e being soft deleted (or qdeleted in ss13 parlance, which nulls vars that individual news expect to have values))
so before I run off ahead with some semi baked ideas about how I can , I was wondering if there is any native byond procs called right after New() or when an atom is spawned into a turf?
ID:2153146
![]() Sep 28 2016, 5:22 pm
|
|
Yeah the current plan is just to schedule a post_new proc to run a tick or two later if the turf type flags as wanting updates about spawned atoms and then handle movement there
|
Question: Are you using the turf.Entered() proc to apply these effects? If not, I would wonder why not. If so, I would suggest calling it directly instead of Move(), which is going the long way around and thus more likely to introduce unforeseen complications.
|
As for needing Enter/Entered to call and the sort, you can just check the turf and call them manually if you absolutely need to.