From 0c4a3753bdf1acae599f6d612bd34acf1d6ff9e1 Mon Sep 17 00:00:00 2001 From: Azarak Date: Mon, 14 Oct 2019 13:54:11 +0200 Subject: [PATCH] Fixes for Stimulum and Nitryl --- code/modules/reagents/chemistry/reagents/other_reagents.dm | 7 +++++++ code/modules/surgery/organs/lungs.dm | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 07c9b166..589aa9ff 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1328,10 +1328,12 @@ ..() ADD_TRAIT(L, TRAIT_STUNIMMUNE, id) ADD_TRAIT(L, TRAIT_SLEEPIMMUNE, id) + ADD_TRAIT(L, TRAIT_NOSLIPALL, id) /datum/reagent/stimulum/on_mob_end_metabolize(mob/living/L) REMOVE_TRAIT(L, TRAIT_STUNIMMUNE, id) REMOVE_TRAIT(L, TRAIT_SLEEPIMMUNE, id) + REMOVE_TRAIT(L, TRAIT_NOSLIPALL, id) ..() /datum/reagent/stimulum/on_mob_life(mob/living/carbon/M) @@ -1358,6 +1360,11 @@ REMOVE_TRAIT(L, TRAIT_GOTTAGOFAST, id) ..() +/datum/reagent/nitryl/on_mob_life(mob/living/carbon/M) + current_cycle++ + holder.remove_reagent(id, 0.99) //Gives time for the next tick of life(). + . = TRUE //Update status effects. + /////////////////////////Coloured Crayon Powder//////////////////////////// //For colouring in /proc/mix_color_from_reagents diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index cfbb530e..ab99ac34 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -317,7 +317,8 @@ H.adjustFireLoss(nitryl_pp/4) gas_breathed = breath_gases[/datum/gas/nitryl] if (gas_breathed > gas_stimulation_min) - H.reagents.add_reagent("no2",1) + var/existing = H.reagents.get_reagent_amount("no2") + H.reagents.add_reagent("no2", max(0, 5 - existing)) breath_gases[/datum/gas/nitryl]-=gas_breathed