code folder. 221 files changed wew
This commit is contained in:
@@ -207,10 +207,16 @@
|
||||
return P
|
||||
|
||||
/obj/machinery/power/emitter/can_be_unfasten_wrench(mob/user, silent)
|
||||
if(state == EM_WELDED)
|
||||
if(active)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
|
||||
return FAILED_UNFASTEN
|
||||
|
||||
else if(state == EM_WELDED)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[src] is welded to the floor!</span>")
|
||||
return FAILED_UNFASTEN
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
|
||||
@@ -221,45 +227,52 @@
|
||||
else
|
||||
state = EM_UNSECURED
|
||||
|
||||
/obj/machinery/power/emitter/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
|
||||
return
|
||||
default_unfasten_wrench(user, W, 0)
|
||||
return
|
||||
/obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/I)
|
||||
default_unfasten_wrench(user, I, 0)
|
||||
return TRUE
|
||||
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(active)
|
||||
to_chat(user, "Turn \the [src] off first.")
|
||||
return
|
||||
switch(state)
|
||||
if(EM_UNSECURED)
|
||||
to_chat(user, "<span class='warning'>The [src.name] needs to be wrenched to the floor!</span>")
|
||||
if(EM_SECURED)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("[user.name] starts to weld the [name] to the floor.", \
|
||||
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20*W.toolspeed, target = src) && WT.isOn())
|
||||
state = EM_WELDED
|
||||
to_chat(user, "<span class='notice'>You weld \the [src] to the floor.</span>")
|
||||
connect_to_network()
|
||||
if(EM_WELDED)
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("[user.name] starts to cut the [name] free from the floor.", \
|
||||
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(do_after(user,20*W.toolspeed, target = src) && WT.isOn())
|
||||
state = EM_SECURED
|
||||
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
|
||||
disconnect_from_network()
|
||||
return
|
||||
/obj/machinery/power/emitter/welder_act(mob/living/user, obj/item/I)
|
||||
if(active)
|
||||
to_chat(user, "Turn \the [src] off first.")
|
||||
return TRUE
|
||||
|
||||
if(W.GetID())
|
||||
switch(state)
|
||||
if(EM_UNSECURED)
|
||||
to_chat(user, "<span class='warning'>The [src.name] needs to be wrenched to the floor!</span>")
|
||||
if(EM_SECURED)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
user.visible_message("[user.name] starts to weld the [name] to the floor.", \
|
||||
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
state = EM_WELDED
|
||||
to_chat(user, "<span class='notice'>You weld \the [src] to the floor.</span>")
|
||||
connect_to_network()
|
||||
if(EM_WELDED)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
user.visible_message("[user.name] starts to cut the [name] free from the floor.", \
|
||||
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
|
||||
"<span class='italics'>You hear welding.</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
state = EM_SECURED
|
||||
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
|
||||
disconnect_from_network()
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/emitter/crowbar_act(mob/living/user, obj/item/I)
|
||||
default_deconstruction_crowbar(I)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/emitter/screwdriver_act(mob/living/user, obj/item/I)
|
||||
default_deconstruction_screwdriver(user, "emitter_open", "emitter", I)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/power/emitter/attackby(obj/item/I, mob/user, params)
|
||||
if(I.GetID())
|
||||
if(obj_flags & EMAGGED)
|
||||
to_chat(user, "<span class='warning'>The lock seems to be broken!</span>")
|
||||
return
|
||||
@@ -273,20 +286,11 @@
|
||||
to_chat(user, "<span class='danger'>Access denied.</span>")
|
||||
return
|
||||
|
||||
if(is_wire_tool(W) && panel_open)
|
||||
else if(is_wire_tool(I) && panel_open)
|
||||
wires.interact(user)
|
||||
return
|
||||
|
||||
if(default_deconstruction_screwdriver(user, "emitter_open", "emitter", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_pry_open(W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(W))
|
||||
else if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user