mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Atmos fixes
This commit is contained in:
@@ -145,7 +145,7 @@ Pipelines + Other Objects -> Pipe network
|
||||
/obj/machinery/atmospherics/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
if(can_unwrench && istype(W, /obj/item/weapon/wrench))
|
||||
var/turf/T = get_turf(src)
|
||||
if (level==1 && isturf(T) && T.intact)
|
||||
if (level == 1 && isturf(T) && T.intact)
|
||||
user << "<span class='danger'>You must remove the plating first.</span>"
|
||||
return 1
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// Uses no power but can not transfer gases from a low pressure area to a high pressure area
|
||||
icon = 'icons/atmos/passive_gate.dmi'
|
||||
icon_state = "map"
|
||||
level = 1
|
||||
|
||||
name = "passive gate"
|
||||
desc = "A one-way air valve that does not require power"
|
||||
|
||||
@@ -15,8 +15,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/binary/pump
|
||||
icon = 'icons/atmos/pump.dmi'
|
||||
icon_state = "map_off"
|
||||
level = 1
|
||||
|
||||
|
||||
name = "gas pump"
|
||||
desc = "A pump"
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
desc = "A pipe valve"
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
level = 1
|
||||
|
||||
var/open = 0
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/binary/volume_pump
|
||||
icon = 'icons/atmos/volume_pump.dmi'
|
||||
icon_state = "map_off"
|
||||
level = 1
|
||||
|
||||
name = "volumetric gas pump"
|
||||
desc = "A volumetric pump"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
icon_state = "base"
|
||||
use_power = 1
|
||||
initialize_directions = 0
|
||||
level = 1
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/obj/machinery/atmospherics/trinary/filter
|
||||
icon = 'icons/atmos/filter.dmi'
|
||||
icon_state = "map"
|
||||
density = 0
|
||||
level = 1
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
@@ -26,7 +24,7 @@ Filter types:
|
||||
var/frequency = 0
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/flipped
|
||||
/obj/machinery/atmospherics/trinary/filter/flipped
|
||||
icon_state = "mmap"
|
||||
flipped = 1
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/obj/machinery/atmospherics/trinary/mixer
|
||||
icon = 'icons/atmos/mixer.dmi'
|
||||
icon_state = "map"
|
||||
density = 0
|
||||
level = 1
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
|
||||
@@ -21,15 +21,28 @@
|
||||
|
||||
/obj/machinery/atmospherics/trinary/New()
|
||||
..()
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = EAST|NORTH|SOUTH
|
||||
if(SOUTH)
|
||||
initialize_directions = SOUTH|WEST|NORTH
|
||||
if(EAST)
|
||||
initialize_directions = EAST|WEST|SOUTH
|
||||
if(WEST)
|
||||
initialize_directions = WEST|NORTH|EAST
|
||||
|
||||
if(!flipped)
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = EAST|NORTH|SOUTH
|
||||
if(SOUTH)
|
||||
initialize_directions = SOUTH|WEST|NORTH
|
||||
if(EAST)
|
||||
initialize_directions = EAST|WEST|SOUTH
|
||||
if(WEST)
|
||||
initialize_directions = WEST|NORTH|EAST
|
||||
else
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
initialize_directions = SOUTH|NORTH|WEST
|
||||
if(SOUTH)
|
||||
initialize_directions = NORTH|SOUTH|EAST
|
||||
if(EAST)
|
||||
initialize_directions = WEST|EAST|NORTH
|
||||
if(WEST)
|
||||
initialize_directions = EAST|WEST|SOUTH
|
||||
|
||||
air1 = new
|
||||
air2 = new
|
||||
air3 = new
|
||||
@@ -65,6 +78,10 @@
|
||||
//Node 2 is filtered output
|
||||
//Node 3 is rest output
|
||||
//If we flip the filter, 1 and 3 shall exchange positions
|
||||
|
||||
if(can_unwrench) // Overridden here to avoid having to snowflake the flipped/icon_state on the construction
|
||||
qdel(stored)
|
||||
stored = new(src, make_from = src)
|
||||
|
||||
var/node1_connect = turn(dir, -180)
|
||||
var/node2_connect = turn(dir, -90)
|
||||
@@ -72,6 +89,7 @@
|
||||
|
||||
if(flipped)
|
||||
node1_connect = turn(node1_connect, 180)
|
||||
node2_connect = turn(node2_connect, 180)
|
||||
node3_connect = turn(node3_connect, 180)
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
|
||||
@@ -10,19 +10,29 @@
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
level = 1
|
||||
|
||||
var/state = TVALVE_STATE_STRAIGHT
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/bypass
|
||||
icon_state = "map_tvalve1"
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/flipped
|
||||
icon_state = "map_tvalvem0"
|
||||
flipped = 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/flipped/bypass
|
||||
icon_state = "map_tvalvem1"
|
||||
flipped = 1
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/update_icon(animation)
|
||||
var/flipstate = ""
|
||||
if(flipped)
|
||||
flipstate = "m"
|
||||
if(animation)
|
||||
flick("tvalve[src.state][!src.state]",src)
|
||||
flick("tvalve[flipstate][src.state][!src.state]",src)
|
||||
else
|
||||
icon_state = "tvalve[state]"
|
||||
icon_state = "tvalve[flipstate][state]"
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/update_underlays()
|
||||
if(..())
|
||||
@@ -32,7 +42,10 @@
|
||||
return
|
||||
add_underlay(T, node1, turn(dir, -180))
|
||||
|
||||
add_underlay(T, node2, turn(dir, -90))
|
||||
if(flipped)
|
||||
add_underlay(T, node2, turn(dir, 90))
|
||||
else
|
||||
add_underlay(T, node2, turn(dir, -90))
|
||||
|
||||
add_underlay(T, node3, dir)
|
||||
|
||||
@@ -93,6 +106,15 @@
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/bypass
|
||||
icon_state = "map_tvalve1"
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/flipped
|
||||
icon_state = "map_tvalvem0"
|
||||
flipped = 1
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/flipped/bypass
|
||||
icon_state = "map_tvalvem1"
|
||||
flipped = 1
|
||||
state = TVALVE_STATE_SIDE
|
||||
|
||||
/obj/machinery/atmospherics/trinary/tvalve/digital/power_change()
|
||||
var/old_stat = stat
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir
|
||||
//currently the same code as cold_sink but anticipating process() changes
|
||||
|
||||
icon = 'icons/obj/atmospherics/cold_sink.dmi'
|
||||
icon_state = "intact_off"
|
||||
density = 1
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
Mtoollink = 1
|
||||
settagwhitelist = list("id_tag")
|
||||
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/outlet_injector/on
|
||||
on = 1
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
var/obj/machinery/portable_atmospherics/connected_device
|
||||
|
||||
var/on = 0
|
||||
use_power = 0
|
||||
level = 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/portables_connector/Destroy()
|
||||
if(connected_device)
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
var/volume = 10000 //in liters, 1 meters by 1 meters by 2 meters ~tweaked it a little to simulate a pressure tank without needing to recode them yet
|
||||
|
||||
level = 1
|
||||
density = 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/tank/update_underlays()
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#define RADIATION_CAPACITY 30000 //Radiation isn't particularly effective (TODO BALANCE)
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermal_plate
|
||||
//Based off Heat Reservoir and Space Heater
|
||||
//Transfers heat between a pipe system and environment, based on which has a greater thermal energy concentration
|
||||
icon = 'icons/obj/atmospherics/cold_sink.dmi'
|
||||
icon_state = "off"
|
||||
level = 1
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
name = "Thermal Transfer Plate"
|
||||
name = "thermal tansfer plate"
|
||||
desc = "Transfers heat to and from an area"
|
||||
|
||||
/obj/machinery/atmospherics/unary/thermal_plate/update_icon()
|
||||
|
||||
@@ -7,14 +7,13 @@
|
||||
icon = 'icons/atmos/vent_pump.dmi'
|
||||
icon_state = "map_vent"
|
||||
|
||||
name = "Air Vent"
|
||||
name = "air vent"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
use_power = 1
|
||||
|
||||
can_unwrench = 1
|
||||
|
||||
var/area/initial_loc
|
||||
level = 1
|
||||
var/area_uid
|
||||
var/id_tag = null
|
||||
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
|
||||
req_one_access_txt = "24;10"
|
||||
|
||||
name = "Air Scrubber"
|
||||
name = "air scrubber"
|
||||
desc = "Has a valve and pump attached to it"
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 10
|
||||
active_power_usage = 60
|
||||
|
||||
level = 1
|
||||
can_unwrench = 1
|
||||
|
||||
var/area/initial_loc
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#define PIPE_PASSIVE_GATE 15
|
||||
#define PIPE_VOLUME_PUMP 16
|
||||
#define PIPE_HEAT_EXCHANGE 17
|
||||
#define PIPE_MTVALVE 18
|
||||
#define PIPE_TVALVE 18
|
||||
#define PIPE_MANIFOLD4W 19
|
||||
#define PIPE_CAP 20
|
||||
#define PIPE_OMNI_MIXER 21
|
||||
@@ -117,7 +117,7 @@
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/trinary/tvalve/digital))
|
||||
src.pipe_type = PIPE_DTVALVE
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/trinary/tvalve))
|
||||
src.pipe_type = PIPE_MTVALVE
|
||||
src.pipe_type = PIPE_TVALVE
|
||||
else if(istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/manifold4w/hidden/supply))
|
||||
src.pipe_type = PIPE_SUPPLY_MANIFOLD4W
|
||||
connect_types = list(2)
|
||||
@@ -152,7 +152,6 @@
|
||||
var/obj/machinery/atmospherics/trinary/triP = make_from
|
||||
if(istype(triP) && triP.flipped)
|
||||
src.flipped = 1
|
||||
src.dir = turn(src.dir, -45)
|
||||
|
||||
else
|
||||
src.pipe_type = pipe_type
|
||||
@@ -166,13 +165,13 @@
|
||||
else if (pipe_type == PIPE_UNIVERSAL)
|
||||
connect_types = list(1,2,3)
|
||||
//src.pipe_dir = get_pipe_dir()
|
||||
update()
|
||||
update(make_from)
|
||||
src.pixel_x = rand(-5, 5)
|
||||
src.pixel_y = rand(-5, 5)
|
||||
|
||||
//update the name and icon of the pipe item depending on the type
|
||||
|
||||
/obj/item/pipe/proc/update()
|
||||
/obj/item/pipe/proc/update(var/obj/machinery/atmospherics/make_from)
|
||||
var/list/nlist = list( \
|
||||
"pipe", \
|
||||
"bent pipe", \
|
||||
@@ -234,7 +233,7 @@
|
||||
"passivegate", \
|
||||
"volumepump", \
|
||||
"heunary", \
|
||||
"mtvalve", \
|
||||
"tvalve", \
|
||||
"manifold4w", \
|
||||
"cap", \
|
||||
"omni_mixer", \
|
||||
@@ -257,6 +256,9 @@
|
||||
"dtvalve", \
|
||||
)
|
||||
icon_state = islist[pipe_type + 1]
|
||||
var/obj/machinery/atmospherics/trinary/triP = make_from
|
||||
if(istype(triP) && triP.flipped)
|
||||
icon_state = "m_[icon_state]"
|
||||
|
||||
//called when a turf is attacked with a pipe item
|
||||
// place the pipe on the turf, setting pipe level to 1 (underfloor) if the turf is not intact
|
||||
@@ -288,11 +290,14 @@
|
||||
set name = "Flip Pipe"
|
||||
set src in view(1)
|
||||
|
||||
if ( usr.stat || usr.restrained() )
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if (pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER))
|
||||
src.dir = turn(src.dir, flipped ? 45 : -45)
|
||||
if (pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE))
|
||||
if(flipped)
|
||||
icon_state = copytext(icon_state,3)
|
||||
else
|
||||
icon_state = "m_[icon_state]"
|
||||
flipped = !flipped
|
||||
return
|
||||
|
||||
@@ -307,8 +312,6 @@
|
||||
if ((pipe_type in list (PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT, PIPE_HE_BENT, PIPE_INSULATED_BENT)) \
|
||||
&& (src.dir in cardinal))
|
||||
src.dir = src.dir|turn(src.dir, 90)
|
||||
else if ((pipe_type in list(PIPE_GAS_FILTER, PIPE_GAS_MIXER)) && flipped)
|
||||
src.dir = turn(src.dir, 45+90)
|
||||
else if (pipe_type in list (PIPE_SIMPLE_STRAIGHT, PIPE_SUPPLY_STRAIGHT, PIPE_SCRUBBERS_STRAIGHT, PIPE_UNIVERSAL, PIPE_HE_STRAIGHT, PIPE_INSULATED_STRAIGHT, PIPE_MVALVE, PIPE_DVALVE))
|
||||
if(dir==2)
|
||||
dir = 1
|
||||
@@ -354,8 +357,11 @@
|
||||
return dir|flip|cw|acw
|
||||
if(PIPE_MANIFOLD, PIPE_SUPPLY_MANIFOLD, PIPE_SCRUBBERS_MANIFOLD)
|
||||
return flip|cw|acw
|
||||
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_MTVALVE, PIPE_DTVALVE)
|
||||
return dir|flip|cw
|
||||
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE)
|
||||
if(!flipped)
|
||||
return dir|flip|cw
|
||||
else
|
||||
return flip|cw|acw
|
||||
if(PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP)
|
||||
return dir
|
||||
return 0
|
||||
@@ -506,28 +512,21 @@
|
||||
V.name = pipename
|
||||
V.construction(dir, get_pdir(), color)
|
||||
|
||||
if(PIPE_MTVALVE)
|
||||
var/obj/machinery/atmospherics/trinary/tvalve/V = new( src.loc )
|
||||
if (pipename)
|
||||
V.name = pipename
|
||||
V.construction(dir, pipe_dir, color)
|
||||
|
||||
if(PIPE_DTVALVE)
|
||||
var/obj/machinery/atmospherics/trinary/tvalve/digital/V = new( src.loc )
|
||||
if (pipename)
|
||||
V.name = pipename
|
||||
V.construction(dir, pipe_dir, color)
|
||||
|
||||
if(PIPE_PUMP) //gas pump
|
||||
var/obj/machinery/atmospherics/binary/pump/P = new(src.loc)
|
||||
P.construction(dir, pipe_dir, color)
|
||||
|
||||
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER)
|
||||
if(PIPE_GAS_FILTER, PIPE_GAS_MIXER, PIPE_TVALVE, PIPE_DTVALVE)
|
||||
var/obj/machinery/atmospherics/trinary/P
|
||||
if(pipe_type == PIPE_GAS_FILTER)
|
||||
P = new /obj/machinery/atmospherics/trinary/filter(src.loc)
|
||||
else if(pipe_type == PIPE_GAS_MIXER)
|
||||
P = new /obj/machinery/atmospherics/trinary/mixer(src.loc)
|
||||
switch(pipe_type)
|
||||
if(PIPE_GAS_FILTER)
|
||||
P = new /obj/machinery/atmospherics/trinary/filter(src.loc)
|
||||
if(PIPE_GAS_MIXER)
|
||||
P = new /obj/machinery/atmospherics/trinary/mixer(src.loc)
|
||||
if(PIPE_TVALVE)
|
||||
P = new /obj/machinery/atmospherics/trinary/tvalve(src.loc)
|
||||
if(PIPE_DTVALVE)
|
||||
P = new /obj/machinery/atmospherics/trinary/tvalve/digital(src.loc)
|
||||
P.flipped = flipped
|
||||
if (pipename)
|
||||
P.name = pipename
|
||||
@@ -666,7 +665,7 @@
|
||||
#undef PIPE_PASSIVE_GATE
|
||||
#undef PIPE_VOLUME_PUMP
|
||||
#undef PIPE_HEAT_EXCHANGE
|
||||
#undef PIPE_MTVALVE
|
||||
#undef PIPE_TVALVE
|
||||
#undef PIPE_MANIFOLD4W
|
||||
#undef PIPE_CAP
|
||||
#undef PIPE_OMNI_MIXER
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
|
||||
var/turf/T = P.loc
|
||||
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
|
||||
user << "\red You must remove the plating first."
|
||||
user << "<span class='warning'>You must remove the plating first.</span>"
|
||||
return
|
||||
|
||||
P.change_color(pipe_colors[mode])
|
||||
|
||||
/obj/item/device/pipe_painter/attack_self(mob/user as mob)
|
||||
mode = input("Which colour do you want to use?", "Pipe painter", mode) in modes
|
||||
mode = input("Which colour do you want to use?", "Pipe Painter", mode) in modes
|
||||
|
||||
/obj/item/device/pipe_painter/examine(mob/user)
|
||||
..(user)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
New()
|
||||
..()
|
||||
var/list/drinks_only = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice","berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana","nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee","icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb","space_up","lemon_lime","beer","whiskey","gin","rum","vodka","holywater","tequilla","vermouth","wine","tonic","kahlua","cognac","hooch","ale","sodawater","ice","bilk","atomicbomb","threemileisland","goldschlager","patron","gintonic","cubalibre","whiskeycola","martini","vodkamartini","whiterussian","screwdrivercocktail","booger","bloodymary","gargleblaster","bravebull","tequillasunrise","toxinsspecial","beepskysmash","salglu_solution","irishcream","manlydorf","longislandicedtea","moonshine","b52","irishcoffee","margarita","blackrussian","manhattan","manhattan_proj","whiskeysoda","antifreeze","barefoot","snowwhite","demonsblood","vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead","mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte","cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk","silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini")
|
||||
var/list/drinks_only = list("beer2","hot_coco","orangejuice","tomatojuice","limejuice","carrotjuice","berryjuice","poisonberryjuice","watermelonjuice","lemonjuice","banana","nothing","potato","milk","soymilk","cream","coffee","tea","icecoffee","icetea","cola","nuka_cola","spacemountainwind","thirteenloko","dr_gibb","space_up","lemon_lime","beer","whiskey","gin","rum","vodka","holywater","tequilla","vermouth","wine","tonic","kahlua","cognac","ale","sodawater","ice","bilk","atomicbomb","threemileisland","goldschlager","patron","gintonic","cubalibre","whiskeycola","martini","vodkamartini","whiterussian","screwdrivercocktail","booger","bloodymary","gargleblaster","bravebull","tequillasunrise","toxinsspecial","beepskysmash","salglu_solution","irishcream","manlydorf","longislandicedtea","moonshine","b52","irishcoffee","margarita","blackrussian","manhattan","manhattan_proj","whiskeysoda","antifreeze","barefoot","snowwhite","demonsblood","vodkatonic","ginfizz","bahama_mama","singulo","sbiten","devilskiss","red_mead","mead","iced_beer","grog","aloe","andalusia","alliescocktail","soy_latte","cafe_latte","acidspit","amasec","neurotoxin","hippiesdelight","bananahonk","silencer","changelingsting","irishcarbomb","syndicatebomb","erikasurprise","driestmartini")
|
||||
if(prob(50))
|
||||
drinks_only += list("pancuronium","adminordrazine","lsd","omnizine","blood")
|
||||
|
||||
|
||||
@@ -456,7 +456,6 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob, params)
|
||||
|
||||
if(!C || !user)
|
||||
return 0
|
||||
|
||||
@@ -468,18 +467,18 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
qdel(C)
|
||||
T.state = C //fixing it by bashing it with a light bulb, fun eh?
|
||||
update_icon()
|
||||
user << "\blue You replace the light bulb."
|
||||
user << "<span class='notice'>You replace the light bulb.</span>"
|
||||
else
|
||||
user << "\blue The lightbulb seems fine, no need to replace it."
|
||||
user << "<span class='notice'>The light bulb seems fine, no need to replace it.</span>"
|
||||
|
||||
if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating())) && (!is_catwalk()))
|
||||
if(broken || burnt)
|
||||
user << "\red You remove the broken plating."
|
||||
user << "<span class='notice'>You remove the broken plating.</span>"
|
||||
else
|
||||
if(is_wood_floor())
|
||||
user << "\red You forcefully pry off the planks, destroying them in the process."
|
||||
user << "<span class='danger'>You forcefully pry off the planks, destroying them in the process.</span>"
|
||||
else
|
||||
user << "\red You remove the [floor_tile.name]."
|
||||
user << "<span class='notice'>You remove the [floor_tile.name].</span>"
|
||||
new floor_tile.type(src)
|
||||
|
||||
make_plating()
|
||||
@@ -488,20 +487,19 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
|
||||
return
|
||||
|
||||
|
||||
if(istype(C, /obj/item/weapon/screwdriver))
|
||||
if(is_wood_floor())
|
||||
if(broken || burnt)
|
||||
return
|
||||
else
|
||||
if(is_wood_floor())
|
||||
user << "\red You unscrew the planks."
|
||||
user << "<span class='notice'>You unscrew the planks.</span>"
|
||||
new floor_tile.type(src)
|
||||
make_plating()
|
||||
playsound(src, 'sound/items/Screwdriver.ogg', 80, 1)
|
||||
else if(is_catwalk())
|
||||
if(broken) return
|
||||
user << "\red You unscrew the catwalk's rods."
|
||||
user << "<span class='notice'>You unscrew the catwalk's rods.</span>"
|
||||
new /obj/item/stack/rods(src, 2)
|
||||
ReplaceWithLattice()
|
||||
for(var/direction in cardinal)
|
||||
@@ -516,23 +514,23 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
var/obj/item/stack/rods/R = C
|
||||
if (is_plating())
|
||||
if (R.amount >= 2)
|
||||
user << "\blue Reinforcing the floor..."
|
||||
user << "<span class='notice'>Reinforcing the floor...</span>"
|
||||
if(do_after(user, 30, target = src) && R && R.amount >= 2 && is_plating())
|
||||
ChangeTurf(/turf/simulated/floor/engine)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
|
||||
R.use(2)
|
||||
return
|
||||
else
|
||||
user << "\red You need more rods."
|
||||
user << "<span class='warning'>You need more rods.</span>"
|
||||
else if (is_catwalk())
|
||||
user << "\red The entire thing is 100% rods already, it doesn't need any more."
|
||||
user << "<span class='warning'>The entire thing is 100% rods already, it doesn't need any more.</span>"
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
user << "<span class='warning'>You must remove the plating first.</span>"
|
||||
return
|
||||
|
||||
if(istype(C, /obj/item/stack/tile))
|
||||
if (is_catwalk())
|
||||
user << "\red The catwalk is too primitive to support tiling."
|
||||
user << "<span class='warning'>The catwalk is too primitive to support tiling.</span>"
|
||||
if(is_plating())
|
||||
if(!broken && !burnt)
|
||||
var/obj/item/stack/tile/T = C
|
||||
@@ -558,7 +556,7 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
levelupdate()
|
||||
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
|
||||
else
|
||||
user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage."
|
||||
user << "<span class='warning'>This section is too damaged to support a tile. Use a welder to fix the damage.</span>"
|
||||
|
||||
|
||||
if(istype(C, /obj/item/stack/cable_coil))
|
||||
@@ -566,29 +564,29 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
var/obj/item/stack/cable_coil/coil = C
|
||||
coil.turf_place(src, user)
|
||||
else
|
||||
user << "\red You must remove the plating first."
|
||||
user << "<span class='warning'>You must remove the plating first.</span>"
|
||||
|
||||
if(istype(C, /obj/item/weapon/shovel))
|
||||
if(is_grass_floor())
|
||||
new /obj/item/weapon/ore/glass(src)
|
||||
new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass
|
||||
user << "\blue You shovel the grass."
|
||||
user << "<span class='notice'>You shovel the grass.</span>"
|
||||
make_plating()
|
||||
else
|
||||
user << "\red You cannot shovel this."
|
||||
user << "<span class='warning'>You cannot shovel this.</span>"
|
||||
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder = C
|
||||
if(welder.isOn() && (is_plating()))
|
||||
if(broken || burnt)
|
||||
if(welder.remove_fuel(0,user))
|
||||
user << "\red You fix some dents on the broken plating."
|
||||
user << "<span class='notice'>You fix some dents on the broken plating.</span>"
|
||||
playsound(src, 'sound/items/Welder.ogg', 80, 1)
|
||||
icon_state = "plating"
|
||||
burnt = 0
|
||||
broken = 0
|
||||
else
|
||||
user << "\blue You need more welding fuel to complete this task."
|
||||
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
|
||||
|
||||
if(istype(C,/obj/item/pipe))
|
||||
var/obj/item/pipe/V = C
|
||||
@@ -597,7 +595,7 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
|
||||
user.visible_message( \
|
||||
"[user] starts sliding [P] along \the [src].", \
|
||||
"\blue You slide [P] along \the [src].", \
|
||||
"<span class='notice'>You slide [P] along \the [src].</span>", \
|
||||
"You hear the scrape of metal against something.")
|
||||
user.drop_item()
|
||||
if (P.pipe_type in list (1,3,12)) // bent pipe rotation fix see construction.dm
|
||||
|
||||
Reference in New Issue
Block a user