Merge pull request #13036 from Citinited/moar-bugfixes

Some bugfixes
This commit is contained in:
variableundefined
2020-03-01 15:40:41 -05:00
committed by GitHub
9 changed files with 69 additions and 49 deletions
+11 -11
View File
@@ -1034,6 +1034,17 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/try_to_crowbar(mob/living/user, obj/item/I) //*scream
if(operating)
return
if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific //FUCK YOU
var/obj/item/twohanded/fireaxe/F = I
if(F.wielded)
spawn(0)
if(density)
open(1)
else
close(1)
else
to_chat(user, "<span class='warning'>You need to be wielding the fire axe to do that!</span>")
return
var/beingcrowbarred = FALSE
if(I.tool_behaviour == TOOL_CROWBAR && I.tool_use_check(user, 0))
beingcrowbarred = TRUE
@@ -1049,17 +1060,6 @@ About the new airlock wires panel:
if(locked)
to_chat(user, "<span class='warning'>The airlock's bolts prevent it from being forced!</span>")
return
if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific //FUCK YOU
var/obj/item/twohanded/fireaxe/F = I
if(F.wielded)
spawn(0)
if(density)
open(1)
else
close(1)
else
to_chat(user, "<span class='warning'>You need to be wielding the fire axe to do that!</span>")
return
else if(!arePowerSystemsOn())
spawn(0)
if(density)
+3 -3
View File
@@ -185,12 +185,12 @@
/obj/machinery/door/proc/unrestricted_side(mob/M) //Allows for specific side of airlocks to be unrestrected (IE, can exit maint freely, but need access to enter)
return get_dir(src, M) & unres_sides
/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
/obj/machinery/door/proc/try_to_crowbar(mob/user, obj/item/I)
return
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
if(user.a_intent != INTENT_HARM && istype(I, /obj/item/twohanded/fireaxe))
try_to_crowbar(I, user)
try_to_crowbar(user, I)
return 1
else if(!(I.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
try_to_activate_door(user)
@@ -206,7 +206,7 @@
return
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
try_to_crowbar(I, user)
try_to_crowbar(user, I)
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
. = ..()
+2 -2
View File
@@ -302,9 +302,9 @@
qdel(src)
else
try_to_crowbar(I, user)
try_to_crowbar(user, I)
/obj/machinery/door/window/try_to_crowbar(obj/item/I, mob/user)
/obj/machinery/door/window/try_to_crowbar(mob/user, obj/item/I)
if(!hasPower())
if(density)
open(2)
@@ -535,7 +535,7 @@
if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door
return
var/obj/machinery/door/D = target //the door we want to open
D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function
D.try_to_crowbar(chassis.occupant, src)//use the door's crowbar function
if(isliving(target)) //interact with living beings
var/mob/living/M = target
if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not.
+4 -1
View File
@@ -250,7 +250,7 @@
var/turf/simulated/floor/F = src
F.burn_tile()
F.icon_state = "wall_thermite"
F.icon_state = "plating"
if(user)
to_chat(user, "<span class='warning'>The thermite starts melting through the wall.</span>")
@@ -329,6 +329,9 @@
/turf/simulated/wall/welder_act(mob/user, obj/item/I)
. = TRUE
if(thermite && I.use_tool(src, user, volume = I.tool_volume))
thermitemelt(user)
return
if(rotting)
if(I.use_tool(src, user, volume = I.tool_volume))
for(var/obj/effect/overlay/wall_rot/WR in src)
@@ -93,6 +93,9 @@
return ..()
/turf/simulated/wall/r_wall/welder_act(mob/user, obj/item/I)
if(thermite && I.use_tool(src, user, volume = I.tool_volume))
thermitemelt(user)
return TRUE
if(!(d_state in list(RWALL_COVER, RWALL_SUPPORT_RODS, RWALL_CUT_COVER)))
return ..()
. = TRUE
@@ -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/can_deconstruct = FALSE
/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
can_deconstruct = !can_deconstruct
to_chat(user, "You [can_deconstruct ? "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(!can_deconstruct)
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 (loc)
C.ptype = deconstructs_to
C.update()
C.anchored = TRUE
C.density = TRUE
qdel(src)
/obj/item/shippingPackage
name = "Shipping package"