code folder. 221 files changed wew
This commit is contained in:
@@ -118,9 +118,7 @@
|
||||
if(istype(I, /obj/item/crowbar))
|
||||
user.visible_message("<span class='notice'>[user] struggles to pry up \the [src] with \the [I].</span>", \
|
||||
"<span class='notice'>You struggle to pry up \the [src] with \the [I].</span>")
|
||||
if(do_after(user, 40*I.toolspeed, target = src))
|
||||
if(QDELETED(src))
|
||||
return //prevent multiple decontructs
|
||||
if(I.use_tool(src, user, 40, volume=40))
|
||||
if(!(stat & BROKEN))
|
||||
var/obj/item/conveyor_construct/C = new/obj/item/conveyor_construct(src.loc)
|
||||
C.id = id
|
||||
@@ -130,7 +128,7 @@
|
||||
|
||||
else if(istype(I, /obj/item/wrench))
|
||||
if(!(stat & BROKEN))
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
setDir(turn(dir,-45))
|
||||
update_move_direction()
|
||||
to_chat(user, "<span class='notice'>You rotate [src].</span>")
|
||||
|
||||
@@ -82,19 +82,17 @@
|
||||
if(!pressure_charging && !full_pressure && !flush)
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
panel_open = !panel_open
|
||||
playsound(get_turf(src), I.usesound, 50, 1)
|
||||
I.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You [panel_open ? "remove":"attach"] the screws around the power connection.</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/weldingtool) && panel_open)
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src.loc, 'sound/items/welder2.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
|
||||
if(do_after(user,20*I.toolspeed, target = src) && panel_open)
|
||||
if(!W.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
|
||||
deconstruct()
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start slicing the floorweld off \the [src]...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=100) && panel_open)
|
||||
to_chat(user, "<span class='notice'>You slice the floorweld off \the [src].</span>")
|
||||
deconstruct()
|
||||
return
|
||||
|
||||
if(user.a_intent != INTENT_HARM)
|
||||
|
||||
@@ -155,24 +155,21 @@
|
||||
anchored = TRUE
|
||||
density = initial(pipe_type.density)
|
||||
to_chat(user, "<span class='notice'>You attach the [pipename] to the underfloor.</span>")
|
||||
playsound(src, I.usesound, 100, 1)
|
||||
I.play_tool_sound(src, 100)
|
||||
update_icon()
|
||||
|
||||
else if(istype(I, /obj/item/weldingtool))
|
||||
if(anchored)
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start welding the [pipename] in place...</span>")
|
||||
if(do_after(user, 8*I.toolspeed, target = src))
|
||||
if(!loc || !W.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>The [pipename] has been welded in place.</span>")
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return
|
||||
|
||||
var/obj/O = new pipe_type(loc, src)
|
||||
transfer_fingerprints_to(O)
|
||||
to_chat(user, "<span class='notice'>You start welding the [pipename] in place...</span>")
|
||||
if(I.use_tool(src, user, 8, volume=50))
|
||||
to_chat(user, "<span class='notice'>The [pipename] has been welded in place.</span>")
|
||||
var/obj/O = new pipe_type(loc, src)
|
||||
transfer_fingerprints_to(O)
|
||||
|
||||
return
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need to attach it to the plating first!</span>")
|
||||
return
|
||||
|
||||
@@ -69,21 +69,16 @@
|
||||
H.vent_gas(T)
|
||||
qdel(H)
|
||||
|
||||
/obj/structure/disposaloutlet/welder_act(mob/living/user, obj/item/I)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
|
||||
/obj/structure/disposaloutlet/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.remove_fuel(0,user))
|
||||
playsound(src, 'sound/items/welder2.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start slicing the floorweld off [src]...</span>")
|
||||
if(do_after(user, 20*I.toolspeed, target = src))
|
||||
if(!W.isOn())
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You slice the floorweld off [src].</span>")
|
||||
stored.forceMove(loc)
|
||||
transfer_fingerprints_to(stored)
|
||||
stored = null
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
playsound(src, 'sound/items/welder2.ogg', 100, 1)
|
||||
to_chat(user, "<span class='notice'>You start slicing the floorweld off [src]...</span>")
|
||||
if(I.use_tool(src, user, 20))
|
||||
to_chat(user, "<span class='notice'>You slice the floorweld off [src].</span>")
|
||||
stored.forceMove(loc)
|
||||
transfer_fingerprints_to(stored)
|
||||
stored = null
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
@@ -141,26 +141,19 @@
|
||||
return ..()
|
||||
|
||||
|
||||
//attack by item
|
||||
//weldingtool: unfasten and convert to obj/disposalconstruct
|
||||
/obj/structure/disposalpipe/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
if(!can_be_deconstructed(user))
|
||||
return
|
||||
//welding tool: unfasten and convert to obj/disposalconstruct
|
||||
/obj/structure/disposalpipe/welder_act(mob/living/user, obj/item/I)
|
||||
if(!can_be_deconstructed(user))
|
||||
return TRUE
|
||||
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.remove_fuel(0, user))
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You start slicing [src]...</span>")
|
||||
// check if anything changed over 2 seconds
|
||||
if(do_after(user, 30*I.toolspeed, target = src))
|
||||
if(!W.isOn())
|
||||
return
|
||||
deconstruct()
|
||||
to_chat(user, "<span class='notice'>You slice [src].</span>")
|
||||
else
|
||||
return ..()
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
|
||||
to_chat(user, "<span class='notice'>You start slicing [src]...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
deconstruct()
|
||||
to_chat(user, "<span class='notice'>You slice [src].</span>")
|
||||
return TRUE
|
||||
|
||||
//checks if something is blocking the deconstruction (e.g. trunk with a bin still linked to it)
|
||||
/obj/structure/disposalpipe/proc/can_be_deconstructed()
|
||||
|
||||
Reference in New Issue
Block a user