mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 00:54:16 +01:00
Converts gas, mat and reagent strings to defines
This commit is contained in:
@@ -150,7 +150,7 @@
|
||||
|
||||
/obj/structure/bonfire/proc/check_oxygen()
|
||||
var/datum/gas_mixture/G = loc.return_air()
|
||||
if(G.gas["oxygen"] < 1)
|
||||
if(G.gas[GAS_O2] < 1)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
/obj/structure/fireplace/proc/check_oxygen()
|
||||
var/datum/gas_mixture/G = loc.return_air()
|
||||
if(G.gas["oxygen"] < 1)
|
||||
if(G.gas[GAS_O2] < 1)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
return PROJECTILE_CONTINUE // It's a hole in the ground, doesn't usually stop or even care about bullets
|
||||
|
||||
/obj/structure/closet/grave/return_air_for_internal_lifeform(var/mob/living/L)
|
||||
var/gasid = "carbon_dioxide"
|
||||
var/gasid = GAS_CO2
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.species && H.species.exhale_type)
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
var/material_name = S.get_material_name()
|
||||
if (S)
|
||||
if (S.get_amount() >= 1)
|
||||
if(material_name == "rglass")
|
||||
if(material_name == MAT_RGLASS)
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 4 SECONDS, src, exclusive = TASK_ALL_EXCLUSIVE) && !glass)
|
||||
@@ -276,7 +276,7 @@
|
||||
glass = 1
|
||||
else if(material_name)
|
||||
// Ugly hack, will suffice for now. Need to fix it upstream as well, may rewrite mineral walls. ~Z
|
||||
if(!(material_name in list("gold", "silver", "diamond", "uranium", "phoron", "sandstone")))
|
||||
if(!(material_name in list(MAT_GOLD, MAT_SILVER, MAT_DIAMOND, MAT_URANIUM, MAT_PHORON, MAT_SANDSTONE)))
|
||||
to_chat(user, "You cannot make an airlock out of that material.")
|
||||
return
|
||||
if(S.get_amount() >= 2)
|
||||
|
||||
@@ -141,5 +141,5 @@
|
||||
/datum/gas_mixture/pod_air/New()
|
||||
. = ..()
|
||||
gas = list(
|
||||
"oxygen" = 21,
|
||||
"nitrogen" = 79)
|
||||
GAS_O2 = 21,
|
||||
GAS_N2 = 79)
|
||||
|
||||
@@ -242,25 +242,25 @@
|
||||
SSradiation.radiate(src, round(material.radioactivity/3))
|
||||
|
||||
/obj/structure/simple_door/iron/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "iron")
|
||||
..(mapload, material_name || MAT_IRON)
|
||||
|
||||
/obj/structure/simple_door/silver/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "silver")
|
||||
..(mapload, material_name || MAT_SILVER)
|
||||
|
||||
/obj/structure/simple_door/gold/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "gold")
|
||||
..(mapload, material_name || MAT_GOLD)
|
||||
|
||||
/obj/structure/simple_door/uranium/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "uranium")
|
||||
..(mapload, material_name || MAT_URANIUM)
|
||||
|
||||
/obj/structure/simple_door/sandstone/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "sandstone")
|
||||
..(mapload, material_name || MAT_SANDSTONE)
|
||||
|
||||
/obj/structure/simple_door/phoron/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "phoron")
|
||||
..(mapload, material_name || MAT_PHORON)
|
||||
|
||||
/obj/structure/simple_door/diamond/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "diamond")
|
||||
..(mapload, material_name || MAT_DIAMOND)
|
||||
|
||||
/obj/structure/simple_door/wood/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || MAT_WOOD)
|
||||
@@ -273,10 +273,10 @@
|
||||
..(mapload, material_name || MAT_SIFWOOD)
|
||||
|
||||
/obj/structure/simple_door/resin/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "resin")
|
||||
..(mapload, material_name || MAT_RESIN)
|
||||
|
||||
/obj/structure/simple_door/cult/Initialize(mapload,var/material_name)
|
||||
..(mapload, material_name || "cult")
|
||||
..(mapload, material_name || MAT_CULT)
|
||||
|
||||
/obj/structure/simple_door/cult/TryToSwitchState(atom/user)
|
||||
if(isliving(user))
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
/obj/structure/transit_tube_pod/New(loc)
|
||||
..(loc)
|
||||
|
||||
air_contents.adjust_multi("oxygen", MOLES_O2STANDARD * 2, "nitrogen", MOLES_N2STANDARD)
|
||||
air_contents.adjust_multi(GAS_O2, MOLES_O2STANDARD * 2, GAS_N2, MOLES_N2STANDARD)
|
||||
air_contents.temperature = T20C
|
||||
|
||||
// Give auto tubes time to align before trying to start moving
|
||||
|
||||
Reference in New Issue
Block a user