From 7f2cb565788f548851c5b4c93e3627544284388a Mon Sep 17 00:00:00 2001 From: Metis <100518708+sheepishgoat@users.noreply.github.com> Date: Sat, 24 Aug 2024 16:28:03 -0400 Subject: [PATCH] wew --- .../game/objects/items/docility_implant.dm | 66 ++++++++++++++++++- .../modules/client/preferences/preferences.dm | 2 + code/modules/client/preferences.dm | 3 + code/modules/client/preferences_savefile.dm | 2 + 4 files changed, 70 insertions(+), 3 deletions(-) diff --git a/GainStation13/code/game/objects/items/docility_implant.dm b/GainStation13/code/game/objects/items/docility_implant.dm index 0e713dd0..31254192 100644 --- a/GainStation13/code/game/objects/items/docility_implant.dm +++ b/GainStation13/code/game/objects/items/docility_implant.dm @@ -29,7 +29,7 @@ if(!istype(target_human)) return - for(var/trait in trait_list) + for(var/trait in traits_list) ADD_TRAIT(target, trait, src) target_human.nutri_mult += 1 @@ -40,9 +40,69 @@ if(!.) return - for(var/trait in trait_list) - REMOVE_TRAIT(target, trait, src) + var/mob/living/carbon/human/target_human = source + if(!istype(target_human)) + return + + for(var/trait in traits_list) + REMOVE_TRAIT(target_human, trait, src) target_human.nutri_mult -= 1 return TRUE + +/obj/item/implant/docile/livstock + name = "livestock implant" + traits_list = list( + TRAIT_WEIGHT_LOSS_IMMUNE, + TRAIT_PACIFISM, + TRAIT_CLUMSY, + TRAIT_FAT_GOOD, + TRAIT_HEAVY_SLEEPER, + TRAIT_DOCILE, + TRAIT_NO_MISC, + TRAIT_NORUNNING, + ) + + /// What is the name of the mob before we change it? + var/stored_name = "" + /// What name do we want to give the mob before adding the randomized number + var/name_to_give = "Livestock" + +/obj/item/implant/docile/livestock/can_be_implanted_in(mob/living/target) + . = ..() + if(!.) + return FALSE + + return target?.client?.prefs?.extreme_fatness_vulnerable + +/obj/item/implant/docile/livestock/implant(mob/living/target, mob/user, silent) + . = ..() + if(!.) + return + + var/mob/living/carbon/human/target_human = target + stored_name = target_human.real_name + var/new_name = "[name_to_give] ([rand(0,999)])" + + target_human.real_name = new_name + target_human.name = new_name + +/obj/item/implant/docile/livestock/removed(mob/living/source, silent, special) + . = ..() + if(!.) + return FALSE + + var/mob/living/carbon/human/target_human = target + target_human.real_name = stored_name + target_human.name = stored_name + +/obj/item/implantcase/docile + name = "implant case - 'Docility'" + desc = "A glass case containing a docility implant." + imp_type = /obj/item/implant/docile + +/obj/item/implantcase/docile + name = "implant case - 'Livestock'" + desc = "A glass case containing a livestock implant." + imp_type = /obj/item/implant/docile/livestock diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm index a55ef553..4da0f2e2 100644 --- a/GainStation13/code/modules/client/preferences/preferences.dm +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -23,6 +23,8 @@ var/stuckage = FALSE /// Are items that only affect those at high weights able to affect the player? var/fatness_vulnerable = FALSE + /// Similar to fatness_vulnerable, but with more extreme effects such as transformation/hypno. + var/extreme_fatness_vulnerable = FALSE // Helplessness, a set of prefs that make things extra tough at higher weights. If set to FALSE, they won't do anything. ///What fatness level disables movement? diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 798f152b..a75622a1 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1071,6 +1071,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "