mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-16 03:56:20 +00:00
Speeds up gas movement significantly Documents the intent and finer details of the atmos system (Thanks dunc) Fixes excited groups constantly rebuilding, this broke 4 years ago Fixes superconductors just straight up not working Allows turfs to sleep while inside an excited group Adds a new subprocess to SSAir to support rebuilding in this state Most heat based behavior no longer relies on being inside a fire Adds a new element to support doing this cleanly Adds a new subprocess to SSAir to support doing this while a turf is asleep Refactors air_update_turf to allow for finer control Makes apcs take damage in heat to prevent infinite plasma fire diffs Cleans up immutable gas mixtures to make them work properly when the mix has gas in it Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global immutable mix Cleans up a typed for loop in reactions Canisters will take damage from outside heat now Speeds up excited group dismantle Increases the superconductor threshold by 200k Cleans up some roundstart ATs on some ruins Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |= Prevents openspace from trying to melt Tweaks a canister examine line Makes planetary turfs reset to base when broken down as part of an excited group Makes it impossible for planetary turfs to rebuild, just like space tiles Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance to tick. Fire alarms will trigger when the area gets too cold for humans
353 lines
11 KiB
Plaintext
353 lines
11 KiB
Plaintext
/*
|
|
* False Walls
|
|
*/
|
|
/obj/structure/falsewall
|
|
name = "wall"
|
|
desc = "A huge chunk of metal used to separate rooms."
|
|
anchored = TRUE
|
|
icon = 'icons/turf/walls/wall.dmi'
|
|
icon_state = "wall-0"
|
|
base_icon_state = "wall"
|
|
layer = LOW_OBJ_LAYER
|
|
density = TRUE
|
|
opacity = TRUE
|
|
max_integrity = 100
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_CLOSED_TURFS, SMOOTH_GROUP_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_WALLS)
|
|
can_be_unanchored = FALSE
|
|
CanAtmosPass = ATMOS_PASS_DENSITY
|
|
flags_1 = RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
|
|
rad_insulation = RAD_MEDIUM_INSULATION
|
|
var/mineral = /obj/item/stack/sheet/metal
|
|
var/mineral_amount = 2
|
|
var/walltype = /turf/closed/wall
|
|
var/girder_type = /obj/structure/girder/displaced
|
|
var/opening = FALSE
|
|
|
|
|
|
/obj/structure/falsewall/Initialize()
|
|
. = ..()
|
|
air_update_turf(TRUE, TRUE)
|
|
|
|
/obj/structure/falsewall/attack_hand(mob/user)
|
|
if(opening)
|
|
return
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
|
|
opening = TRUE
|
|
update_icon()
|
|
if(!density)
|
|
var/srcturf = get_turf(src)
|
|
for(var/mob/living/obstacle in srcturf) //Stop people from using this as a shield
|
|
opening = FALSE
|
|
return
|
|
addtimer(CALLBACK(src, /obj/structure/falsewall/proc/toggle_open), 5)
|
|
|
|
/obj/structure/falsewall/proc/toggle_open()
|
|
if(!QDELETED(src))
|
|
density = !density
|
|
set_opacity(density)
|
|
opening = FALSE
|
|
update_icon()
|
|
air_update_turf(TRUE, !density)
|
|
|
|
/obj/structure/falsewall/update_icon()//Calling icon_update will refresh the smoothwalls if it's closed, otherwise it will make sure the icon is correct if it's open
|
|
if(opening)
|
|
if(density)
|
|
icon_state = "fwall_opening"
|
|
smoothing_flags = NONE
|
|
clear_smooth_overlays()
|
|
else
|
|
icon_state = "fwall_closing"
|
|
else
|
|
if(density)
|
|
icon_state = "[base_icon_state]-[smoothing_junction]"
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
QUEUE_SMOOTH(src)
|
|
else
|
|
icon_state = "fwall_open"
|
|
|
|
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
|
|
var/turf/T = get_turf(src)
|
|
T.PlaceOnTop(walltype)
|
|
if(delete)
|
|
qdel(src)
|
|
return T
|
|
|
|
/obj/structure/falsewall/attackby(obj/item/W, mob/user, params)
|
|
if(opening)
|
|
to_chat(user, "<span class='warning'>You must wait until the door has stopped moving!</span>")
|
|
return
|
|
|
|
if(W.tool_behaviour == TOOL_SCREWDRIVER)
|
|
if(density)
|
|
var/turf/T = get_turf(src)
|
|
if(T.density)
|
|
to_chat(user, "<span class='warning'>[src] is blocked!</span>")
|
|
return
|
|
if(!isfloorturf(T))
|
|
to_chat(user, "<span class='warning'>[src] bolts must be tightened on the floor!</span>")
|
|
return
|
|
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='notice'>You tighten the bolts on the wall.</span>")
|
|
ChangeToWall()
|
|
else
|
|
to_chat(user, "<span class='warning'>You can't reach, close it first!</span>")
|
|
|
|
else if(W.tool_behaviour == TOOL_WELDER)
|
|
if(W.use_tool(src, user, 0, volume=50))
|
|
dismantle(user, TRUE)
|
|
else
|
|
return ..()
|
|
|
|
/obj/structure/falsewall/proc/dismantle(mob/user, disassembled=TRUE, obj/item/tool = null)
|
|
user.visible_message("<span class='notice'>[user] dismantles the false wall.</span>", "<span class='notice'>You dismantle the false wall.</span>")
|
|
if(tool)
|
|
tool.play_tool_sound(src, 100)
|
|
else
|
|
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
|
deconstruct(disassembled)
|
|
|
|
/obj/structure/falsewall/deconstruct(disassembled = TRUE)
|
|
if(!(flags_1 & NODECONSTRUCT_1))
|
|
if(disassembled)
|
|
new girder_type(loc)
|
|
if(mineral_amount)
|
|
for(var/i in 1 to mineral_amount)
|
|
new mineral(loc)
|
|
qdel(src)
|
|
|
|
/obj/structure/falsewall/get_dumping_location(obj/item/storage/source,mob/user)
|
|
return null
|
|
|
|
/obj/structure/falsewall/examine_status(mob/user) //So you can't detect falsewalls by examine.
|
|
to_chat(user, "<span class='notice'>The outer plating is <b>welded</b> firmly in place.</span>")
|
|
return null
|
|
|
|
/*
|
|
* False R-Walls
|
|
*/
|
|
|
|
/obj/structure/falsewall/reinforced
|
|
name = "reinforced wall"
|
|
desc = "A huge chunk of reinforced metal used to separate rooms."
|
|
icon = 'icons/turf/walls/reinforced_wall.dmi'
|
|
icon_state = "reinforced_wall-0"
|
|
base_icon_state = "reinforced_wall"
|
|
walltype = /turf/closed/wall/r_wall
|
|
mineral = /obj/item/stack/sheet/plasteel
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
|
|
/obj/structure/falsewall/reinforced/examine_status(mob/user)
|
|
to_chat(user, "<span class='notice'>The outer <b>grille</b> is fully intact.</span>")
|
|
return null
|
|
|
|
/obj/structure/falsewall/reinforced/attackby(obj/item/tool, mob/user)
|
|
..()
|
|
if(tool.tool_behaviour == TOOL_WIRECUTTER)
|
|
dismantle(user, TRUE, tool)
|
|
|
|
/*
|
|
* Uranium Falsewalls
|
|
*/
|
|
|
|
/obj/structure/falsewall/uranium
|
|
name = "uranium wall"
|
|
desc = "A wall with uranium plating. This is probably a bad idea."
|
|
icon = 'icons/turf/walls/uranium_wall.dmi'
|
|
icon_state = "uranium_wall-0"
|
|
base_icon_state = "uranium_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/uranium
|
|
walltype = /turf/closed/wall/mineral/uranium
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_URANIUM_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_URANIUM_WALLS)
|
|
var/active = null
|
|
var/last_event = 0
|
|
|
|
/obj/structure/falsewall/uranium/attackby(obj/item/W, mob/user, params)
|
|
radiate()
|
|
return ..()
|
|
|
|
/obj/structure/falsewall/uranium/attack_hand(mob/user)
|
|
radiate()
|
|
. = ..()
|
|
|
|
/obj/structure/falsewall/uranium/proc/radiate()
|
|
if(!active)
|
|
if(world.time > last_event+15)
|
|
active = 1
|
|
radiation_pulse(src, 150)
|
|
for(var/turf/closed/wall/mineral/uranium/T in orange(1,src))
|
|
T.radiate()
|
|
last_event = world.time
|
|
active = null
|
|
return
|
|
return
|
|
/*
|
|
* Other misc falsewall types
|
|
*/
|
|
|
|
/obj/structure/falsewall/gold
|
|
name = "gold wall"
|
|
desc = "A wall with gold plating. Swag!"
|
|
icon = 'icons/turf/walls/gold_wall.dmi'
|
|
icon_state = "gold_wall-0"
|
|
base_icon_state = "gold_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/gold
|
|
walltype = /turf/closed/wall/mineral/gold
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_GOLD_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_GOLD_WALLS)
|
|
|
|
/obj/structure/falsewall/silver
|
|
name = "silver wall"
|
|
desc = "A wall with silver plating. Shiny."
|
|
icon = 'icons/turf/walls/silver_wall.dmi'
|
|
icon_state = "silver_wall-0"
|
|
base_icon_state = "silver_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/silver
|
|
walltype = /turf/closed/wall/mineral/silver
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SILVER_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_SILVER_WALLS)
|
|
|
|
/obj/structure/falsewall/diamond
|
|
name = "diamond wall"
|
|
desc = "A wall with diamond plating. You monster."
|
|
icon = 'icons/turf/walls/diamond_wall.dmi'
|
|
icon_state = "diamond_wall-0"
|
|
base_icon_state = "diamond_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/diamond
|
|
walltype = /turf/closed/wall/mineral/diamond
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_DIAMOND_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_DIAMOND_WALLS)
|
|
max_integrity = 800
|
|
|
|
/obj/structure/falsewall/plasma
|
|
name = "plasma wall"
|
|
desc = "A wall with plasma plating. This is definitely a bad idea."
|
|
icon = 'icons/turf/walls/plasma_wall.dmi'
|
|
icon_state = "plasma_wall-0"
|
|
base_icon_state = "plasma_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/plasma
|
|
walltype = /turf/closed/wall/mineral/plasma
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASMA_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_PLASMA_WALLS)
|
|
|
|
/obj/structure/falsewall/plasma/ComponentInitialize()
|
|
. = ..()
|
|
AddElement(/datum/element/atmos_sensitive)
|
|
|
|
/obj/structure/falsewall/plasma/attackby(obj/item/W, mob/user, params)
|
|
if(W.get_temperature() > 300)
|
|
var/turf/T = get_turf(src)
|
|
message_admins("Plasma falsewall ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]")
|
|
log_game("Plasma falsewall ignited by [key_name(user)] in [AREACOORD(T)]")
|
|
burnbabyburn()
|
|
else
|
|
return ..()
|
|
|
|
/obj/structure/falsewall/plasma/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
|
|
return exposed_temperature > 300
|
|
|
|
/obj/structure/falsewall/plasma/atmos_expose(datum/gas_mixture/air, exposed_temperature)
|
|
burnbabyburn()
|
|
|
|
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
|
|
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
|
|
atmos_spawn_air("plasma=400;TEMP=1000")
|
|
new /obj/structure/girder/displaced(loc)
|
|
qdel(src)
|
|
|
|
/obj/structure/falsewall/bananium
|
|
name = "bananium wall"
|
|
desc = "A wall with bananium plating. Honk!"
|
|
icon = 'icons/turf/walls/bananium_wall.dmi'
|
|
icon_state = "bananium_wall-0"
|
|
base_icon_state = "bananium_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/bananium
|
|
walltype = /turf/closed/wall/mineral/bananium
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_BANANIUM_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_BANANIUM_WALLS)
|
|
|
|
|
|
/obj/structure/falsewall/sandstone
|
|
name = "sandstone wall"
|
|
desc = "A wall with sandstone plating. Rough."
|
|
icon = 'icons/turf/walls/sandstone_wall.dmi'
|
|
icon_state = "sandstone_wall-0"
|
|
base_icon_state = "sandstone_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/sandstone
|
|
walltype = /turf/closed/wall/mineral/sandstone
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_SANDSTONE_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_SANDSTONE_WALLS)
|
|
|
|
/obj/structure/falsewall/wood
|
|
name = "wooden wall"
|
|
desc = "A wall with wooden plating. Stiff."
|
|
icon = 'icons/turf/walls/wood_wall.dmi'
|
|
icon_state = "wood_wall-0"
|
|
base_icon_state = "wood_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/wood
|
|
walltype = /turf/closed/wall/mineral/wood
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_WOOD_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_WOOD_WALLS)
|
|
|
|
/obj/structure/falsewall/iron
|
|
name = "rough metal wall"
|
|
desc = "A wall with rough metal plating."
|
|
icon = 'icons/turf/walls/iron_wall.dmi'
|
|
icon_state = "iron_wall-0"
|
|
base_icon_state = "iron_wall"
|
|
mineral = /obj/item/stack/rods
|
|
mineral_amount = 5
|
|
walltype = /turf/closed/wall/mineral/iron
|
|
base_icon_state = "iron_wall"
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_IRON_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_IRON_WALLS)
|
|
|
|
/obj/structure/falsewall/abductor
|
|
name = "alien wall"
|
|
desc = "A wall with alien alloy plating."
|
|
icon = 'icons/turf/walls/abductor_wall.dmi'
|
|
icon_state = "abductor_wall-0"
|
|
base_icon_state = "abductor_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/abductor
|
|
walltype = /turf/closed/wall/mineral/abductor
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_ABDUCTOR_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_ABDUCTOR_WALLS)
|
|
|
|
/obj/structure/falsewall/titanium
|
|
name = "wall"
|
|
desc = "A light-weight titanium wall used in shuttles."
|
|
icon = 'icons/turf/walls/shuttle_wall.dmi'
|
|
icon_state = "shuttle_wall-0"
|
|
base_icon_state = "shuttle_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/titanium
|
|
walltype = /turf/closed/wall/mineral/titanium
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_TITANIUM_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_TITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
|
|
|
|
/obj/structure/falsewall/plastitanium
|
|
name = "wall"
|
|
desc = "An evil wall of plasma and titanium."
|
|
icon = 'icons/turf/walls/plastitanium_wall.dmi'
|
|
icon_state = "plastitanium_wall-0"
|
|
base_icon_state = "plastitanium_wall"
|
|
mineral = /obj/item/stack/sheet/mineral/plastitanium
|
|
walltype = /turf/closed/wall/mineral/plastitanium
|
|
smoothing_flags = SMOOTH_BITMASK
|
|
smoothing_groups = list(SMOOTH_GROUP_WALLS, SMOOTH_GROUP_PLASTITANIUM_WALLS)
|
|
canSmoothWith = list(SMOOTH_GROUP_PLASTITANIUM_WALLS, SMOOTH_GROUP_AIRLOCK, SMOOTH_GROUP_SHUTTLE_PARTS)
|