Files
+37 21b4095dfd [MDB IGNORE] [IDB IGNORE] Upstream Sync - 04/17/2026 (#5453)
Upstream 04/17/2026

fixes https://github.com/Bubberstation/Bubberstation/issues/5549

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tgstation-ci[bot] <179393467+tgstation-ci[bot]@users.noreply.github.com>
Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: rageguy505 <54517726+rageguy505@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Aliceee2ch <160794176+Aliceee2ch@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Tsar-Salat <62388554+Tsar-Salat@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: Maxipat <108554989+Maxipat112@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: deltanedas <39013340+deltanedas@users.noreply.github.com>
Co-authored-by: SimplyLogan <47579821+loganuk@users.noreply.github.com>
Co-authored-by: loganuk <fakeemail123@aol.com>
Co-authored-by: Leland Kemble <70413276+lelandkemble@users.noreply.github.com>
Co-authored-by: FalloutFalcon <86381784+FalloutFalcon@users.noreply.github.com>
Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: siliconOpossum <138069572+siliconOpossum@users.noreply.github.com>
Co-authored-by: Isratosh <Isratosh@hotmail.com>
Co-authored-by: TheRyeGuyWhoWillNowDie <70169560+TheRyeGuyWhoWillNowDie@users.noreply.github.com>
Co-authored-by: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Co-authored-by: Alexander V. <volas@ya.ru>
Co-authored-by: ElGitificador <168473461+ElGitificador@users.noreply.github.com>
Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: Layzu666 <121319428+Layzu666@users.noreply.github.com>
Co-authored-by: Arturlang <24881678+Arturlang@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: mrmanlikesbt <99309552+mrmanlikesbt@users.noreply.github.com>
Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
Co-authored-by: John F. Kennedy <54908920+MacaroniCritter@users.noreply.github.com>
Co-authored-by: Cursor <102828457+theselfish@users.noreply.github.com>
Co-authored-by: Josh <josh.adam.powell@gmail.com>
Co-authored-by: Josh Powell <josh.powell@softwire.com>
Co-authored-by: Yobrocharlie <Charliemiller5617@gmail.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: shayoki <96078776+shayoki@users.noreply.github.com>
Co-authored-by: LT3 <83487515+lessthnthree@users.noreply.github.com>
2026-05-16 00:56:00 +02:00

247 lines
7.5 KiB
Plaintext

#define TAPE_REQUIRED_TO_FIX 2
#define INFLATABLE_DOOR_OPENED FALSE
#define INFLATABLE_DOOR_CLOSED TRUE
#define BOX_DOOR_AMOUNT 7
#define BOX_WALL_AMOUNT 14
/obj/structure/inflatable
name = "inflatable wall"
desc = "An inflated membrane. Do not puncture. Alt+Click to deflate."
can_atmos_pass = ATMOS_PASS_DENSITY
density = TRUE
anchored = TRUE
max_integrity = 40
icon = 'modular_skyrat/modules/inflatables/icons/inflatable.dmi'
icon_state = "wall"
/// The type we drop when damaged.
var/torn_type = /obj/item/inflatable/torn
/// The type we drop when deflated.
var/deflated_type = /obj/item/inflatable
/// The hitsound made when we're... hit...
var/hit_sound = 'sound/effects/glass/glasshit.ogg'
/// How quickly we deflate when manually deflated.
var/manual_deflation_time = 3 SECONDS
/// Whether or not the inflatable has been deflated
var/has_been_deflated = FALSE
/obj/structure/inflatable/Initialize(mapload)
. = ..()
air_update_turf(TRUE, !density)
/obj/structure/inflatable/ex_act(severity)
switch(severity)
if(EXPLODE_DEVASTATE)
qdel(src)
return
if(EXPLODE_HEAVY)
deflate(TRUE)
return
if(EXPLODE_LIGHT)
if(prob(50))
deflate(TRUE)
return
/obj/structure/inflatable/atom_destruction(damage_flag)
deflate(TRUE)
return ..()
/obj/structure/inflatable/attackby(obj/item/attacking_item, mob/user, params)
if(attacking_item.sharpness)
visible_message(span_danger("<b>[user] pierces [src] with [attacking_item]!</b>"))
deflate(TRUE)
return
return ..()
/obj/structure/inflatable/click_alt(mob/user)
deflate(FALSE)
return CLICK_ACTION_SUCCESS
/obj/structure/inflatable/play_attack_sound(damage_amount, damage_type, damage_flag)
playsound(src, hit_sound, 75, TRUE)
// Deflates the airbag and drops a deflated airbag item. If violent, drops a broken item instantly.
/obj/structure/inflatable/proc/deflate(violent)
if(has_been_deflated) // We do not ever want to deflate more than once.
return
has_been_deflated = TRUE
playsound(src, 'sound/machines/hiss.ogg', 75, 1)
if(!violent)
balloon_alert_to_viewers("slowly deflates!")
addtimer(CALLBACK(src, PROC_REF(slow_deflate_finish)), manual_deflation_time)
return
var/turf/inflatable_loc = get_turf(src)
inflatable_loc.balloon_alert_to_viewers("[src] rapidly deflates!") // just so we don't balloon alert from the qdeleted inflatable object
if(torn_type)
new torn_type(get_turf(src))
qdel(src)
// Called when the airbag is calmly deflated, drops a non-broken item.
/obj/structure/inflatable/proc/slow_deflate_finish()
if(deflated_type)
new deflated_type(get_turf(src))
qdel(src)
/obj/structure/inflatable/verb/hand_deflate()
set name = "Deflate"
set category = "Object"
set src in oview(1)
if(usr.stat || usr.can_interact())
return
deflate(FALSE)
/obj/structure/inflatable/door
name = "inflatable door"
can_atmos_pass = ATMOS_PASS_DENSITY
icon = 'modular_skyrat/modules/inflatables/icons/inflatable.dmi'
icon_state = "door_closed"
base_icon_state = "door"
torn_type = /obj/item/inflatable/door/torn
deflated_type = /obj/item/inflatable/door
/// Are we open(FALSE), or are we closed(TRUE)?
var/door_state = INFLATABLE_DOOR_CLOSED
/obj/structure/inflatable/door/Initialize(mapload)
. = ..()
density = door_state
/obj/structure/inflatable/door/attack_hand(mob/living/user, list/modifiers)
. = ..()
if(!user.can_interact_with(src))
return
toggle_door()
to_chat(user, span_notice("You [door_state ? "close" : "open"] [src]!"))
/obj/structure/inflatable/door/update_icon_state()
. = ..()
icon_state = "[base_icon_state]_[door_state ? "closed" : "open"]"
/obj/structure/inflatable/door/proc/toggle_door()
if(door_state) // opening
door_state = INFLATABLE_DOOR_OPENED
flick("[base_icon_state]_opening", src)
else // Closing
door_state = INFLATABLE_DOOR_CLOSED
flick("[base_icon_state]_closing", src)
density = door_state
air_update_turf(TRUE, !density)
update_appearance()
// The deployable item
/obj/item/inflatable
name = "inflatable wall"
desc = "A folded membrane which rapidly expands into a large cubical shape on activation."
icon = 'modular_skyrat/modules/inflatables/icons/inflatable.dmi'
icon_state = "folded_wall"
base_icon_state = "folded_wall"
w_class = WEIGHT_CLASS_SMALL
/// The structure we deploy when used.
var/structure_type = /obj/structure/inflatable
/// Are we torn?
var/torn = FALSE
/obj/item/inflatable/Initialize(mapload)
. = ..()
update_appearance()
/obj/item/inflatable/torn
torn = TRUE
/obj/item/inflatable/attack_self(mob/user)
. = ..()
if(torn)
to_chat(user, span_warning("[src] is too damaged to function!"))
return
if(locate(structure_type) in get_turf(user))
to_chat(user, span_warning("There is already a wall here!"))
return
playsound(loc, 'sound/items/zip/zip.ogg', 75, 1)
to_chat(user, span_notice("You inflate [src]."))
if(do_after(user, 1 SECONDS, src))
new structure_type(get_turf(user))
qdel(src)
/obj/item/inflatable/attackby(obj/item/attacking_item, mob/user)
if(!istype(attacking_item, /obj/item/stack/medical/wrap/sticky_tape))
return ..()
if(!torn)
to_chat(user, span_notice("[src] does not need repairing!"))
return
var/obj/item/stack/medical/wrap/sticky_tape/attacking_tape = attacking_item
if(attacking_tape.use(TAPE_REQUIRED_TO_FIX, check = TRUE))
to_chat(user, span_danger("There is not enough of [attacking_tape]! You need at least [TAPE_REQUIRED_TO_FIX] pieces!"))
return
if(!do_after(user, 2 SECONDS, src))
return
playsound(user, 'modular_skyrat/modules/inflatables/sound/ducttape1.ogg', 50, 1)
to_chat(user, span_notice("You fix [src] using [attacking_tape]!"))
attacking_tape.use(TAPE_REQUIRED_TO_FIX)
torn = FALSE
update_appearance()
/obj/item/inflatable/update_icon_state()
. = ..()
icon_state = "[base_icon_state][torn ? "_torn" : ""]"
/obj/item/inflatable/examine(mob/user)
. = ..()
if(torn)
. += span_warning("It is badly torn, and cannot be used! The damage looks like it could be repaired with some <b>tape</b>.")
/obj/item/inflatable/suicide_act(mob/living/user)
visible_message(user, span_danger("[user] starts shoving the [src] up [user.p_their()] ass! It looks like [user.p_their()] going to pull the cord, oh shit!"))
playsound(user.loc, 'sound/machines/hiss.ogg', 75, 1)
new structure_type(user.loc)
user.gib()
return BRUTELOSS
/obj/item/inflatable/door
name = "inflatable door"
desc = "A folded membrane which rapidly expands into a simple door on activation."
icon = 'modular_skyrat/modules/inflatables/icons/inflatable.dmi'
icon_state = "folded_door"
base_icon_state = "folded_door"
structure_type = /obj/structure/inflatable/door
/obj/item/inflatable/door/torn
torn = TRUE
/// The storage for the inflatables box.
/datum/storage/inflatables_box
max_slots = (BOX_DOOR_AMOUNT + BOX_WALL_AMOUNT)
max_specific_storage = WEIGHT_CLASS_SMALL
max_total_storage = (BOX_DOOR_AMOUNT + BOX_WALL_AMOUNT) * WEIGHT_CLASS_SMALL
/// The box full of inflatables
/obj/item/storage/inflatable
icon = 'modular_skyrat/modules/more_briefcases/icons/briefcases.dmi'
name = "inflatable barrier box"
desc = "Contains inflatable walls and doors."
icon_state = "briefcase_inflate"
w_class = WEIGHT_CLASS_NORMAL
storage_type = /datum/storage/inflatables_box
/obj/item/storage/inflatable/Initialize(mapload)
. = ..()
atom_storage.set_holdable(typesof(/obj/item/inflatable))
/obj/item/storage/inflatable/PopulateContents()
for(var/i = 0, i < BOX_DOOR_AMOUNT, i++)
new /obj/item/inflatable/door(src)
for(var/i = 0, i < BOX_WALL_AMOUNT, i ++)
new /obj/item/inflatable(src)
#undef TAPE_REQUIRED_TO_FIX
#undef INFLATABLE_DOOR_OPENED
#undef INFLATABLE_DOOR_CLOSED
#undef BOX_DOOR_AMOUNT
#undef BOX_WALL_AMOUNT