mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #28588 from Ergovisavi/atmos_backpack_again
Changes to the Atmos Watertank Backpack
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
// Foam
|
// Foam
|
||||||
// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin.
|
// Similar to smoke, but slower and mobs absorb its reagent through their exposed skin.
|
||||||
|
#define ALUMINUM_FOAM 1
|
||||||
|
#define IRON_FOAM 2
|
||||||
|
#define RESIN_FOAM 3
|
||||||
|
|
||||||
|
|
||||||
/obj/effect/particle_effect/foam
|
/obj/effect/particle_effect/foam
|
||||||
name = "foam"
|
name = "foam"
|
||||||
@@ -22,13 +26,16 @@
|
|||||||
|
|
||||||
/obj/effect/particle_effect/foam/metal
|
/obj/effect/particle_effect/foam/metal
|
||||||
name = "aluminium foam"
|
name = "aluminium foam"
|
||||||
metal = 1
|
metal = ALUMINUM_FOAM
|
||||||
icon_state = "mfoam"
|
icon_state = "mfoam"
|
||||||
|
|
||||||
|
|
||||||
/obj/effect/particle_effect/foam/metal/iron
|
/obj/effect/particle_effect/foam/metal/iron
|
||||||
name = "iron foam"
|
name = "iron foam"
|
||||||
metal = 2
|
metal = IRON_FOAM
|
||||||
|
|
||||||
|
/obj/effect/particle_effect/foam/metal/resin
|
||||||
|
name = "resin foam"
|
||||||
|
metal = RESIN_FOAM
|
||||||
|
|
||||||
|
|
||||||
/obj/effect/particle_effect/foam/New(loc)
|
/obj/effect/particle_effect/foam/New(loc)
|
||||||
@@ -45,10 +52,12 @@
|
|||||||
/obj/effect/particle_effect/foam/proc/kill_foam()
|
/obj/effect/particle_effect/foam/proc/kill_foam()
|
||||||
STOP_PROCESSING(SSfastprocess, src)
|
STOP_PROCESSING(SSfastprocess, src)
|
||||||
switch(metal)
|
switch(metal)
|
||||||
if(1)
|
if(ALUMINUM_FOAM)
|
||||||
new /obj/structure/foamedmetal(src.loc)
|
new /obj/structure/foamedmetal(get_turf(src))
|
||||||
if(2)
|
if(IRON_FOAM)
|
||||||
new /obj/structure/foamedmetal/iron(src.loc)
|
new /obj/structure/foamedmetal/iron(get_turf(src))
|
||||||
|
if(RESIN_FOAM)
|
||||||
|
new /obj/structure/foamedmetal/resin(get_turf(src))
|
||||||
flick("[icon_state]-disolve", src)
|
flick("[icon_state]-disolve", src)
|
||||||
QDEL_IN(src, 5)
|
QDEL_IN(src, 5)
|
||||||
|
|
||||||
@@ -230,3 +239,44 @@
|
|||||||
obj_integrity = 50
|
obj_integrity = 50
|
||||||
max_integrity = 50
|
max_integrity = 50
|
||||||
icon_state = "ironfoam"
|
icon_state = "ironfoam"
|
||||||
|
|
||||||
|
//Atmos Backpack Resin, transparent, prevents atmos and filters the air
|
||||||
|
/obj/structure/foamedmetal/resin
|
||||||
|
name = "ATMOS Resin"
|
||||||
|
desc = "A lightweight, transparent resin used to suffocate fires, scrub the air of toxins, and restore the air to a safe temperature"
|
||||||
|
opacity = FALSE
|
||||||
|
icon_state = "atmos_resin"
|
||||||
|
alpha = 120
|
||||||
|
obj_integrity = 10
|
||||||
|
max_integrity = 10
|
||||||
|
layer = EDGED_TURF_LAYER
|
||||||
|
|
||||||
|
/obj/structure/foamedmetal/resin/Initialize()
|
||||||
|
. = ..()
|
||||||
|
if(isopenturf(loc))
|
||||||
|
var/turf/open/O = loc
|
||||||
|
if(O.air)
|
||||||
|
var/datum/gas_mixture/G = O.air
|
||||||
|
G.temperature = 293.15
|
||||||
|
for(var/obj/effect/hotspot/H in O)
|
||||||
|
qdel(H)
|
||||||
|
var/list/G_gases = G.gases
|
||||||
|
for(var/I in G_gases)
|
||||||
|
if(I != "o2" && I != "n2")
|
||||||
|
G.gases[I][MOLES] = 0
|
||||||
|
G.garbage_collect()
|
||||||
|
O.air_update_turf()
|
||||||
|
for(var/obj/machinery/atmospherics/components/unary/U in O)
|
||||||
|
if(!U.welded)
|
||||||
|
U.welded = TRUE
|
||||||
|
U.update_icon()
|
||||||
|
U.visible_message("<span class='danger'>[U] sealed shut!</span>")
|
||||||
|
for(var/mob/living/L in O)
|
||||||
|
L.ExtinguishMob()
|
||||||
|
for(var/obj/item/Item in O)
|
||||||
|
Item.extinguish()
|
||||||
|
|
||||||
|
|
||||||
|
#undef ALUMINUM_FOAM
|
||||||
|
#undef IRON_FOAM
|
||||||
|
#undef RESIN_FOAM
|
||||||
|
|||||||
@@ -74,6 +74,14 @@
|
|||||||
creation_time = 30
|
creation_time = 30
|
||||||
max_signs = 6
|
max_signs = 6
|
||||||
|
|
||||||
|
/obj/item/weapon/holosign_creator/atmos
|
||||||
|
name = "ATMOS holofan projector"
|
||||||
|
desc = "A holographic projector that creates holographic barriers that prevent changes in atmosphere conditions."
|
||||||
|
icon_state = "signmaker_engi"
|
||||||
|
holosign_type = /obj/structure/holosign/barrier/atmos
|
||||||
|
creation_time = 0
|
||||||
|
max_signs = 3
|
||||||
|
|
||||||
/obj/item/weapon/holosign_creator/cyborg
|
/obj/item/weapon/holosign_creator/cyborg
|
||||||
name = "Energy Barrier Projector"
|
name = "Energy Barrier Projector"
|
||||||
desc = "A holographic projector that creates fragile energy fields"
|
desc = "A holographic projector that creates fragile energy fields"
|
||||||
|
|||||||
@@ -178,15 +178,16 @@
|
|||||||
//ATMOS FIRE FIGHTING BACKPACK
|
//ATMOS FIRE FIGHTING BACKPACK
|
||||||
|
|
||||||
#define EXTINGUISHER 0
|
#define EXTINGUISHER 0
|
||||||
#define NANOFROST 1
|
#define RESIN_LAUNCHER 1
|
||||||
#define METAL_FOAM 2
|
#define RESIN_FOAM 2
|
||||||
|
|
||||||
/obj/item/weapon/watertank/atmos
|
/obj/item/weapon/watertank/atmos
|
||||||
name = "backpack firefighter tank"
|
name = "backpack firefighter tank"
|
||||||
desc = "A refridgerated and pressurized backpack tank with extinguisher nozzle, intended to fight fires. Swaps between extinguisher, nanofrost launcher, and metal foam dispenser for breaches. Nanofrost converts plasma in the air to nitrogen, but only if it is combusting at the time."
|
desc = "A refridgerated and pressurized backpack tank with extinguisher nozzle, intended to fight fires. Swaps between extinguisher, resin launcher and a smaller scale resin foamer."
|
||||||
icon_state = "waterbackpackatmos"
|
|
||||||
item_state = "waterbackpackatmos"
|
item_state = "waterbackpackatmos"
|
||||||
|
icon_state = "waterbackpackatmos"
|
||||||
volume = 200
|
volume = 200
|
||||||
|
slowdown = 0
|
||||||
|
|
||||||
/obj/item/weapon/watertank/atmos/New()
|
/obj/item/weapon/watertank/atmos/New()
|
||||||
..()
|
..()
|
||||||
@@ -211,6 +212,7 @@
|
|||||||
safety = 0
|
safety = 0
|
||||||
max_water = 200
|
max_water = 200
|
||||||
power = 8
|
power = 8
|
||||||
|
force = 10
|
||||||
precision = 1
|
precision = 1
|
||||||
cooling_power = 5
|
cooling_power = 5
|
||||||
w_class = WEIGHT_CLASS_HUGE
|
w_class = WEIGHT_CLASS_HUGE
|
||||||
@@ -218,7 +220,7 @@
|
|||||||
var/obj/item/weapon/watertank/tank
|
var/obj/item/weapon/watertank/tank
|
||||||
var/nozzle_mode = 0
|
var/nozzle_mode = 0
|
||||||
var/metal_synthesis_cooldown = 0
|
var/metal_synthesis_cooldown = 0
|
||||||
var/nanofrost_cooldown = 0
|
var/resin_cooldown = 0
|
||||||
|
|
||||||
/obj/item/weapon/extinguisher/mini/nozzle/New(parent_tank)
|
/obj/item/weapon/extinguisher/mini/nozzle/New(parent_tank)
|
||||||
..()
|
..()
|
||||||
@@ -238,16 +240,16 @@
|
|||||||
/obj/item/weapon/extinguisher/mini/nozzle/attack_self(mob/user)
|
/obj/item/weapon/extinguisher/mini/nozzle/attack_self(mob/user)
|
||||||
switch(nozzle_mode)
|
switch(nozzle_mode)
|
||||||
if(EXTINGUISHER)
|
if(EXTINGUISHER)
|
||||||
nozzle_mode = NANOFROST
|
nozzle_mode = RESIN_LAUNCHER
|
||||||
tank.icon_state = "waterbackpackatmos_1"
|
tank.icon_state = "waterbackpackatmos_1"
|
||||||
to_chat(user, "Swapped to nanofrost launcher")
|
to_chat(user, "Swapped to resin launcher")
|
||||||
return
|
return
|
||||||
if(NANOFROST)
|
if(RESIN_LAUNCHER)
|
||||||
nozzle_mode = METAL_FOAM
|
nozzle_mode = RESIN_FOAM
|
||||||
tank.icon_state = "waterbackpackatmos_2"
|
tank.icon_state = "waterbackpackatmos_2"
|
||||||
to_chat(user, "Swapped to metal foam synthesizer")
|
to_chat(user, "Swapped to resin foamer")
|
||||||
return
|
return
|
||||||
if(METAL_FOAM)
|
if(RESIN_FOAM)
|
||||||
nozzle_mode = EXTINGUISHER
|
nozzle_mode = EXTINGUISHER
|
||||||
tank.icon_state = "waterbackpackatmos_0"
|
tank.icon_state = "waterbackpackatmos_0"
|
||||||
to_chat(user, "Swapped to water extinguisher")
|
to_chat(user, "Swapped to water extinguisher")
|
||||||
@@ -267,20 +269,20 @@
|
|||||||
var/Adj = user.Adjacent(target)
|
var/Adj = user.Adjacent(target)
|
||||||
if(Adj)
|
if(Adj)
|
||||||
AttemptRefill(target, user)
|
AttemptRefill(target, user)
|
||||||
if(nozzle_mode == NANOFROST)
|
if(nozzle_mode == RESIN_LAUNCHER)
|
||||||
if(Adj)
|
if(Adj)
|
||||||
return //Safety check so you don't blast yourself trying to refill your tank
|
return //Safety check so you don't blast yourself trying to refill your tank
|
||||||
var/datum/reagents/R = reagents
|
var/datum/reagents/R = reagents
|
||||||
if(R.total_volume < 100)
|
if(R.total_volume < 100)
|
||||||
to_chat(user, "<span class='warning'>You need at least 100 units of water to use the nanofrost launcher!</span>")
|
to_chat(user, "<span class='warning'>You need at least 100 units of water to use the resin launcher!</span>")
|
||||||
return
|
return
|
||||||
if(nanofrost_cooldown)
|
if(resin_cooldown)
|
||||||
to_chat(user, "<span class='warning'>Nanofrost launcher is still recharging...</span>")
|
to_chat(user, "<span class='warning'>Resin launcher is still recharging...</span>")
|
||||||
return
|
return
|
||||||
nanofrost_cooldown = 1
|
resin_cooldown = TRUE
|
||||||
R.remove_any(100)
|
R.remove_any(100)
|
||||||
var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src))
|
var/obj/effect/resin_container/A = new (get_turf(src))
|
||||||
log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).")
|
log_game("[key_name_admin(user)] used Resin Launcher at [get_area(user)] [COORD(user)].")
|
||||||
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
playsound(src,'sound/items/syringeproj.ogg',40,1)
|
||||||
for(var/a=0, a<5, a++)
|
for(var/a=0, a<5, a++)
|
||||||
step_towards(A, target)
|
step_towards(A, target)
|
||||||
@@ -288,43 +290,38 @@
|
|||||||
A.Smoke()
|
A.Smoke()
|
||||||
spawn(100)
|
spawn(100)
|
||||||
if(src)
|
if(src)
|
||||||
nanofrost_cooldown = 0
|
resin_cooldown = FALSE
|
||||||
return
|
return
|
||||||
if(nozzle_mode == METAL_FOAM)
|
if(nozzle_mode == RESIN_FOAM)
|
||||||
if(!Adj|| !isturf(target))
|
if(!Adj|| !isturf(target))
|
||||||
return
|
return
|
||||||
if(metal_synthesis_cooldown < 5)
|
if(metal_synthesis_cooldown < 5)
|
||||||
var/obj/effect/particle_effect/foam/metal/F = new /obj/effect/particle_effect/foam/metal(get_turf(target))
|
var/obj/effect/particle_effect/foam/metal/resin/F = new (get_turf(target))
|
||||||
F.amount = 0
|
F.amount = 0
|
||||||
metal_synthesis_cooldown++
|
metal_synthesis_cooldown++
|
||||||
spawn(100)
|
spawn(100)
|
||||||
metal_synthesis_cooldown--
|
metal_synthesis_cooldown--
|
||||||
else
|
else
|
||||||
to_chat(user, "<span class='warning'>Metal foam mix is still being synthesized...</span>")
|
to_chat(user, "<span class='warning'>Resin foam mix is still being synthesized...</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/effect/nanofrost_container
|
/obj/effect/resin_container
|
||||||
name = "nanofrost container"
|
name = "resin container"
|
||||||
desc = "A frozen shell of ice containing nanofrost that freezes the surrounding area after activation."
|
desc = "A compacted ball of expansive resin, used to repair the atmosphere in a room, or seal off breaches."
|
||||||
icon = 'icons/effects/effects.dmi'
|
icon = 'icons/effects/effects.dmi'
|
||||||
icon_state = "frozen_smoke_capsule"
|
icon_state = "frozen_smoke_capsule"
|
||||||
mouse_opacity = 0
|
mouse_opacity = 0
|
||||||
pass_flags = PASSTABLE
|
pass_flags = PASSTABLE
|
||||||
|
|
||||||
/obj/effect/nanofrost_container/proc/Smoke()
|
/obj/effect/resin_container/proc/Smoke()
|
||||||
var/datum/effect_system/smoke_spread/freezing/S = new
|
var/obj/effect/particle_effect/foam/metal/resin/S = new /obj/effect/particle_effect/foam/metal/resin(get_turf(loc))
|
||||||
S.set_up(2, src.loc, blasting=1)
|
S.amount = 3
|
||||||
S.start()
|
|
||||||
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
|
|
||||||
F.add_atom_colour("#B2FFFF", FIXED_COLOUR_PRIORITY)
|
|
||||||
F.name = "nanofrost residue"
|
|
||||||
F.desc = "Residue left behind from a nanofrost detonation. Perhaps there was a fire here?"
|
|
||||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
#undef EXTINGUISHER
|
#undef EXTINGUISHER
|
||||||
#undef NANOFROST
|
#undef RESIN_LAUNCHER
|
||||||
#undef METAL_FOAM
|
#undef RESIN_FOAM
|
||||||
|
|
||||||
/obj/item/weapon/reagent_containers/chemtank
|
/obj/item/weapon/reagent_containers/chemtank
|
||||||
name = "backpack chemical injector"
|
name = "backpack chemical injector"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
new /obj/item/clothing/gloves/color/yellow(src)
|
new /obj/item/clothing/gloves/color/yellow(src)
|
||||||
new /obj/item/clothing/gloves/color/yellow(src)
|
new /obj/item/clothing/gloves/color/yellow(src)
|
||||||
new /obj/item/weapon/inducer(src)
|
new /obj/item/weapon/inducer(src)
|
||||||
new /obj/item/weapon/inducer(src)
|
new /obj/item/weapon/inducer(src)
|
||||||
for(var/i in 1 to 3)
|
for(var/i in 1 to 3)
|
||||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||||
for(var/i in 1 to 3)
|
for(var/i in 1 to 3)
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
new /obj/item/weapon/storage/toolbox/mechanical(src)
|
||||||
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
|
new /obj/item/weapon/tank/internals/emergency_oxygen/engi(src)
|
||||||
new /obj/item/device/analyzer(src)
|
new /obj/item/device/analyzer(src)
|
||||||
new /obj/item/weapon/holosign_creator/engineering(src)
|
new /obj/item/weapon/holosign_creator/atmos(src)
|
||||||
new /obj/item/weapon/watertank/atmos(src)
|
new /obj/item/weapon/watertank/atmos(src)
|
||||||
new /obj/item/clothing/suit/fire/atmos(src)
|
new /obj/item/clothing/suit/fire/atmos(src)
|
||||||
new /obj/item/clothing/head/hardhat/atmos(src)
|
new /obj/item/clothing/head/hardhat/atmos(src)
|
||||||
|
|||||||
@@ -65,6 +65,26 @@
|
|||||||
/obj/structure/holosign/barrier/engineering
|
/obj/structure/holosign/barrier/engineering
|
||||||
icon_state = "holosign_engi"
|
icon_state = "holosign_engi"
|
||||||
|
|
||||||
|
/obj/structure/holosign/barrier/atmos
|
||||||
|
name = "holo firelock"
|
||||||
|
desc = "A holographic barrier resembling a firelock. Though it does not prevent solid objects from passing through, gas is kept out."
|
||||||
|
icon_state = "holo_firelock"
|
||||||
|
density = FALSE
|
||||||
|
layer = ABOVE_MOB_LAYER
|
||||||
|
anchored = TRUE
|
||||||
|
CanAtmosPass = ATMOS_PASS_NO
|
||||||
|
layer = ABOVE_MOB_LAYER
|
||||||
|
alpha = 150
|
||||||
|
|
||||||
|
/obj/structure/holosign/barrier/atmos/Initialize()
|
||||||
|
. = ..()
|
||||||
|
air_update_turf(TRUE)
|
||||||
|
|
||||||
|
/obj/structure/holosign/barrier/atmos/Destroy()
|
||||||
|
var/turf/T = get_turf(src)
|
||||||
|
. = ..()
|
||||||
|
T.air_update_turf(TRUE)
|
||||||
|
|
||||||
/obj/structure/holosign/barrier/cyborg
|
/obj/structure/holosign/barrier/cyborg
|
||||||
name = "Energy Field"
|
name = "Energy Field"
|
||||||
desc = "A fragile energy field that blocks movement. Excels at blocking lethal projectiles."
|
desc = "A fragile energy field that blocks movement. Excels at blocking lethal projectiles."
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 494 KiB After Width: | Height: | Size: 498 KiB |
Reference in New Issue
Block a user