Skip to content

Commit

Permalink
Fix light emitters being deleted in pod bay when deleting everything (t…
Browse files Browse the repository at this point in the history
…gstation#87516)

## About The Pull Request

When you delete everything with the "delete that shit" button in the pod
bay, it also deleted the light emitters, which makes it difficult to see
what is happening in the bay. This PR makes it so the light emitters are
not deleted. Also removes some one letter variables in that part of the
code.


* Closes tgstation#83219
## Why It's Good For The Game

Helps admins do their work more easily.
## Changelog
:cl:
code: removed two one letter variables
admin: clearing the pod bay will not remove the light emitters.
/:cl:
  • Loading branch information
Jewelry-x authored Nov 1, 2024
1 parent 5b18d47 commit 10b1e13
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions code/modules/cargo/centcom_podlauncher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -788,12 +788,16 @@ ADMIN_VERB(centcom_podlauncher, R_ADMIN, "Config/Launch Supplypod", "Configure a
selector.moveToNullspace() //Otherwise, we move the selector to nullspace until it is needed again

/datum/centcom_podlauncher/proc/clearBay() //Clear all objs and mobs from the selected bay
for (var/obj/O in bay.get_all_contents())
qdel(O)
for (var/mob/M in bay.get_all_contents())
qdel(M)
for (var/obj/object in bay.get_all_contents())
if (istype(object.type, /obj/effect/light_emitter/podbay))
continue
qdel(object)
for (var/mob/mob in bay.get_all_contents())
qdel(mob)
for (var/bayturf in bay)
var/turf/turf_to_clear = bayturf
if (istype(turf_to_clear, /obj/effect/light_emitter/podbay))
continue
turf_to_clear.ChangeTurf(/turf/open/floor/iron)

/datum/centcom_podlauncher/Destroy() //The Destroy() proc. This is called by ui_close proc, or whenever the user leaves the game
Expand Down

0 comments on commit 10b1e13

Please sign in to comment.