Skip to content

Commit

Permalink
actually fix the floor flusher bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TobleroneSwordfish committed Nov 27, 2023
1 parent b4ae111 commit 414e898
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions code/obj/machinery/floorflusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ ADMIN_INTERACT_PROCS(/obj/machinery/floorflusher, proc/flush)
if(!trunk)
mode = 0
flush = 0
if (src.open)
src.closeup()
for (var/atom/movable/AM in src)
src.expel_thing(AM)
else
trunk.linked = src // link the pipe trunk to self
mode = 1
Expand Down Expand Up @@ -333,19 +337,18 @@ ADMIN_INTERACT_PROCS(/obj/machinery/floorflusher, proc/flush)
// called when holder is expelled from a disposal
// should usually only occur if the pipe network is modified
proc/expel(var/obj/disposalholder/H)

var/turf/target
playsound(src, 'sound/machines/hiss.ogg', 50, FALSE, 0)
for(var/atom/movable/AM in H)
target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))

AM.set_loc(get_turf(src))
AM.pipe_eject(0)
AM?.throw_at(target, 5, 1)
src.expel_thing(AM)

H.vent_gas(loc)
qdel(H)

proc/expel_thing(atom/movable/AM)
var/turf/target = get_offset_target_turf(src.loc, rand(5)-rand(5), rand(5)-rand(5))
AM.set_loc(get_turf(src))
AM.pipe_eject(0)
AM?.throw_at(target, 5, 1)

/obj/machinery/floorflusher/industrial
name = "industrial loading chute"
Expand Down

0 comments on commit 414e898

Please sign in to comment.