From fc0b3a2fae7d0cbe736b2f04607818c2fd7d92d1 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Thu, 20 Feb 2025 14:24:41 +0300 Subject: [PATCH 1/3] IPC tech research. IPC tech research. IPC eyes protection from weld flash --- .../research/designs/medical_designs.dm | 52 +++++++++++++++++++ .../research/techweb/nodes/robotics_nodes.dm | 8 +++ code/modules/surgery/organs/eyes.dm | 1 + 3 files changed, 61 insertions(+) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 5d28603055..9ec6ea5dfd 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -834,6 +834,58 @@ category = list("Misc", "Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL +/datum/design/ipc_heart // GS13 ADDITION + name = "I.P.C heart" + desc = "Allows for the construction of an I.P.C heart." + id = "ipc_heart" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/glass = 400, /datum/material/iron = 800, /datum/material/gold = 300) + build_path = /obj/item/organ/heart/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_liver // GS13 ADDITION + name = "I.P.C reagent processing liver" + desc = "Allows for the construction of an I.P.C reagent processing liver." + id = "ipc_liver" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/diamond = 400, /datum/material/iron = 800) + build_path = /obj/item/organ/liver/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_ears // GS13 ADDITION + name = "I.P.C auditory sensors" + desc = "Allows for the construction of an I.P.C auditory sensors." + id = "ipc_ears" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/gold = 400, /datum/material/iron = 800) + build_path = /obj/item/organ/ears/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_tongue // GS13 ADDITION + name = "I.P.C positronic voicebox" + desc = "Allows for the construction of an I.P.C positronic voicebox." + id = "ipc_tongue" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/gold = 400, /datum/material/iron = 800) + build_path = /obj/item/organ/tongue/robot/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_eyes // GS13 ADDITION + name = "I.P.C eyes" + desc = "Allows for the construction of an I.P.C eyes." + id = "ipc_eyes" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/glass = 500, /datum/material/iron = 800) + build_path = /obj/item/organ/eyes/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + + + ///////////////////// ///Surgery Designs/// ///////////////////// diff --git a/code/modules/research/techweb/nodes/robotics_nodes.dm b/code/modules/research/techweb/nodes/robotics_nodes.dm index 77748de74b..2c1328f768 100644 --- a/code/modules/research/techweb/nodes/robotics_nodes.dm +++ b/code/modules/research/techweb/nodes/robotics_nodes.dm @@ -79,3 +79,11 @@ "reset_module", "purge_module", "remove_module", "freeformcore_module", "asimov_module", "paladin_module", "tyrant_module", "corporate_module", "default_module", "borg_ai_control", "mecha_tracking_ai_control", "aiupload", "intellicard") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) + +/datum/techweb_node/ipc_tech + id = "ipc_tech" + display_name = "I.P.C. parts" + description = "I.P.C. parts research." + prereq_ids = list("robotics", "posibrain") + design_ids = list("ipc_eyes", "ipc_stomach", "ipc_heart", "ipc_liver", "ipc_ears", "ipc_tongue", "ci-power-cord" ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 4e5e2524d3..5796c688b4 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -429,6 +429,7 @@ name = "ipc eyes" icon_state = "cybernetic_eyeballs" organ_flags = ORGAN_SYNTHETIC // GS13 = Fixes IPC organs decaying, we hope. + flash_protect = 2 // GS13 EDIT Non-organic eyes should be protected from welding flash. /obj/item/organ/eyes/ipc/emp_act(severity) . = ..() From 85e1afd2d31e2e54c5458f9610a3aab43ad475f5 Mon Sep 17 00:00:00 2001 From: AbsFree Date: Thu, 20 Feb 2025 14:16:23 +0100 Subject: [PATCH 2/3] added custom stuckage change --- GainStation13/code/machinery/doors/airlock_types.dm | 11 +++++++++++ .../code/modules/client/preferences/preferences.dm | 2 ++ code/modules/client/preferences.dm | 11 +++++++++++ code/modules/client/preferences_savefile.dm | 2 ++ 4 files changed, 26 insertions(+) diff --git a/GainStation13/code/machinery/doors/airlock_types.dm b/GainStation13/code/machinery/doors/airlock_types.dm index 7e2d83ab6c..91f2108c3c 100644 --- a/GainStation13/code/machinery/doors/airlock_types.dm +++ b/GainStation13/code/machinery/doors/airlock_types.dm @@ -7,6 +7,17 @@ if(isnull(stuckage_weight) || (stuckage_weight < 10)) return ..() // They aren't able to get stuck + var/chance_to_get_stuck = L?.client?.prefs?.stuckage_chance * 100 + if(chance_to_get_stuck && L.fatness > stuckage_weight) + if(prob(chance_to_get_stuck)) + L.doorstuck = 1 + L.visible_message("[L] gets stuck in the doorway!") + to_chat(L, "As you attempt to pass through \the [src], your ample curves get wedged in the narrow opening. You find yourself stuck in the [src] frame, struggling to free yourself from the tight squeeze.") + L.Stun(55, updating = TRUE, ignore_canstun = TRUE) + addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/machinery/door/airlock/, AsyncDoorstuckCall), L), 55) + return ..() + + if(L.fatness > (stuckage_weight * 2)) if(rand(1, 3) == 1) L.doorstuck = 1 diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm index 4919d3703e..3ad11a65e4 100644 --- a/GainStation13/code/modules/client/preferences/preferences.dm +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -27,6 +27,8 @@ var/weight_gain_permanent = FALSE /// At what weight will you start to get stuck in airlocks? var/stuckage = FALSE + // Percentage chance to get stuck in doors. Setting this to 0 will make the chance depend on the person's weight + var/stuckage_chance = 0 /// At what weight will you start to break chairs? var/chair_breakage = FALSE /// Are items that only affect those at high weights able to affect the player? diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0c86d86668..00af91d8b9 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -328,6 +328,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) wl_rate = 0.5 if(isnull(stuckage)) stuckage = 0 + if (stuckage_chance == null) + stuckage_chance = 0 if(isnull(max_weight)) max_weight = 0 if(isnull(chair_breakage)) @@ -1422,6 +1424,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat +="" dat += "

GS13 Gameplay Preferences

" dat += "Stuckage (at what weight will you get stuck in doors?):[stuckage == FALSE ? "Disabled" : stuckage]
" + if(stuckage) + dat += "Stuckage Chance : [stuckage_chance]
" dat += "Chair Breakage (at what weight will you break chairs?):[chair_breakage == FALSE ? "Disabled" : chair_breakage]
" dat += "

" dat += "This preference will allow items that work based on weight to work to you, usually to your detriment.
" @@ -3021,6 +3025,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/new_wl_rate = input(user, "Choose your weight loss rate from 0.1 (10%) to 2 (200%).\n Decimals such as 0.2 indicate 20% rate.\nDefault recommended rate is 0.5 (50%)", "Character Preference", wl_rate) as num|null if (new_wl_rate) wl_rate = max(min(round(text2num(new_wl_rate),0.01),2),0) + + if("stuckage_chance") + var/new_stuckage_chance = input(user, "Choose your chance to get stuck in doors from 0.1 (10%) to 1 (100%).\nDecimals such as 0.2 indicate 20% chance.\nSetting this to 0 restores default values.", "Character Preference", stuckage_chance) as num|null + if(new_stuckage_chance) + stuckage_chance = clamp(new_stuckage_chance, 0.1, 1) + else + stuckage_chance = 0 if("marking_down") // move the specified marking down diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 20278d34de..4bf91a6e0f 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -952,6 +952,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["helplessness_clothing_back"] >> helplessness_clothing_back S["helplessness_no_buckle"] >> helplessness_no_buckle S["stuckage"] >> stuckage + S["stuckage_chance"] >> stuckage_chance S["chair_breakage"] >> chair_breakage S["fatness_vulnerable"] >> fatness_vulnerable S["extreme_fatness_vulnerable"] >> extreme_fatness_vulnerable @@ -1247,6 +1248,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["helplessness_clothing_back"], helplessness_clothing_back) WRITE_FILE(S["helplessness_no_buckle"], helplessness_no_buckle) WRITE_FILE(S["stuckage"], stuckage) + WRITE_FILE(S["stuckage_chance"], stuckage_chance) WRITE_FILE(S["chair_breakage"], chair_breakage) WRITE_FILE(S["fatness_vulnerable"], fatness_vulnerable) WRITE_FILE(S["extreme_fatness_vulnerable"], extreme_fatness_vulnerable) From ba6c637432ee035d2b04f35b83c78d77c627991a Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 22 Feb 2025 22:56:04 +0300 Subject: [PATCH 3/3] Moved some code to GS13 folder --- .../modules/research/designs/ipc_designs.dm | 53 +++++++++++++++++++ .../modules/research/techweb/robotic_nodes.dm | 11 ++++ .../research/designs/medical_designs.dm | 52 ------------------ .../research/techweb/nodes/robotics_nodes.dm | 8 --- code/modules/surgery/organs/eyes.dm | 1 + tgstation.dme | 2 + 6 files changed, 67 insertions(+), 60 deletions(-) create mode 100644 GainStation13/code/modules/research/designs/ipc_designs.dm create mode 100644 GainStation13/code/modules/research/techweb/robotic_nodes.dm diff --git a/GainStation13/code/modules/research/designs/ipc_designs.dm b/GainStation13/code/modules/research/designs/ipc_designs.dm new file mode 100644 index 0000000000..98a7fb2822 --- /dev/null +++ b/GainStation13/code/modules/research/designs/ipc_designs.dm @@ -0,0 +1,53 @@ +///////////////////////////// +/////Synth and IPC Organs//// +///////////////////////////// + +/datum/design/ipc_heart + name = "IPC heart" + desc = "Allows for the construction of an IPC heart." + id = "ipc_heart" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/glass = 400, /datum/material/iron = 800, /datum/material/gold = 300) + build_path = /obj/item/organ/heart/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_liver + name = "IPC reagent processing liver" + desc = "Allows for the construction of an IPC reagent processing liver." + id = "ipc_liver" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/plasma = 100, /datum/material/iron = 800, /datum/material/glass = 300, /datum/material/silver = 500, /datum/material/gold = 400) + build_path = /obj/item/organ/liver/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_ears + name = "IPC auditory sensors" + desc = "Allows for the construction of an IPC auditory sensors." + id = "ipc_ears" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/gold = 400, /datum/material/iron = 800) + build_path = /obj/item/organ/ears/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_tongue + name = "IPC positronic voicebox" + desc = "Allows for the construction of an IPC positronic voicebox." + id = "ipc_tongue" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/gold = 400, /datum/material/iron = 800) + build_path = /obj/item/organ/tongue/robot/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE + +/datum/design/ipc_eyes + name = "IPC eyes" + desc = "Allows for the construction of an IPC eyes." + id = "ipc_eyes" + build_type = PROTOLATHE | MECHFAB + materials = list(/datum/material/glass = 500, /datum/material/iron = 800, /datum/material/glass = 300,) + build_path = /obj/item/organ/eyes/ipc + category = list("Misc", "Medical Designs") + departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE diff --git a/GainStation13/code/modules/research/techweb/robotic_nodes.dm b/GainStation13/code/modules/research/techweb/robotic_nodes.dm new file mode 100644 index 0000000000..7687363899 --- /dev/null +++ b/GainStation13/code/modules/research/techweb/robotic_nodes.dm @@ -0,0 +1,11 @@ +////////////////////////////// +/////Any new robotic nodes//// +////////////////////////////// + +/datum/techweb_node/ipc_tech + id = "ipc_tech" + display_name = "IPC. parts" + description = "IPC. parts research." + prereq_ids = list("biotech") + design_ids = list("ipc_eyes", "ipc_stomach", "ipc_heart", "ipc_liver", "ipc_ears", "ipc_tongue", "ci-power-cord" ) + research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000) diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index 9ec6ea5dfd..5d28603055 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -834,58 +834,6 @@ category = list("Misc", "Medical Designs") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL -/datum/design/ipc_heart // GS13 ADDITION - name = "I.P.C heart" - desc = "Allows for the construction of an I.P.C heart." - id = "ipc_heart" - build_type = PROTOLATHE | MECHFAB - materials = list(/datum/material/glass = 400, /datum/material/iron = 800, /datum/material/gold = 300) - build_path = /obj/item/organ/heart/ipc - category = list("Misc", "Medical Designs") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/ipc_liver // GS13 ADDITION - name = "I.P.C reagent processing liver" - desc = "Allows for the construction of an I.P.C reagent processing liver." - id = "ipc_liver" - build_type = PROTOLATHE | MECHFAB - materials = list(/datum/material/diamond = 400, /datum/material/iron = 800) - build_path = /obj/item/organ/liver/ipc - category = list("Misc", "Medical Designs") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/ipc_ears // GS13 ADDITION - name = "I.P.C auditory sensors" - desc = "Allows for the construction of an I.P.C auditory sensors." - id = "ipc_ears" - build_type = PROTOLATHE | MECHFAB - materials = list(/datum/material/gold = 400, /datum/material/iron = 800) - build_path = /obj/item/organ/ears/ipc - category = list("Misc", "Medical Designs") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/ipc_tongue // GS13 ADDITION - name = "I.P.C positronic voicebox" - desc = "Allows for the construction of an I.P.C positronic voicebox." - id = "ipc_tongue" - build_type = PROTOLATHE | MECHFAB - materials = list(/datum/material/gold = 400, /datum/material/iron = 800) - build_path = /obj/item/organ/tongue/robot/ipc - category = list("Misc", "Medical Designs") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE - -/datum/design/ipc_eyes // GS13 ADDITION - name = "I.P.C eyes" - desc = "Allows for the construction of an I.P.C eyes." - id = "ipc_eyes" - build_type = PROTOLATHE | MECHFAB - materials = list(/datum/material/glass = 500, /datum/material/iron = 800) - build_path = /obj/item/organ/eyes/ipc - category = list("Misc", "Medical Designs") - departmental_flags = DEPARTMENTAL_FLAG_MEDICAL | DEPARTMENTAL_FLAG_SCIENCE - - - ///////////////////// ///Surgery Designs/// ///////////////////// diff --git a/code/modules/research/techweb/nodes/robotics_nodes.dm b/code/modules/research/techweb/nodes/robotics_nodes.dm index 2c1328f768..77748de74b 100644 --- a/code/modules/research/techweb/nodes/robotics_nodes.dm +++ b/code/modules/research/techweb/nodes/robotics_nodes.dm @@ -79,11 +79,3 @@ "reset_module", "purge_module", "remove_module", "freeformcore_module", "asimov_module", "paladin_module", "tyrant_module", "corporate_module", "default_module", "borg_ai_control", "mecha_tracking_ai_control", "aiupload", "intellicard") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) - -/datum/techweb_node/ipc_tech - id = "ipc_tech" - display_name = "I.P.C. parts" - description = "I.P.C. parts research." - prereq_ids = list("robotics", "posibrain") - design_ids = list("ipc_eyes", "ipc_stomach", "ipc_heart", "ipc_liver", "ipc_ears", "ipc_tongue", "ci-power-cord" ) - research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2000) diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 5796c688b4..3cf62c69ee 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -240,6 +240,7 @@ /obj/item/organ/eyes/robotic/glow name = "High Luminosity Eyes" desc = "Special glowing eyes, used by snowflakes who want to be special." + flash_protect = 2 // GS13 EDIT Non-organic eyes should be protected from welding flash. left_eye_color = "000" right_eye_color = "000" actions_types = list(/datum/action/item_action/organ_action/use, /datum/action/item_action/organ_action/toggle) diff --git a/tgstation.dme b/tgstation.dme index 365f21daff..61a79dc2d5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4127,6 +4127,8 @@ #include "GainStation13\icons\obj\vairous_weapons.dm" #include "GainStation13\icons\obj\structure\beds.dm" #include "GainStation13\icons\obj\structure\flora.dm" +#include "GainStation13\code\modules\research\techweb\robotic_nodes.dm" +#include "GainStation13\code\modules\research\designs\ipc_designs.dm" #include "hyperstation\code\datums\mood_events\events.dm" #include "hyperstation\code\game\objects\railings.dm" #include "hyperstation\code\game\objects\structures\bench.dm"