From 4971a2e40483ca935aa13d9526c07364454f5662 Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Sat, 25 Jan 2025 08:21:34 +0100 Subject: [PATCH] Adiphazard & Permafat fix Adipohazard no longer tries to fatten up non-carbon pulled or pulled by objects Permafat no longer tries to save without a client --- GainStation13/code/datums/mutations/adipohazard.dm | 7 ++----- GainStation13/code/mechanics/permanent_fat.dm | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/GainStation13/code/datums/mutations/adipohazard.dm b/GainStation13/code/datums/mutations/adipohazard.dm index 3742db0258..c10eb62499 100644 --- a/GainStation13/code/datums/mutations/adipohazard.dm +++ b/GainStation13/code/datums/mutations/adipohazard.dm @@ -1,6 +1,3 @@ - -//There was a runtime error. Look into it - /datum/mutation/human/adipohazard name = "Adipohazard" desc = "A mutation that causes swelling upon touching the mutated person." @@ -14,7 +11,7 @@ /datum/mutation/human/adipohazard/on_life() . = ..() - if(owner.pulledby != null) + if(owner.pulledby != null && iscarbon(owner.pulledby)) var/mob/living/carbon/C = owner.pulledby var/pwr = GET_MUTATION_POWER(src) C.adjust_fatness(get_fatness_bonus(owner) + (fat_add * pwr), FATTENING_TYPE_RADIATIONS) @@ -23,7 +20,7 @@ if(prob(5)) var/add_text = pick("You feel softer.", "[owner] feels warm to the touch", "It's so nice to touch [owner].", "You don't want to let go of [owner].") to_chat(C, "[add_text]") - if(owner.pulling != null) + if(owner.pulling != null && iscarbon(owner.pulling)) var/mob/living/carbon/C = owner.pulling var/pwr = GET_MUTATION_POWER(src) C.adjust_fatness(get_fatness_bonus(owner) + (fat_add * pwr), FATTENING_TYPE_RADIATIONS) diff --git a/GainStation13/code/mechanics/permanent_fat.dm b/GainStation13/code/mechanics/permanent_fat.dm index 9492f6b8ff..6eb055e7cc 100644 --- a/GainStation13/code/mechanics/permanent_fat.dm +++ b/GainStation13/code/mechanics/permanent_fat.dm @@ -4,7 +4,7 @@ /mob/living/carbon/proc/perma_fat_save() var/key = savekey - if(!key) + if(!key || !client) return FALSE var/filename = "preferences.sav" var/path = "data/player_saves/[key[1]]/[key]/[filename]"