Merge pull request #6555 from KasparoVy/vox-plasmaman-reagent-bsns

Reagent Oxygen is Toxic to Vox, Reagent Plasma Heals Plasmamen, Plasmaman Suit Autoextinguish & Plasmaman Exposure Burn Fixes
This commit is contained in:
Fox McCloud
2017-02-25 17:11:08 -05:00
committed by GitHub
7 changed files with 84 additions and 22 deletions
+34 -6
View File
@@ -21,11 +21,8 @@
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/examine(mob/user)
..(user)
to_chat(user, "<span class='info'>There are [extinguishes_left] extinguisher canisters left in this suit.</span>")
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/proc/Extinguish(var/mob/user)
var/mob/living/carbon/human/H=user
@@ -35,9 +32,40 @@
next_extinguish = world.time + extinguish_cooldown
extinguishes_left--
to_chat(H, "<span class='warning'>Your suit automatically extinguishes the fire.</span>")
to_chat(user, "<span class='warning'>You hear a soft click and a hiss from your suit as it automatically extinguishes the fire.</span>")
if(!extinguishes_left)
to_chat(user, "<span class='warning'>Onboard auto-extinguisher depleted, refill with a cartridge.</span>")
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, /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, "<span class='notice'>You replenish \the [src] with the cartridge.</span>")
qdel(A)
else
to_chat(user, "<span class='notice'>The suit must be depleted before it can be refilled.</span>")
/obj/item/clothing/suit/space/eva/plasmaman/examine(mob/user)
..(user)
to_chat(user, "<span class='info'>There are [extinguishes_left] extinguisher canisters left in this suit.</span>")
/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"
desc = "A special containment helmet designed to protect a plasmaman's volatile body from outside exposure and quickly extinguish it in emergencies."
@@ -15,6 +15,7 @@
butt_sprite = "plasma"
breath_type = "plasma"
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.
@@ -127,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, "<span class='notice'>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.</span>")
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, "<span class='notice'>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.</span>")
H.internal = H.get_item_by_slot(tank_slot)
H.update_internals_hud_icon(1)
@@ -235,10 +238,29 @@
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, "<span class='warning'>Your body reacts with the atmosphere and bursts into flame!</span>")
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.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("<span class='danger'>[H]'s body reacts with the atmosphere and bursts into flames!</span>","<span class='userdanger'>Your body reacts with the atmosphere and bursts into flame!</span>")
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")
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 ..()
@@ -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)
@@ -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(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
@@ -427,7 +435,8 @@
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
blood_color = "#2299FC"
@@ -455,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"
@@ -39,7 +39,6 @@
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
/datum/reagent/nitrogen
name = "Nitrogen"
id = "nitrogen"