mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Revert "Revert "Adds glass floors" (#16524)"
This reverts commit 517f5e8304.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,14 @@
|
||||
#define FOOTSTEP_WATER "water"
|
||||
#define FOOTSTEP_LAVA "lava"
|
||||
#define FOOTSTEP_MEAT "meat"
|
||||
#define FOOTSTEP_GLASS "glass"
|
||||
//barefoot sounds
|
||||
#define FOOTSTEP_WOOD_BAREFOOT "woodbarefoot"
|
||||
#define FOOTSTEP_WOOD_CLAW "woodclaw"
|
||||
#define FOOTSTEP_HARD_BAREFOOT "hardbarefoot"
|
||||
#define FOOTSTEP_HARD_CLAW "hardclaw"
|
||||
#define FOOTSTEP_CARPET_BAREFOOT "carpetbarefoot"
|
||||
#define FOOTSTEP_GLASS_BAREFOOT "glassbarefoot"
|
||||
//misc footstep sounds
|
||||
#define FOOTSTEP_GENERIC_HEAVY "heavy"
|
||||
|
||||
@@ -83,7 +85,11 @@ GLOBAL_LIST_INIT(footstep, list(
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0)
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_GLASS = list(list(
|
||||
'sound/effects/footstep/glass1.ogg',
|
||||
'sound/effects/footstep/glass2.ogg',
|
||||
'sound/effects/footstep/glass3.ogg'), 100, 1),
|
||||
))
|
||||
//bare footsteps lists
|
||||
GLOBAL_LIST_INIT(barefootstep, list(
|
||||
@@ -127,6 +133,10 @@ GLOBAL_LIST_INIT(barefootstep, list(
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_GLASS_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/glassbarefoot1.ogg',
|
||||
'sound/effects/footstep/glassbarefoot2.ogg',
|
||||
'sound/effects/footstep/glassbarefoot3.ogg'), 100, 1),
|
||||
))
|
||||
|
||||
//claw footsteps lists
|
||||
@@ -171,6 +181,10 @@ GLOBAL_LIST_INIT(clawfootstep, list(
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
FOOTSTEP_GLASS = list(list(
|
||||
'sound/effects/footstep/glassbarefoot1.ogg',
|
||||
'sound/effects/footstep/glassbarefoot2.ogg',
|
||||
'sound/effects/footstep/glassbarefoot3.ogg'), 100, 1),
|
||||
))
|
||||
|
||||
//heavy footsteps list
|
||||
|
||||
@@ -26,11 +26,13 @@
|
||||
#define DISPOSAL_PIPE_LAYER 2.3
|
||||
#define GAS_PIPE_HIDDEN_LAYER 2.35
|
||||
#define WIRE_LAYER 2.4
|
||||
#define TRANSPARENT_TURF_LAYER 2.41
|
||||
#define WIRE_TERMINAL_LAYER 2.45
|
||||
#define GAS_SCRUBBER_LAYER 2.46
|
||||
#define GAS_PIPE_VISIBLE_LAYER 2.47
|
||||
#define GAS_FILTER_LAYER 2.48
|
||||
#define GAS_PUMP_LAYER 2.49
|
||||
#define HOLOPAD_LAYER 2.491
|
||||
#define CONVEYOR_LAYER 2.495
|
||||
#define LOW_OBJ_LAYER 2.5
|
||||
#define LOW_SIGIL_LAYER 2.52
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "Bluespace Gigabeacon"
|
||||
desc = "A device that draws power from bluespace and creates a permanent tracking beacon."
|
||||
level = 1 // underfloor
|
||||
layer = 2.5
|
||||
layer = WIRE_LAYER+0.001
|
||||
anchored = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 0
|
||||
@@ -26,7 +26,8 @@
|
||||
Beacon.syndicate = syndicate
|
||||
Beacon.area_bypass = area_bypass
|
||||
Beacon.cc_beacon = cc_beacon
|
||||
hide(T.intact)
|
||||
if(!T.transparent_floor)
|
||||
hide(T.intact)
|
||||
|
||||
/obj/machinery/bluespace_beacon/proc/destroy_beacon()
|
||||
QDEL_NULL(Beacon)
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(holopads)
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
||||
layer = HOLOPAD_LAYER //Preventing mice and drones from sneaking under them.
|
||||
plane = FLOOR_PLANE
|
||||
max_integrity = 300
|
||||
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 0)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
name = "Electromagnetic Generator"
|
||||
desc = "A device that uses station power to create points of magnetic energy."
|
||||
level = 1 // underfloor
|
||||
layer = 2.5
|
||||
layer = WIRE_LAYER+0.001
|
||||
anchored = 1
|
||||
use_power = IDLE_POWER_USE
|
||||
idle_power_usage = 50
|
||||
@@ -32,7 +32,8 @@
|
||||
/obj/machinery/magnetic_module/New()
|
||||
..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
if(!T.transparent_floor)
|
||||
hide(T.intact)
|
||||
center = T
|
||||
|
||||
spawn(10) // must wait for map loading to finish
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
name = "navigation beacon"
|
||||
desc = "A radio beacon used for bot navigation."
|
||||
level = 1 // underfloor
|
||||
layer = 2.5
|
||||
layer = WIRE_LAYER+0.001
|
||||
anchored = 1
|
||||
max_integrity = 500
|
||||
armor = list(melee = 70, bullet = 70, laser = 70, energy = 70, bomb = 0, bio = 0, rad = 0, fire = 80, acid = 80)
|
||||
@@ -26,7 +26,8 @@
|
||||
set_codes()
|
||||
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
if(!T.transparent_floor)
|
||||
hide(T.intact)
|
||||
if(!codes || !codes.len)
|
||||
log_runtime(EXCEPTION("Empty codes datum at ([x],[y],[z])"), src, list("codes_txt: '[codes_txt]'"))
|
||||
if("patrol" in codes)
|
||||
|
||||
@@ -337,12 +337,18 @@
|
||||
fixdir()
|
||||
|
||||
var/pipe_dir = get_pipe_dir()
|
||||
var/turf/T = get_turf(loc)
|
||||
|
||||
for(var/obj/machinery/atmospherics/M in src.loc)
|
||||
if((M.initialize_directions & pipe_dir) && M.check_connect_types_construction(M,src)) // matches at least one direction on either type of pipe
|
||||
to_chat(user, "<span class='warning'>There is already a pipe of the same type at this location.</span>")
|
||||
return 1
|
||||
|
||||
if(pipe_type in list(PIPE_SUPPLY_STRAIGHT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_STRAIGHT, PIPE_SCRUBBERS_BENT, PIPE_HE_STRAIGHT, PIPE_HE_BENT, PIPE_SUPPLY_MANIFOLD, PIPE_SCRUBBERS_MANIFOLD, PIPE_SUPPLY_MANIFOLD4W, PIPE_SCRUBBERS_MANIFOLD4W, PIPE_UVENT, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP, PIPE_PASV_VENT, PIPE_DP_VENT, PIPE_PASSIVE_GATE))
|
||||
if(T.transparent_floor) //stops jank with transparent floors and pipes
|
||||
to_chat(user, "<span class='warning'>You can only fix simple pipes and devices over glass floors!</span>")
|
||||
return 1
|
||||
|
||||
switch(pipe_type) //What kind of heartless person thought of doing this?
|
||||
if(PIPE_SIMPLE_STRAIGHT, PIPE_SIMPLE_BENT)
|
||||
var/obj/machinery/atmospherics/pipe/simple/P = new( src.loc )
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(P)
|
||||
if(P.level < 2 && T.level == 1 && T.intact)
|
||||
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
|
||||
if(P.level < 2 && T.level == 1 && T.intact && !T.transparent_floor)
|
||||
to_chat(user, "<span class='warning'>You must remove the flooring first.</span>")
|
||||
return
|
||||
|
||||
P.change_color(GLOB.pipe_colors[paint_setting])
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
/obj/blob_act(obj/structure/blob/B)
|
||||
if(isturf(loc))
|
||||
var/turf/T = loc
|
||||
if(T.intact && level == 1) //the blob doesn't destroy thing below the floor
|
||||
if(T.intact && level == 1 || T.transparent_floor) //the blob doesn't destroy thing below the floor
|
||||
return
|
||||
take_damage(400, BRUTE, "melee", 0, get_dir(src, B))
|
||||
|
||||
@@ -199,7 +199,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/obj/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
if(isturf(loc))
|
||||
var/turf/T = loc
|
||||
if(T.intact && level == 1) //fire can't damage things hidden below the floor.
|
||||
if(T.intact && level == 1 || T.transparent_floor) //fire can't damage things hidden below the floor.
|
||||
return
|
||||
..()
|
||||
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
|
||||
|
||||
@@ -368,7 +368,8 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
/obj/structure/safe/floor/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
if(!T.transparent_floor)
|
||||
hide(T.intact)
|
||||
|
||||
/obj/structure/safe/floor/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
@@ -27,6 +27,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
|
||||
var/list/broken_states = list("damaged1", "damaged2", "damaged3", "damaged4", "damaged5")
|
||||
var/list/burnt_states = list("floorscorched1", "floorscorched2")
|
||||
var/list/prying_tool_list = list(TOOL_CROWBAR) //What tool/s can we use to pry up the tile?
|
||||
var/keep_dir = TRUE //When false, resets dir to default on changeturf()
|
||||
|
||||
var/footstep = FOOTSTEP_FLOOR
|
||||
var/barefootstep = FOOTSTEP_HARD_BAREFOOT
|
||||
@@ -124,11 +125,18 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
|
||||
|
||||
var/turf/simulated/floor/W = ..()
|
||||
|
||||
var/obj/machinery/atmospherics/R
|
||||
|
||||
if(keep_icon)
|
||||
W.icon_regular_floor = old_icon
|
||||
W.icon_plating = old_plating
|
||||
if(W.keep_dir)
|
||||
W.dir = old_dir
|
||||
|
||||
if(W.transparent_floor)
|
||||
for(R in W)
|
||||
R.update_icon()
|
||||
for(R in W)
|
||||
R.update_underlays()
|
||||
W.update_icon()
|
||||
return W
|
||||
|
||||
|
||||
@@ -70,6 +70,36 @@
|
||||
to_chat(user, "<span class='warning'>This section is too damaged to support a tile! Use a welder to fix the damage.</span>")
|
||||
return TRUE
|
||||
|
||||
else if(is_glass_sheet(C))
|
||||
if(broken || burnt)
|
||||
to_chat(user, "<span class='warning'>Repair the plating first!</span>")
|
||||
return TRUE
|
||||
var/obj/item/stack/sheet/R = C
|
||||
if(R.get_amount() < 2)
|
||||
to_chat(user, "<span class='warning'>You need two sheets of [C] to build a [C] floor!</span>")
|
||||
return TRUE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You begin swapping the plating for [C]...</span>")
|
||||
if(do_after(user, 3 SECONDS * C.toolspeed, target = src))
|
||||
if(R.get_amount() >= 2 && !istype(src, /turf/simulated/floor/transparent/glass))
|
||||
if(istype(C, /obj/item/stack/sheet/plasmaglass)) //So, what type of glass floor do we want today?
|
||||
ChangeTurf(/turf/simulated/floor/transparent/glass/plasma)
|
||||
else if(istype(C, /obj/item/stack/sheet/plasmarglass))
|
||||
ChangeTurf(/turf/simulated/floor/transparent/glass/reinforced/plasma)
|
||||
else if(istype(C, /obj/item/stack/sheet/glass))
|
||||
ChangeTurf(/turf/simulated/floor/transparent/glass)
|
||||
else if(istype(C, /obj/item/stack/sheet/rglass))
|
||||
ChangeTurf(/turf/simulated/floor/transparent/glass/reinforced)
|
||||
else if(istype(C, /obj/item/stack/sheet/titaniumglass))
|
||||
ChangeTurf(/turf/simulated/floor/transparent/glass/titanium)
|
||||
else if(istype(C, /obj/item/stack/sheet/plastitaniumglass))
|
||||
ChangeTurf(/turf/simulated/floor/transparent/glass/titanium/plastic)
|
||||
playsound(src, C.usesound, 80, TRUE)
|
||||
R.use(2)
|
||||
to_chat(user, "<span class='notice'>You swap the plating for [C].</span>")
|
||||
new /obj/item/stack/sheet/metal(src, 2)
|
||||
return TRUE
|
||||
|
||||
/turf/simulated/floor/plating/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/turf/simulated/floor/transparent/glass
|
||||
name = "glass floor"
|
||||
desc = "Don't jump on it... Or do, I'm not your mom."
|
||||
icon = 'icons/turf/floors/glass.dmi'
|
||||
icon_state = "unsmooth"
|
||||
baseturf = /turf/space
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/turf/simulated/floor/transparent/glass, /turf/simulated/floor/transparent/glass/reinforced, /turf/simulated/floor/transparent/glass/plasma, /turf/simulated/floor/transparent/glass/reinforced/plasma)
|
||||
footstep = FOOTSTEP_GLASS
|
||||
barefootstep = FOOTSTEP_GLASS_BAREFOOT
|
||||
clawfootstep = FOOTSTEP_GLASS_BAREFOOT
|
||||
heavyfootstep = FOOTSTEP_GLASS_BAREFOOT
|
||||
light_power = 0.25
|
||||
light_range = 2
|
||||
layer = TRANSPARENT_TURF_LAYER
|
||||
keep_dir = FALSE
|
||||
intact = FALSE
|
||||
transparent_floor = TRUE
|
||||
|
||||
/turf/simulated/floor/transparent/glass/Initialize(mapload)
|
||||
. = ..()
|
||||
var/image/I = image('icons/turf/space.dmi', src, SPACE_ICON_STATE)
|
||||
I.plane = PLANE_SPACE
|
||||
underlays += I
|
||||
dir = SOUTH //dirs that are not 2/south cause smoothing jank
|
||||
icon_state = "" //Prevents default icon appearing behind the glass
|
||||
|
||||
/turf/simulated/floor/transparent/glass/attackby(obj/item/C, mob/user, params)
|
||||
if(!C || !user)
|
||||
return
|
||||
if(istype(C, /obj/item/crowbar))
|
||||
var/obj/item/stack/R = user.get_inactive_hand()
|
||||
if(istype(R, /obj/item/stack/sheet/metal))
|
||||
if(R.get_amount() < 2) //not enough metal in the stack
|
||||
to_chat(user, "<span class='danger'>You also need to hold two sheets of metal to dismantle \the [src]!</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You begin replacing \the [src]...</span>")
|
||||
playsound(src, C.usesound, 80, TRUE)
|
||||
if(do_after(user, 3 SECONDS * C.toolspeed, target = src))
|
||||
if(R.get_amount() >= 2 && !istype(src, /turf/simulated/floor/plating))
|
||||
if(!transparent_floor)
|
||||
return
|
||||
if(istype(src, /turf/simulated/floor/transparent/glass/reinforced)) //What material is returned? Depends on the turf
|
||||
new /obj/item/stack/sheet/rglass(src, 2)
|
||||
else if(istype(src, /turf/simulated/floor/transparent/glass))
|
||||
new /obj/item/stack/sheet/glass(src, 2)
|
||||
else if(istype(src, /turf/simulated/floor/transparent/glass/plasma))
|
||||
new /obj/item/stack/sheet/plasmaglass(src, 2)
|
||||
else if(istype(src, /turf/simulated/floor/transparent/glass/reinforced/plasma))
|
||||
new /obj/item/stack/sheet/plasmarglass(src, 2)
|
||||
else if(istype(src, /turf/simulated/floor/transparent/glass/titanium))
|
||||
new /obj/item/stack/sheet/titaniumglass(src, 2)
|
||||
else if(istype(src, /turf/simulated/floor/transparent/glass/titanium/plastic))
|
||||
new /obj/item/stack/sheet/plastitaniumglass(src, 2)
|
||||
R.use(2)
|
||||
ChangeTurf(/turf/simulated/floor/plating)
|
||||
|
||||
else //not holding metal at all
|
||||
to_chat(user, "<span class='danger'>You also need to hold two sheets of metal to dismantle \the [src]!</span>")
|
||||
return
|
||||
|
||||
|
||||
/turf/simulated/floor/transparent/glass/reinforced
|
||||
name = "reinforced glass floor"
|
||||
desc = "Jump on it, it can cope. Promise..."
|
||||
icon = 'icons/turf/floors/reinf_glass.dmi'
|
||||
thermal_conductivity = 0.035
|
||||
heat_capacity = 50000
|
||||
|
||||
/turf/simulated/floor/transparent/glass/reinforced/acid_act(acidpwr, acid_volume)
|
||||
acidpwr = min(acidpwr, 50)
|
||||
. = ..()
|
||||
|
||||
/turf/simulated/floor/transparent/glass/plasma
|
||||
name = "plasma glass floor"
|
||||
desc = "Wait, was space always that color?"
|
||||
icon = 'icons/turf/floors/plasmaglass.dmi'
|
||||
thermal_conductivity = 0.030
|
||||
heat_capacity = 75000
|
||||
|
||||
/turf/simulated/floor/transparent/glass/reinforced/plasma
|
||||
name = "reinforced plasma glass floor"
|
||||
desc = "For when you REALLY don't want your floor choice to suffocate everyone."
|
||||
icon = 'icons/turf/floors/reinf_plasmaglass.dmi'
|
||||
thermal_conductivity = 0.025
|
||||
heat_capacity = 325000
|
||||
|
||||
/turf/simulated/floor/transparent/glass/titanium
|
||||
name = "titanium glass floor"
|
||||
canSmoothWith = list(/turf/simulated/floor/transparent/glass/titanium, /turf/simulated/floor/transparent/glass/titanium/plastic)
|
||||
desc = "Stylish AND strong!"
|
||||
icon = 'icons/turf/floors/titaniumglass.dmi'
|
||||
thermal_conductivity = 0.025
|
||||
heat_capacity = 325000
|
||||
|
||||
/turf/simulated/floor/transparent/glass/titanium/plastic
|
||||
name = "plastitanium glass floor"
|
||||
icon = 'icons/turf/floors/plastitaniumglass.dmi'
|
||||
@@ -6,6 +6,7 @@
|
||||
var/intact = TRUE
|
||||
var/turf/baseturf = /turf/space
|
||||
var/slowdown = 0 //negative for faster, positive for slower
|
||||
var/transparent_floor = FALSE //used to check if pipes should be visible under the turf or not
|
||||
|
||||
///Properties for open tiles (/floor)
|
||||
/// All the gas vars, on the turf, are meant to be utilized for initializing a gas datum and setting its first gas values; the turf vars are never further modified at runtime; it is never directly used for calculations by the atmospherics system.
|
||||
|
||||
@@ -71,10 +71,13 @@ Pipelines + Other Objects -> Pipe network
|
||||
// Icons/overlays/underlays
|
||||
/obj/machinery/atmospherics/update_icon()
|
||||
var/turf/T = get_turf(loc)
|
||||
if(!T || level == 2 || !T.intact)
|
||||
plane = GAME_PLANE
|
||||
else
|
||||
if(T.transparent_floor)
|
||||
plane = FLOOR_PLANE
|
||||
else
|
||||
if(!T || level == 2 || !T.intact)
|
||||
plane = GAME_PLANE
|
||||
else
|
||||
plane = FLOOR_PLANE
|
||||
|
||||
/obj/machinery/atmospherics/proc/update_pipe_image()
|
||||
pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view)
|
||||
@@ -95,15 +98,18 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/proc/add_underlay(turf/T, obj/machinery/atmospherics/node, direction, icon_connect_type)
|
||||
if(node)
|
||||
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
|
||||
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe) && !T.transparent_floor)
|
||||
//underlays += SSair.icon_manager.get_atmos_icon("underlay_down", direction, color_cache_name(node))
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
|
||||
else
|
||||
//underlays += SSair.icon_manager.get_atmos_icon("underlay_intact", direction, color_cache_name(node))
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
||||
else
|
||||
//underlays += SSair.icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color)
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type)
|
||||
if(T.transparent_floor) //we want to keep pipes under transparent floors connected normally
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
||||
else
|
||||
//underlays += SSair.icon_manager.get_atmos_icon("underlay_exposed", direction, pipe_color)
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "exposed" + icon_connect_type)
|
||||
|
||||
/obj/machinery/atmospherics/proc/update_underlays()
|
||||
if(check_icon_cache())
|
||||
@@ -166,11 +172,14 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
//(De)construction
|
||||
/obj/machinery/atmospherics/attackby(obj/item/W, mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(can_unwrench && istype(W, /obj/item/wrench))
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.transparent_floor && istype(src, /obj/machinery/atmospherics/pipe) && layer != GAS_PIPE_VISIBLE_LAYER) //pipes on GAS_PIPE_VISIBLE_LAYER are above the transparent floor and should be interactable
|
||||
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
||||
return
|
||||
if(level == 1 && isturf(T) && T.intact)
|
||||
to_chat(user, "<span class='danger'>You must remove the plating first.</span>")
|
||||
return 1
|
||||
return
|
||||
var/datum/gas_mixture/int_air = return_air()
|
||||
var/datum/gas_mixture/env_air = loc.return_air()
|
||||
add_fingerprint(user)
|
||||
@@ -184,14 +193,14 @@ Pipelines + Other Objects -> Pipe network
|
||||
playsound(src.loc, 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>")
|
||||
to_chat(user, "<span class='warning'>As you begin unwrenching \the [src] a gust of air blows in your face... maybe you should reconsider?</span>")
|
||||
unsafe_wrenching = TRUE //Oh dear oh dear
|
||||
|
||||
if(do_after(user, 40 * W.toolspeed, target = src) && !QDELETED(src))
|
||||
user.visible_message( \
|
||||
"[user] unfastens \the [src].", \
|
||||
"<span class='notice'>You have unfastened \the [src].</span>", \
|
||||
"<span class='italics'>You hear ratchet.</span>")
|
||||
"<span class='italics'>You hear ratcheting.</span>")
|
||||
investigate_log("was <span class='warning'>REMOVED</span> by [key_name(usr)]", "atmos")
|
||||
|
||||
for(var/obj/item/clothing/shoes/magboots/usermagboots in user.get_equipped_items())
|
||||
@@ -206,6 +215,9 @@ Pipelines + Other Objects -> Pipe network
|
||||
unsafe_pressure_release(user,internal_pressure)
|
||||
deconstruct(TRUE)
|
||||
else
|
||||
if(T.transparent_floor)
|
||||
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
||||
return
|
||||
return ..()
|
||||
|
||||
//Called when an atmospherics object is unwrenched while having a large pressure difference
|
||||
@@ -240,7 +252,12 @@ Pipelines + Other Objects -> Pipe network
|
||||
dir = D
|
||||
initialize_directions = P
|
||||
var/turf/T = loc
|
||||
level = T.intact ? 2 : 1
|
||||
if(!T.transparent_floor)
|
||||
level = T.intact ? 2 : 1
|
||||
else
|
||||
level = 2
|
||||
plane = GAME_PLANE
|
||||
layer = GAS_PIPE_VISIBLE_LAYER
|
||||
add_fingerprint(usr)
|
||||
if(!SSair.initialized) //If there's no atmos subsystem, we can't really initialize pipenets
|
||||
SSair.machinery_to_construct.Add(src)
|
||||
@@ -337,12 +354,15 @@ Pipelines + Other Objects -> Pipe network
|
||||
|
||||
/obj/machinery/atmospherics/proc/add_underlay_adapter(turf/T, obj/machinery/atmospherics/node, direction, icon_connect_type) //modified from add_underlay, does not make exposed underlays
|
||||
if(node)
|
||||
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe))
|
||||
if(T.intact && node.level == 1 && istype(node, /obj/machinery/atmospherics/pipe) && !T.transparent_floor)
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "down" + icon_connect_type)
|
||||
else
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
||||
else
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
|
||||
if(T.transparent_floor) //we want to keep pipes under transparent floors connected normally
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "intact" + icon_connect_type)
|
||||
else
|
||||
underlays += SSair.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
|
||||
|
||||
/obj/machinery/atmospherics/singularity_pull(S, current_size)
|
||||
if(current_size >= STAGE_FIVE)
|
||||
|
||||
@@ -159,9 +159,9 @@
|
||||
var/cache_name = state
|
||||
|
||||
for(var/D in GLOB.cardinal)
|
||||
var/image/I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D))
|
||||
var/image/I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D), layer = GAS_PIPE_HIDDEN_LAYER)
|
||||
underlays[cache_name + "[D]"] = I
|
||||
for(var/pipe_color in GLOB.pipe_colors)
|
||||
I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D))
|
||||
I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D), layer = GAS_PIPE_HIDDEN_LAYER)
|
||||
I.color = GLOB.pipe_colors[pipe_color]
|
||||
underlays[state + "[D]" + "[GLOB.pipe_colors[pipe_color]]"] = I
|
||||
|
||||
@@ -79,7 +79,8 @@
|
||||
break
|
||||
|
||||
var/turf/T = get_turf(src) // hide if turf is not intact
|
||||
if(!istype(T)) return
|
||||
if(!istype(T) || T.transparent_floor)
|
||||
return
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@
|
||||
node3 = target
|
||||
break
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
if(T.transparent_floor)
|
||||
return
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -165,7 +165,8 @@
|
||||
break
|
||||
|
||||
var/turf/T = src.loc // hide if turf is not intact
|
||||
hide(T.intact)
|
||||
if(!T.transparent_floor)
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
break
|
||||
|
||||
var/turf/T = loc // hide if turf is not intact
|
||||
hide(T.intact)
|
||||
if(!T.transparent_floor)
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/check_pressure(pressure)
|
||||
|
||||
@@ -35,6 +35,7 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
icon_state = "0-1"
|
||||
var/d1 = 0
|
||||
var/d2 = 1
|
||||
plane = FLOOR_PLANE
|
||||
layer = WIRE_LAYER //Just below unary stuff, which is at 2.45 and above pipes, which are at 2.4
|
||||
color = COLOR_RED
|
||||
|
||||
@@ -68,9 +69,11 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
d2 = text2num(copytext( icon_state, dash+1 ))
|
||||
|
||||
var/turf/T = get_turf(src) // hide if turf is not intact
|
||||
LAZYADD(GLOB.cable_list, src) //add it to the global cable list
|
||||
if(T.transparent_floor)
|
||||
return
|
||||
if(level == 1)
|
||||
hide(T.intact)
|
||||
LAZYADD(GLOB.cable_list, src) //add it to the global cable list
|
||||
|
||||
/obj/structure/cable/Destroy() // called when a cable is deleted
|
||||
if(powernet)
|
||||
@@ -162,7 +165,8 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
//
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
if(T.transparent_floor || T.intact)
|
||||
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
@@ -204,7 +208,8 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
/obj/structure/cable/wirecutter_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
if(T.transparent_floor || T.intact)
|
||||
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
@@ -703,7 +708,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
|
||||
var/turf/T = get_turf(C)
|
||||
|
||||
if(!isturf(T) || T.intact) // sanity checks, also stop use interacting with T-scanner revealed cable
|
||||
if(!isturf(T) || T.intact || T.transparent_floor) // sanity checks, also stop use interacting with T-scanner revealed cable
|
||||
return
|
||||
|
||||
if(get_dist(C, user) > 1) // make sure it's close enough
|
||||
@@ -719,7 +724,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe("cable restrai
|
||||
|
||||
// one end of the clicked cable is pointing towards us
|
||||
if(C.d1 == dirn || C.d2 == dirn)
|
||||
if(U.intact) // can't place a cable if the floor is complete
|
||||
if(U.intact || U.transparent_floor) // can't place a cable if the floor is complete
|
||||
to_chat(user, "<span class='warning'>You can't lay cable there unless the floor tiles are removed!</span>")
|
||||
return
|
||||
else
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
/obj/machinery/power/terminal/Initialize(mapload)
|
||||
. = ..()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.transparent_floor)
|
||||
return
|
||||
if(level == 1)
|
||||
hide(T.intact)
|
||||
|
||||
|
||||
@@ -691,6 +691,7 @@
|
||||
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
|
||||
damage_deflection = 10
|
||||
flags_2 = RAD_PROTECT_CONTENTS_2 | RAD_NO_CONTAMINATE_2
|
||||
plane = FLOOR_PLANE
|
||||
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
|
||||
var/base_icon_state // initial icon state on map
|
||||
|
||||
@@ -757,6 +758,9 @@
|
||||
// update the icon_state to reflect hidden status
|
||||
/obj/structure/disposalpipe/proc/update()
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.transparent_floor)
|
||||
update_icon()
|
||||
return
|
||||
hide(T.intact && !istype(T, /turf/space)) // space never hides pipes
|
||||
update_icon()
|
||||
|
||||
@@ -889,15 +893,20 @@
|
||||
|
||||
/obj/structure/disposalpipe/attackby(obj/item/I, mob/user, params)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T.intact)
|
||||
return // prevent interaction with T-scanner revealed pipes
|
||||
if(T.intact || T.transparent_floor)
|
||||
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
||||
return // prevent interaction with T-scanner revealed pipes and pipes under glass
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/structure/disposalpipe/welder_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
var/turf/T = get_turf(src)
|
||||
if(!I.tool_use_check(user, 0))
|
||||
return
|
||||
if(T.transparent_floor)
|
||||
to_chat(user, "<span class='danger'>You can't interact with something that's under the floor!</span>")
|
||||
return
|
||||
WELDER_ATTEMPT_SLICING_MESSAGE
|
||||
if(!I.use_tool(src, user, 30, volume = I.tool_volume))
|
||||
return
|
||||
@@ -1201,7 +1210,7 @@
|
||||
return
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
if(T.intact || T.transparent_floor)
|
||||
return // prevent interaction with T-scanner revealed pipes
|
||||
src.add_fingerprint(user)
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1151,6 +1151,7 @@
|
||||
#include "code\game\turfs\simulated\floor\misc_floor.dm"
|
||||
#include "code\game\turfs\simulated\floor\plasteel_floor.dm"
|
||||
#include "code\game\turfs\simulated\floor\plating.dm"
|
||||
#include "code\game\turfs\simulated\floor\transparent.dm"
|
||||
#include "code\game\turfs\space\space.dm"
|
||||
#include "code\game\turfs\space\transit.dm"
|
||||
#include "code\game\verbs\ooc.dm"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user