Skip to content

Commit

Permalink
Fixes some hard dels (#37338)
Browse files Browse the repository at this point in the history
  • Loading branch information
west3436 authored Dec 11, 2024
1 parent bc5faed commit e2473f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions code/game/objects/effects/decals/floor_decals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
I.pixel_y = pixel_y
I.color=color
T.AddDecal(I)
I = null
qdel(src)

/obj/effect/decal/warning_stripes/oldstyle
Expand Down
4 changes: 2 additions & 2 deletions code/modules/maps/spawners/pick_spawner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
map_pickspawners[category] = list()
map_pickspawners[category] += src

/obj/abstract/map/spawner/pick_spawner/Destroy()
/obj/abstract/map/spawner/pick_spawner/kill_spawner()
if(category && map_pickspawners[category])
map_pickspawners[category] -= src
..()
Expand All @@ -45,7 +45,7 @@
var/obj/abstract/map/spawner/pick_spawner/winner = pickweight(possible_spawners)
winner.perform_spawn() //It automatically removes itself from the list when spawning.
for(var/obj/abstract/map/spawner/pick_spawner/loser in map_pickspawners[category])
qdel(loser) //They automatically remove themselves from the list in their Destroy().
loser.kill_spawner() //They automatically remove themselves from the list here.



Expand Down
6 changes: 5 additions & 1 deletion code/modules/maps/spawners/spawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
else
if(prob(chance))
CreateItem(pick(to_spawn))
qdel(src)
kill_spawner()

/obj/abstract/map/spawner/proc/kill_spawner() //prevents hard dels
to_spawn = list()
src.forceMove(null, harderforce = TRUE)

/obj/abstract/map/spawner/proc/CreateItem(new_item_type)
var/obj/spawned = new new_item_type(loc)
Expand Down

0 comments on commit e2473f3

Please sign in to comment.