code folder. 221 files changed wew
This commit is contained in:
@@ -653,14 +653,14 @@
|
||||
switch(buildstage)
|
||||
if(2)
|
||||
if(istype(W, /obj/item/wirecutters) && panel_open && wires.is_all_cut())
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
to_chat(user, "<span class='notice'>You cut the final wires.</span>")
|
||||
new /obj/item/stack/cable_coil(loc, 5)
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W, /obj/item/screwdriver)) // Opening that Air Alarm up.
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
panel_open = !panel_open
|
||||
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
|
||||
update_icon()
|
||||
@@ -674,8 +674,8 @@
|
||||
if(istype(W, /obj/item/crowbar))
|
||||
user.visible_message("[user.name] removes the electronics from [src.name].",\
|
||||
"<span class='notice'>You start prying out the circuit...</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
if (do_after(user, 20*W.toolspeed, target = src))
|
||||
W.play_tool_sound(src)
|
||||
if (W.use_tool(src, user, 20))
|
||||
if (buildstage == 1)
|
||||
to_chat(user, "<span class='notice'>You remove the air alarm electronics.</span>")
|
||||
new /obj/item/electronics/airalarm( src.loc )
|
||||
@@ -725,7 +725,7 @@
|
||||
|
||||
if(istype(W, /obj/item/wrench))
|
||||
to_chat(user, "<span class='notice'>You detach \the [src] from the wall.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
new /obj/item/wallframe/airalarm( user.loc )
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -183,39 +183,44 @@ Pipelines + Other Objects -> Pipe network
|
||||
if(user.dropItemToGround(pipe))
|
||||
pipe.setPipingLayer(piping_layer) //align it with us
|
||||
return TRUE
|
||||
if(istype(W, /obj/item/wrench))
|
||||
if(can_unwrench(user))
|
||||
var/turf/T = get_turf(src)
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
|
||||
return TRUE
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
add_fingerprint(user)
|
||||
|
||||
var/unsafe_wrenching = FALSE
|
||||
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
|
||||
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (internal_pressure > 2*ONE_ATMOSPHERE)
|
||||
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
|
||||
unsafe_wrenching = TRUE //Oh dear oh dear
|
||||
|
||||
if (do_after(user, 20*W.toolspeed, target = src) && !QDELETED(src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You unfasten \the [src].</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
|
||||
//You unwrenched a pipe full of pressure? Let's splat you into the wall, silly.
|
||||
if(unsafe_wrenching)
|
||||
unsafe_pressure_release(user, internal_pressure)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/wrench_act(mob/living/user, obj/item/I)
|
||||
if(!can_unwrench(user))
|
||||
return TRUE
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first!</span>")
|
||||
return TRUE
|
||||
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
add_fingerprint(user)
|
||||
|
||||
var/unsafe_wrenching = FALSE
|
||||
var/internal_pressure = int_air.return_pressure()-env_air.return_pressure()
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
|
||||
if (internal_pressure > 2*ONE_ATMOSPHERE)
|
||||
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gush of air blows in your face... maybe you should reconsider?</span>")
|
||||
unsafe_wrenching = TRUE //Oh dear oh dear
|
||||
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You unfasten \the [src].</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", INVESTIGATE_ATMOS)
|
||||
|
||||
//You unwrenched a pipe full of pressure? Let's splat you into the wall, silly.
|
||||
if(unsafe_wrenching)
|
||||
unsafe_pressure_release(user, internal_pressure)
|
||||
deconstruct(TRUE)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/proc/can_unwrench(mob/user)
|
||||
return can_unwrench
|
||||
|
||||
@@ -345,8 +350,6 @@ Pipelines + Other Objects -> Pipe network
|
||||
return list()
|
||||
|
||||
/obj/machinery/atmospherics/update_remote_sight(mob/user)
|
||||
// if(isborer(user))
|
||||
// user.sight |= (SEE_PIXELS)
|
||||
user.sight |= (SEE_TURFS|BLIND)
|
||||
|
||||
//Used for certain children of obj/machinery/atmospherics to not show pipe vision when mob is inside it.
|
||||
|
||||
@@ -269,28 +269,21 @@
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0, user))
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
|
||||
if(do_after(user, W.toolspeed * 20, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the vent shut.", "<span class='notice'>You weld the vent shut.</span>", "<span class='italics'>You hear welding.</span>")
|
||||
welded = TRUE
|
||||
else
|
||||
user.visible_message("[user] unwelds the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/welder_act(mob/living/user, obj/item/I)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You begin welding the vent...</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the vent shut.", "<span class='notice'>You weld the vent shut.</span>", "<span class='italics'>You hear welding.</span>")
|
||||
welded = TRUE
|
||||
else
|
||||
user.visible_message("[user] unwelds the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_pump/can_unwrench(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -263,28 +263,21 @@
|
||||
..()
|
||||
update_icon_nopipes()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0,user))
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
|
||||
if(do_after(user, 20*W.toolspeed, target = src))
|
||||
if(!src || !WT.isOn())
|
||||
return
|
||||
playsound(src.loc, 'sound/items/welder2.ogg', 50, 1)
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the scrubber shut.","You weld the scrubber shut.", "You hear welding.")
|
||||
welded = TRUE
|
||||
else
|
||||
user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
return 0
|
||||
else
|
||||
return ..()
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/welder_act(mob/living/user, obj/item/I)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>Now welding the scrubber.</span>")
|
||||
if(I.use_tool(src, user, 20, volume=50))
|
||||
if(!welded)
|
||||
user.visible_message("[user] welds the scrubber shut.","You weld the scrubber shut.", "You hear welding.")
|
||||
welded = TRUE
|
||||
else
|
||||
user.visible_message("[user] unwelds the scrubber.", "You unweld the scrubber.", "You hear welding.")
|
||||
welded = FALSE
|
||||
update_icon()
|
||||
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
|
||||
pipe_vision_img.plane = ABOVE_HUD_PLANE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_unwrench(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -100,19 +100,20 @@
|
||||
to_chat(user, status())
|
||||
|
||||
|
||||
/obj/machinery/meter/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/wrench))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (do_after(user, 40*W.toolspeed, target = src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You unfasten \the [src].</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
new /obj/item/pipe_meter(loc)
|
||||
qdel(src)
|
||||
else
|
||||
return ..()
|
||||
/obj/machinery/meter/wrench_act(mob/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You begin to unfasten \the [src]...</span>")
|
||||
if (I.use_tool(src, user, 40, volume=50))
|
||||
user.visible_message(
|
||||
"[user] unfastens \the [src].",
|
||||
"<span class='notice'>You unfasten \the [src].</span>",
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
deconstruct()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/meter/deconstruct(disassembled = TRUE)
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
new /obj/item/pipe_meter(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/meter/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
@@ -131,8 +132,7 @@
|
||||
/obj/machinery/meter/singularity_pull(S, current_size)
|
||||
..()
|
||||
if(current_size >= STAGE_FIVE)
|
||||
new /obj/item/pipe_meter(loc)
|
||||
qdel(src)
|
||||
deconstruct()
|
||||
|
||||
// TURF METER - REPORTS A TILE'S AIR CONTENTS
|
||||
// why are you yelling?
|
||||
|
||||
@@ -278,21 +278,20 @@
|
||||
new /obj/item/stack/sheet/metal (loc, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/attackby(obj/item/W, mob/user, params)
|
||||
if(user.a_intent != INTENT_HARM && istype(W, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/WT = W
|
||||
if(stat & BROKEN)
|
||||
if(!WT.remove_fuel(0, user))
|
||||
return
|
||||
playsound(loc, WT.usesound, 40, 1)
|
||||
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
|
||||
if(do_after(user, 30, target = src))
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
|
||||
return 1
|
||||
/obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/item/I)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return FALSE
|
||||
|
||||
if(stat & BROKEN)
|
||||
if(!I.tool_start_check(user, amount=0))
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You begin cutting [src] apart...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=50))
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
return ..()
|
||||
to_chat(user, "<span class='notice'>You cannot slice [src] apart when it isn't broken.</span>")
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
|
||||
if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
if(!(stat & BROKEN))
|
||||
if(connected_port)
|
||||
disconnect()
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
user.visible_message( \
|
||||
"[user] disconnects [src].", \
|
||||
"<span class='notice'>You unfasten [src] from the port.</span>", \
|
||||
@@ -107,7 +107,7 @@
|
||||
if(!connect(possible_port))
|
||||
to_chat(user, "<span class='notice'>[name] failed to connect to the port.</span>")
|
||||
return
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
W.play_tool_sound(src)
|
||||
user.visible_message( \
|
||||
"[user] connects [src].", \
|
||||
"<span class='notice'>You fasten [src] to the port.</span>", \
|
||||
|
||||
Reference in New Issue
Block a user