From 829dcf4229a22c7e5e2befce3ca5a8d922c8d2a9 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Tue, 21 Feb 2017 07:18:04 -0500 Subject: [PATCH 1/7] Oxygen is Toxic to the Vox, Plasma Heals Plasmamen, Plasmaman Suit Autoextinguishes, Oxygen Burns Plasmamen Oxygen is toxic to the Vox (as toxic as plasma). Plasma healing plasmaman from swindly @ https://github.com/tgstation/tgstation/pull/24209 Plasmaman suit auto-extinguishing actually does something now. Oxygen burns Plasmamen. --- code/__DEFINES/flags.dm | 2 ++ code/modules/clothing/clothing.dm | 5 +++++ code/modules/clothing/spacesuits/plasmamen.dm | 10 ++++------ code/modules/mob/living/carbon/human/life.dm | 2 ++ .../living/carbon/human/species/plasmaman.dm | 3 ++- .../reagents/chemistry/reagents/misc.dm | 19 +++++++++++++++++++ .../chemistry/reagents/pyrotechnic.dm | 7 ++++++- 7 files changed, 40 insertions(+), 8 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index a4d9ca87384..9be75ea5367 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -23,6 +23,7 @@ #define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! #define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT) +#define AUTOEXTINGUISH 16384 // Suits that have this will automatically extinguish a burning mob when worn. //Reagent flags #define REAGENT_NOREACT 1 @@ -43,6 +44,7 @@ #define ALL_RPARTS 2048 #define NOGUNS 4096 #define NOTRANSSTING 8192 +#define PLASMA_BASED 16384 //Species clothing flags #define HAS_UNDERWEAR 1 diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c80c13d514b..de39921c970 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -497,6 +497,11 @@ BLIND // can't see anything else to_chat(user, "You attempt to button up the velcro on \the [src], before promptly realising how retarded you are.") +/obj/item/clothing/suit/proc/auto_extinguish(var/mob/living/carbon/human/user) + if(istype(user)) + to_chat(user, "You hear a soft click and a hiss from your suit as it automatically extinguishes the fire.") + user.ExtinguishMob() + /obj/item/clothing/suit/equipped(var/mob/living/carbon/human/user, var/slot) //Handle tail-hiding on a by-species basis. ..() if(ishuman(user) && hide_tail_by_species && slot == slot_wear_suit) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 73fa69d297c..8ccf0a0a413 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -11,7 +11,7 @@ flags_inv = HIDEGLOVES|HIDESHOES max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT species_restricted = list("Plasmaman") - flags = STOPSPRESSUREDMAGE + flags = STOPSPRESSUREDMAGE | AUTOEXTINGUISH icon_state = "plasmaman_suit" item_state = "plasmaman_suit" @@ -24,16 +24,14 @@ ..(user) to_chat(user, "There are [extinguishes_left] extinguisher canisters left in this suit.") -/obj/item/clothing/suit/space/eva/plasmaman/proc/Extinguish(var/mob/user) - var/mob/living/carbon/human/H=user - if(extinguishes_left) +/obj/item/clothing/suit/space/eva/plasmaman/auto_extinguish(var/mob/living/carbon/human/H) + if(istype(H) && extinguishes_left) if(next_extinguish > world.time) return next_extinguish = world.time + extinguish_cooldown extinguishes_left-- - to_chat(H, "Your suit automatically extinguishes the fire.") - H.ExtinguishMob() + ..() /obj/item/clothing/head/helmet/space/eva/plasmaman name = "plasmaman helmet" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index b2e609c92f2..6d31c53263e 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -485,6 +485,8 @@ if(on_fire) var/thermal_protection = get_thermal_protection() + if(wear_suit && wear_suit.flags & AUTOEXTINGUISH) + wear_suit.auto_extinguish(src) if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) return if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT) diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index 05f24facc65..bb8d1a59100 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -6,7 +6,7 @@ //language = "Clatter" unarmed_type = /datum/unarmed_attack/punch - flags = IS_WHITELISTED | NO_BLOOD | NOTRANSSTING + flags = IS_WHITELISTED | NO_BLOOD | NOTRANSSTING | PLASMA_BASED dietflags = DIET_OMNI reagent_tag = PROCESS_ORG @@ -15,6 +15,7 @@ butt_sprite = "plasma" breath_type = "plasma" + poison_type = null heat_level_1 = 350 // Heat damage level 1 above this point. heat_level_2 = 400 // Heat damage level 2 above this point. diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index e8505d64653..70482a10489 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -39,6 +39,25 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 +/datum/reagent/oxygen/on_mob_life(var/mob/living/carbon/human/H) + if(istype(H) && H.species && H.species.poison_type && H.species.poison_type == id) + H.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) //Same as plasma. + if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Oxygen lights up plasma-based lifeforms. + if(prob(60)) + H.adjust_fire_stacks(0.25) + if(prob(40)) + H.IgniteMob() //Light them up. + ..() + +/datum/reagent/oxygen/reaction_mob(var/mob/living/carbon/human/H, method=TOUCH, volume) + if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Oxygen lights up plasma-based lifeforms. + if(method == INGEST) + to_chat(H, "You feel a horrible burning from within as your body bursts into flame!") + if(method == TOUCH) + to_chat(H, "Your body bursts into flames as it comes into contact with the substance!") + H.adjust_fire_stacks(1) //Same as phlogiston, guaranteed one-time firestack delivery and ignition. + H.IgniteMob() + ..() /datum/reagent/nitrogen name = "Nitrogen" diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index 9fc96c714a8..48d8c33977d 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -22,7 +22,12 @@ color = "#7A2B94" /datum/reagent/plasma/on_mob_life(mob/living/M) - M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + var/mob/living/carbon/human/H = M + if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Plasma shouldn't poison plasmamen. + if(prob(20)) + H.heal_organ_damage(1, 1) + else + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) if(holder.has_reagent("epinephrine")) holder.remove_reagent("epinephrine", 2) if(iscarbon(M)) From 3f99632f1103e55e60304b67663f091332631c60 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Tue, 21 Feb 2017 07:19:14 -0500 Subject: [PATCH 2/7] Holds off on Oxygen Burning Plasmamen for now. --- code/modules/reagents/chemistry/reagents/misc.dm | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index 70482a10489..19717ac50f3 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -42,21 +42,6 @@ /datum/reagent/oxygen/on_mob_life(var/mob/living/carbon/human/H) if(istype(H) && H.species && H.species.poison_type && H.species.poison_type == id) H.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) //Same as plasma. - if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Oxygen lights up plasma-based lifeforms. - if(prob(60)) - H.adjust_fire_stacks(0.25) - if(prob(40)) - H.IgniteMob() //Light them up. - ..() - -/datum/reagent/oxygen/reaction_mob(var/mob/living/carbon/human/H, method=TOUCH, volume) - if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Oxygen lights up plasma-based lifeforms. - if(method == INGEST) - to_chat(H, "You feel a horrible burning from within as your body bursts into flame!") - if(method == TOUCH) - to_chat(H, "Your body bursts into flames as it comes into contact with the substance!") - H.adjust_fire_stacks(1) //Same as phlogiston, guaranteed one-time firestack delivery and ignition. - H.IgniteMob() ..() /datum/reagent/nitrogen From 71c2bcae7a97867a291468c1cc9fc95e870d0755 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Tue, 21 Feb 2017 07:46:55 -0500 Subject: [PATCH 3/7] Plasmaman Plasma Heal Consistency Removes RNG from Plasmaman plasma heal, ties it to REAGENTS_EFFECT_MULTIPLIER and halves its healing amount. --- code/modules/reagents/chemistry/reagents/pyrotechnic.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index 48d8c33977d..40c59f0891c 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -24,8 +24,7 @@ /datum/reagent/plasma/on_mob_life(mob/living/M) var/mob/living/carbon/human/H = M if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Plasma shouldn't poison plasmamen. - if(prob(20)) - H.heal_organ_damage(1, 1) + H.heal_organ_damage(0.5*REAGENTS_EFFECT_MULTIPLIER, 0.5*REAGENTS_EFFECT_MULTIPLIER) else M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) if(holder.has_reagent("epinephrine")) From 9dad3503291f501e934007a461d56024687c135f Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Wed, 22 Feb 2017 00:12:01 -0500 Subject: [PATCH 4/7] Desnowflakes the Special Reagent Handling & Amends+Completes Autoextinguish & Fixes Plasmaman Immolation Immunity Bug - Moved Vox and Plasmamen special reagent handling to the Species datum to avoid snowflaking in reagent code - Removed the AUTOEXTINGUISH flag and turned it into a var to conserve flags - Adds Plasmaman EVA suit auto-extinguisher reloading. Eject the depleted cartridges with an action button and fill them as you would a fire extinguisher, then just slot them back into the suit. - Fixes a bug where having NOBREATHE cured a Plasmaman of burning when exposed to atmosphere. - Fixes a bug where Plasmamen would burn in space or in totally-Plasma environments. Inspired by /vg/station. --- code/__DEFINES/flags.dm | 2 - code/__DEFINES/mob.dm | 2 + code/datums/action.dm | 7 +- .../objects/items/weapons/extinguisher.dm | 33 ++++++++- code/modules/clothing/clothing.dm | 2 + code/modules/clothing/spacesuits/plasmamen.dm | 73 +++++++++++++++++-- code/modules/mob/living/carbon/human/life.dm | 2 +- .../living/carbon/human/species/plasmaman.dm | 29 ++++++-- .../living/carbon/human/species/station.dm | 8 ++ .../reagents/chemistry/reagents/misc.dm | 5 -- .../chemistry/reagents/pyrotechnic.dm | 6 +- 11 files changed, 137 insertions(+), 32 deletions(-) diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 9be75ea5367..a4d9ca87384 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -23,7 +23,6 @@ #define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! #define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT) -#define AUTOEXTINGUISH 16384 // Suits that have this will automatically extinguish a burning mob when worn. //Reagent flags #define REAGENT_NOREACT 1 @@ -44,7 +43,6 @@ #define ALL_RPARTS 2048 #define NOGUNS 4096 #define NOTRANSSTING 8192 -#define PLASMA_BASED 16384 //Species clothing flags #define HAS_UNDERWEAR 1 diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 7ab8a19f86d..e976e71f295 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -54,6 +54,8 @@ #define DEFAULT_MARKING_STYLES list("head" = "None", "body" = "None", "tail" = "None") //Marking styles. Use instead of initial() for m_styles. #define DEFAULT_MARKING_COLOURS list("head" = "#000000", "body" = "#000000", "tail" = "#000000") //Marking colours. Use instead of initial() for m_colours. +#define OXYCONCEN_PLASMEN_IGNITION 0.01 //1% oxygen in the air is all it takes to light up a poorly clothed Plasmaman. + ////////REAGENT STUFF//////// // How many units of reagent are consumed per tick, by default. #define REAGENTS_METABOLISM 0.4 diff --git a/code/datums/action.dm b/code/datums/action.dm index f1826c334c5..9f752b481e3 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -187,7 +187,7 @@ /datum/action/item_action/toggle_hardsuit_mode name = "Toggle Hardsuit Mode" - + /datum/action/item_action/toggle_unfriendly_fire name = "Toggle Friendly Fire \[ON\]" desc = "Toggles if the staff causes friendly fire." @@ -311,6 +311,9 @@ return 0 return ..() +/datum/action/item_action/eject_depleted_cartridges + name = "Eject Depleted Cartridges" + /datum/action/item_action/hands_free check_flags = AB_CHECK_CONSCIOUS @@ -357,7 +360,7 @@ ..() name = "Toggle [target.name]" button.name = name - + /datum/action/item_action/organ_action/use/New(Target) ..() name = "Use [target.name]" diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 5fc704b7618..e15615460f4 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -80,8 +80,7 @@ //TODO; Add support for reagents in water. if(target.loc == user)//No more spraying yourself when putting your extinguisher away return - var/Refill = AttemptRefill(target, user) - if(Refill) + if(AttemptRefill(target, user)) return if(!safety) if(src.reagents.total_volume < 1) @@ -164,4 +163,32 @@ if(W.loc == my_target) break sleep(2) else - return ..() \ No newline at end of file + return ..() + +/obj/item/weapon/extinguisher/cartridge + name = "auto-extinguisher cartridge" + desc = "A tiny and light fibreglass-framed auto-extinguisher cartridge." + icon_state = "miniFE0" + item_state = "miniFE" + hitsound = null //Ultralight and + flags = null //non-conductive + force = 0 + throwforce = 0 + w_class = 1 + materials = list() + max_water = 25 //5 uses in compatible suits + var/volume_per_use = 5 + sprite_name = "miniFE" + attack_verb = list("tapped") + +/obj/item/weapon/extinguisher/cartridge/afterattack(atom/target, mob/user , flag) + AttemptRefill(target, user) + +/obj/item/weapon/extinguisher/cartridge/attack_self() + return + +/obj/item/weapon/extinguisher/cartridge/proc/try_use() + if(reagents.has_reagent("water", volume_per_use)) + reagents.remove_reagent("water", volume_per_use) + return 1 + return 0 diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index de39921c970..2ac304e4b21 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -447,6 +447,7 @@ BLIND // can't see anything var/ignore_suitadjust = 1 var/adjust_flavour = null var/list/hide_tail_by_species = null + var/autoextinguish = 0 //Proc that opens and closes jackets. /obj/item/clothing/suit/proc/adjustsuit(var/mob/user) @@ -500,6 +501,7 @@ BLIND // can't see anything /obj/item/clothing/suit/proc/auto_extinguish(var/mob/living/carbon/human/user) if(istype(user)) to_chat(user, "You hear a soft click and a hiss from your suit as it automatically extinguishes the fire.") + playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3) user.ExtinguishMob() /obj/item/clothing/suit/equipped(var/mob/living/carbon/human/user, var/slot) //Handle tail-hiding on a by-species basis. diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 8ccf0a0a413..3f003099eef 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -11,27 +11,88 @@ flags_inv = HIDEGLOVES|HIDESHOES max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT species_restricted = list("Plasmaman") - flags = STOPSPRESSUREDMAGE | AUTOEXTINGUISH + flags = STOPSPRESSUREDMAGE + autoextinguish = 1 icon_state = "plasmaman_suit" item_state = "plasmaman_suit" + actions_types = list(/datum/action/item_action/eject_depleted_cartridges) + var/extinguisher_cart_type = /obj/item/weapon/extinguisher/cartridge + var/obj/item/weapon/extinguisher/cartridge/cart1 + var/obj/item/weapon/extinguisher/cartridge/cart2 var/next_extinguish = 0 var/extinguish_cooldown = 10 SECONDS - var/extinguishes_left = 10 // Yeah yeah, reagents, blah blah blah. This should be simple. + +/obj/item/clothing/suit/space/eva/plasmaman/New() + if(!cart1) + cart1 = new extinguisher_cart_type(src) + if(!cart2) + cart2 = new extinguisher_cart_type(src) + ..() /obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user) ..(user) + var/extinguishes_left = 0 + if(cart1) + extinguishes_left += cart1.reagents.total_volume / cart1.volume_per_use + if(cart2) + extinguishes_left += cart2.reagents.total_volume / cart2.volume_per_use to_chat(user, "There are [extinguishes_left] extinguisher canisters left in this suit.") /obj/item/clothing/suit/space/eva/plasmaman/auto_extinguish(var/mob/living/carbon/human/H) - if(istype(H) && extinguishes_left) + if(istype(H) && istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) //Only extinguish if the mob's wearing the whole suit. if(next_extinguish > world.time) return - next_extinguish = world.time + extinguish_cooldown - extinguishes_left-- - ..() + var/extinguish = 0 + if(cart1.try_use()) + extinguish = 1 + else if(cart2.try_use()) + to_chat(H, "Cartridge 1 depleted, extinguishing from cartridge 2.") + extinguish = 1 + else + to_chat(H, "Both cartridges depleted. Replenish immediately.") + + if(extinguish) + next_extinguish = world.time + extinguish_cooldown + ..() + +/obj/item/clothing/suit/space/eva/plasmaman/proc/eject_depleted_cartridges(mob/user) + var/ejected = 0 + if(cart1 && cart1.reagents.total_volume < cart1.max_water) + cart1.forceMove(get_turf(loc)) + user.put_in_hands(cart1) + cart1 = null + ejected = 1 + if(cart2 && cart2.reagents.total_volume < cart2.max_water) + cart2.forceMove(get_turf(loc)) + user.put_in_hands(cart2) + cart2 = null + ejected = 1 + + if(ejected) + to_chat(usr, "You eject the depleted extinguisher cartridges from \the [src].") + else + to_chat(usr, "No extinguisher cartridges were ejected from \the [src].") + +/obj/item/clothing/suit/space/eva/plasmaman/attack_self(mob/user) + eject_depleted_cartridges(user) + +/obj/item/clothing/suit/space/eva/plasmaman/attackby(var/obj/item/A as obj, mob/user as mob, params) + ..() + if(istype(A, extinguisher_cart_type)) + if(cart1 && cart2) + to_chat(user, "There's already cartridges in \the [src].") + else + var/obj/item/weapon/extinguisher/cartridge/cart = A + user.remove_from_mob(cart) + if(!cart1) + cart1 = cart + else if(!cart2) + cart2 = cart + cart.forceMove(src) + to_chat(user, "You load the extinguisher cartridge into \the [src].") /obj/item/clothing/head/helmet/space/eva/plasmaman name = "plasmaman helmet" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6d31c53263e..16cb575c83a 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -485,7 +485,7 @@ if(on_fire) var/thermal_protection = get_thermal_protection() - if(wear_suit && wear_suit.flags & AUTOEXTINGUISH) + if(wear_suit && wear_suit.autoextinguish) wear_suit.auto_extinguish(src) if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) return diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index bb8d1a59100..b025e266d6e 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -6,7 +6,7 @@ //language = "Clatter" unarmed_type = /datum/unarmed_attack/punch - flags = IS_WHITELISTED | NO_BLOOD | NOTRANSSTING | PLASMA_BASED + flags = IS_WHITELISTED | NO_BLOOD | NOTRANSSTING dietflags = DIET_OMNI reagent_tag = PROCESS_ORG @@ -15,7 +15,7 @@ butt_sprite = "plasma" breath_type = "plasma" - poison_type = null + poison_type = null //Certainly isn't plasma. heat_level_1 = 350 // Heat damage level 1 above this point. heat_level_2 = 400 // Heat damage level 2 above this point. @@ -236,10 +236,23 @@ if(heat_level_3 to INFINITY) H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat") H.fire_alert = max(H.fire_alert, 2) - - if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) - to_chat(H, "Your body reacts with the atmosphere and bursts into flame!") - H.adjust_fire_stacks(0.5) - H.IgniteMob() - return 1 + +/datum/species/plasmaman/handle_life(var/mob/living/carbon/human/H) + if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) + var/datum/gas_mixture/environment = H.loc.return_air() + if(environment && environment.oxygen && environment.total_moles()) + if(environment.oxygen / environment.total_moles() >= OXYCONCEN_PLASMEN_IGNITION) + if(!H.on_fire) + to_chat(H, "Your body reacts with the atmosphere and bursts into flame!") + H.adjust_fire_stacks(0.5) + H.IgniteMob() + +/datum/species/plasmaman/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) + if(R.id == "plasma") + H.heal_organ_damage(0.5*REAGENTS_EFFECT_MULTIPLIER, 0.5*REAGENTS_EFFECT_MULTIPLIER) + H.adjustPlasma(20) + H.reagents.remove_reagent(R.id, REAGENTS_METABOLISM) + return 0 //Handling reagent removal on our own. Prevents plasma from dealing toxin damage to plasmamen. + + return ..() diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index fcdd8ac40ea..f6cd56ece53 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -395,6 +395,14 @@ H.change_icobase(new_icobase, new_deform, owner_sensitive) //Update the icobase/deform of all our organs, but make sure we don't mess with frankenstein limbs in doing so. H.update_dna() +/datum/species/vox/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) + if(H.species.name == "Vox" && R.id == "oxygen") //Armalis are above such petty things. + H.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) //Same as plasma. + H.reagents.remove_reagent(R.id, REAGENTS_METABOLISM) + return 0 //Handling reagent removal on our own. + + return ..() + /datum/species/vox/armalis/handle_post_spawn(var/mob/living/carbon/human/H) H.verbs += /mob/living/carbon/human/proc/leap H.verbs += /mob/living/carbon/human/proc/gut diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index 19717ac50f3..89233789903 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -39,11 +39,6 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 -/datum/reagent/oxygen/on_mob_life(var/mob/living/carbon/human/H) - if(istype(H) && H.species && H.species.poison_type && H.species.poison_type == id) - H.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) //Same as plasma. - ..() - /datum/reagent/nitrogen name = "Nitrogen" id = "nitrogen" diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index 40c59f0891c..9fc96c714a8 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -22,11 +22,7 @@ color = "#7A2B94" /datum/reagent/plasma/on_mob_life(mob/living/M) - var/mob/living/carbon/human/H = M - if(istype(H) && H.species && H.species.flags & PLASMA_BASED) //Plasma shouldn't poison plasmamen. - H.heal_organ_damage(0.5*REAGENTS_EFFECT_MULTIPLIER, 0.5*REAGENTS_EFFECT_MULTIPLIER) - else - M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) + M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) if(holder.has_reagent("epinephrine")) holder.remove_reagent("epinephrine", 2) if(iscarbon(M)) From 864260efde279bdc75e0f43f661e197920d0c431 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Wed, 22 Feb 2017 00:35:00 -0500 Subject: [PATCH 5/7] Removes Snowflake Name-checks and Amends Plasmen Suit Extinguish Messages Removes a bunch of bodyflags from Armalis that they really shouldn've had as well. --- code/modules/clothing/spacesuits/plasmamen.dm | 17 +++++++---------- .../mob/living/carbon/human/species/station.dm | 8 ++++++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 3f003099eef..d393163606f 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -38,7 +38,7 @@ extinguishes_left += cart1.reagents.total_volume / cart1.volume_per_use if(cart2) extinguishes_left += cart2.reagents.total_volume / cart2.volume_per_use - to_chat(user, "There are [extinguishes_left] extinguisher canisters left in this suit.") + to_chat(user, "This suit can automatically extinguish [extinguishes_left] more times.") /obj/item/clothing/suit/space/eva/plasmaman/auto_extinguish(var/mob/living/carbon/human/H) if(istype(H) && istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) //Only extinguish if the mob's wearing the whole suit. @@ -46,32 +46,29 @@ return var/extinguish = 0 - if(cart1.try_use()) + if(cart1 && cart1.try_use()) extinguish = 1 - else if(cart2.try_use()) - to_chat(H, "Cartridge 1 depleted, extinguishing from cartridge 2.") + else if(cart2 && cart2.try_use()) + to_chat(H, "Primary cartridge absent or depleted, extinguishing from secondary cartridge.") extinguish = 1 else - to_chat(H, "Both cartridges depleted. Replenish immediately.") + to_chat(H, "Unable to extinguish, all cartridges absent or depleted. Replenish immediately.") if(extinguish) next_extinguish = world.time + extinguish_cooldown - ..() + ..() //Extinguish the mob with the parent proc. /obj/item/clothing/suit/space/eva/plasmaman/proc/eject_depleted_cartridges(mob/user) - var/ejected = 0 if(cart1 && cart1.reagents.total_volume < cart1.max_water) cart1.forceMove(get_turf(loc)) user.put_in_hands(cart1) cart1 = null - ejected = 1 if(cart2 && cart2.reagents.total_volume < cart2.max_water) cart2.forceMove(get_turf(loc)) user.put_in_hands(cart2) cart2 = null - ejected = 1 - if(ejected) + if(!cart1 || !cart2) to_chat(usr, "You eject the depleted extinguisher cartridges from \the [src].") else to_chat(usr, "No extinguisher cartridges were ejected from \the [src].") diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index f6cd56ece53..6632ae15663 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -365,7 +365,7 @@ ..() /datum/species/vox/updatespeciescolor(var/mob/living/carbon/human/H, var/owner_sensitive = 1) //Handling species-specific skin-tones for the Vox race. - if(H.species.name == "Vox") //Making sure we don't break Armalis. + if(H.species.bodyflags & HAS_ICON_SKIN_TONE) //Making sure we don't break Armalis. var/new_icobase = 'icons/mob/human_races/vox/r_vox.dmi' //Default Green Vox. var/new_deform = 'icons/mob/human_races/vox/r_def_vox.dmi' //Default Green Vox. switch(H.s_tone) @@ -396,7 +396,7 @@ H.update_dna() /datum/species/vox/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) - if(H.species.name == "Vox" && R.id == "oxygen") //Armalis are above such petty things. + if(R.id == "oxygen") //Armalis are above such petty things. H.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) //Same as plasma. H.reagents.remove_reagent(R.id, REAGENTS_METABOLISM) return 0 //Handling reagent removal on our own. @@ -436,6 +436,7 @@ poison_type = "oxygen" flags = NO_SCAN | NO_BLOOD | HAS_TAIL | NO_PAIN | IS_WHITELISTED + bodyflags = HAS_TAIL dietflags = DIET_OMNI //should inherit this from vox, this is here just in case blood_color = "#2299FC" @@ -463,6 +464,9 @@ "is holding their breath!", "is huffing oxygen!") +/datum/species/vox/armalis/handle_reagents() //Skip the Vox oxygen reagent toxicity. Armalis are above such things. + return 1 + /datum/species/kidan name = "Kidan" name_plural = "Kidan" From 61670a24a0d55eedc5f763991cdf36a35992ce6b Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Wed, 22 Feb 2017 02:31:37 -0500 Subject: [PATCH 6/7] Plasmaman Plasma Reagent Healing Proc Change --- .../modules/mob/living/carbon/human/species/plasmaman.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index b025e266d6e..97b5169face 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -239,10 +239,10 @@ return 1 /datum/species/plasmaman/handle_life(var/mob/living/carbon/human/H) - if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) + if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) //If they're wearing the full suit they'll be alright. var/datum/gas_mixture/environment = H.loc.return_air() if(environment && environment.oxygen && environment.total_moles()) - if(environment.oxygen / environment.total_moles() >= OXYCONCEN_PLASMEN_IGNITION) + if(environment.oxygen / environment.total_moles() >= OXYCONCEN_PLASMEN_IGNITION) //If the environment isn't a vacuum and amount of oxygen in the air is over whatever Plasmamen get ignited at, light them up. if(!H.on_fire) to_chat(H, "Your body reacts with the atmosphere and bursts into flame!") H.adjust_fire_stacks(0.5) @@ -250,9 +250,10 @@ /datum/species/plasmaman/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) if(R.id == "plasma") - H.heal_organ_damage(0.5*REAGENTS_EFFECT_MULTIPLIER, 0.5*REAGENTS_EFFECT_MULTIPLIER) + H.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) + H.adjustFireLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) H.adjustPlasma(20) H.reagents.remove_reagent(R.id, REAGENTS_METABOLISM) - return 0 //Handling reagent removal on our own. Prevents plasma from dealing toxin damage to plasmamen. + return 0 //Handling reagent removal on our own. Prevents plasma from dealing toxin damage to Plasmamen. return ..() From 3c24f6e2551e9a927c30c4ad570467ee6ae85055 Mon Sep 17 00:00:00 2001 From: KasparoVy Date: Thu, 23 Feb 2017 19:09:02 -0500 Subject: [PATCH 7/7] Dumbs Down Plasmaman Suit Reloading & Amends Plasmaman Suitless Ignition Plasmaman suits no longer have an in-depth system by which their autoextinguisher can be replenished, but a simple one. Plasmamen now combust in the same circumstances regular gasous plasma will as defined in LINDA code. --- code/__DEFINES/mob.dm | 2 +- code/datums/action.dm | 3 - .../objects/items/weapons/extinguisher.dm | 28 ----- code/modules/clothing/clothing.dm | 7 -- code/modules/clothing/spacesuits/plasmamen.dm | 101 +++++++----------- code/modules/mob/living/carbon/human/life.dm | 2 - .../living/carbon/human/species/plasmaman.dm | 25 +++-- .../living/carbon/human/species/station.dm | 2 +- 8 files changed, 54 insertions(+), 116 deletions(-) diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index e976e71f295..23b1964f015 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -54,7 +54,7 @@ #define DEFAULT_MARKING_STYLES list("head" = "None", "body" = "None", "tail" = "None") //Marking styles. Use instead of initial() for m_styles. #define DEFAULT_MARKING_COLOURS list("head" = "#000000", "body" = "#000000", "tail" = "#000000") //Marking colours. Use instead of initial() for m_colours. -#define OXYCONCEN_PLASMEN_IGNITION 0.01 //1% oxygen in the air is all it takes to light up a poorly clothed Plasmaman. +#define OXYCONCEN_PLASMEN_IGNITION 0.5 //Moles of oxygen in the air needed to light up a poorly clothed Plasmaman. Same as LINDA requirements for plasma burning. ////////REAGENT STUFF//////// // How many units of reagent are consumed per tick, by default. diff --git a/code/datums/action.dm b/code/datums/action.dm index 9f752b481e3..62a2bd9a39d 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -311,9 +311,6 @@ return 0 return ..() -/datum/action/item_action/eject_depleted_cartridges - name = "Eject Depleted Cartridges" - /datum/action/item_action/hands_free check_flags = AB_CHECK_CONSCIOUS diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index e15615460f4..5ab7a6cd61a 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -164,31 +164,3 @@ sleep(2) else return ..() - -/obj/item/weapon/extinguisher/cartridge - name = "auto-extinguisher cartridge" - desc = "A tiny and light fibreglass-framed auto-extinguisher cartridge." - icon_state = "miniFE0" - item_state = "miniFE" - hitsound = null //Ultralight and - flags = null //non-conductive - force = 0 - throwforce = 0 - w_class = 1 - materials = list() - max_water = 25 //5 uses in compatible suits - var/volume_per_use = 5 - sprite_name = "miniFE" - attack_verb = list("tapped") - -/obj/item/weapon/extinguisher/cartridge/afterattack(atom/target, mob/user , flag) - AttemptRefill(target, user) - -/obj/item/weapon/extinguisher/cartridge/attack_self() - return - -/obj/item/weapon/extinguisher/cartridge/proc/try_use() - if(reagents.has_reagent("water", volume_per_use)) - reagents.remove_reagent("water", volume_per_use) - return 1 - return 0 diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 53f12174688..fd8ebf045b6 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -448,7 +448,6 @@ BLIND // can't see anything var/ignore_suitadjust = 1 var/adjust_flavour = null var/list/hide_tail_by_species = null - var/autoextinguish = 0 //Proc that opens and closes jackets. /obj/item/clothing/suit/proc/adjustsuit(var/mob/user) @@ -499,12 +498,6 @@ BLIND // can't see anything else to_chat(user, "You attempt to button up the velcro on \the [src], before promptly realising how retarded you are.") -/obj/item/clothing/suit/proc/auto_extinguish(var/mob/living/carbon/human/user) - if(istype(user)) - to_chat(user, "You hear a soft click and a hiss from your suit as it automatically extinguishes the fire.") - playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3) - user.ExtinguishMob() - /obj/item/clothing/suit/equipped(var/mob/living/carbon/human/user, var/slot) //Handle tail-hiding on a by-species basis. ..() if(ishuman(user) && hide_tail_by_species && slot == slot_wear_suit) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 1d2f80a6968..324a05614c3 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -16,84 +16,55 @@ "Plasmaman" = 'icons/mob/species/plasmaman/suit.dmi' ) flags = STOPSPRESSUREDMAGE - autoextinguish = 1 - icon_state = "plasmaman_suit" item_state = "plasmaman_suit" - actions_types = list(/datum/action/item_action/eject_depleted_cartridges) - var/extinguisher_cart_type = /obj/item/weapon/extinguisher/cartridge - var/obj/item/weapon/extinguisher/cartridge/cart1 - var/obj/item/weapon/extinguisher/cartridge/cart2 var/next_extinguish = 0 var/extinguish_cooldown = 10 SECONDS + var/max_extinguishes = 5 + var/extinguishes_left = 5 // Yeah yeah, reagents, blah blah blah. This should be simple. -/obj/item/clothing/suit/space/eva/plasmaman/New() - if(!cart1) - cart1 = new extinguisher_cart_type(src) - if(!cart2) - cart2 = new extinguisher_cart_type(src) - ..() - -/obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user) - ..(user) - var/extinguishes_left = 0 - if(cart1) - extinguishes_left += cart1.reagents.total_volume / cart1.volume_per_use - if(cart2) - extinguishes_left += cart2.reagents.total_volume / cart2.volume_per_use - to_chat(user, "This suit can automatically extinguish [extinguishes_left] more times.") - -/obj/item/clothing/suit/space/eva/plasmaman/auto_extinguish(var/mob/living/carbon/human/H) - if(istype(H) && istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) //Only extinguish if the mob's wearing the whole suit. +/obj/item/clothing/suit/space/eva/plasmaman/proc/Extinguish(var/mob/user) + var/mob/living/carbon/human/H=user + if(extinguishes_left) if(next_extinguish > world.time) return - var/extinguish = 0 - if(cart1 && cart1.try_use()) - extinguish = 1 - else if(cart2 && cart2.try_use()) - to_chat(H, "Primary cartridge absent or depleted, extinguishing from secondary cartridge.") - extinguish = 1 - else - to_chat(H, "Unable to extinguish, all cartridges absent or depleted. Replenish immediately.") - - if(extinguish) - next_extinguish = world.time + extinguish_cooldown - ..() //Extinguish the mob with the parent proc. - -/obj/item/clothing/suit/space/eva/plasmaman/proc/eject_depleted_cartridges(mob/user) - if(cart1 && cart1.reagents.total_volume < cart1.max_water) - cart1.forceMove(get_turf(loc)) - user.put_in_hands(cart1) - cart1 = null - if(cart2 && cart2.reagents.total_volume < cart2.max_water) - cart2.forceMove(get_turf(loc)) - user.put_in_hands(cart2) - cart2 = null - - if(!cart1 || !cart2) - to_chat(usr, "You eject the depleted extinguisher cartridges from \the [src].") - else - to_chat(usr, "No extinguisher cartridges were ejected from \the [src].") - -/obj/item/clothing/suit/space/eva/plasmaman/attack_self(mob/user) - eject_depleted_cartridges(user) + next_extinguish = world.time + extinguish_cooldown + extinguishes_left-- + to_chat(user, "You hear a soft click and a hiss from your suit as it automatically extinguishes the fire.") + if(!extinguishes_left) + to_chat(user, "Onboard auto-extinguisher depleted, refill with a cartridge.") + playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3) + H.ExtinguishMob() /obj/item/clothing/suit/space/eva/plasmaman/attackby(var/obj/item/A as obj, mob/user as mob, params) ..() - if(istype(A, extinguisher_cart_type)) - if(cart1 && cart2) - to_chat(user, "There's already cartridges in \the [src].") + if(istype(A, /obj/item/weapon/plasmensuit_cartridge)) //This suit can only be reloaded by the appropriate cartridges, and only if it's got no more extinguishes left. + if(!extinguishes_left) + extinguishes_left = max_extinguishes //Full replenishment from the cartridge. + to_chat(user, "You replenish \the [src] with the cartridge.") + qdel(A) else - var/obj/item/weapon/extinguisher/cartridge/cart = A - user.remove_from_mob(cart) - if(!cart1) - cart1 = cart - else if(!cart2) - cart2 = cart - cart.forceMove(src) - to_chat(user, "You load the extinguisher cartridge into \the [src].") + to_chat(user, "The suit must be depleted before it can be refilled.") + +/obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user) + ..(user) + to_chat(user, "There are [extinguishes_left] extinguisher canisters left in this suit.") + +/obj/item/weapon/plasmensuit_cartridge //Can be used to refill Plasmaman suits when they run out of autoextinguishes. + name = "auto-extinguisher cartridge" + desc = "A tiny and light fibreglass-framed auto-extinguisher cartridge." + icon = 'icons/obj/items.dmi' + icon_state = "miniFE0" + item_state = "miniFE" + hitsound = null //Ultralight and + flags = null //non-conductive + force = 0 + throwforce = 0 + w_class = 2 //Fits in boxes. + materials = list() + attack_verb = list("tapped") /obj/item/clothing/head/helmet/space/eva/plasmaman name = "plasmaman helmet" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 16cb575c83a..b2e609c92f2 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -485,8 +485,6 @@ if(on_fire) var/thermal_protection = get_thermal_protection() - if(wear_suit && wear_suit.autoextinguish) - wear_suit.auto_extinguish(src) if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT) return if(thermal_protection >= FIRE_SUIT_MAX_TEMP_PROTECT) diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index 97b5169face..42b64cccd01 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -128,8 +128,10 @@ helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/mime H.equip_or_collect(new suit(H), slot_wear_suit) H.equip_or_collect(new helm(H), slot_head) - H.equip_or_collect(new/obj/item/weapon/tank/plasma/plasmaman(H), tank_slot) // Bigger plasma tank from Raggy. - to_chat(H, "You are now running on plasma internals from the [H.s_store] in your [tank_slot_name]. You must breathe plasma in order to survive, and are extremely flammable.") + H.equip_or_collect(new /obj/item/weapon/tank/plasma/plasmaman(H), tank_slot) // Bigger plasma tank from Raggy. + H.equip_or_collect(new /obj/item/weapon/plasmensuit_cartridge(H), slot_in_backpack) + H.equip_or_collect(new /obj/item/weapon/plasmensuit_cartridge(H), slot_in_backpack) //Two refill cartridges for their suit. Can fit in boxes. + to_chat(H, "You are now running on plasma internals from the [H.s_store] in your [tank_slot_name]. You must breathe plasma in order to survive, and are extremely flammable.") H.internal = H.get_item_by_slot(tank_slot) H.update_internals_hud_icon(1) @@ -239,14 +241,19 @@ return 1 /datum/species/plasmaman/handle_life(var/mob/living/carbon/human/H) - if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) //If they're wearing the full suit they'll be alright. + if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) var/datum/gas_mixture/environment = H.loc.return_air() - if(environment && environment.oxygen && environment.total_moles()) - if(environment.oxygen / environment.total_moles() >= OXYCONCEN_PLASMEN_IGNITION) //If the environment isn't a vacuum and amount of oxygen in the air is over whatever Plasmamen get ignited at, light them up. - if(!H.on_fire) - to_chat(H, "Your body reacts with the atmosphere and bursts into flame!") - H.adjust_fire_stacks(0.5) - H.IgniteMob() + if(environment && environment.oxygen && environment.oxygen >= OXYCONCEN_PLASMEN_IGNITION) //Plasmamen so long as there's enough oxygen (0.5 moles, same as it takes to burn gaseous plasma). + H.adjust_fire_stacks(0.5) + if(!H.on_fire && H.fire_stacks > 0) + H.visible_message("[H]'s body reacts with the atmosphere and bursts into flames!","Your body reacts with the atmosphere and bursts into flame!") + H.IgniteMob() + else + if(H.fire_stacks) + var/obj/item/clothing/suit/space/eva/plasmaman/P = H.wear_suit + if(istype(P)) + P.Extinguish(H) + H.update_fire() /datum/species/plasmaman/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) if(R.id == "plasma") diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 6632ae15663..99d5689ae56 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -435,7 +435,7 @@ breath_type = "nitrogen" poison_type = "oxygen" - flags = NO_SCAN | NO_BLOOD | HAS_TAIL | NO_PAIN | IS_WHITELISTED + flags = NO_SCAN | NO_BLOOD | NO_PAIN | IS_WHITELISTED bodyflags = HAS_TAIL dietflags = DIET_OMNI //should inherit this from vox, this is here just in case