Some bugfixes

This commit is contained in:
Citinited
2020-02-27 21:02:09 +00:00
parent 384a3f7279
commit 04217a1e2c
5 changed files with 52 additions and 32 deletions
@@ -198,6 +198,7 @@
if(!S.reagents)
S.create_reagents(volume)
S.reagents.add_reagent("thermite", volume)
S.thermite = TRUE
S.overlays.Cut()
S.overlays = image('icons/effects/effects.dmi', icon_state = "thermite")
if(S.active_hotspot)
+20 -16
View File
@@ -27,7 +27,7 @@
var/flush_count = 0 //this var adds 1 once per tick. When it reaches flush_every_ticks it resets and tries to flush.
var/last_sound = 0
var/required_mode_to_deconstruct = -1
var/deconstructs_to = PIPE_DISPOSALS_CHUTE
var/deconstructs_to = PIPE_DISPOSALS_BIN
active_power_usage = 600
idle_power_usage = 100
@@ -98,21 +98,7 @@
return
src.add_fingerprint(user)
if(mode<=0) // It's off
if(istype(I, /obj/item/screwdriver))
if(contents.len > 0)
to_chat(user, "Eject the items first!")
return
if(mode==0) // It's off but still not unscrewed
mode=-1 // Set it to doubleoff l0l
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "You remove the screws around the power connection.")
return
else if(mode==-1)
mode=0
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "You attach the screws around the power connection.")
return
if(istype(I, /obj/item/melee/energy/blade))
to_chat(user, "You can't place that item inside the disposal unit.")
return
@@ -158,6 +144,24 @@
update()
/obj/machinery/disposal/screwdriver_act(mob/user, obj/item/I)
if(mode>0) // It's on
return
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
if(contents.len > 0)
to_chat(user, "Eject the items first!")
return
if(mode==0) // It's off but still not unscrewed
mode=-1 // Set it to doubleoff l0l
else if(mode==-1)
mode=0
to_chat(user, "You [mode ? "unfasten": "fasten"] the screws around the power connection.")
/obj/machinery/disposal/welder_act(mob/user, obj/item/I)
. = TRUE
if(mode != required_mode_to_deconstruct)
+24 -15
View File
@@ -273,8 +273,7 @@
icon_state = "intake"
required_mode_to_deconstruct = 1
deconstructs_to = PIPE_DISPOSALS_CHUTE
var/c_mode = 0
var/c_mode = 0 //1 = we can deconstruct, 0 means we cannot
/obj/machinery/disposal/deliveryChute/New()
..()
@@ -345,21 +344,31 @@
update()
return
/obj/machinery/disposal/deliveryChute/attackby(obj/item/I, mob/user, params)
if(!I || !user)
/obj/machinery/disposal/deliveryChute/screwdriver_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
c_mode = !c_mode
to_chat(user, "You [c_mode ? "unfasten": "fasten"] the screws around the power connection.")
if(istype(I, /obj/item/screwdriver))
if(c_mode==0)
c_mode=1
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "You remove the screws around the power connection.")
return
else if(c_mode==1)
c_mode=0
playsound(src.loc, I.usesound, 50, 1)
to_chat(user, "You attach the screws around the power connection.")
return
/obj/machinery/disposal/deliveryChute/welder_act(mob/user, obj/item/I)
. = TRUE
if(!c_mode)
return
if(contents.len > 0)
to_chat(user, "Eject the items first!")
return
if(!I.tool_use_check(user, 0))
return
WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE
if(I.use_tool(src, user, 20, volume = I.tool_volume))
WELDER_FLOOR_SLICE_SUCCESS_MESSAGE
var/obj/structure/disposalconstruct/C = new (src.loc)
C.ptype = deconstructs_to
C.update()
C.anchored = 1
C.density = 1
qdel(src)
/obj/item/shippingPackage
name = "Shipping package"