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
This commit is contained in:
Alphas00
2025-01-25 08:21:34 +01:00
parent 705e92e0c7
commit 4971a2e404
2 changed files with 3 additions and 6 deletions
@@ -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, "<span class='notice'>[add_text]</span>")
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)
@@ -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]"