From b089499eb9b9cdfece83bf30fca23ed6cf1e2601 Mon Sep 17 00:00:00 2001 From: AbsFree Date: Sun, 13 Apr 2025 16:21:02 +0200 Subject: [PATCH 01/11] first changes, not yet tested. Added the weaker variant and tweaked some bugs --- .../code/obj/items/bluespace_belt.dm | 67 ++++++++++++++++++- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index f550e783e3..7e25879eff 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -8,16 +8,19 @@ equip_sound = 'GainStation13/sound/items/equip/toolbelt_equip.ogg' drop_sound = 'GainStation13/sound/items/handling/toolbelt_drop.ogg' pickup_sound = 'GainStation13/sound/items/handling/toolbelt_pickup.ogg' + var/was_equipped = FALSE /obj/item/bluespace_belt/equipped(mob/user, slot) ..() if(!iscarbon(user)) return var/mob/living/carbon/U = user - if(slot ==ITEM_SLOT_BELT) + if(slot == ITEM_SLOT_BELT) + was_equipped = TRUE to_chat(U, "You put the belt around your waist and your mass begins to shrink...") U.hider_add(src) - else + else if(was_equipped) + was_equipped = FALSE to_chat(user, "The belt is opened, letting your mass flow out!") U.hider_remove(src) @@ -26,9 +29,67 @@ if(!iscarbon(user)) return var/mob/living/carbon/U = user - to_chat(U, "The belt is opened, letting your mass flow out!") + if (was_equipped) + to_chat(U, "The belt is opened, letting your mass flow out!") U.hider_remove(src) /obj/item/bluespace_belt/proc/fat_hide(var/mob/living/carbon/user) return -(user.fatness_real - 1) +/obj/item/bluespace_belt/primitive + name = "primitive bluespace belt" + desc = "A primitive belt made using bluespace technology. The power of space and time, used to hide the fact you are fat. This one requires cells to continue operating." + var/cell_type = /obj/item/stock_parts/cell/high + var/obj/item/stock_parts/cell/cell + var/maximum_power_drain = 250 + var/fatness_to_power_coefficient = 27.52 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 250, our maximum power drain + var/mob/living/carbon/user + +/obj/item/bluespace_belt/primitive/initialize(mapload) + . = ..() + if(!cell && cell_type) + cell = new cell_type + +/obj/item/bluespace_belt/primitive/equipped(mob/U, slot) + ..() + if(!iscarbon(U)) + user = null + return + user = U + if(slot == ITEM_SLOT_BELT && cell.charge) + was_equipped = TRUE + to_chat(user, "You put the belt around your waist and your mass begins to shrink...") + user.hider_add(src) + else if(slot == ITEM_SLOT_BELT && !cell.charge) + was_equipped = FALSE + to_chat(user, "You put the belt around your waist, but it seems that the battery is dead!") + user.hider_remove(src) + else if(slot == ITEM_SLOT_BELT && !cell) + was_equipped = FALSE + to_chat(user, "You put the belt around your waist, but it seems that the battery is missing!") + user.hider_remove(src) + else + if(was_equipped) + was_equipped = FALSE + to_chat(user, "The belt is opened, letting your mass flow out!") + user.hider_remove(src) + user = null + +/obj/item/bluespace_belt/dropped(mob/user) + ..() + user = null + +/obj/item/bluespace_belt/primitive/process() + if(isnull(user)) + return + + if (!cell.charge) + was_equipped = FALSE + to_chat(user, "The belt beeps as it's battery runs out, and your mass starts flowing out!") + user.hider_remove(src) + + + var/power_drain = clamp(user.fatness_real / fatness_to_power_coefficient, 0, maximum_power_drain) + power_drain = min(power_drain, cell.charge) + cell.use(power_drain) + cell.update_icon() \ No newline at end of file From 87a38e570724e91111d583e123de21ffeec2cc1e Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Sun, 27 Apr 2025 14:05:09 +0200 Subject: [PATCH 02/11] added cell replacement functionality and checks for whether it should do stuff or not --- .../code/obj/items/bluespace_belt.dm | 100 ++++++++++++++---- 1 file changed, 77 insertions(+), 23 deletions(-) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index 7e25879eff..09925a3ba8 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -8,7 +8,7 @@ equip_sound = 'GainStation13/sound/items/equip/toolbelt_equip.ogg' drop_sound = 'GainStation13/sound/items/handling/toolbelt_drop.ogg' pickup_sound = 'GainStation13/sound/items/handling/toolbelt_pickup.ogg' - var/was_equipped = FALSE + var/equipped = FALSE // is it in the belt slot? /obj/item/bluespace_belt/equipped(mob/user, slot) ..() @@ -16,11 +16,11 @@ return var/mob/living/carbon/U = user if(slot == ITEM_SLOT_BELT) - was_equipped = TRUE + equipped = TRUE to_chat(U, "You put the belt around your waist and your mass begins to shrink...") U.hider_add(src) - else if(was_equipped) - was_equipped = FALSE + else if(equipped) + equipped = FALSE to_chat(user, "The belt is opened, letting your mass flow out!") U.hider_remove(src) @@ -29,7 +29,7 @@ if(!iscarbon(user)) return var/mob/living/carbon/U = user - if (was_equipped) + if (equipped) to_chat(U, "The belt is opened, letting your mass flow out!") U.hider_remove(src) @@ -41,11 +41,11 @@ desc = "A primitive belt made using bluespace technology. The power of space and time, used to hide the fact you are fat. This one requires cells to continue operating." var/cell_type = /obj/item/stock_parts/cell/high var/obj/item/stock_parts/cell/cell - var/maximum_power_drain = 250 - var/fatness_to_power_coefficient = 27.52 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 250, our maximum power drain - var/mob/living/carbon/user + var/maximum_power_drain = 100 + var/fatness_to_power_coefficient = 68 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 100, our maximum power drain + var/mob/living/carbon/user // the fatass who's weight we must track for power drain calcs -/obj/item/bluespace_belt/primitive/initialize(mapload) +/obj/item/bluespace_belt/primitive/Initialize(mapload) . = ..() if(!cell && cell_type) cell = new cell_type @@ -56,25 +56,74 @@ user = null return user = U - if(slot == ITEM_SLOT_BELT && cell.charge) - was_equipped = TRUE - to_chat(user, "You put the belt around your waist and your mass begins to shrink...") - user.hider_add(src) - else if(slot == ITEM_SLOT_BELT && !cell.charge) - was_equipped = FALSE - to_chat(user, "You put the belt around your waist, but it seems that the battery is dead!") - user.hider_remove(src) - else if(slot == ITEM_SLOT_BELT && !cell) - was_equipped = FALSE + START_PROCESSING(SSprocessing, src) + if(slot == ITEM_SLOT_BELT && !cell) + equipped = TRUE to_chat(user, "You put the belt around your waist, but it seems that the battery is missing!") user.hider_remove(src) + else if(slot == ITEM_SLOT_BELT && !cell.charge) + equipped = TRUE + to_chat(user, "You put the belt around your waist, but it seems that the battery is dead!") + user.hider_remove(src) + else if(slot == ITEM_SLOT_BELT && cell.charge) + equipped = TRUE + to_chat(user, "You put the belt around your waist and your mass begins to shrink...") + user.hider_add(src) else - if(was_equipped) - was_equipped = FALSE + if(equipped) + equipped = FALSE to_chat(user, "The belt is opened, letting your mass flow out!") user.hider_remove(src) user = null +/obj/item/bluespace_belt/primitive/attackby(obj/item/W, mob/person) + if (istype(W, /obj/item/stock_parts/cell)) + if(!person.transferItemToLoc(W, src)) + return + if (!cell) + to_chat(person, "You put the cell into the belt") + else + to_chat(person, "You swiftly replace the cell in the belt") + person.put_in_hands(cell) + cell = W + START_PROCESSING(SSprocessing, src) + + if (equipped) + to_chat(person, "Your mass begins to shrink as the belt is powered again...") + user = person + user.hider_add(src) + + + +/obj/item/bluespace_belt/primitive/attack_self(mob/person) + if (!cell) + return + + if(!isnull(user)) + user.hider_remove(src) + + to_chat(person, "You take the cell out of the belt, letting your mass flow out!") + user = null + person.put_in_hands(cell) + cell = null + STOP_PROCESSING(SSprocessing, src) + +/obj/item/bluespace_belt/primitive/AltClick(mob/person) + . = ..() + + if (!cell) + return + + if(!isnull(user)) + user.hider_remove(src) + + to_chat(person, "You take the cell out of the belt, letting your mass flow out!") + user = null + person.put_in_hands(cell) + cell = null + STOP_PROCESSING(SSprocessing, src) + + /obj/item/bluespace_belt/dropped(mob/user) ..() user = null @@ -82,11 +131,16 @@ /obj/item/bluespace_belt/primitive/process() if(isnull(user)) return + + if (!cell) + return if (!cell.charge) - was_equipped = FALSE - to_chat(user, "The belt beeps as it's battery runs out, and your mass starts flowing out!") user.hider_remove(src) + to_chat(user, "The belt beeps as it's battery runs out, and your mass starts flowing out!") + user = null + STOP_PROCESSING(SSprocessing, src) + return var/power_drain = clamp(user.fatness_real / fatness_to_power_coefficient, 0, maximum_power_drain) From a9901236fd527d3e70eeb84713e5842b7c967ab1 Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Sun, 27 Apr 2025 14:09:04 +0200 Subject: [PATCH 03/11] added examine --- GainStation13/code/obj/items/bluespace_belt.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index 09925a3ba8..af5dcefdc6 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -45,6 +45,13 @@ var/fatness_to_power_coefficient = 68 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 100, our maximum power drain var/mob/living/carbon/user // the fatass who's weight we must track for power drain calcs +/obj/item/bluespace_belt/primitive/examine(mob/user) + . = ..() + if(cell && cell.charge) + . += "It seems to have [DisplayEnergy(cell.charge)] of power remaining." + else + . += "It seems to be out of power." + /obj/item/bluespace_belt/primitive/Initialize(mapload) . = ..() if(!cell && cell_type) From 8e8af77e81f37f3ee2d21db9356c23479693cf1c Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Sun, 27 Apr 2025 17:04:00 +0200 Subject: [PATCH 04/11] added bluespace belt failure event --- .../modules/events/bluespace_belt_failure.dm | 37 +++++++++++++++++++ .../code/obj/items/bluespace_belt.dm | 21 ++++++++++- tgstation.dme | 1 + 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 GainStation13/code/modules/events/bluespace_belt_failure.dm diff --git a/GainStation13/code/modules/events/bluespace_belt_failure.dm b/GainStation13/code/modules/events/bluespace_belt_failure.dm new file mode 100644 index 0000000000..b7c3af50c2 --- /dev/null +++ b/GainStation13/code/modules/events/bluespace_belt_failure.dm @@ -0,0 +1,37 @@ +/datum/round_event_control/bluespace_belt_failure + name = "Bluespace Belt Failure" + description = "Causes Primitive Bluespace Belts to fail in a way identical to an EMP" + category = EVENT_CATEGORY_ANOMALIES + typepath = /datum/round_event/bluespace_belt_failure + + weight = 15 // should be infinite >:) + + max_occurrences = 8 + + alert_observers = FALSE + +/datum/round_event/bluespace_belt_failure + var/length = 0 + +/datum/round_event/bluespace_belt_failure/setup() + length = rand(25, 50) + end_when = length + start_when = rand(1, 5) + announce_when = rand(0, 4) + +/datum/round_event/bluespace_belt_failure/start() + for(var/mob/living/carbon/human/C in shuffle(GLOB.alive_mob_list)) + if(!C.client) + continue + if(C.stat == DEAD) + continue + // if (HAS_TRAIT(C,TRAIT_EXEMPT_HEALTH_EVENTS)) + // continue + if(!C.belt || !istype(C.belt, /obj/item/bluespace_belt/primitive)) + continue + if(!is_station_level(C.z)) + continue + C.belt.emp_act(length) + +/datum/round_event/bluespace_belt_failure/announce(fake) + priority_announce("Bluespace Fluctuations have been detected near the station. Certain Bluespace based equipment may stop working correctly for a short period of time.", "Bluespace Fluctuations Alert") diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index af5dcefdc6..346e7968f8 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -57,6 +57,25 @@ if(!cell && cell_type) cell = new cell_type +/obj/item/bluespace_belt/primitive/emp_act(severity) + . = ..() + STOP_PROCESSING(SSprocessing, src) + if(cell && !(. & EMP_PROTECT_CONTENTS)) + cell.emp_act(severity) + + if(!isnull(user)) + user.hider_remove(src) + to_chat(loc, "\The [src] overloads!") + + addtimer(CALLBACK(src, PROC_REF(emp_act_end)), severity*10, TIMER_UNIQUE | TIMER_NO_HASH_WAIT | TIMER_OVERRIDE) + +/obj/item/bluespace_belt/primitive/proc/emp_act_end() + if(!isnull(user)) + user.hider_add(src) + + START_PROCESSING(SSprocessing, src) + + /obj/item/bluespace_belt/primitive/equipped(mob/U, slot) ..() if(!iscarbon(U)) @@ -131,7 +150,7 @@ STOP_PROCESSING(SSprocessing, src) -/obj/item/bluespace_belt/dropped(mob/user) +/obj/item/bluespace_belt/primitive/dropped(mob/person) ..() user = null diff --git a/tgstation.dme b/tgstation.dme index eacade08ce..b252253b1c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4026,6 +4026,7 @@ #include "GainStation13\code\modules\client\preferences\preferences.dm" #include "GainStation13\code\modules\clothing\under\jobs\modular_items.dm" #include "GainStation13\code\modules\events\vent_clog.dm\vent_clog.dm" +#include "GainStation13\code\modules\events\bluespace_belt_failure.dm" #include "GainStation13\code\modules\food_and_drinks\bigbottle.dm" #include "GainStation13\code\modules\food_and_drinks\drinks.dm" #include "GainStation13\code\modules\food_and_drinks\food.dm" From cdf63fa5f6a6e572ae28521ca08da49087d9a68f Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Sun, 27 Apr 2025 17:57:37 +0200 Subject: [PATCH 05/11] commented out the old bluespace belt and added the primitive one to loadout --- GainStation13/code/modules/loadout/backpack.dm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/GainStation13/code/modules/loadout/backpack.dm b/GainStation13/code/modules/loadout/backpack.dm index 3631b0c6e2..515f3f614f 100644 --- a/GainStation13/code/modules/loadout/backpack.dm +++ b/GainStation13/code/modules/loadout/backpack.dm @@ -1,5 +1,14 @@ -/datum/gear/backpack/bluespace_belt - name = "Bluespace Belt" - category = LOADOUT_SUBCATEGORY_BACKPACK_GENERAL - path = /obj/item/bluespace_belt +// /datum/gear/backpack/bluespace_belt +// name = "Bluespace Belt" +// category = LOADOUT_CATEGORY_BACKPACK +// subcategory = LOADOUT_SUBCATEGORY_BACKPACK_GENERAL +// path = /obj/item/bluespace_belt +// cost = 5 + +/datum/gear/backpack/bluespace_belt_primitive + name = "Primitive Bluespace Belt" + // category = LOADOUT_SUBCATEGORY_BACKPACK_GENERAL + path = /obj/item/bluespace_belt/primitive cost = 5 + category = LOADOUT_CATEGORY_BACKPACK + subcategory = LOADOUT_SUBCATEGORY_BACKPACK_GENERAL \ No newline at end of file From a76fc6124c3c3789b1568b8d02afb29f55695f39 Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Sun, 27 Apr 2025 19:02:09 +0200 Subject: [PATCH 06/11] added primitive belt sprites --- .../icons/obj/clothing/bluespace_belt.dmi | Bin 793 -> 1333 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/GainStation13/icons/obj/clothing/bluespace_belt.dmi b/GainStation13/icons/obj/clothing/bluespace_belt.dmi index 19c6fa6bdb074d7d604f2a7332ba30b465d2a518..761e586a9db52fd1126dfab91b24ca72172adfab 100644 GIT binary patch literal 1333 zcmeAS@N?(olHy`uVBq!ia0vp^4M3d0!3HF+R#kZdsU=k*5hX6E#mPmP1tppJc?=8{ zb4q&;ay1)BG@t)FU+G0?ik0m*qbUy^;~ii9ncHf$^sP+wZ&{fW2Lw4-Ch05cJ>8lW za7A=&&fIzO6HYu5?wtPaFGpvwS5iu?{9my-;qw#)OP-y~3pCHOHnUT>nEhH|;sl8` zvu-#lsbAb2nD4RVVz_nU#;Qwk>!laYZGSjp(x2Hf*Ejz)>AY<7%akk7jJ0dmB7U>G zZckD+Ug&3FVDa&EaSW-L^LCDH_H755WB;{gdUMUSn&GhErq4mSP3%T#Mn5^em3J^L z6?keLk-h!V%4CIVHg2zNY)nU;UkZ40(YJ>sQ>$OC({?V!Zq!$c%N_lHE+}81Am@?0y?dv4z zPwlo7_a*-;iHZGl^_xrA)7?QYk{8%*H1B`;_2mN<%d4inw*-}xn)Ofroc#Go>0IIc zC+4QV63#w#{eEzHe91wSEs+%nsQG(df(;Z1|80ra}1$s_ou`^;Ry(@o5r%uxWQxV-27AeMQjBpw{tD9 z3S4rzYuCIE!~HvJ)EPahA5M3~8o)Th9Z7i3+$i~k3#Gp~Uq6YP@&3fM_52I?fBlW# z{@uoA>H5|0dbT~!|N4uedEJp;3%)i!1x0~1qhfvbb#{po)w=IdPoBU3lAqegaMkVN z+=fZ}ufAq3`8N67>PB%}Cb@Z+%x28*{i?R%<*yRy_2)y&23ey=qFHrRRPBo4ui8?Y8-QRoodqpS9pzpcT};hF`$#tH*_# z{_I6}1S`cRDsW8O_OUj;?_5pgXWhTmvXk@A?(cA2xA*MR^S>WdPha}Eclno$HPgxR zPPI0y1{@7R^8I=a?`%O_t823lfMk!)c2n+M6S4?S)+^L|+m ze^b%x%UgH-=)HRUb!~=%eCr+c#+_e(YMZ{wUf+NH_k{pECcmc-bJz8|UvGZR+`xT6 kzxe>FTi}@)DEx<6G@#k>prZ9bU^&R(>FVdQ&MBb@0JS}KQUCw| literal 793 zcmeAS@N?(olHy`uVBq!ia0vp^2|(P7{tH^Qn#<96`SNK;=YBQGUd21Pf2YHS)Lkj%mzfSW zp3E+i=h$^se)|h`X5*-TOqb^>33cu=d&a=P6yWLN7*a9k?d*%bhYdtr;{}>Sl3Gfd zy?h!Z6lbpd_msbsX-Qr{f5Q>=U;(=z?PXnapIba!cG5OJVCz18OT)s$#frTG3j8ma zw(+qxEMzbcVQ6DI5Wpb8#o)}Cpuun^`PA&wy8>(Tw;f+35q|F5r|yOBf^`{@uh_Ph z#TZ7P>F3gTz3ij&-^S!Sb!l%rZ#dNjI7FJCeW&oL^qss#Tl@-X<*zC^s`gd<7JIwi zoR2MdC7O_HeoSKCd>5azebUJ*e+Duh>k66LVfgm_{ruLft0_x=3ht~6i!AB5^C#xn zx$w13cO0HsZTR*#cw@_-RU$XFKkK{yZJoY_=PUo4$D4ou-eJ8ZI5+Q3r+{E(<^S3B zRk`)&<`(YVdHu}kjn%qS-q*VYpMIdV;(gXCCiBJn9FjkUDc03#n1{LN?W@1!EV=R4 zx34EcC&atVXF1Dr!tzHz-6@_KTKoMEUEmRrwEL;V#kh{ccjI=Sue~K_e`+zN*!?iz z^W1CE zKfdjFpvqo*yDK+lF;JE_aw z_#1q)Q{h?H^k;SC?w<$k3w*oFbnLg?KKk^?E2*5o_*Ysd1Sc(+$!Mv5|NQ*Y`a_pk wJJ#&B|F6fgM(SU1-EBk^!<`3;_Zjg*4l|cu*tFvdFs(Cqy85}Sb4q9e02V`DIRF3v From 1f5743f869b974f4f7c56aa97acf2e955602c209 Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Sun, 27 Apr 2025 19:02:57 +0200 Subject: [PATCH 07/11] added icons to the code and designs for lathes and research --- .../modules/research/designs/nutri_designs.dm | 11 +++++++++++ .../research/techweb/nutritech_nodes.dm | 2 +- GainStation13/code/obj/items/bluespace_belt.dm | 18 ++++++++++++++++-- tgstation.dme | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/GainStation13/code/modules/research/designs/nutri_designs.dm b/GainStation13/code/modules/research/designs/nutri_designs.dm index 89ac62e498..90aa4d546e 100644 --- a/GainStation13/code/modules/research/designs/nutri_designs.dm +++ b/GainStation13/code/modules/research/designs/nutri_designs.dm @@ -112,6 +112,17 @@ category = list("Misc", "Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE +/datum/design/primitive_bluespace_belt + name = "Primitive Bluespace Belt" + desc = "A primitive belt made using bluespace technology. The power of space and time, used to hide the fact you are fat. This one requires cells to continue operating, and may suffer from random failures." + id = "primitive_bluespace_belt" + build_type = PROTOLATHE + construction_time = 100 + materials = list(/datum/material/iron = 4000, /datum/material/silver = 2000, ) + build_path = /obj/item/bluespace_belt/primitive + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + /datum/design/cookie_synthesizer name = "Cookie Synthesizer" desc = "A self-charging miraculous device that's able to produce cookies." diff --git a/GainStation13/code/modules/research/techweb/nutritech_nodes.dm b/GainStation13/code/modules/research/techweb/nutritech_nodes.dm index 486ff6ffb8..5e5deb6e8d 100644 --- a/GainStation13/code/modules/research/techweb/nutritech_nodes.dm +++ b/GainStation13/code/modules/research/techweb/nutritech_nodes.dm @@ -5,7 +5,7 @@ display_name = "Nutri-Tech Tools" description = "Ending world hunger was never made easier!" prereq_ids = list("biotech", "adv_engi") - design_ids = list("calorite_collar", "ci-nutrimentturbo", "bluespace_belt", "adipoelectric_transformer", "cookie_synthesizer", "borg_upgrade_cookiesynthesizer", "borg_upgrade_feedingtube", "ci-fatmobility","bluespace_collar_receiver","bluespace_collar_transmitter") + design_ids = list("calorite_collar", "ci-nutrimentturbo", "bluespace_belt", "primitive_bluespace_belt", "adipoelectric_transformer", "cookie_synthesizer", "borg_upgrade_cookiesynthesizer", "borg_upgrade_feedingtube", "ci-fatmobility","bluespace_collar_receiver","bluespace_collar_transmitter") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) boost_item_paths = list(/obj/item/gun/energy/fatoray, /obj/item/gun/energy/fatoray/cannon, /obj/item/trash/fatoray_scrap1, /obj/item/trash/fatoray_scrap2) hidden = TRUE diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index 346e7968f8..ae11e1d157 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -38,7 +38,11 @@ /obj/item/bluespace_belt/primitive name = "primitive bluespace belt" - desc = "A primitive belt made using bluespace technology. The power of space and time, used to hide the fact you are fat. This one requires cells to continue operating." + desc = "A primitive belt made using bluespace technology. The power of space and time, used to hide the fact you are fat. This one requires cells to continue operating, and may suffer from random failures." + icon = 'GainStation13/icons/obj/clothing/bluespace_belt.dmi' + icon_state = "primitive_belt" + item_state = "primitive_belt" + var/cell_type = /obj/item/stock_parts/cell/high var/obj/item/stock_parts/cell/cell var/maximum_power_drain = 100 @@ -63,6 +67,7 @@ if(cell && !(. & EMP_PROTECT_CONTENTS)) cell.emp_act(severity) + icon_state = "primitive_belt_off" if(!isnull(user)) user.hider_remove(src) to_chat(loc, "\The [src] overloads!") @@ -72,7 +77,7 @@ /obj/item/bluespace_belt/primitive/proc/emp_act_end() if(!isnull(user)) user.hider_add(src) - + icon_state = "primitive_belt" START_PROCESSING(SSprocessing, src) @@ -112,6 +117,12 @@ to_chat(person, "You swiftly replace the cell in the belt") person.put_in_hands(cell) cell = W + + if (cell.charge) + icon_state = "primitive_belt" + else + icon_state = "primitive_belt_off" + START_PROCESSING(SSprocessing, src) if (equipped) @@ -129,6 +140,7 @@ user.hider_remove(src) to_chat(person, "You take the cell out of the belt, letting your mass flow out!") + icon_state = "primitive_belt_off" user = null person.put_in_hands(cell) cell = null @@ -144,6 +156,7 @@ user.hider_remove(src) to_chat(person, "You take the cell out of the belt, letting your mass flow out!") + icon_state = "primitive_belt_off" user = null person.put_in_hands(cell) cell = null @@ -162,6 +175,7 @@ return if (!cell.charge) + icon_state = "primitive_belt_off" user.hider_remove(src) to_chat(user, "The belt beeps as it's battery runs out, and your mass starts flowing out!") user = null diff --git a/tgstation.dme b/tgstation.dme index b252253b1c..6e61b5dc1d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4025,8 +4025,8 @@ #include "GainStation13\code\modules\client\loadout\uniform.dm" #include "GainStation13\code\modules\client\preferences\preferences.dm" #include "GainStation13\code\modules\clothing\under\jobs\modular_items.dm" -#include "GainStation13\code\modules\events\vent_clog.dm\vent_clog.dm" #include "GainStation13\code\modules\events\bluespace_belt_failure.dm" +#include "GainStation13\code\modules\events\vent_clog.dm\vent_clog.dm" #include "GainStation13\code\modules\food_and_drinks\bigbottle.dm" #include "GainStation13\code\modules\food_and_drinks\drinks.dm" #include "GainStation13\code\modules\food_and_drinks\food.dm" From f6d8d91c1077977010c738a00c9608d5583d1e45 Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Mon, 28 Apr 2025 13:22:53 +0200 Subject: [PATCH 08/11] added belt busting helplessness pref and it's interactions with the primitive belt --- GainStation13/code/mechanics/helplessness.dm | 11 ++ .../modules/client/preferences/preferences.dm | 2 + .../code/modules/mob/living/species.dm | 24 ++++ .../code/obj/items/bluespace_belt.dm | 107 ++++++++++++------ code/__DEFINES/traits.dm | 1 + code/modules/client/preferences.dm | 5 + code/modules/client/preferences_savefile.dm | 2 + 7 files changed, 118 insertions(+), 34 deletions(-) diff --git a/GainStation13/code/mechanics/helplessness.dm b/GainStation13/code/mechanics/helplessness.dm index 317e674744..9e647b0722 100644 --- a/GainStation13/code/mechanics/helplessness.dm +++ b/GainStation13/code/mechanics/helplessness.dm @@ -16,6 +16,17 @@ if(!mod_check(I) && HAS_TRAIT(H, TRAIT_NO_MISC) && (slot == ITEM_SLOT_FEET || slot ==ITEM_SLOT_GLOVES || slot == ITEM_SLOT_OCLOTHING)) to_chat(H, "You are too fat to wear [I].") return FALSE + + if(HAS_TRAIT(H, TRAIT_NO_BELT) && slot == ITEM_SLOT_BELT) + if(istype(I, /obj/item/bluespace_belt/primitive) && H?.client?.prefs.helplessness_belts*2 > H.fatness) + return ..() + + if(istype(I, /obj/item/bluespace_belt) && !istype(I, /obj/item/bluespace_belt/primitive)) + return ..() + + to_chat(H, "You are too fat to wear [I].") + return FALSE + return ..() diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm index 3ad11a65e4..d8ce7cf670 100644 --- a/GainStation13/code/modules/client/preferences/preferences.dm +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -56,6 +56,8 @@ var/helplessness_clothing_jumpsuit = FALSE ///What fatness level prevents the user from wearing non-jumpsuit clothing var/helplessness_clothing_misc = FALSE + // What fatness level prevents the user from wearing belts. Also affects the max weight the PBS Belt can hide + var/helplessness_belts = FALSE ///What fatness level prevents the user from wearing anything on their back var/helplessness_clothing_back = FALSE ///What fatness level prevents the user from being buckled to anything? diff --git a/GainStation13/code/modules/mob/living/species.dm b/GainStation13/code/modules/mob/living/species.dm index 12fff6fc92..e2e759c373 100644 --- a/GainStation13/code/modules/mob/living/species.dm +++ b/GainStation13/code/modules/mob/living/species.dm @@ -196,6 +196,30 @@ REMOVE_TRAIT(fatty, TRAIT_NO_MISC, HELPLESSNESS_TRAIT) + if(preferences.helplessness_belts) + if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_BELT, HELPLESSNESS_TRAIT)) + if(fatty.fatness >= preferences.helplessness_belts) + ADD_TRAIT(fatty, TRAIT_NO_BELT, HELPLESSNESS_TRAIT) + + // if(istype(fatty.belt, /obj/item/bluespace_belt)) + var/obj/item/bluespace_belt/primitive/PBS_belt = fatty.belt + if(istype(PBS_belt)) + to_chat(fatty, "[PBS_belt] can no longer contain your weight!") + fatty.dropItemToGround(PBS_belt) + + var/obj/item/storage/belt/belt = fatty.belt + if(istype(belt)) + to_chat(fatty, "[belt] can no longer contain your weight!") + fatty.dropItemToGround(belt) + + else if(fatty.fatness < preferences.helplessness_belts) + to_chat(fatty, "You feel thin enough to put on belts now. ") + REMOVE_TRAIT(fatty, TRAIT_NO_BELT, HELPLESSNESS_TRAIT) + + else + if(HAS_TRAIT_FROM(fatty, TRAIT_NO_BELT, HELPLESSNESS_TRAIT)) + REMOVE_TRAIT(fatty, TRAIT_NO_BELT, HELPLESSNESS_TRAIT) + if(preferences.helplessness_clothing_back) if(!HAS_TRAIT_FROM(fatty, TRAIT_NO_BACKPACK, HELPLESSNESS_TRAIT)) if(fatty.fatness >= preferences.helplessness_clothing_back) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index ae11e1d157..e252638411 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -48,6 +48,7 @@ var/maximum_power_drain = 100 var/fatness_to_power_coefficient = 68 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 100, our maximum power drain var/mob/living/carbon/user // the fatass who's weight we must track for power drain calcs + var/overloaded = FALSE // is it EMP'ed? /obj/item/bluespace_belt/primitive/examine(mob/user) . = ..() @@ -63,49 +64,76 @@ /obj/item/bluespace_belt/primitive/emp_act(severity) . = ..() - STOP_PROCESSING(SSprocessing, src) + if(cell && !(. & EMP_PROTECT_CONTENTS)) cell.emp_act(severity) - - icon_state = "primitive_belt_off" - if(!isnull(user)) - user.hider_remove(src) - to_chat(loc, "\The [src] overloads!") - + + overloaded = TRUE + to_chat(loc, "\The [src] overloads!") + deactivate() addtimer(CALLBACK(src, PROC_REF(emp_act_end)), severity*10, TIMER_UNIQUE | TIMER_NO_HASH_WAIT | TIMER_OVERRIDE) /obj/item/bluespace_belt/primitive/proc/emp_act_end() - if(!isnull(user)) + overloaded = FALSE + activate() + +/obj/item/bluespace_belt/primitive/proc/activate() + if (overloaded) + deactivate() + return + + if(!cell) + deactivate() + return + + if(!cell.charge) + deactivate() + return + + if(!isnull(user) && equipped) user.hider_add(src) + icon_state = "primitive_belt" START_PROCESSING(SSprocessing, src) +/obj/item/bluespace_belt/primitive/proc/deactivate() + if(!isnull(user)) + user.hider_remove(src) + + STOP_PROCESSING(SSprocessing, src) + icon_state = "primitive_belt_off" + +/obj/item/bluespace_belt/primitive/fat_hide(var/mob/living/carbon/user) + var/belts_pref = user?.client?.prefs.helplessness_belts + var/weight_to_hide = min(belts_pref, user.fatness_real - 1) + return -(weight_to_hide) + /obj/item/bluespace_belt/primitive/equipped(mob/U, slot) ..() if(!iscarbon(U)) user = null return + user = U - START_PROCESSING(SSprocessing, src) if(slot == ITEM_SLOT_BELT && !cell) equipped = TRUE to_chat(user, "You put the belt around your waist, but it seems that the battery is missing!") - user.hider_remove(src) + deactivate() else if(slot == ITEM_SLOT_BELT && !cell.charge) equipped = TRUE to_chat(user, "You put the belt around your waist, but it seems that the battery is dead!") - user.hider_remove(src) + deactivate() else if(slot == ITEM_SLOT_BELT && cell.charge) equipped = TRUE to_chat(user, "You put the belt around your waist and your mass begins to shrink...") - user.hider_add(src) + activate() else if(equipped) equipped = FALSE to_chat(user, "The belt is opened, letting your mass flow out!") user.hider_remove(src) - user = null + // user = null /obj/item/bluespace_belt/primitive/attackby(obj/item/W, mob/person) if (istype(W, /obj/item/stock_parts/cell)) @@ -118,17 +146,27 @@ person.put_in_hands(cell) cell = W - if (cell.charge) - icon_state = "primitive_belt" - else - icon_state = "primitive_belt_off" + // if (cell.charge) + // icon_state = "primitive_belt" + // else + // icon_state = "primitive_belt_off" - START_PROCESSING(SSprocessing, src) + // START_PROCESSING(SSprocessing, src) - if (equipped) + // if(cell.charge) + // if(equipped) + // to_chat(person, "Your mass begins to shrink as the belt is powered again...") + // user = person + // activate() + + + + if (equipped && cell.charge) to_chat(person, "Your mass begins to shrink as the belt is powered again...") user = person - user.hider_add(src) + + // // user.hider_add(src) + activate() @@ -136,15 +174,14 @@ if (!cell) return - if(!isnull(user)) - user.hider_remove(src) + // if(!isnull(user)) + // user.hider_remove(src) to_chat(person, "You take the cell out of the belt, letting your mass flow out!") - icon_state = "primitive_belt_off" - user = null person.put_in_hands(cell) cell = null - STOP_PROCESSING(SSprocessing, src) + deactivate() + // user = null /obj/item/bluespace_belt/primitive/AltClick(mob/person) . = ..() @@ -152,15 +189,16 @@ if (!cell) return - if(!isnull(user)) - user.hider_remove(src) + // if(!isnull(user)) + // user.hider_remove(src) to_chat(person, "You take the cell out of the belt, letting your mass flow out!") - icon_state = "primitive_belt_off" - user = null + // icon_state = "primitive_belt_off" + // user = null person.put_in_hands(cell) cell = null - STOP_PROCESSING(SSprocessing, src) + // STOP_PROCESSING(SSprocessing, src) + deactivate() /obj/item/bluespace_belt/primitive/dropped(mob/person) @@ -175,11 +213,12 @@ return if (!cell.charge) - icon_state = "primitive_belt_off" - user.hider_remove(src) + // icon_state = "primitive_belt_off" + // user.hider_remove(src) to_chat(user, "The belt beeps as it's battery runs out, and your mass starts flowing out!") - user = null - STOP_PROCESSING(SSprocessing, src) + // user = null + // STOP_PROCESSING(SSprocessing, src) + deactivate() return diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 98d5205a20..9f36dc0b92 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -254,6 +254,7 @@ #define TRAIT_NO_MOVE "no_move" #define TRAIT_NO_JUMPSUIT "no_jumpsuit" #define TRAIT_NO_MISC "no_misc" +#define TRAIT_NO_BELT "no_belt" #define TRAIT_NO_BACKPACK "no_backpack" #define TRAIT_NO_BUCKLE "no_buckle" #define TRAIT_DOCILE "docile" diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 3cb2e1c7ce..f70c97c512 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -343,6 +343,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) helplessness_clothing_back = 0 if(isnull(helplessness_clothing_jumpsuit)) helplessness_clothing_jumpsuit = 0 + if(isnull(helplessness_belts)) + helplessness_belts = 0 if(isnull(helplessness_hidden_face)) helplessness_hidden_face = 0 if(isnull(helplessness_mute)) @@ -1452,6 +1454,7 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Immobile Arms:[helplessness_immobile_arms == FALSE ? "Disabled" : helplessness_immobile_arms]
" dat += "Clothing Jumpsuit:[helplessness_clothing_jumpsuit == FALSE ? "Disabled" : helplessness_clothing_jumpsuit]
" dat += "Clothing, Suit, Boots, and Gloves:[helplessness_clothing_misc == FALSE ? "Disabled" : helplessness_clothing_misc]
" + dat += "Belts:[helplessness_belts == FALSE ? "Disabled" : helplessness_belts]
" dat += "Clothing Back:[helplessness_clothing_back == FALSE ? "Disabled" : helplessness_clothing_back]
" dat += "No Buckle:[helplessness_no_buckle == FALSE ? "Disabled" : helplessness_no_buckle]
" dat += "" @@ -3542,6 +3545,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) helplessness_clothing_jumpsuit = chose_weight("Choose the level of fatness that you would like to be made unable to wear jumpsuits at. None will disable this alltogether", user) if("helplessness_clothing_misc") helplessness_clothing_misc = chose_weight("Choose the level of fatness that you would like to be made unable to wear other non-jumpsuit clothing at. None will disable this alltogether", user) + if("helplessness_belts") + helplessness_belts = chose_weight("Choose the level of fatness that you would like to be made unable to wear belts at. This also affects how much weight the Primitive Bluespace Belt can hide. None will disable this alltogether", user) if("helplessness_clothing_back") helplessness_clothing_back = chose_weight("Choose the level of fatness that you would like to be made unable to wear anything on your back at. None will disable this alltogether", user) if("helplessness_no_buckle") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 4bf91a6e0f..2836b6d7b7 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -949,6 +949,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["helplessness_immobile_arms"] >> helplessness_immobile_arms S["helplessness_clothing_jumpsuit"] >> helplessness_clothing_jumpsuit S["helplessness_clothing_misc"] >> helplessness_clothing_misc + S["helplessness_belts"] >> helplessness_belts S["helplessness_clothing_back"] >> helplessness_clothing_back S["helplessness_no_buckle"] >> helplessness_no_buckle S["stuckage"] >> stuckage @@ -1245,6 +1246,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["helplessness_immobile_arms"], helplessness_immobile_arms) WRITE_FILE(S["helplessness_clothing_jumpsuit"], helplessness_clothing_jumpsuit) WRITE_FILE(S["helplessness_clothing_misc"], helplessness_clothing_misc) + WRITE_FILE(S["helplessness_belts"], helplessness_belts) WRITE_FILE(S["helplessness_clothing_back"], helplessness_clothing_back) WRITE_FILE(S["helplessness_no_buckle"], helplessness_no_buckle) WRITE_FILE(S["stuckage"], stuckage) From c42e8c4fd24aa38ae6a0e2c5b9cf3831a7098db0 Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Mon, 28 Apr 2025 14:43:10 +0200 Subject: [PATCH 09/11] tweaked power drain and fixed PBS belt helplessness interactions --- GainStation13/code/modules/mob/living/species.dm | 2 +- GainStation13/code/obj/items/bluespace_belt.dm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GainStation13/code/modules/mob/living/species.dm b/GainStation13/code/modules/mob/living/species.dm index e2e759c373..a77c0472a8 100644 --- a/GainStation13/code/modules/mob/living/species.dm +++ b/GainStation13/code/modules/mob/living/species.dm @@ -203,7 +203,7 @@ // if(istype(fatty.belt, /obj/item/bluespace_belt)) var/obj/item/bluespace_belt/primitive/PBS_belt = fatty.belt - if(istype(PBS_belt)) + if(istype(PBS_belt) && fatty.fatness > preferences.helplessness_belts * 2) to_chat(fatty, "[PBS_belt] can no longer contain your weight!") fatty.dropItemToGround(PBS_belt) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index e252638411..49ccb0b478 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -45,8 +45,8 @@ var/cell_type = /obj/item/stock_parts/cell/high var/obj/item/stock_parts/cell/cell - var/maximum_power_drain = 100 - var/fatness_to_power_coefficient = 68 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 100, our maximum power drain + var/maximum_power_drain = 50 + var/fatness_to_power_coefficient = 136 // FATNESS_LEVEL_BLOB*2 BFI divided by this equals 50, our maximum power drain var/mob/living/carbon/user // the fatass who's weight we must track for power drain calcs var/overloaded = FALSE // is it EMP'ed? From 7e20c3e214a55b9d90a75546a5daf9e203273e0c Mon Sep 17 00:00:00 2001 From: NiceNiceSwan Date: Mon, 28 Apr 2025 15:21:11 +0200 Subject: [PATCH 10/11] fixed problem with visible messages and required weight --- GainStation13/code/modules/mob/living/species.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/GainStation13/code/modules/mob/living/species.dm b/GainStation13/code/modules/mob/living/species.dm index a77c0472a8..be06bf55c6 100644 --- a/GainStation13/code/modules/mob/living/species.dm +++ b/GainStation13/code/modules/mob/living/species.dm @@ -203,13 +203,15 @@ // if(istype(fatty.belt, /obj/item/bluespace_belt)) var/obj/item/bluespace_belt/primitive/PBS_belt = fatty.belt - if(istype(PBS_belt) && fatty.fatness > preferences.helplessness_belts * 2) - to_chat(fatty, "[PBS_belt] can no longer contain your weight!") + if(istype(PBS_belt) && fatty.fatness > preferences.helplessness_belts) + // to_chat(fatty, "[PBS_belt] can no longer contain your weight!") + fatty.visible_message("[PBS_belt] fails as it's unable to contain [fatty]'s bulk!", "[PBS_belt] fails as it's unable to contain your bulk!") fatty.dropItemToGround(PBS_belt) var/obj/item/storage/belt/belt = fatty.belt if(istype(belt)) - to_chat(fatty, "[belt] can no longer contain your weight!") + // to_chat(fatty, "[belt] can no longer contain your weight!") + fatty.visible_message("With a loud ripping sound, [fatty]'s [belt] snaps open!", "With a loud ripping sound, your [belt] snaps open!") fatty.dropItemToGround(belt) else if(fatty.fatness < preferences.helplessness_belts) From c4d476b9c11d025682cd60e1b11b13aca54cfddc Mon Sep 17 00:00:00 2001 From: Phantastic-Swan Date: Mon, 28 Apr 2025 15:35:38 +0200 Subject: [PATCH 11/11] adds fatness hiding for someone without prefs --- GainStation13/code/obj/items/bluespace_belt.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index 49ccb0b478..3054efd022 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -104,8 +104,12 @@ icon_state = "primitive_belt_off" /obj/item/bluespace_belt/primitive/fat_hide(var/mob/living/carbon/user) - var/belts_pref = user?.client?.prefs.helplessness_belts - var/weight_to_hide = min(belts_pref, user.fatness_real - 1) + var/weight_to_hide = 0 + if(preferences.helplessness_belts) + var/belts_pref = user?.client?.prefs.helplessness_belts + weight_to_hide = min(belts_pref, user.fatness_real - 1) + else + weight_to_hide = min(FATNESS_LEVEL_BLOB*2, user.fatness_real - 1) return -(weight_to_hide)