From 7604d9a008afeb410c21ca403157347d9f2bf873 Mon Sep 17 00:00:00 2001
From: Alphas00 <154434082+Alphas00@users.noreply.github.com>
Date: Mon, 9 Sep 2024 18:18:49 +0200
Subject: [PATCH 1/5] Fatfang changes
The Nibble mutation now allows you to bite yourself. The fangs no longer disappear after use, making drawing them out again needed, but remain in the hand. After an attack with them, you'll go into a 5 seconds melee cooldown.
Internal change for admin memery, chem and amount injected can be changed as they are now tied to vars inside the mutation
---
GainStation13/code/datums/mutations/fatfang.dm | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/GainStation13/code/datums/mutations/fatfang.dm b/GainStation13/code/datums/mutations/fatfang.dm
index 0303b090..718345c1 100644
--- a/GainStation13/code/datums/mutations/fatfang.dm
+++ b/GainStation13/code/datums/mutations/fatfang.dm
@@ -9,6 +9,9 @@
instability = 10
energy_coeff = 1
power_coeff = 1
+ ///Which chem is added (lipo default) and how much?
+ var/chem_to_add = /datum/reagent/consumable/lipoifier
+ var/chem_amount = 5
/obj/effect/proc_holder/spell/targeted/touch/fatfang
name = "The Nibble"
@@ -27,16 +30,14 @@
catchphrase = null
icon = 'icons/mob/actions/bloodsucker.dmi'
icon_state = "power_feed"
- ///How much weight is added?
- var/chem_to_add = 5
var/starttime = 0
/obj/item/melee/touch_attack/fatfang/afterattack(atom/target, mob/living/carbon/user, proximity)
- if(!proximity || !iscarbon(target) || target == user)
+ if(!proximity || !iscarbon(target))
return FALSE
- if(!target || !chem_to_add)
+ if(!target || !user.dna.get_mutation(FATFANG).chem_to_add || !user.dna.get_mutation(FATFANG).chem_amount)
return FALSE
target.visible_message("[user] nibbles [target]!","[user] nibbles you!")
if(target == user.pulling && ishuman(user.pulling))
@@ -44,13 +45,12 @@
user.dna.get_mutation(FATFANG).power.charge_max = 600 * GET_MUTATION_ENERGY(user.dna.get_mutation(FATFANG))
while(starttime + 300 > world.time && in_range(user, target))
if(do_mob(user, target, 10, 0, 1))
- target.reagents.add_reagent(/datum/reagent/consumable/lipoifier, (chem_to_add * GET_MUTATION_POWER(user.dna.get_mutation(FATFANG))/2))
+ target.reagents.add_reagent(user.dna.get_mutation(FATFANG).chem_to_add, (user.dna.get_mutation(FATFANG).chem_amount * GET_MUTATION_POWER(user.dna.get_mutation(FATFANG))/2))
target.visible_message("[user] pumps some venom in [target]!","[user] pumps some venom in you!")
else
user.dna.get_mutation(FATFANG).power.charge_max = 50 * GET_MUTATION_ENERGY(user.dna.get_mutation(FATFANG))
- target.reagents.add_reagent(/datum/reagent/consumable/lipoifier, chem_to_add * GET_MUTATION_POWER(user.dna.get_mutation(FATFANG)))
-
- return ..()
+ target.reagents.add_reagent(user.dna.get_mutation(FATFANG).chem_to_add, user.dna.get_mutation(FATFANG).chem_amount * GET_MUTATION_POWER(user.dna.get_mutation(FATFANG)))
+ user.changeNext_move(50)
/obj/item/dnainjector/antifang
name = "\improper DNA injector (Anti-The Nibble)"
From e0c82546c728fb8f45e589a6cfba34b61302e0e3 Mon Sep 17 00:00:00 2001
From: Alphas00 <154434082+Alphas00@users.noreply.github.com>
Date: Mon, 9 Sep 2024 22:06:51 +0200
Subject: [PATCH 2/5] Bee banned reagents
Added a list of reagents that cannot be injected into queen bees
---
.../mob/living/simple_animal/hostile/bees.dm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm
index 89264441..e42ab836 100644
--- a/code/modules/mob/living/simple_animal/hostile/bees.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bees.dm
@@ -1,3 +1,4 @@
+GLOBAL_LIST_INIT(bee_banned_chem, list(/datum/reagent/fermi_fat, /datum/reagent/fermi_slim))
#define BEE_IDLE_ROAMING 70 //The value of idle at which a bee in a beebox will try to wander
#define BEE_IDLE_GOHOME 0 //The value of idle at which a bee will try to go home
@@ -272,13 +273,16 @@
queen.paxed = TRUE
else
var/datum/reagent/R = GLOB.chemical_reagents_list[S.reagents.get_master_reagent_id()]
- if(R && S.reagents.has_reagent(R.type, 5))
- S.reagents.remove_reagent(R.type,5)
- queen.assign_reagent(R)
- user.visible_message("[user] injects [src]'s genome with [R.name], mutating it's DNA!","You inject [src]'s genome with [R.name], mutating it's DNA!")
- name = queen.name
+ if(!is_type_in_list(R, GLOB.bee_banned_chem))
+ if(R && S.reagents.has_reagent(R.type, 5))
+ S.reagents.remove_reagent(R.type,5)
+ queen.assign_reagent(R)
+ user.visible_message("[user] injects [src]'s genome with [R.name], mutating it's DNA!","You inject [src]'s genome with [R.name], mutating it's DNA!")
+ name = queen.name
+ else
+ to_chat(user, "You don't have enough units of that chemical to modify the bee's DNA!")
else
- to_chat(user, "You don't have enough units of that chemical to modify the bee's DNA!")
+ to_chat(user, "The bee rejects the injection! This chem is incompatible!")
..()
From 5ef1b7b466d7b3e2fcc2e695faf6ca1d4e9b19e9 Mon Sep 17 00:00:00 2001
From: Alphas00 <154434082+Alphas00@users.noreply.github.com>
Date: Tue, 10 Sep 2024 15:06:37 +0200
Subject: [PATCH 3/5] Permanent Fat changes
Permanent fat variable removed. Instead, the permanent WG pref, if enabled, now will save your character's real fatness at roundend or cryo as your new starting weight. Starting weight can still be tweaked from 0 to 8000 should you want to lose some of it.
Tweaked galbanic compound to behave better while addicted.
Macerinic solution can now be overdosed (50u). Overdosing causes your character to get hungry but also increases your weight loss rate up to 5
---
GainStation13/code/mechanics/fatness.dm | 36 -------------------
GainStation13/code/mechanics/permanent_fat.dm | 4 ++-
.../reagents/chemistry/reagents/fermi_fat.dm | 25 ++++++++-----
code/modules/client/preferences.dm | 4 +--
code/modules/client/preferences_savefile.dm | 1 -
5 files changed, 20 insertions(+), 50 deletions(-)
diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm
index 82c5dd31..00c9aa8a 100644
--- a/GainStation13/code/mechanics/fatness.dm
+++ b/GainStation13/code/mechanics/fatness.dm
@@ -11,8 +11,6 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/bridge, /area/crew_quarters,
var/fat_hiders = list()
//The actual value a mob is at. Is equal to fatness if fat_hider is FALSE.
var/fatness_real = 0
- //Permanent fatness, which sticks around between rounds
- var/fatness_perma = 0
///At what rate does the parent mob gain weight? 1 = 100%
var/weight_gain_rate = 1
//At what rate does the parent mob lose weight? 1 = 100%
@@ -51,12 +49,10 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/bridge, /area/crew_quarters,
fatness = fatness_real //Make their current fatness their real fatness
hiders_apply() //Check and apply hiders
- perma_apply() //Check and apply for permanent fat
xwg_resize() //Apply XWG
return TRUE
-
/mob/living/carbon/fully_heal(admin_revive)
fatness = 0
fatness_real = 0
@@ -142,42 +138,10 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/bridge, /area/crew_quarters,
if(client?.prefs?.max_weight) //Check their prefs
fatness = min(fatness, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max
-/mob/living/carbon/proc/perma_apply()
- if(fatness_perma > 0) //Check if we need to make calcs at all
- fatness = fatness + fatness_perma //Add permanent fat to fatness
- if(client?.prefs?.max_weight) //Check for max weight prefs
- fatness = min(fatness, (client?.prefs?.max_weight - 1)) //Apply max weight prefs
-
-/mob/living/carbon/proc/adjust_perma(adjustment_amount, type_of_fattening = FATTENING_TYPE_ITEM)
- if(!client)
- return FALSE
- if(!client.prefs.weight_gain_permanent)
- return FALSE
-
- if(!adjustment_amount || !type_of_fattening)
- return FALSE
-
- if(!HAS_TRAIT(src, TRAIT_UNIVERSAL_GAINER) && client?.prefs)
- if(!check_weight_prefs(type_of_fattening))
- return FALSE
- var/amount_to_change = adjustment_amount
-
- if(adjustment_amount > 0)
- amount_to_change = amount_to_change * weight_gain_rate
- else
- amount_to_change = amount_to_change * weight_loss_rate
-
- fatness_perma += amount_to_change
- fatness_perma = max(fatness_perma, MINIMUM_FATNESS_LEVEL)
-
- if(client?.prefs?.max_weight) // GS13
- fatness_perma = min(fatness_perma, (client?.prefs?.max_weight - 1))
-
/mob/living/carbon/human/handle_breathing(times_fired)
. = ..()
fatness = fatness_real
hiders_apply()
- perma_apply()
xwg_resize()
/mob/living/carbon/proc/xwg_resize()
diff --git a/GainStation13/code/mechanics/permanent_fat.dm b/GainStation13/code/mechanics/permanent_fat.dm
index 74471024..ed926465 100644
--- a/GainStation13/code/mechanics/permanent_fat.dm
+++ b/GainStation13/code/mechanics/permanent_fat.dm
@@ -1,6 +1,8 @@
/datum/preferences/proc/perma_fat_save(character)
if(iscarbon(character))
var/mob/living/carbon/C = character
+ if(!C.client.prefs.weight_gain_permanent)
+ return FALSE
if(!path)
return 0
if(world.time < savecharcooldown)
@@ -15,4 +17,4 @@
return 0
S.cd = "/character[default_slot]"
- WRITE_FILE(S["permanent_fat"] , C.fatness_perma)
+ WRITE_FILE(S["starting_weight"] , C.fatness_real)
diff --git a/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm b/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm
index 93242535..e53e4692 100644
--- a/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm
+++ b/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm
@@ -1,5 +1,3 @@
-///datum/reagent/sizechem
-
//Reagent
/datum/reagent/fermi_fat
name = "Galbanic Compound"
@@ -55,7 +53,6 @@
if(!iscarbon(M))
return..()
M.adjust_fatness(30, FATTENING_TYPE_CHEM)
- M.adjust_perma(1, FATTENING_TYPE_CHEM)
..()
. = 1
@@ -65,7 +62,6 @@
return..()
var/mob/living/carbon/C = M
C.adjust_fatness(20, FATTENING_TYPE_CHEM)
- C.adjust_perma(1, FATTENING_TYPE_CHEM)
..()
/datum/reagent/fermi_fat/overdose_start(mob/living/M)
@@ -83,7 +79,7 @@
C.adjust_fatness(1, FATTENING_TYPE_CHEM)
C.fullness = max(0, C.fullness-1)
C.nutrition = max(0, C.nutrition-1)
- if(addiction_mults == 0)
+ if(addiction_mults < 1)
C.nutri_mult += 0.5
C.weight_gain_rate += 0.25
addiction_mults = 1
@@ -99,7 +95,7 @@
C.adjust_fatness(2, FATTENING_TYPE_CHEM)
C.fullness = max(0, C.fullness-2)
C.nutrition = max(0, C.nutrition-2)
- if(addiction_mults <= 1)
+ if(addiction_mults < 2)
C.nutri_mult += 0.5
C.weight_gain_rate += 0.25
addiction_mults = 2
@@ -115,7 +111,7 @@
C.adjust_fatness(3, FATTENING_TYPE_CHEM)
C.fullness = max(0, C.fullness-3)
C.nutrition = max(0, C.nutrition-3)
- if(addiction_mults <= 2)
+ if(addiction_mults < 3)
C.nutri_mult += 0.5
C.weight_gain_rate += 0.25
addiction_mults = 3
@@ -131,7 +127,7 @@
C.adjust_fatness(4, FATTENING_TYPE_CHEM)
C.fullness = max(0, C.fullness-4)
C.nutrition = max(0, C.nutrition-4)
- if(addiction_mults <= 3)
+ if(addiction_mults < 4)
C.nutri_mult += 0.5
C.weight_gain_rate += 0.25
addiction_mults = 4
@@ -143,6 +139,7 @@
C.weight_gain_rate = max(0,11, 0.25 * addiction_mults)
return
+//Reagent
/datum/reagent/fermi_slim
name = "Macerinic Solution"
description = "A solution with unparalleled obesity-solving properties. One of the few things known to be capable of removing galbanic fat."
@@ -152,6 +149,8 @@
metabolization_rate = REAGENTS_METABOLISM / 4
can_synth = FALSE
+ overdose_threshold = 50
+
//Reaction
/datum/chemical_reaction/fermi_slim
name = "FermiSlim"
@@ -181,6 +180,14 @@
if(!iscarbon(M))
return..()
M.adjust_fatness(-50, FATTENING_TYPE_CHEM)
- M.adjust_perma(-5, FATTENING_TYPE_CHEM)
..()
. = 1
+
+/datum/reagent/fermi_slim/overdose_process(mob/living/M)
+ if(!iscarbon(M))
+ return..()
+ var/mob/living/carbon/C = M
+ C.fullness = max(0, C.fullness-5)
+ C.nutrition = max(0, C.nutrition-5)
+ C.weight_loss_rate = min(5, C.weight_loss_rate+0.01)
+ ..()
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 8be93308..beb1b99d 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -105,7 +105,6 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//GS13
var/starting_weight = 0 //how thicc you wanna be at start
- var/permanent_fat = 0 //If it isn't the consequences of your own actions
var/wg_rate = 0.5
var/wl_rate = 0.5
var/voice = "human"
@@ -1077,7 +1076,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "This preference functions similar to the one before but allows for items with more drastic effects. Do not enable this if you aren't okay with more drastic things happening to your character.
"
dat += "Extreme Fatness Vulnerability:[extreme_fatness_vulnerable == TRUE ? "Enabled" : "Disabled"]
"
dat += "Extreme Weight Gain (Sprite Size scales with weight):[weight_gain_extreme == TRUE ? "Enabled" : "Disabled"]
"
- dat += "Weight Gain Permanent (special weight persists between rounds):[weight_gain_permanent == TRUE ? "Enabled" : "Disabled"]
"
+ dat += "Weight Gain Permanent (endround/cryo weight becomes your new start weight):[weight_gain_permanent == TRUE ? "Enabled" : "Disabled"]
"
dat += "