diff --git a/GainStation13/code/datums/traits.dm b/GainStation13/code/datums/traits.dm index 89484a7b25..58fb96f112 100644 --- a/GainStation13/code/datums/traits.dm +++ b/GainStation13/code/datums/traits.dm @@ -148,3 +148,12 @@ species.liked_food |= MEAT else species.disliked_food &= ~MEAT + +/datum/quirk/biofuel + name = "Biofuel Processor" + desc = "Your robotic body is equipped to eat and digest food the same way organic crew can." + value = 0 + mob_trait = TRAIT_BIOFUEL + +/datum/quirk/biofuel/post_add() + REMOVE_TRAIT(quirk_holder, TRAIT_NO_PROCESS_FOOD, SPECIES_TRAIT) diff --git a/GainStation13/code/modules/reagents/chemistry/reagents/consumable_reagents.dm b/GainStation13/code/modules/reagents/chemistry/reagents/consumable_reagents.dm index 9cef5cb2ab..8c7901bea2 100644 --- a/GainStation13/code/modules/reagents/chemistry/reagents/consumable_reagents.dm +++ b/GainStation13/code/modules/reagents/chemistry/reagents/consumable_reagents.dm @@ -8,6 +8,7 @@ reagent_state = LIQUID color = "#e2e1b1" metabolization_rate = 0.5 * REAGENTS_METABOLISM + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS /datum/reagent/consumable/lipoifier/on_mob_life(mob/living/carbon/M) M.adjust_fatness(15, FATTENING_TYPE_CHEM) @@ -22,6 +23,7 @@ // GS13 tweak metabolization_rate = 0.7 * REAGENTS_METABOLISM overdose_threshold = 105 + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS /datum/reagent/medicine/lipolicide/overdose_process(mob/living/carbon/C) . = ..() @@ -51,6 +53,7 @@ reagent_state = LIQUID taste_description = "fizziness" metabolization_rate = 2 * REAGENTS_METABOLISM + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS /datum/reagent/consumable/fizulphite/on_mob_life(mob/living/carbon/M) if(M && M?.client?.prefs.weight_gain_chems) @@ -69,6 +72,7 @@ reagent_state = LIQUID taste_description = "smoothness" metabolization_rate = 0.8 * REAGENTS_METABOLISM + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS /datum/reagent/consumable/extilphite/on_mob_life(mob/living/carbon/M) if(M && M?.client?.prefs.weight_gain_chems) @@ -91,6 +95,7 @@ reagent_state = LIQUID taste_description = "sulfury sweetness" metabolization_rate = 0.5 * REAGENTS_METABOLISM //Done by Zestyspy, Jan 2023 + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS /datum/reagent/consumable/flatulose/on_mob_life(mob/living/carbon/M) if(M && M?.client?.prefs.weight_gain_chems) @@ -136,6 +141,7 @@ taste_description = "blueberry pie" var/no_mob_color = FALSE value = 10 //it sells. Make that berry factory + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS //screw it let robots have juice why not /datum/reagent/blueberry_juice/on_mob_life(mob/living/carbon/M) if(M?.client) diff --git a/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm b/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm index 2e4968752a..068adfc5b6 100644 --- a/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm +++ b/GainStation13/code/modules/reagents/chemistry/reagents/fermi_fat.dm @@ -8,6 +8,7 @@ overdose_threshold = 50 metabolization_rate = REAGENTS_METABOLISM / 4 can_synth = FALSE //DO NOT MAKE THIS SNYTHESIZABLE, THESE CHEMS ARE SUPPOSED TO NOT BE USED COMMONLY + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS overdose_threshold = 50 addiction_threshold = 100 @@ -150,6 +151,7 @@ pH = 7 metabolization_rate = REAGENTS_METABOLISM / 4 can_synth = FALSE + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS overdose_threshold = 50 diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 1d4bcc9d8b..83bb5419ce 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -2393,7 +2393,7 @@ /obj/machinery/door/airlock/security/glass{ dir = 8; name = "Security E.V.A. Storage"; - req_access_txt = "3" + req_access_txt = "1" }, /obj/structure/cable/yellow{ icon_state = "4-8" diff --git a/code/__DEFINES/reagents.dm b/code/__DEFINES/reagents.dm index 2b0f51f230..3e8f6081bd 100644 --- a/code/__DEFINES/reagents.dm +++ b/code/__DEFINES/reagents.dm @@ -77,6 +77,8 @@ #define REAGENT_SPLITRETAINVOL (1<<7) //Retains initial volume of chem when splitting #define REAGENT_ORGANIC_PROCESS (1<<8) //Can be processed by organic carbons - will otherwise slowly dissipate #define REAGENT_ROBOTIC_PROCESS (1<<9) //Can be processed by robotic carbons - will otherwise slowly dissipate +//GS13 edit +#define REAGENT_BIOFUEL_PROCESS (1<<10) //Can be processed by robotic carbons with biofuel processor trait - should be on nutriment-type reagents and fatchems only #define REAGENT_ALL_PROCESS (REAGENT_ORGANIC_PROCESS | REAGENT_ROBOTIC_PROCESS) //expand this if you for some reason add more process flags diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 98d5205a20..7c55fe07fb 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -289,6 +289,7 @@ #define TRAIT_METAL_CRUNCHER "metal_cruncher" #define TRAIT_WATER_SPONGE "water_sponge" #define TRAIT_FATROUSAL "fatrousal" +#define TRAIT_BIOFUEL "biofuel_processor" //GS13 Port #define TRAIT_HEADPAT_SLUT "headpat_slut" diff --git a/code/__HELPERS/reagents.dm b/code/__HELPERS/reagents.dm index 0ecf82b191..8c8bc75cd2 100644 --- a/code/__HELPERS/reagents.dm +++ b/code/__HELPERS/reagents.dm @@ -106,4 +106,8 @@ /proc/is_reagent_processing_invalid(datum/reagent/R, mob/living/owner) if(!R || !owner) return TRUE + //GS13 edit start + if(HAS_TRAIT(owner, TRAIT_BIOFUEL) && (R.chemical_flags & REAGENT_BIOFUEL_PROCESS)) + return FALSE + //GS13 edit end return ((HAS_TRAIT(owner, TRAIT_ROBOTIC_ORGANISM) && !(R.chemical_flags & REAGENT_ROBOTIC_PROCESS)) || (!HAS_TRAIT(owner, TRAIT_ROBOTIC_ORGANISM) && !(R.chemical_flags & REAGENT_ORGANIC_PROCESS))) diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index c66823050b..dac68a6cca 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -100,6 +100,7 @@ DEFINE_BITFIELD(chemical_flags, list( "REAGENT_ONMOBMERGE" = REAGENT_ONMOBMERGE, "REAGENT_ORGANIC_PROCESS" = REAGENT_ORGANIC_PROCESS, "REAGENT_ROBOTIC_PROCESS" = REAGENT_ROBOTIC_PROCESS, + "REAGENT_BIOFUEL_PROCESS" = REAGENT_BIOFUEL_PROCESS, "REAGENT_SNEAKYNAME" = REAGENT_SNEAKYNAME, "REAGENT_SPLITRETAINVOL" = REAGENT_SPLITRETAINVOL, )) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 2a176c755b..ba8ba77170 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -371,7 +371,7 @@ if(!key) msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.\n" else if(!client) - msg += "[t_He] [t_has] a blank, absent-minded stare and appears completely unresponsive to anything. [t_He] may snap out of it soon.\n" + msg += "[t_He] [t_has] a blank, absent-minded stare and [t_has] been completely unresponsive to anything for [round(((world.time - lastclienttime) / (1 MINUTES)),1)] minutes. [t_He] may snap out of it soon.\n" //GS13 Edit: SSD timer if(digitalcamo) msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n" diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 29f17c0c71..f146e0f9b9 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -524,6 +524,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put if(!SSD) add_status_indicator("ssd") SSD = TRUE + lastclienttime = world.time //GS13 Editception: SSD timer else if(SSD) remove_status_indicator("ssd") diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index d3d0919baf..2967865db2 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -92,6 +92,7 @@ // GS13 EDIT var/SSD = FALSE + var/lastclienttime = 0 //GS13 Editception: SSD timer var/list/pipes_shown = list() var/last_played_vent diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index d156f3e36b..e8149946b7 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -12,6 +12,7 @@ taste_description = "generic food" taste_mult = 4 value = REAGENT_VALUE_VERY_COMMON + chemical_flags = REAGENT_ORGANIC_PROCESS | REAGENT_BIOFUEL_PROCESS // GS13 edit; lets robots with the biofuel trait process foodchems var/nutriment_factor = 1 * REAGENTS_METABOLISM var/max_nutrition = INFINITY var/quality = 0 //affects mood, typically higher for mixed drinks with more complex recipes diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index a99b6a926e..f75fb72272 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -360,6 +360,13 @@ /obj/item/apc_powercord/proc/apc_powerdraw_loop(obj/machinery/power/apc/A, mob/living/carbon/human/H) H.visible_message("[H] inserts a power connector into [A].", "You begin to draw power from [A].") + + //GS13 EDIT START + var/overcharge = FALSE + if(H.nutrition >= NUTRITION_LEVEL_WELL_FED) + overcharge = TRUE + //GS13 EDIT END + while(do_after(H, 10, target = A)) if(loc != H) to_chat(H, "You must keep your connector out while charging!") @@ -378,14 +385,28 @@ A.cell.use(A.cell.charge) to_chat(H, "You siphon off as much as [A] can spare.") break - if(H.nutrition > NUTRITION_LEVEL_WELL_FED) - to_chat(H, "You are now fully charged.") - break + //GS13 EDIT START + if(H.nutrition >= NUTRITION_LEVEL_WELL_FED) + if(!overcharge) //GS13 edit + to_chat(H, "You are now fully charged.") + break + else + if(H.nutrition >= NUTRITION_LEVEL_FAT) + to_chat(H, "You've packed as much extra power into your battery as it can handle.") + break + //GS13 EDIT END in_use = FALSE H.visible_message("[H] unplugs from [A].", "You unplug from [A].") /obj/item/apc_powercord/proc/cell_powerdraw_loop(obj/item/stock_parts/cell/C, mob/living/carbon/human/H) H.visible_message("[H] connects a power cord to [C]", "You begin to draw power from [C].") + + //GS13 EDIT START + var/overcharge = FALSE + if(H.nutrition >= NUTRITION_LEVEL_WELL_FED) + overcharge = TRUE + //GS13 EDIT END + while(do_after(H, 10, target = C)) if(loc != H) to_chat(H, "You must keep your connector out while charging!") @@ -397,8 +418,15 @@ C.use(siphoned_charge) do_sparks(1, FALSE, C) H.adjust_nutrition(siphoned_charge / 100) //Less efficient on a pure power basis than APC recharge. Still a very viable way of gaining nutrition. (100 nutrition / base 10k cell) - if(H.nutrition > NUTRITION_LEVEL_WELL_FED) - to_chat(H, "You are now fully charged.") - break + // GS13 EDIT START + if(H.nutrition >= NUTRITION_LEVEL_WELL_FED) + if(!overcharge) + to_chat(H, "You are now fully charged.") + break + else + if(H.nutrition >= NUTRITION_LEVEL_FAT) + to_chat(H, "You've packed as much extra power into your battery as it can handle.") + break + //GS13 EDIT END in_use = FALSE H.visible_message("[H] disconnects [src] from [C].", "You disconnect from [C].")