mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 02:24:11 +01:00
Metalfoam structures can now be used as girders to finish building walls. (#64386)
* Foam structures can be used as girders for walls. * Cleaner ifs * RIP non iron walls
This commit is contained in:
@@ -272,10 +272,12 @@
|
||||
layer = EDGED_TURF_LAYER
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
name = "foamed metal"
|
||||
desc = "A lightweight foamed metal wall."
|
||||
desc = "A lightweight foamed metal wall that can be used as base to construct a wall."
|
||||
gender = PLURAL
|
||||
max_integrity = 20
|
||||
can_atmos_pass = ATMOS_PASS_DENSITY
|
||||
///Var used to prevent spamming of the construction sound
|
||||
var/next_beep = 0
|
||||
|
||||
/obj/structure/foamedmetal/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -305,6 +307,37 @@
|
||||
to_chat(user, span_warning("You hit [src] but bounce off it!"))
|
||||
playsound(src.loc, 'sound/weapons/tap.ogg', 100, TRUE)
|
||||
|
||||
/obj/structure/foamedmetal/attackby(obj/item/W, mob/user, params)
|
||||
///A speed modifier for how fast the wall is build
|
||||
var/platingmodifier = 1
|
||||
if(HAS_TRAIT(user, TRAIT_QUICK_BUILD))
|
||||
platingmodifier = 0.7
|
||||
if(next_beep <= world.time)
|
||||
next_beep = world.time + 10
|
||||
playsound(src, 'sound/machines/clockcult/integration_cog_install.ogg', 50, TRUE)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(!istype(W, /obj/item/stack/sheet))
|
||||
return ..()
|
||||
|
||||
var/obj/item/stack/sheet/sheet_for_plating = W
|
||||
if(istype(sheet_for_plating, /obj/item/stack/sheet/iron))
|
||||
if(sheet_for_plating.get_amount() < 2)
|
||||
to_chat(user, span_warning("You need two sheets of iron to finish a wall!"))
|
||||
return
|
||||
to_chat(user, span_notice("You start adding plating to the foam structure..."))
|
||||
if (do_after(user, 40*platingmodifier, target = src))
|
||||
if(!sheet_for_plating.use(2))
|
||||
return
|
||||
to_chat(user, span_notice("You add the plating."))
|
||||
var/turf/T = get_turf(src)
|
||||
T.PlaceOnTop(/turf/closed/wall)
|
||||
transfer_fingerprints_to(T)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
add_hiddenprint(user)
|
||||
|
||||
/obj/structure/foamedmetal/iron
|
||||
max_integrity = 50
|
||||
icon_state = "ironfoam"
|
||||
@@ -312,7 +345,7 @@
|
||||
//Atmos Backpack Resin, transparent, prevents atmos and filters the air
|
||||
/obj/structure/foamedmetal/resin
|
||||
name = "\improper ATMOS Resin"
|
||||
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature."
|
||||
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature. It can be used as base to construct a wall."
|
||||
opacity = FALSE
|
||||
icon_state = "atmos_resin"
|
||||
alpha = 120
|
||||
|
||||
Reference in New Issue
Block a user