diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 0e4a9f40ef1..5a96b6e954f 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.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. #define REAGENTS_METABOLISM 0.4 diff --git a/code/datums/action.dm b/code/datums/action.dm index f1826c334c5..62a2bd9a39d 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." @@ -357,7 +357,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..5ab7a6cd61a 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,4 @@ if(W.loc == my_target) break sleep(2) else - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index edc715f0b27..324a05614c3 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -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, "There are [extinguishes_left] extinguisher canisters left in this suit.") + 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, "Your suit automatically extinguishes the fire.") + 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, /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 + 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" desc = "A special containment helmet designed to protect a plasmaman's volatile body from outside exposure and quickly extinguish it in emergencies." diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index 05f24facc65..42b64cccd01 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -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, "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) @@ -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, "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.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") + 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 ..() diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index fcdd8ac40ea..99d5689ae56 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) @@ -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" diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index e8505d64653..89233789903 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -39,7 +39,6 @@ reagent_state = GAS color = "#808080" // rgb: 128, 128, 128 - /datum/reagent/nitrogen name = "Nitrogen" id = "nitrogen"