mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-11 01:13:18 +00:00
* Fixes being able to fish up qdeleted spawners (#80646) ## About The Pull Request Fixes https://github.com/NovaSector/NovaSector/issues/152 This is mostly a downstream issue, I think, but should a spawner ever get added to the fish tables here this bug will be present. Basically spawners, when created, do their item spawning behavior on the src loc and then immediately qdel themselves. If you try to forceMove() the spawners out of nullspace, like what was happening with fishing, you'd end up with an unmovable broken item that cannot be easily admin deleted. This PR also adds a stack_trace when you forceMove() a qdeleted spawner, because this is not the first time I've seen this issue come up. It doesn't stop it from happening, though, because it's easier to visually see the bug that way. This just provides some useful feedback as to why the bug is happening should you check the debug logs. ## Why It's Good For The Game Fixes a bug ## Changelog 🆑 fix: fishing up a spawner will now give you the spawned item instead of a broken, undeletable spawner object code: adds a warning to the stack trace when something tries to forceMove() a qdeleted spawner /🆑 * Fixes being able to fish up qdeleted spawners --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
86 lines
2.1 KiB
Plaintext
86 lines
2.1 KiB
Plaintext
//The effect when you wrap a dead body in gift wrap
|
|
/obj/effect/spresent
|
|
name = "strange present"
|
|
desc = "It's a ... present?"
|
|
icon = 'icons/obj/storage/wrapping.dmi'
|
|
icon_state = "strangepresent"
|
|
density = TRUE
|
|
anchored = FALSE
|
|
|
|
/obj/effect/beam
|
|
name = "beam"
|
|
var/def_zone
|
|
pass_flags = PASSTABLE
|
|
|
|
/obj/effect/beam/singularity_act()
|
|
return
|
|
|
|
/obj/effect/beam/singularity_pull()
|
|
return
|
|
|
|
/obj/effect/spawner
|
|
name = "object spawner"
|
|
|
|
// Brief explanation:
|
|
// Rather then setting up and then deleting spawners, we block all atomlike setup
|
|
// and do the absolute bare minimum
|
|
// This is with the intent of optimizing mapload
|
|
/obj/effect/spawner/Initialize(mapload)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
if(flags_1 & INITIALIZED_1)
|
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
|
flags_1 |= INITIALIZED_1
|
|
|
|
return INITIALIZE_HINT_QDEL
|
|
|
|
/obj/effect/spawner/Destroy(force)
|
|
SHOULD_CALL_PARENT(FALSE)
|
|
moveToNullspace()
|
|
return QDEL_HINT_QUEUE
|
|
|
|
/obj/effect/spawner/forceMove(atom/destination)
|
|
if(destination && QDELETED(src)) // throw a warning if we try to forceMove a qdeleted spawner to somewhere other than nullspace
|
|
stack_trace("Warning: something tried to forceMove() a qdeleted [src]([type]) to non-null destination [destination]([destination.type])!")
|
|
return ..()
|
|
|
|
/obj/effect/list_container
|
|
name = "list container"
|
|
|
|
/obj/effect/list_container/mobl
|
|
name = "mobl"
|
|
var/master = null
|
|
|
|
var/list/container = list()
|
|
|
|
//Makes a tile fully lit no matter what
|
|
/obj/effect/fullbright
|
|
icon = 'icons/effects/alphacolors.dmi'
|
|
icon_state = "white"
|
|
plane = LIGHTING_PLANE
|
|
layer = LIGHTING_ABOVE_ALL
|
|
blend_mode = BLEND_ADD
|
|
luminosity = 1
|
|
|
|
/obj/effect/abstract/marker
|
|
name = "marker"
|
|
icon = 'icons/effects/effects.dmi'
|
|
anchored = TRUE
|
|
icon_state = "wave3"
|
|
layer = RIPPLE_LAYER
|
|
plane = ABOVE_GAME_PLANE
|
|
|
|
/obj/effect/abstract/marker/Initialize(mapload)
|
|
. = ..()
|
|
GLOB.all_abstract_markers += src
|
|
|
|
/obj/effect/abstract/marker/Destroy()
|
|
GLOB.all_abstract_markers -= src
|
|
. = ..()
|
|
|
|
/obj/effect/abstract/marker/at
|
|
name = "active turf marker"
|
|
|
|
/obj/effect/abstract/marker/intercom
|
|
name = "intercom range marker"
|
|
color = COLOR_YELLOW
|