Stops aux base turrets from hard-deleting (and 1 other fix) (#63424)

Fixes #62643

Fixes aux-base turrets from hard-deleting by handling their deleting on the aux base itself.
Converts the turrets list to a proper lazylist and cleans up some surrounding code involving the turrets list.
Also fixes a copy+paste error with tiny fans being placed.
This commit is contained in:
MrMelbert
2021-12-17 11:49:22 +00:00
committed by GitHub
parent 4d9e61cedd
commit bae0967b8e
2 changed files with 42 additions and 29 deletions
@@ -133,7 +133,7 @@
structure_path = /obj/structure/fans/tiny
place_sound = 'sound/machines/click.ogg'
/datum/action/innate/construction/place_structure/turret/after_place(obj/placed_structure, remaining)
/datum/action/innate/construction/place_structure/fan/after_place(obj/placed_structure, remaining)
to_chat(owner, span_notice("Tiny fan placed. [remaining] fans remaining."))
/datum/action/innate/construction/place_structure/turret
@@ -148,5 +148,6 @@
if(!turret_controller)
to_chat(owner, span_notice("<b>Warning:</b> Aux base controller not found. Turrets might not work properly."))
return
turret_controller.turrets += placed_structure
LAZYADD(turret_controller.turrets, WEAKREF(placed_structure))
to_chat(owner, span_notice("You've constructed an additional turret. [remaining] turrets remaining."))