Air tanks get their own sprite, plus reset fix.

This commit is contained in:
RandomMarine
2017-09-25 19:25:06 -07:00
committed by CitadelStationBot
parent 18545eb41c
commit ab28e2facb
3 changed files with 187 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/* Types of tanks!
* Contains:
* Oxygen
@@ -181,3 +182,188 @@
name = "double emergency oxygen tank"
icon_state = "emergency_engi"
volume = 10
=======
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
* Emergency Oxygen
*/
/*
* Oxygen
*/
/obj/item/tank/internals/oxygen
name = "oxygen tank"
desc = "A tank of oxygen."
icon_state = "oxygen"
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/oxygen/New()
..()
air_contents.assert_gas("o2")
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/oxygen/yellow
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
dog_fashion = null
/obj/item/tank/internals/oxygen/red
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
dog_fashion = null
/*
* Anesthetic
*/
/obj/item/tank/internals/anesthetic
name = "anesthetic tank"
desc = "A tank with an N2O/O2 gas mix."
icon_state = "anesthetic"
item_state = "an_tank"
force = 10
/obj/item/tank/internals/anesthetic/New()
..()
air_contents.assert_gases("o2", "n2o")
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases["n2o"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Air
*/
/obj/item/tank/internals/air
name = "air tank"
desc = "Mixed anyone?"
icon_state = "air"
force = 10
dog_fashion = /datum/dog_fashion/back
/obj/item/tank/internals/air/New()
..()
air_contents.assert_gases("o2","n2")
air_contents.gases["o2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
air_contents.gases["n2"][MOLES] = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Plasma
*/
/obj/item/tank/internals/plasma
name = "plasma tank"
desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable."
icon_state = "plasma"
flags_1 = CONDUCT_1
slot_flags = null //they have no straps!
force = 8
/obj/item/tank/internals/plasma/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (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))
var/obj/item/flamethrower/F = W
if ((!F.status)||(F.ptank))
return
if(!user.transferItemToLoc(src, F))
return
src.master = F
F.ptank = src
F.update_icon()
else
return ..()
/obj/item/tank/internals/plasma/full/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
* Plasmaman Plasma Tank
*/
/obj/item/tank/internals/plasmaman
name = "plasma internals tank"
desc = "A tank of plasma gas designed specifically for use as internals, particularly for plasma-based lifeforms. If you're not a Plasmaman, you probably shouldn't use this."
icon_state = "plasmaman_tank"
item_state = "plasmaman_tank"
force = 10
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
/obj/item/tank/internals/plasmaman/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/full/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/tank/internals/plasmaman/belt
icon_state = "plasmaman_tank_belt"
item_state = "plasmaman_tank_belt"
slot_flags = SLOT_BELT
force = 5
volume = 6
w_class = WEIGHT_CLASS_SMALL //thanks i forgot this
/obj/item/tank/internals/plasmaman/belt/full/New()
..()
air_contents.assert_gas("plasma")
air_contents.gases["plasma"][MOLES] = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
/*
* Emergency Oxygen
*/
/obj/item/tank/internals/emergency_oxygen
name = "emergency oxygen tank"
desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it."
icon_state = "emergency"
flags_1 = CONDUCT_1
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
force = 4
distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
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()
..()
air_contents.assert_gas("o2")
air_contents.gases["o2"][MOLES] = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
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/double
name = "double emergency oxygen tank"
icon_state = "emergency_engi"
volume = 10
>>>>>>> 98ed3d0... Air tanks get their own sprite + reset fix

View File

@@ -177,7 +177,7 @@
if("pressure")
var/pressure = params["pressure"]
if(pressure == "reset")
pressure = TANK_DEFAULT_RELEASE_PRESSURE
pressure = initial(distribute_pressure)
. = TRUE
else if(pressure == "min")
pressure = TANK_MIN_RELEASE_PRESSURE