Porting updates related to material datums. (#12317)

* Porting updates related to material datums.

* art_type

* oh oh
This commit is contained in:
Ghom
2020-05-25 23:21:00 +02:00
committed by GitHub
parent e11908a357
commit 85186a9714
64 changed files with 2542 additions and 208 deletions
+7 -5
View File
@@ -14,13 +14,15 @@
var/full_speed = TRUE // If the jetpack will have a speedboost in space/nograv or not
var/datum/effect_system/trail_follow/ion/ion_trail
/obj/item/tank/jetpack/New()
/obj/item/tank/jetpack/Initialize()
..()
ion_trail = new
ion_trail.set_up(src)
/obj/item/tank/jetpack/populate_gas()
if(gas_type)
air_contents.gases[gas_type] = ((6 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C))
ion_trail = new
ion_trail.set_up(src)
/obj/item/tank/jetpack/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_jetpack))
@@ -188,8 +190,8 @@
var/obj/item/tank/internals/tank = null
var/mob/living/carbon/human/cur_user
/obj/item/tank/jetpack/suit/New()
..()
/obj/item/tank/jetpack/suit/Initialize()
. = ..()
STOP_PROCESSING(SSobj, src)
temp_air_contents = air_contents
+23 -26
View File
@@ -12,15 +12,13 @@
*/
/obj/item/tank/internals/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
desc = "A tank of oxygen, this one is blue."
icon_state = "oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/oxygen/New()
..()
/obj/item/tank/internals/oxygen/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -35,6 +33,8 @@
icon_state = "oxygen_fr"
dog_fashion = null
/obj/item/tank/internals/oxygen/empty/populate_gas()
return
/*
* Anesthetic
@@ -46,11 +46,9 @@
item_state = "an_tank"
force = 10
/obj/item/tank/internals/anesthetic/New()
..()
/obj/item/tank/internals/anesthetic/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrous_oxide] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Air
@@ -63,11 +61,9 @@
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/New()
..()
/obj/item/tank/internals/air/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases[/datum/gas/nitrogen] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
@@ -82,10 +78,8 @@
force = 8
/obj/item/tank/internals/plasma/New()
..()
/obj/item/tank/internals/plasma/populate_gas()
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/flamethrower))
@@ -100,10 +94,8 @@
else
return ..()
/obj/item/tank/internals/plasma/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasma/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
@@ -118,13 +110,10 @@
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/New()
..()
/obj/item/tank/internals/plasmaman/populate_gas()
air_contents.gases[/datum/gas/plasma] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasmaman/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
@@ -137,12 +126,12 @@
volume = 6
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/New()
..() // Plasma asserted in parent
/obj/item/tank/internals/plasmaman/belt/full/populate_gas()
air_contents.gases[/datum/gas/plasma] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/belt/empty/populate_gas()
return
/*
* Emergency Oxygen
@@ -159,17 +148,25 @@
volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011)
/obj/item/tank/internals/emergency_oxygen/New()
..()
/obj/item/tank/internals/emergency_oxygen/populate_gas()
air_contents.gases[/datum/gas/oxygen] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/emergency_oxygen/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
icon_state = "emergency_engi"
volume = 6
/obj/item/tank/internals/emergency_oxygen/engi/empty/populate_gas()
return
/obj/item/tank/internals/emergency_oxygen/double
name = "double emergency oxygen tank"
icon_state = "emergency_double"
volume = 10
/obj/item/tank/internals/emergency_oxygen/double/empty/populate_gas()
return
+9 -4
View File
@@ -60,14 +60,19 @@
H.update_action_buttons_icon()
/obj/item/tank/New()
..()
/obj/item/tank/Initialize()
. = ..()
air_contents = new(volume) //liters
air_contents.temperature = T20C
populate_gas()
START_PROCESSING(SSobj, src)
/obj/item/tank/proc/populate_gas()
return
/obj/item/tank/Destroy()
if(air_contents)
qdel(air_contents)
@@ -78,9 +83,9 @@
/obj/item/tank/examine(mob/user)
var/obj/icon = src
. = ..()
if (istype(src.loc, /obj/item/assembly))
if(istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user))
if(!in_range(src, user) && !isobserver(user))
if (icon == src)
. += "<span class='notice'>If you want any more information you'll need to get closer.</span>"
return