diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 4feb3296fe6..8a5255a01b8 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -1,10 +1,10 @@ /* Types of tanks! * Contains: * Oxygen - * Anesthetic - * Air + * Nitrogen * Plasma - * Emergency Oxygen + * Air Mix + * Anesthetic */ /* @@ -14,10 +14,8 @@ name = "oxygen tank" desc = "A tank of oxygen." icon_state = "oxygen" - distribute_pressure = ONE_ATMOSPHERE*O2STANDARD dog_fashion = /datum/dog_fashion/back - /obj/item/tank/oxygen/New() ..() air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) @@ -41,101 +39,6 @@ icon_state = "oxygen_fr" dog_fashion = null - -/* - * Anesthetic - */ -/obj/item/tank/anesthetic - name = "anesthetic tank" - desc = "A tank with an N2O/O2 gas mix." - icon_state = "anesthetic" - item_state = "an_tank" - -/obj/item/tank/anesthetic/New() - ..() - air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD - air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD - -/* - * Air - */ -/obj/item/tank/air - name = "air tank" - desc = "Mixed anyone?" - icon_state = "air" - item_state = "air" - -/obj/item/tank/air/examine(mob/user) - . = ..() - if(get_dist(user, src) <= 0 && air_contents.oxygen < 1) - . += "The meter on [src] indicates you are almost out of air!" - playsound(user, 'sound/effects/alert.ogg', 50, 1) - -/obj/item/tank/air/New() - ..() - air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD - air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD - -/* - * Plasma - */ -/obj/item/tank/plasma - name = "plasma tank" - desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable." - icon_state = "plasma" - flags = CONDUCT - slot_flags = null //they have no straps! - -/obj/item/tank/plasma/New() - ..() - air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) - -/obj/item/tank/plasma/attackby(obj/item/W as obj, mob/user as mob, params) - ..() - - if(istype(W, /obj/item/flamethrower)) - var/obj/item/flamethrower/F = W - if((!F.status)||(F.ptank)) return - master = F - F.ptank = src - user.unEquip(src) - loc = F - F.update_icon() - -/obj/item/tank/plasma/full/New() - ..() - air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) - -/obj/item/tank/plasma/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/plasma/plasmaman/examine(mob/user) - . = ..() - if(get_dist(user, src) <= 0 && air_contents.toxins < 0.2) - . += "The meter on [src] indicates you are almost out of plasma!" - playsound(user, 'sound/effects/alert.ogg', 50, 1) - - -/obj/item/tank/plasma/plasmaman/belt - icon_state = "plasmaman_tank_belt" - item_state = "plasmaman_tank_belt" - slot_flags = SLOT_BELT - force = 5 - volume = 25 - w_class = WEIGHT_CLASS_SMALL - -/obj/item/tank/plasma/plasmaman/belt/full/New() - ..() - air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) - -/* - * Emergency Oxygen - */ /obj/item/tank/emergency_oxygen name = "emergency oxygen tank" desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." @@ -144,7 +47,6 @@ slot_flags = SLOT_BELT w_class = WEIGHT_CLASS_SMALL force = 4.0 - distribute_pressure = ONE_ATMOSPHERE*O2STANDARD volume = 3 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011) @@ -202,11 +104,11 @@ /* * Nitrogen */ + /obj/item/tank/nitrogen name = "nitrogen tank" desc = "A tank of nitrogen." icon_state = "oxygen_fr" - distribute_pressure = ONE_ATMOSPHERE*O2STANDARD sprite_sheets = list("Vox Armalis" = 'icons/mob/species/armalis/back.dmi') //Do it for Big Bird. /obj/item/tank/nitrogen/New() @@ -241,6 +143,63 @@ air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) +/* + Plasma +*/ + +/obj/item/tank/plasma + name = "plasma tank" + desc = "Contains dangerous plasma. Do not inhale. Warning: extremely flammable." + icon_state = "plasma" + flags = CONDUCT + slot_flags = null //they have no straps! + +/obj/item/tank/plasma/New() + ..() + air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) + +/obj/item/tank/plasma/attackby(obj/item/W as obj, mob/user as mob, params) + ..() + + if(istype(W, /obj/item/flamethrower)) + var/obj/item/flamethrower/F = W + if((!F.status)||(F.ptank)) return + master = F + F.ptank = src + user.unEquip(src) + loc = F + F.update_icon() + +/obj/item/tank/plasma/full/New() + ..() + air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + +/obj/item/tank/plasma/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 + +/obj/item/tank/plasma/plasmaman/examine(mob/user) + . = ..() + if(get_dist(user, src) <= 0 && air_contents.toxins < 0.2) + . += "The meter on [src] indicates you are almost out of plasma!" + playsound(user, 'sound/effects/alert.ogg', 50, 1) + + +/obj/item/tank/plasma/plasmaman/belt + icon_state = "plasmaman_tank_belt" + item_state = "plasmaman_tank_belt" + slot_flags = SLOT_BELT + force = 5 + volume = 25 + w_class = WEIGHT_CLASS_SMALL + +/obj/item/tank/plasma/plasmaman/belt/full/New() + ..() + air_contents.toxins = (10 * ONE_ATMOSPHERE) * volume / (R_IDEAL_GAS_EQUATION * T20C) + /obj/item/tank/emergency_oxygen/plasma name = "emergency plasma tank" desc = "An emergency tank designed specifically for Plasmamen." @@ -251,3 +210,41 @@ ..() air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) air_contents.toxins = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) + +/* + * Air Mix + */ +/obj/item/tank/air + name = "air tank" + desc = "Mixed anyone?" + icon_state = "air" + item_state = "air" + distribute_pressure = ONE_ATMOSPHERE + +/obj/item/tank/air/examine(mob/user) + . = ..() + if(get_dist(user, src) <= 0 && air_contents.oxygen < 1) + . += "The meter on [src] indicates you are almost out of air!" + playsound(user, 'sound/effects/alert.ogg', 50, 1) + +/obj/item/tank/air/New() + ..() + air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD + air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD + + +/* + * Anesthetic + */ +/obj/item/tank/anesthetic + name = "anesthetic tank" + desc = "A tank with an N2O/O2 gas mix." + icon_state = "anesthetic" + item_state = "an_tank" + distribute_pressure = ONE_ATMOSPHERE + +/obj/item/tank/anesthetic/New() + ..() + air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD + air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD + diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 4d71ee20fe9..5d40efc81dd 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -15,7 +15,7 @@ armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 10, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 30) actions_types = list(/datum/action/item_action/set_internals) var/datum/gas_mixture/air_contents = null - var/distribute_pressure = ONE_ATMOSPHERE + var/distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE var/integrity = 3 var/volume = 70 @@ -25,7 +25,6 @@ air_contents = new /datum/gas_mixture() air_contents.volume = volume //liters air_contents.temperature = T20C - START_PROCESSING(SSobj, src) return