mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
[MIRROR] Fixing GBJ cases where the disposal holder is forcemoved outside a pipe. (#1602)
* Fixing GBJ cases where the disposal holder is forcemoved outside a pipe. (#54643) Title. Also turned movable/pipe_eject() into a comsig, since it was used only for gibs. * Fixing GBJ cases where the disposal holder is forcemoved outside a pipe. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -26,6 +26,10 @@
|
||||
random_icon_states = list("xgib1", "xgib2", "xgib3", "xgib4", "xgib5", "xgib6")
|
||||
mergeable_decal = FALSE
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_MOVABLE_PIPE_EJECTING, .proc/on_pipe_eject)
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/streak(list/directions, mapload=FALSE)
|
||||
set waitfor = FALSE
|
||||
var/direction = pick(directions)
|
||||
@@ -37,6 +41,17 @@
|
||||
if(!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/proc/on_pipe_eject(atom/source, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/list/dirs
|
||||
if(direction)
|
||||
dirs = list(direction, turn(direction, -45), turn(direction, 45))
|
||||
else
|
||||
dirs = GLOB.alldirs.Copy()
|
||||
|
||||
streak(dirs)
|
||||
|
||||
/obj/effect/decal/cleanable/xenoblood/xgibs/ex_act()
|
||||
return
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
/obj/effect/decal/cleanable/blood/gibs/Initialize(mapload, list/datum/disease/diseases)
|
||||
. = ..()
|
||||
reagents.add_reagent(/datum/reagent/liquidgibs, 5)
|
||||
RegisterSignal(src, COMSIG_MOVABLE_PIPE_EJECTING, .proc/on_pipe_eject)
|
||||
if(already_rotting)
|
||||
start_rotting(rename=FALSE)
|
||||
else
|
||||
@@ -78,6 +79,17 @@
|
||||
playsound(loc, 'sound/effects/gib_step.ogg', HAS_TRAIT(L, TRAIT_LIGHT_STEP) ? 20 : 50, TRUE)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/on_pipe_eject(atom/source, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/list/dirs
|
||||
if(direction)
|
||||
dirs = list(direction, turn(direction, -45), turn(direction, 45))
|
||||
else
|
||||
dirs = GLOB.alldirs.Copy()
|
||||
|
||||
streak(dirs)
|
||||
|
||||
/obj/effect/decal/cleanable/blood/gibs/proc/streak(list/directions, mapload=FALSE)
|
||||
set waitfor = FALSE
|
||||
var/list/diseases = list()
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
mergeable_decal = FALSE
|
||||
beauty = -50
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/Initialize()
|
||||
. = ..()
|
||||
RegisterSignal(src, COMSIG_MOVABLE_PIPE_EJECTING, .proc/on_pipe_eject)
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/streak(list/directions, mapload=FALSE)
|
||||
set waitfor = FALSE
|
||||
var/direction = pick(directions)
|
||||
@@ -28,6 +32,17 @@
|
||||
if (!step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/proc/on_pipe_eject(atom/source, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/list/dirs
|
||||
if(direction)
|
||||
dirs = list(direction, turn(direction, -45), turn(direction, 45))
|
||||
else
|
||||
dirs = GLOB.alldirs.Copy()
|
||||
|
||||
streak(dirs)
|
||||
|
||||
/obj/effect/decal/cleanable/robot_debris/ex_act()
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user