Merge remote-tracking branch 'origin/master' into rustsql
This commit is contained in:
@@ -117,12 +117,6 @@
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
|
||||
//callback proc used on stacks use_tool to stop unnecessary amounts being wasted from spam clicking.
|
||||
/obj/structure/frame/computer/proc/check_state(target_state)
|
||||
if(state == target_state)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/frame/computer/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(state == 4)
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
circuit = null
|
||||
qdel(src)
|
||||
|
||||
//callback proc used on stacks use_tool to stop unnecessary amounts being wasted from spam clicking.
|
||||
/obj/structure/frame/proc/check_state(target_state)
|
||||
if(state == target_state)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/frame/machine
|
||||
name = "machine frame"
|
||||
@@ -84,7 +89,7 @@
|
||||
if(!P.tool_start_check(user, amount=5))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start to add cables to the frame...</span>")
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5))
|
||||
if(P.use_tool(src, user, 20, volume=50, amount=5, extra_checks = CALLBACK(src, .proc/check_state, 1)))
|
||||
to_chat(user, "<span class='notice'>You add cables to the frame.</span>")
|
||||
state = 2
|
||||
icon_state = "box_1"
|
||||
@@ -93,25 +98,23 @@
|
||||
if(P.tool_behaviour == TOOL_SCREWDRIVER && !anchored)
|
||||
user.visible_message("<span class='warning'>[user] disassembles the frame.</span>", \
|
||||
"<span class='notice'>You start to disassemble the frame...</span>", "You hear banging and clanking.")
|
||||
if(P.use_tool(src, user, 40, volume=50))
|
||||
if(state == 1)
|
||||
to_chat(user, "<span class='notice'>You disassemble the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 5)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
if(P.use_tool(src, user, 40, volume=50, extra_checks = CALLBACK(src, .proc/check_state, 1)))
|
||||
to_chat(user, "<span class='notice'>You disassemble the frame.</span>")
|
||||
var/obj/item/stack/sheet/metal/M = new (loc, 5)
|
||||
M.add_fingerprint(user)
|
||||
qdel(src)
|
||||
return
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
if(state == 1)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
setAnchored(!anchored)
|
||||
if(P.use_tool(src, user, 40, volume=75, extra_checks = CALLBACK(src, .proc/check_state, 1)))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
setAnchored(!anchored)
|
||||
return
|
||||
|
||||
if(2)
|
||||
if(P.tool_behaviour == TOOL_WRENCH)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
if(P.use_tool(src, user, 40, volume=75, extra_checks = CALLBACK(src, .proc/check_state, 2)))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
setAnchored(!anchored)
|
||||
return
|
||||
@@ -169,7 +172,7 @@
|
||||
|
||||
if(P.tool_behaviour == TOOL_WRENCH && !circuit.needs_anchored)
|
||||
to_chat(user, "<span class='notice'>You start [anchored ? "un" : ""]securing [name]...</span>")
|
||||
if(P.use_tool(src, user, 40, volume=75))
|
||||
if(P.use_tool(src, user, 40, volume=75, extra_checks = CALLBACK(src, .proc/check_state, 3)))
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>")
|
||||
setAnchored(!anchored)
|
||||
return
|
||||
|
||||
@@ -1062,7 +1062,7 @@
|
||||
to_chat(user, "<span class='warning'>The airlock's motors resist your efforts to force it!</span>")
|
||||
else if(locked)
|
||||
to_chat(user, "<span class='warning'>The airlock's bolts prevent it from being forced!</span>")
|
||||
else if( !welded && !operating)
|
||||
else if(!welded && !operating)
|
||||
if(!beingcrowbarred) //being fireaxe'd
|
||||
var/obj/item/fireaxe/axe = I
|
||||
if(!axe.wielded)
|
||||
@@ -1073,6 +1073,8 @@
|
||||
INVOKE_ASYNC(src, (density ? .proc/open : .proc/close), 2)
|
||||
|
||||
if(I.tool_behaviour == TOOL_CROWBAR)
|
||||
if(!I.can_force_powered)
|
||||
return
|
||||
if(hasPower() && isElectrified())
|
||||
shock(user,100)//it's like sticking a forck in a power socket
|
||||
return
|
||||
|
||||
@@ -116,6 +116,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/buffer = null
|
||||
var/show_wires = FALSE
|
||||
var/datum/integrated_io/selected_io = null //functional for integrated circuits.
|
||||
//Special crowbar
|
||||
var/can_force_powered = FALSE
|
||||
|
||||
var/reach = 1 //In tiles, how far this weapon can reach; 1 for adjacent, which is default
|
||||
|
||||
|
||||
@@ -771,7 +771,10 @@
|
||||
|
||||
/obj/item/nullrod/tribal_knife/process()
|
||||
slowdown = rand(-2, 2)
|
||||
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/wielder = loc
|
||||
if(wielder.is_holding(src))
|
||||
wielder.update_equipment_speed_mods()
|
||||
|
||||
/obj/item/nullrod/pitchfork
|
||||
icon_state = "pitchfork0"
|
||||
|
||||
@@ -88,6 +88,7 @@
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 15
|
||||
toolspeed = 0.25
|
||||
can_force_powered = TRUE
|
||||
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src], it looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
|
||||
Reference in New Issue
Block a user