This commit is contained in:
Putnam
2021-03-02 01:33:22 -08:00
62 changed files with 470 additions and 132 deletions
+2 -1
View File
@@ -44,7 +44,8 @@
icon_state = "colormate"
/obj/machinery/gear_painter/Destroy()
inserted.forceMove(drop_location())
if(inserted) //please i beg you do not drop nulls
inserted.forceMove(drop_location())
return ..()
/obj/machinery/gear_painter/attackby(obj/item/I, mob/living/user)
@@ -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)
+16 -13
View File
@@ -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
+4 -1
View File
@@ -122,7 +122,10 @@
/obj/item/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
src.pai = personality
src.add_overlay("pai-null")
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
var/policy = policies[POLICYCONFIG_PAI]
if(policy)
to_chat(personality, policy)
playsound(loc, 'sound/effects/pai_boot.ogg', 50, 1, -1)
audible_message("\The [src] plays a cheerful startup noise!")
+4 -1
View File
@@ -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"