mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-09 23:27:56 +01:00
Removes the deliverychute entirely from the machinery ticker and updates his flush() proc with his parent that I fixed long time ago. Because someone though that copypasting was the best idea to make new machines.
Anyways I'm not planning to keep touching this for a while, if you want to remove the copypasta, please, do it. If there's a wall on top of the exit of a disposal pipe, the disposal pipe will now shoot the stuff to the wall anyways because being stuck in the holder inside of pipe sucks.
This commit is contained in:
@@ -716,10 +716,6 @@
|
||||
|
||||
var/turf/target
|
||||
|
||||
if(T.density) // dense ouput turf, so stop holder
|
||||
H.active = 0
|
||||
H.loc = src
|
||||
return
|
||||
if(istype(T,/turf/simulated/floor)) //intact floor, pop the tile
|
||||
var/turf/simulated/floor/F = T
|
||||
//F.health = 100
|
||||
@@ -742,8 +738,6 @@
|
||||
spawn(1)
|
||||
if(AM)
|
||||
AM.throw_at(target, 100, 1)
|
||||
H.vent_gas(T)
|
||||
del(H)
|
||||
|
||||
else // no specified direction, so throw in random direction
|
||||
|
||||
@@ -757,10 +751,8 @@
|
||||
spawn(1)
|
||||
if(AM)
|
||||
AM.throw_at(target, 5, 1)
|
||||
|
||||
H.vent_gas(T) // all gas vent to turf
|
||||
del(H)
|
||||
|
||||
H.vent_gas(T)
|
||||
del(H)
|
||||
return
|
||||
|
||||
// call to break the pipe
|
||||
|
||||
@@ -219,105 +219,107 @@
|
||||
var/start_flush = 0
|
||||
var/c_mode = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
spawn(5)
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
/obj/machinery/disposal/deliveryChute/New()
|
||||
..()
|
||||
spawn(5)
|
||||
trunk = locate() in loc
|
||||
if(trunk)
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
interact()
|
||||
return
|
||||
/obj/machinery/disposal/deliveryChute/interact()
|
||||
return
|
||||
|
||||
update()
|
||||
return
|
||||
/obj/machinery/disposal/deliveryChute/update()
|
||||
return
|
||||
|
||||
Bumped(var/atom/movable/AM) //Go straight into the chute
|
||||
if(istype(AM, /obj/item/projectile)) return
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
if(AM.loc.y != loc.y+1) return
|
||||
if(EAST)
|
||||
if(AM.loc.x != loc.x+1) return
|
||||
if(SOUTH)
|
||||
if(AM.loc.y != loc.y-1) return
|
||||
if(WEST)
|
||||
if(AM.loc.x != loc.x-1) return
|
||||
|
||||
if(istype(AM, /obj))
|
||||
var/obj/O = AM
|
||||
O.loc = src
|
||||
else if(istype(AM, /mob))
|
||||
var/mob/M = AM
|
||||
M.loc = src
|
||||
flush()
|
||||
/obj/machinery/disposal/deliveryChute/Bumped(var/atom/movable/AM) //Go straight into the chute
|
||||
if(istype(AM, /obj/item/projectile)) return
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
if(AM.loc.y != loc.y+1) return
|
||||
if(EAST)
|
||||
if(AM.loc.x != loc.x+1) return
|
||||
if(SOUTH)
|
||||
if(AM.loc.y != loc.y-1) return
|
||||
if(WEST)
|
||||
if(AM.loc.x != loc.x-1) return
|
||||
|
||||
if(istype(AM, /obj))
|
||||
var/obj/O = AM
|
||||
O.loc = src
|
||||
else if(istype(AM, /mob))
|
||||
var/mob/M = AM
|
||||
M.loc = src
|
||||
flush()
|
||||
flushing = 1
|
||||
flick("intake-closing", src)
|
||||
var/deliveryCheck = 0
|
||||
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
|
||||
// travels through the pipes.
|
||||
|
||||
/obj/machinery/disposal/deliveryChute/flush()
|
||||
flushing = 1
|
||||
flick("intake-closing", src)
|
||||
var/deliveryCheck = 0
|
||||
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
|
||||
// travels through the pipes.
|
||||
/* for(var/obj/structure/bigDelivery/O in src)
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0) //This auto-sorts package wrapped objects to disposals
|
||||
O.sortTag = 1 //Cargo techs can do this themselves with their taggers
|
||||
for(var/obj/item/smallDelivery/O in src) //With this disabled packages will loop back round and come out the mail chute
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0)
|
||||
O.sortTag = 1 */
|
||||
if(deliveryCheck == 0)
|
||||
H.destinationTag = 1
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0) //This auto-sorts package wrapped objects to disposals
|
||||
O.sortTag = 1 //Cargo techs can do this themselves with their taggers
|
||||
for(var/obj/item/smallDelivery/O in src) //With this disabled packages will loop back round and come out the mail chute
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0)
|
||||
O.sortTag = 1 */
|
||||
if(deliveryCheck == 0)
|
||||
H.destinationTag = 1
|
||||
|
||||
air_contents = new() // new empty gas resv.
|
||||
sleep(10)
|
||||
if((start_flush + 15) < world.time)
|
||||
start_flush = world.time
|
||||
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
|
||||
sleep(5) // wait for animation to finish
|
||||
|
||||
sleep(10)
|
||||
if((start_flush + 15) < world.time)
|
||||
start_flush = world.time
|
||||
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
|
||||
sleep(5) // wait for animation to finish
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
air_contents = new() // new empty gas resv.
|
||||
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
H.start(src) // start the holder processing movement
|
||||
flushing = 0
|
||||
// now reset disposal state
|
||||
flush = 0
|
||||
if(mode == 2) // if was ready,
|
||||
mode = 1 // switch to charging
|
||||
update()
|
||||
return
|
||||
|
||||
H.start(src) // start the holder processing movement
|
||||
flushing = 0
|
||||
// now reset disposal state
|
||||
flush = 0
|
||||
if(mode == 2) // if was ready,
|
||||
mode = 1 // switch to charging
|
||||
update()
|
||||
/obj/machinery/disposal/deliveryChute/attackby(var/obj/item/I, var/mob/user)
|
||||
if(!I || !user)
|
||||
return
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
if(!I || !user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(c_mode==0)
|
||||
c_mode=1
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the screws around the power connection.</span>"
|
||||
return
|
||||
else if(c_mode==1)
|
||||
c_mode=0
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You attach the screws around the power connection.</span>"
|
||||
return
|
||||
else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start slicing the floorweld off the delivery chute.</span>"
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "<span class='notice'>You sliced the floorweld off the delivery chute.</span>"
|
||||
var/obj/structure/disposalconstruct/C = new (loc)
|
||||
C.ptype = 8 // 8 = Delivery chute
|
||||
C.update()
|
||||
C.anchored = 1
|
||||
C.density = 1
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(c_mode==0)
|
||||
c_mode=1
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You remove the screws around the power connection.</span>"
|
||||
return
|
||||
else if(c_mode==1)
|
||||
c_mode=0
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
user << "<span class='notice'>You attach the screws around the power connection.</span>"
|
||||
return
|
||||
else if(istype(I,/obj/item/weapon/weldingtool) && c_mode==1)
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(loc, 'sound/items/Welder2.ogg', 100, 1)
|
||||
user << "<span class='notice'>You start slicing the floorweld off the delivery chute.</span>"
|
||||
if(do_after(user,20))
|
||||
if(!src || !W.isOn()) return
|
||||
user << "<span class='notice'>You sliced the floorweld off the delivery chute.</span>"
|
||||
var/obj/structure/disposalconstruct/C = new (loc)
|
||||
C.ptype = 8 // 8 = Delivery chute
|
||||
C.update()
|
||||
C.anchored = 1
|
||||
C.density = 1
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
return
|
||||
/obj/machinery/disposal/deliveryChute/process()
|
||||
return PROCESS_KILL
|
||||
Reference in New Issue
Block a user