code folder. 221 files changed wew

This commit is contained in:
deathride58
2018-02-12 21:03:40 -05:00
parent e3ad2643b2
commit 72ff7be9bd
221 changed files with 2797 additions and 2172 deletions
@@ -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)