Merge pull request #262 from Alphas00/master

Permafat changes, Fatfang changes, Bees banned reagents
This commit is contained in:
evilew
2024-09-11 16:36:21 +02:00
committed by GitHub
11 changed files with 97 additions and 34 deletions
@@ -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("<span class='danger'>[user] nibbles [target]!</span>","<span class='userdanger'>[user] nibbles you!</span>")
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("<span class='danger'>[user] pumps some venom in [target]!</span>","<span class='userdanger'>[user] pumps some venom in you!</span>")
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)"
-1
View File
@@ -56,7 +56,6 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/bridge, /area/crew_quarters,
return TRUE
/mob/living/carbon/fully_heal(admin_revive)
fatness = 0
fatness_real = 0
+36 -1
View File
@@ -1,6 +1,37 @@
/mob/living/carbon
var/savekey
var/ckeyslot
/mob/living/carbon/proc/perma_fat_save(mob/living/carbon/character)
var/key = savekey
if(!key)
return FALSE
var/filename = "preferences.sav"
var/path = "data/player_saves/[key[1]]/[key]/[filename]"
var/savefile/S = new /savefile(path)
if(!path)
return FALSE
if(character.ckeyslot)
var/slot = character.ckeyslot
S.cd = "/character[slot]"
var/persi
S["weight_gain_persistent"] >> persi
if(persi)
WRITE_FILE(S["starting_weight"] , character.fatness_real)
var/perma
S["weight_gain_permanent"] >> perma
if(S["weight_gain_permanent"])
WRITE_FILE(S["permanent_fat"] , character.fatness_perma)
/*
/datum/preferences/proc/perma_fat_save(character)
if(iscarbon(character))
var/mob/living/carbon/C = character
if(!C.client.prefs.weight_gain_permanent && !C.client.prefs.weight_gain_persistent)
return FALSE
if(!path)
return 0
if(world.time < savecharcooldown)
@@ -15,4 +46,8 @@
return 0
S.cd = "/character[default_slot]"
WRITE_FILE(S["permanent_fat"] , C.fatness_perma)
if(C.client.prefs.weight_gain_persistent)
WRITE_FILE(S["starting_weight"] , C.fatness_real)
if(C.client.prefs.weight_gain_permanent)
WRITE_FILE(S["permanent_fat"] , C.fatness_perma)
*/
@@ -19,6 +19,8 @@
var/blueberry_inflation = FALSE
///Extreme weight gain
var/weight_gain_extreme = FALSE
///Persistant fatness
var/weight_gain_persistent = FALSE
///Permanent weight gain
var/weight_gain_permanent = FALSE
/// At what weight will you start to get stuck in airlocks?
@@ -1,5 +1,3 @@
///datum/reagent/sizechem
//Reagent
/datum/reagent/fermi_fat
name = "Galbanic Compound"
@@ -83,7 +81,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 +97,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 +113,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 +129,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 +141,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 +151,8 @@
metabolization_rate = REAGENTS_METABOLISM / 4
can_synth = FALSE
overdose_threshold = 50
//Reaction
/datum/chemical_reaction/fermi_slim
name = "FermiSlim"
@@ -180,7 +181,16 @@
/datum/reagent/fermi_slim/on_mob_life(mob/living/carbon/M)
if(!iscarbon(M))
return..()
M.adjust_fatness(-50, FATTENING_TYPE_CHEM)
M.adjust_perma(-5, FATTENING_TYPE_CHEM)
M.adjust_fatness(-50, FATTENING_TYPE_WEIGHT_LOSS)
M.adjust_perma(-5, FATTENING_TYPE_WEIGHT_LOSS)
..()
. = 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)
..()
+2 -1
View File
@@ -9,5 +9,6 @@ GLOBAL_LIST_INIT(blacklisted_pool_reagents, list(
/datum/reagent/toxin/plasma, /datum/reagent/oxygen, /datum/reagent/nitrous_oxide, /datum/reagent/nitrogen, //gases
/datum/reagent/fermi, //blanket fermichem ban sorry. this also covers mkultra, genital enlargers, etc etc.
/datum/reagent/drug/aphrodisiac, /datum/reagent/drug/anaphrodisiac, /datum/reagent/drug/aphrodisiacplus, /datum/reagent/drug/anaphrodisiacplus, //literally asking for prefbreaks
/datum/reagent/consumable/femcum, /datum/reagent/consumable/semen //NO.
/datum/reagent/consumable/femcum, /datum/reagent/consumable/semen, //NO.
/datum/reagent/fermi_fat, /datum/reagent/fermi_slim //GS13 fermi fat chems
))
+5 -4
View File
@@ -6,10 +6,11 @@
//GS13 Process permanent fat
for(var/mob/m in GLOB.player_list)
if(m.client.prefs)
if(m.client.ckey)
m.client.prefs.perma_fat_save(m)
if(iscarbon(m))
var/mob/living/carbon/C = m
if(C)
C.perma_fat_save(C)
gather_antag_data()
record_nuke_disk_location()
var/json_file = file("[GLOB.log_directory]/round_end_data.json")
+9 -2
View File
@@ -109,6 +109,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/wg_rate = 0.5
var/wl_rate = 0.5
var/voice = "human"
var/ckeyslot
//HS13 jobs
var/sillyroles = TRUE //for clown and mime
@@ -1077,7 +1078,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "This preference functions similar to the one before but allows for items with more drastic effects. <b>Do not enable this if you aren't okay with more drastic things happening to your character.</b><BR>"
dat += "<b>Extreme Fatness Vulnerability:</b><a href='?_src_=prefs;preference=extreme_fatness_vulnerable'>[extreme_fatness_vulnerable == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Extreme Weight Gain (Sprite Size scales with weight):</b><a href='?_src_=prefs;preference=weight_gain_extreme'>[weight_gain_extreme == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Weight Gain Permanent (special weight persists between rounds):</b><a href='?_src_=prefs;preference=weight_gain_permanent'>[weight_gain_permanent == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Persistent Fat (endround/cryo weight becomes your new start weight):</b><a href='?_src_=prefs;preference=weight_gain_persistent'>[weight_gain_persistent == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Permanent Weight (hard to remove and persistent weight):</b><a href='?_src_=prefs;preference=weight_gain_permanent'>[weight_gain_permanent == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<h2>GS13 Helplessness Preferences</h2>"
dat += "<b>Please be careful when using these mechanics as not to use them in a way that negatively impacts those around you. If you are seriously needed for something, especially something station critical, do not use these as an excuse to ignore your duty.</b><BR><BR>"
@@ -2667,6 +2669,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
weight_gain_nanites = !weight_gain_nanites
if("weight_gain_extreme")
weight_gain_extreme = !weight_gain_extreme
if("weight_gain_persistent")
weight_gain_persistent = !weight_gain_persistent
if("weight_gain_permanent")
weight_gain_permanent = !weight_gain_permanent
if("noncon_weight_gain")
@@ -3001,9 +3005,12 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//GS13
character.fatness = starting_weight
character.fatness_real = starting_weight
character.fatness_perma = permanent_fat
if(weight_gain_permanent)
character.fatness_perma = permanent_fat
character.weight_gain_rate = wg_rate
character.weight_loss_rate = wl_rate
character.savekey = clientckey
character.ckeyslot = ckeyslot
character.gender = gender
character.age = age
@@ -298,6 +298,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
default_slot = slot
WRITE_FILE(S["default_slot"] , slot)
ckeyslot = slot
S.cd = "/character[slot]"
var/needs_update = savefile_needs_update(S)
if(needs_update == -2) //fatal, can't load any data
@@ -495,6 +496,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["weight_gain_nanites"] >> weight_gain_nanites
S["weight_gain_weapons"] >> weight_gain_weapons
S["weight_gain_extreme"] >> weight_gain_extreme
S["weight_gain_persistent"] >> weight_gain_persistent
S["weight_gain_permanent"] >> weight_gain_permanent
S["wg_rate"] >> wg_rate
S["wl_rate"] >> wl_rate
@@ -714,6 +716,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["weight_gain_chems"], weight_gain_chems)
WRITE_FILE(S["weight_gain_weapons"], weight_gain_weapons)
WRITE_FILE(S["weight_gain_extreme"], weight_gain_extreme)
WRITE_FILE(S["weight_gain_persistent"], weight_gain_persistent)
WRITE_FILE(S["weight_gain_permanent"], weight_gain_permanent)
WRITE_FILE(S["wg_rate"], wg_rate)
WRITE_FILE(S["wl_rate"], wl_rate)
@@ -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("<span class='warning'>[user] injects [src]'s genome with [R.name], mutating it's DNA!</span>","<span class='warning'>You inject [src]'s genome with [R.name], mutating it's DNA!</span>")
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("<span class='warning'>[user] injects [src]'s genome with [R.name], mutating it's DNA!</span>","<span class='warning'>You inject [src]'s genome with [R.name], mutating it's DNA!</span>")
name = queen.name
else
to_chat(user, "<span class='warning'>You don't have enough units of that chemical to modify the bee's DNA!</span>")
else
to_chat(user, "<span class='warning'>You don't have enough units of that chemical to modify the bee's DNA!</span>")
to_chat(user, "<span class='warning'>The bee rejects the injection! This chem is incompatible!</span>")
..()
@@ -249,9 +249,10 @@
var/mob/living/mob_occupant = occupant
//GS13 Process permanent fat
if(mob_occupant.client.prefs)
if(mob_occupant.client.ckey)
mob_occupant.client.prefs.perma_fat_save(mob_occupant)
if(iscarbon(mob_occupant))
var/mob/living/carbon/C = mob_occupant
if(C)
C.perma_fat_save(C)
//Update any existing objectives involving this mob.
for(var/datum/objective/O in GLOB.objectives)