Files
Bubberstation/code/game/objects/structures/plasticflaps.dm
LemonInTheDark 6d1cb94ffb LINDA Reforged (#55604)
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
2021-01-08 08:14:08 +01:00

112 lines
4.0 KiB
Plaintext

/obj/structure/plasticflaps
name = "airtight plastic flaps"
desc = "Heavy duty, airtight, plastic flaps. Definitely can't get past those. No way."
gender = PLURAL
icon = 'icons/obj/stationobjs.dmi'
icon_state = "plasticflaps"
armor = list(MELEE = 100, BULLET = 80, LASER = 80, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 50, ACID = 50)
density = FALSE
anchored = TRUE
CanAtmosPass = ATMOS_PASS_NO
/obj/structure/plasticflaps/opaque
opacity = TRUE
/obj/structure/plasticflaps/Initialize()
. = ..()
alpha = 0
SSvis_overlays.add_vis_overlay(src, icon, icon_state, ABOVE_MOB_LAYER, plane, dir, add_appearance_flags = RESET_ALPHA) //you see mobs under it, but you hit them like they are above it
/obj/structure/plasticflaps/examine(mob/user)
. = ..()
if(anchored)
. += "<span class='notice'>[src] are <b>screwed</b> to the floor.</span>"
else
. += "<span class='notice'>[src] are no longer <i>screwed</i> to the floor, and the flaps can be <b>cut</b> apart.</span>"
/obj/structure/plasticflaps/screwdriver_act(mob/living/user, obj/item/W)
if(..())
return TRUE
add_fingerprint(user)
var/action = anchored ? "unscrews [src] from" : "screws [src] to"
var/uraction = anchored ? "unscrew [src] from " : "screw [src] to"
user.visible_message("<span class='warning'>[user] [action] the floor.</span>", "<span class='notice'>You start to [uraction] the floor...</span>", "<span class='hear'>You hear rustling noises.</span>")
if(W.use_tool(src, user, 100, volume=100, extra_checks = CALLBACK(src, .proc/check_anchored_state, anchored)))
set_anchored(!anchored)
to_chat(user, "<span class='notice'>You [anchored ? "unscrew" : "screw"] [src] from the floor.</span>")
return TRUE
else
return TRUE
/obj/structure/plasticflaps/wirecutter_act(mob/living/user, obj/item/W)
. = ..()
if(!anchored)
user.visible_message("<span class='warning'>[user] cuts apart [src].</span>", "<span class='notice'>You start to cut apart [src].</span>", "<span class='hear'>You hear cutting.</span>")
if(W.use_tool(src, user, 50, volume=100))
if(anchored)
return TRUE
to_chat(user, "<span class='notice'>You cut apart [src].</span>")
var/obj/item/stack/sheet/plastic/five/P = new(loc)
P.add_fingerprint(user)
qdel(src)
return TRUE
/obj/structure/plasticflaps/proc/check_anchored_state(check_anchored)
if(anchored != check_anchored)
return FALSE
return TRUE
/obj/structure/plasticflaps/CanAStarPass(ID, to_dir, caller)
if(isliving(caller))
if(isbot(caller))
return TRUE
var/mob/living/M = caller
if(!M.ventcrawler && M.mob_size != MOB_SIZE_TINY)
return FALSE
var/atom/movable/M = caller
if(M?.pulling)
return CanAStarPass(ID, to_dir, M.pulling)
return TRUE //diseases, stings, etc can pass
/obj/structure/plasticflaps/CanAllowThrough(atom/movable/A, turf/T)
. = ..()
if(A.pass_flags & PASSFLAPS) //For anything specifically engineered to cross plastic flaps.
return TRUE
if(istype(A) && (A.pass_flags & PASSGLASS))
return prob(60)
var/obj/structure/bed/B = A
if(istype(A, /obj/structure/bed) && (B.has_buckled_mobs() || B.density))//if it's a bed/chair and is dense or someone is buckled, it will not pass
return FALSE
if(istype(A, /obj/structure/closet/cardboard))
var/obj/structure/closet/cardboard/C = A
if(C.move_delay)
return FALSE
if(ismecha(A))
return FALSE
else if(isliving(A)) // You Shall Not Pass!
var/mob/living/M = A
if(M.buckled && istype(M.buckled, /mob/living/simple_animal/bot/mulebot)) // mulebot passenger gets a free pass.
return TRUE
if(M.body_position == STANDING_UP && !M.ventcrawler && M.mob_size != MOB_SIZE_TINY) //If your not laying down, or a ventcrawler or a small creature, no pass.
return FALSE
/obj/structure/plasticflaps/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/plastic/five(loc)
qdel(src)
/obj/structure/plasticflaps/Initialize()
. = ..()
air_update_turf(TRUE, TRUE)
/obj/structure/plasticflaps/Destroy()
var/atom/oldloc = loc
. = ..()
if (oldloc)
oldloc.air_update_turf(TRUE, FALSE)