From e1c0b990c215ec484a3c42e8c9c0457ed65985e1 Mon Sep 17 00:00:00 2001 From: SeepingVisage <160535199+SeepingVisage@users.noreply.github.com> Date: Tue, 13 Aug 2024 22:09:48 -0400 Subject: [PATCH] preferences not working! cant toggle in the menu. seems to be defined in the 3 files that it needs to be. check cant be tested, but since the preference is perma-disabled at the moment it at least seems like the bot is reading the preference and chooses not to feed you --- GainStation13/code/modules/client/preferences/preferences.dm | 3 +++ GainStation13/code/modules/mob/living/nutribot.dm | 3 +++ code/modules/client/preferences.dm | 4 ++++ code/modules/client/preferences_savefile.dm | 2 ++ 4 files changed, 12 insertions(+) diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm index 6c20037c..7a968916 100644 --- a/GainStation13/code/modules/client/preferences/preferences.dm +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -48,6 +48,9 @@ ///Does the person wish to be involved with non-con weight gain events? var/noncon_weight_gain = FALSE + //Does the person wish to be fed from bots? + var/bot_feeding = FALSE + ///What is the max weight that the person wishes to be? If set to FALSE, there will be no max weight var/max_weight = FALSE diff --git a/GainStation13/code/modules/mob/living/nutribot.dm b/GainStation13/code/modules/mob/living/nutribot.dm index 59d710fd..3f51c254 100644 --- a/GainStation13/code/modules/mob/living/nutribot.dm +++ b/GainStation13/code/modules/mob/living/nutribot.dm @@ -484,6 +484,9 @@ if(C.suiciding) return FALSE //Kevorkian school of robotic medical assistants. + + if(!C?.client?.prefs.bot_feeding) + return FALSE if(emagged == 2) //Everyone needs our medicine. (Our medicine is corn oil) return TRUE diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 537ab2ca..626f4219 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1056,6 +1056,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Maximum Weight:[max_weight == FALSE ? "None" : max_weight]
" dat += "NonCon - Weight Gain:[noncon_weight_gain == TRUE ? "Enabled" : "Disabled"]
" + dat += "Bot Feeding:[bot_feeding == TRUE ? "Enabled" : "Disabled"]
" + dat += "

GS13 Weight Gain

" dat += "Weight Gain - Food:[weight_gain_food == TRUE ? "Enabled" : "Disabled"]
" dat += "Weight Gain - Items:[weight_gain_items == TRUE ? "Enabled" : "Disabled"]
" @@ -2660,6 +2662,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) weight_gain_extreme = !weight_gain_extreme if("noncon_weight_gain") noncon_weight_gain = !noncon_weight_gain + if("bot_feeding") + bot_feeding = !bot_feeding if("stuckage") stuckage = !stuckage if("blueberry_inflation") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 6e12fbb1..ad1f1f0a 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -158,6 +158,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["wg_rate"] >> wg_rate S["wl_rate"] >> wl_rate S["noncon_weight_gain"] >> noncon_weight_gain + S["bot_feeding"] >> bot_feeding S["max_weight"] >> max_weight S["helplessness_no_movement"] >> helplessness_no_movement S["helplessness_clumsy"] >> helplessness_clumsy @@ -311,6 +312,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["wg_rate"], wg_rate) WRITE_FILE(S["wl_rate"], wl_rate) WRITE_FILE(S["noncon_weight_gain"], noncon_weight_gain) + WRITE_FILE(S["bot_feeding"], bot_feeding) WRITE_FILE(S["max_weight"], max_weight) WRITE_FILE(S["helplessness_no_movement"], helplessness_no_movement) WRITE_FILE(S["helplessness_clumsy"], helplessness_clumsy)