[MIRROR] Correct instances of destroying baseturfs in ChangeTurf & Select dimensional anomaly theme [MDB IGNORE] (#19255)

* Correct instances of destroying baseturfs in ChangeTurf & Select dimensional anomaly theme

* events

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-10 02:39:30 +00:00
committed by GitHub
co-authored by Jacquerel lessthnthree Gandalf
parent 68b1ed193f
commit f48b604aff
10 changed files with 208 additions and 79 deletions
@@ -34,16 +34,26 @@
to_summon_in -= spawn_place
if(ispath(summoned_object_type, /turf))
spawn_place.ChangeTurf(summoned_object_type, flags = CHANGETURF_INHERIT_AIR)
if(isclosedturf(spawn_place))
spawn_place.ChangeTurf(summoned_object_type, flags = CHANGETURF_INHERIT_AIR)
return
if(ispath(summoned_object_type, /turf/closed))
if (spawn_place.overfloor_placed)
spawn_place.ChangeTurf(summoned_object_type, flags = CHANGETURF_INHERIT_AIR)
else
spawn_place.PlaceOnTop(summoned_object_type, flags = CHANGETURF_INHERIT_AIR)
return
var/turf/open/open_turf = spawn_place
open_turf.replace_floor(summoned_object_type, flags = CHANGETURF_INHERIT_AIR)
return
else
var/atom/summoned_object = new summoned_object_type(spawn_place)
var/atom/summoned_object = new summoned_object_type(spawn_place)
summoned_object.flags_1 |= ADMIN_SPAWNED_1
if(summon_lifespan > 0)
QDEL_IN(summoned_object, summon_lifespan)
summoned_object.flags_1 |= ADMIN_SPAWNED_1
if(summon_lifespan > 0)
QDEL_IN(summoned_object, summon_lifespan)
post_summon(summoned_object, cast_on)
post_summon(summoned_object, cast_on)
/// Called on atoms summoned after they are created, allows extra variable editing and such of created objects
/datum/action/cooldown/spell/conjure/proc/post_summon(atom/summoned_object, atom/cast_on)