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 ..()
|
||||
|
||||
@@ -77,10 +77,16 @@ field_generator power level display
|
||||
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first!</span>")
|
||||
|
||||
/obj/machinery/field/generator/can_be_unfasten_wrench(mob/user, silent)
|
||||
if(state == FG_WELDED)
|
||||
if(active)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
|
||||
return FAILED_UNFASTEN
|
||||
|
||||
else if(state == FG_WELDED)
|
||||
if(!silent)
|
||||
to_chat(user, "<span class='warning'>[src] is welded to the floor!</span>")
|
||||
return FAILED_UNFASTEN
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/field/generator/default_unfasten_wrench(mob/user, obj/item/wrench/W, time = 20)
|
||||
@@ -91,41 +97,41 @@ field_generator power level display
|
||||
else
|
||||
state = FG_UNSECURED
|
||||
|
||||
/obj/machinery/field/generator/attackby(obj/item/W, mob/user, params)
|
||||
/obj/machinery/field/generator/wrench_act(mob/living/user, obj/item/I)
|
||||
default_unfasten_wrench(user, I, 0)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/field/generator/welder_act(mob/living/user, obj/item/I)
|
||||
if(active)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be off!</span>")
|
||||
return
|
||||
else if(istype(W, /obj/item/wrench))
|
||||
default_unfasten_wrench(user, W, 0)
|
||||
return TRUE
|
||||
|
||||
else if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
switch(state)
|
||||
if(FG_UNSECURED)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor!</span>")
|
||||
switch(state)
|
||||
if(FG_UNSECURED)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor!</span>")
|
||||
|
||||
if(FG_SECURED)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("[user] starts to weld [src] 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) && state == FG_SECURED && WT.isOn())
|
||||
state = FG_WELDED
|
||||
to_chat(user, "<span class='notice'>You weld the field generator to the floor.</span>")
|
||||
if(FG_SECURED)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
user.visible_message("[user] starts to weld [src] 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 == FG_SECURED)
|
||||
state = FG_WELDED
|
||||
to_chat(user, "<span class='notice'>You weld the field generator to the floor.</span>")
|
||||
|
||||
if(FG_WELDED)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 50, 1)
|
||||
user.visible_message("[user] starts to cut [src] 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) && state == FG_WELDED && WT.isOn())
|
||||
state = FG_SECURED
|
||||
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
|
||||
if(FG_WELDED)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
user.visible_message("[user] starts to cut [src] 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 == FG_WELDED)
|
||||
state = FG_SECURED
|
||||
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
|
||||
|
||||
return TRUE
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/M)
|
||||
if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
switch(construction_state)
|
||||
if(PA_CONSTRUCTION_UNSECURED)
|
||||
if(istype(W, /obj/item/wrench) && !isinspace())
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
W.play_tool_sound(src, 75)
|
||||
anchored = TRUE
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
@@ -73,7 +73,7 @@
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_UNWIRED)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
W.play_tool_sound(src, 75)
|
||||
anchored = FALSE
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
|
||||
@@ -270,7 +270,7 @@
|
||||
switch(construction_state)
|
||||
if(PA_CONSTRUCTION_UNSECURED)
|
||||
if(istype(W, /obj/item/wrench) && !isinspace())
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
W.play_tool_sound(src, 75)
|
||||
anchored = TRUE
|
||||
user.visible_message("[user.name] secures the [name] to the floor.", \
|
||||
"You secure the external bolts.")
|
||||
@@ -278,7 +278,7 @@
|
||||
did_something = TRUE
|
||||
if(PA_CONSTRUCTION_UNWIRED)
|
||||
if(istype(W, /obj/item/wrench))
|
||||
playsound(loc, W.usesound, 75, 1)
|
||||
W.play_tool_sound(src, 75)
|
||||
anchored = FALSE
|
||||
user.visible_message("[user.name] detaches the [name] from the floor.", \
|
||||
"You remove the external bolts.")
|
||||
|
||||
Reference in New Issue
Block a user