Merge pull request #13707 from DeltaFire15/synthetic-alcohol-intolerance

Makes synthetics inherently immune to alcohol
This commit is contained in:
silicons
2020-11-25 22:23:05 -07:00
committed by GitHub
4 changed files with 14 additions and 4 deletions
@@ -35,8 +35,18 @@ All effects don't start immediately, but rather get worse over time; the rate is
91-100: Dangerously toxic - swift death
*/
/datum/reagent/consumable/ethanol/on_mob_add(mob/living/L, amount)
. = ..()
if(!iscarbon(L))
return
var/mob/living/carbon/C = L
if(HAS_TRAIT(C, TRAIT_ROBOTIC_ORGANISM))
C.reagents.remove_reagent(type, amount, FALSE)
/datum/reagent/consumable/ethanol/on_mob_life(mob/living/carbon/C)
if(HAS_TRAIT(C, TRAIT_NO_ALCOHOL))
if(HAS_TRAIT(C, TRAIT_TOXIC_ALCOHOL))
C.adjustToxLoss((boozepwr/25)*REM,forced = TRUE)
else if(C.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER)
var/booze_power = boozepwr