procs
This commit is contained in:
@@ -259,7 +259,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
I.play_tool_sound(src, 75)
|
||||
if(state == WINDOW_SCREWED_TO_FRAME || state == WINDOW_IN_FRAME && anchored)
|
||||
to_chat(user, "<span class='notice'>You begin to [state == WINDOW_SCREWED_TO_FRAME ? "unscrew the window from":"screw the window to"] the frame...</span>")
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
if(extra_reinforced && state == WINDOW_IN_FRAME)
|
||||
state = PRWINDOW_SECURE
|
||||
else
|
||||
@@ -267,7 +267,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
to_chat(user, "<span class='notice'>You [state == WINDOW_IN_FRAME ? "unfasten the window from":"fasten the window to"] the frame.</span>")
|
||||
else if(state == WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You begin to [anchored ? "unscrew the frame from":"screw the frame to"] the floor...</span>")
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
setAnchored(!anchored)
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "fasten the frame to":"unfasten the frame from"] the floor.</span>")
|
||||
return
|
||||
@@ -276,7 +276,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
else if(I.tool_behaviour == TOOL_CROWBAR && reinf && (state == WINDOW_OUT_OF_FRAME || state == WINDOW_IN_FRAME) && anchored)
|
||||
to_chat(user, "<span class='notice'>You begin to lever the window [state == WINDOW_OUT_OF_FRAME ? "into":"out of"] the frame...</span>")
|
||||
I.play_tool_sound(src, 75)
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
state = (state == WINDOW_OUT_OF_FRAME ? WINDOW_IN_FRAME : WINDOW_OUT_OF_FRAME)
|
||||
to_chat(user, "<span class='notice'>You pry the window [state == WINDOW_IN_FRAME ? "into":"out of"] the frame.</span>")
|
||||
return
|
||||
@@ -284,7 +284,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
else if(I.tool_behaviour == TOOL_WRENCH && !anchored)
|
||||
I.play_tool_sound(src, 75)
|
||||
to_chat(user, "<span class='notice'> You begin to disassemble [src]...</span>")
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, .proc/check_state_and_anchored, state, anchored)))
|
||||
if(I.use_tool(src, user, decon_speed, extra_checks = CALLBACK(src, PROC_REF(check_state_and_anchored), state, anchored)))
|
||||
var/obj/item/stack/sheet/G = new glass_type(user.loc, glass_amount)
|
||||
G.add_fingerprint(user)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
@@ -302,7 +302,7 @@ GLOBAL_LIST_EMPTY(electrochromatic_window_lookup)
|
||||
if(I.use_tool(src, user, 180, volume = 100))
|
||||
to_chat(user, "<span class='notice'>The security bolts are glowing white hot and look ready to be removed.</span>")
|
||||
state = PRWINDOW_BOLTS_HEATED
|
||||
addtimer(CALLBACK(src, .proc/cool_bolts), 300)
|
||||
addtimer(CALLBACK(src, PROC_REF(cool_bolts)), 300)
|
||||
return
|
||||
else
|
||||
if(I.tool_behaviour == TOOL_SCREWDRIVER)
|
||||
|
||||
Reference in New Issue
Block a user