From 7baea452860c7fd423187ae58e111f24f0074686 Mon Sep 17 00:00:00 2001 From: githubuser4141 Date: Tue, 4 Feb 2025 18:57:05 +1300 Subject: [PATCH 1/6] mech freedom --- code/modules/mechs/components/arms.dm | 3 - code/modules/mechs/components/body.dm | 96 ++++++++++++++++++++++--- code/modules/mechs/components/frame.dm | 16 ++++- code/modules/mechs/components/head.dm | 88 ++--------------------- code/modules/mechs/components/legs.dm | 3 - code/modules/mechs/mech_construction.dm | 4 +- maps/away/scavver/scavver_gantry.dm | 6 +- 7 files changed, 109 insertions(+), 107 deletions(-) diff --git a/code/modules/mechs/components/arms.dm b/code/modules/mechs/components/arms.dm index 3d1f4ca002ad8..084744cfacc50 100644 --- a/code/modules/mechs/components/arms.dm +++ b/code/modules/mechs/components/arms.dm @@ -19,9 +19,6 @@ if(!motivator) to_chat(user, SPAN_WARNING("It is missing an actuator.")) -/obj/item/mech_component/manipulators/ready_to_install() - return motivator - /obj/item/mech_component/manipulators/prebuild() motivator = new(src) diff --git a/code/modules/mechs/components/body.dm b/code/modules/mechs/components/body.dm index 560474893e7a3..b3d2c984ac69a 100644 --- a/code/modules/mechs/components/body.dm +++ b/code/modules/mechs/components/body.dm @@ -26,6 +26,7 @@ var/obj/item/cell/cell var/obj/item/robot_parts/robot_component/diagnosis_unit/diagnostics var/obj/item/robot_parts/robot_component/armour/exosuit/m_armour + var/obj/item/mech_component/control_module/software var/obj/machinery/portable_atmospherics/canister/air_supply var/obj/item/storage/mech/storage_compartment var/datum/gas_mixture/cockpit @@ -40,6 +41,9 @@ var/damage_sound = 'sound/effects/bang.ogg' var/climb_time = 25 + /// Takes /obj/item/circuitboard/exosystem type paths for what boards get put in for prefabs + var/list/prebuilt_software = list() + /obj/item/mech_component/chassis/New() ..() if(isnull(pilot_positions)) @@ -57,6 +61,7 @@ QDEL_NULL(diagnostics) QDEL_NULL(m_armour) QDEL_NULL(air_supply) + QDEL_NULL(software) QDEL_NULL(storage_compartment) . = ..() @@ -65,6 +70,7 @@ cell = locate() in src m_armour = locate() in src air_supply = locate() in src + software = locate() in src storage_compartment = locate() in src /obj/item/mech_component/chassis/show_missing_parts(mob/user) @@ -74,6 +80,8 @@ to_chat(user, SPAN_WARNING("It is missing a diagnostics unit.")) if(!m_armour) to_chat(user, SPAN_WARNING("It is missing exosuit armour plating.")) + if(!software) + to_chat(user, SPAN_WARNING("It is missing a software control module.")) /obj/item/mech_component/chassis/Initialize() . = ..() @@ -136,15 +144,23 @@ if(changed) cockpit.react() -/obj/item/mech_component/chassis/ready_to_install() - return (cell && diagnostics && m_armour) - /obj/item/mech_component/chassis/prebuild() diagnostics = new(src) cell = new /obj/item/cell/high(src) cell.charge = cell.maxcharge + software = new(src) + for(var/board in prebuilt_software) + software.install_software(new board) /obj/item/mech_component/chassis/use_tool(obj/item/thing, mob/living/user, list/click_params) + if(istype(thing, /obj/item/mech_component/control_module)) + if(software) + to_chat(user, SPAN_WARNING("\The [src] already has a control modules installed.")) + return TRUE + if(install_component(thing, user)) + software = thing + return TRUE + if(istype(thing,/obj/item/robot_parts/robot_component/diagnosis_unit)) if(diagnostics) to_chat(user, SPAN_WARNING("\The [src] already has a diagnostic system installed.")) @@ -197,6 +213,12 @@ /obj/item/mech_component/chassis/return_diagnostics(mob/user) ..() + if(software) + to_chat(user, SPAN_NOTICE(" Installed Software")) + for(var/exosystem_software in software.installed_software) + to_chat(user, SPAN_NOTICE(" - [capitalize(exosystem_software)]")) + else + to_chat(user, SPAN_WARNING(" Control Module Missing or Non-functional.")) if(diagnostics) to_chat(user, SPAN_NOTICE(" Diagnostics Unit Integrity: [round((((diagnostics.max_dam - diagnostics.total_dam) / diagnostics.max_dam)) * 100)]%")) else @@ -206,16 +228,17 @@ else to_chat(user, SPAN_WARNING(" Armor Missing or Non-functional.")) - /obj/item/mech_component/chassis/powerloader name = "open exosuit chassis" hatch_descriptor = "roll cage" pilot_coverage = 40 exosuit_desc_string = "an industrial rollcage" desc = "A Xion industrial brand roll cage. Technically OSHA compliant. Technically." - max_damage = 100 + max_damage = 200 + mech_health = 400 power_use = 0 climb_time = 6 + prebuilt_software = list(/obj/item/circuitboard/exosystem/utility, /obj/item/circuitboard/exosystem/engineering) /obj/item/mech_component/chassis/powerloader/prebuild() . = ..() @@ -245,12 +268,13 @@ transparent_cabin = TRUE exosuit_desc_string = "an open and light chassis" icon_state = "light_body" - max_damage = 50 + max_damage = 100 power_use = 5 has_hardpoints = list(HARDPOINT_BACK, HARDPOINT_LEFT_SHOULDER) damage_sound = 'sound/effects/glass_crack1.ogg' desc = "The Veymed Odysseus series cockpits combine ultralight materials and clear aluminum laminates to provide an optimized cockpit experience." climb_time = 15 + prebuilt_software = list(/obj/item/circuitboard/exosystem/medical, /obj/item/circuitboard/exosystem/utility) /obj/item/mech_component/chassis/light/prebuild() . = ..() @@ -274,10 +298,12 @@ transparent_cabin = TRUE exosuit_desc_string = "a spherical chassis" icon_state = "pod_body" - max_damage = 70 + max_damage = 150 + mech_health = 400 power_use = 5 has_hardpoints = list(HARDPOINT_BACK) desc = "The Necromundan Katamari series cockpits have won a massive tender by Imperium few years back. No one is sure why, but these terrible things keep popping up on every government facility." + prebuilt_software = list(/obj/item/circuitboard/exosystem/utility) /obj/item/mech_component/chassis/pod/Initialize() pilot_positions = list( @@ -318,10 +344,11 @@ pilot_coverage = 100 exosuit_desc_string = "a heavily armoured chassis" icon_state = "heavy_body" - max_damage = 150 - mech_health = 500 + max_damage = 400 + mech_health = 750 power_use = 50 has_hardpoints = list(HARDPOINT_BACK) + prebuilt_software = list(/obj/item/circuitboard/exosystem/weapons) /obj/item/mech_component/chassis/heavy/prebuild() pilot_positions = list( @@ -339,13 +366,20 @@ . = ..() m_armour = new /obj/item/robot_parts/robot_component/armour/exosuit/combat(src) +/obj/item/mech_component/chassis/cubical/prebuild() + . = ..() + m_armour = new /obj/item/robot_parts/robot_component/armour/exosuit/combat(src) + /obj/item/mech_component/chassis/combat name = "sealed exosuit chassis" hatch_descriptor = "canopy" pilot_coverage = 100 exosuit_desc_string = "an armoured chassis" icon_state = "combat_body" + max_damage = 300 + mech_health = 500 power_use = 40 + prebuilt_software = list(/obj/item/circuitboard/exosystem/weapons) /obj/item/mech_component/chassis/combat/prebuild() . = ..() @@ -362,3 +396,47 @@ ) . = ..() +/obj/item/mech_component/control_module + name = "exosuit control module" + desc = "A clump of circuitry and software chip docks, used to program exosuits." + icon_state = "control" + icon = 'icons/mecha/mech_equipment.dmi' + gender = NEUTER + color = COLOR_WHITE + var/list/installed_software = list() + var/max_installed_software = 2 + +/obj/item/mech_component/control_module/examine(mob/user) + . = ..() + to_chat(user, SPAN_NOTICE("It has [max_installed_software - LAZYLEN(installed_software)] empty slot\s remaining out of [max_installed_software].")) + +/obj/item/mech_component/control_module/use_tool(obj/item/thing, mob/living/user, list/click_params) + if(istype(thing, /obj/item/circuitboard/exosystem)) + install_software(thing, user) + return TRUE + + if(isScrewdriver(thing)) + var/result = ..() + update_software() + return result + else + return ..() + +/obj/item/mech_component/control_module/proc/install_software(obj/item/circuitboard/exosystem/software, mob/user) + if(length(installed_software) >= max_installed_software) + if(user) + to_chat(user, SPAN_WARNING("\The [src] can only hold [max_installed_software] software modules.")) + return + if(user && !user.unEquip(software)) + return + + if(user) + to_chat(user, SPAN_NOTICE("You load \the [software] into \the [src]'s memory.")) + + software.forceMove(src) + update_software() + +/obj/item/mech_component/control_module/proc/update_software() + installed_software = list() + for(var/obj/item/circuitboard/exosystem/program in contents) + installed_software |= program.contains_software \ No newline at end of file diff --git a/code/modules/mechs/components/frame.dm b/code/modules/mechs/components/frame.dm index 850fa8247b5a7..86b9f1a67721e 100644 --- a/code/modules/mechs/components/frame.dm +++ b/code/modules/mechs/components/frame.dm @@ -181,7 +181,7 @@ // Screwdriver - Finish construction if (isScrewdriver(tool)) // Check for basic components. - if (!(arms && legs && head && body)) + if (!(body)) USE_FEEDBACK_FAILURE("\The [src] is still missing parts and cannot be completed.") return TRUE // Check for wiring. @@ -208,7 +208,7 @@ if (!user.do_skilled((tool.toolspeed * 5) SECONDS, SKILL_DEVICES, src) || !user.use_sanity_check(src, tool)) return TRUE // Check for basic components. - if (!(arms && legs && head && body)) + if (!(body)) USE_FEEDBACK_FAILURE("\The [src] is still missing parts and cannot be completed.") return TRUE // Check for wiring. @@ -364,6 +364,10 @@ if (body) USE_FEEDBACK_FAILURE("\The [src] already has \a [body] installed.") return TRUE + var/obj/item/mech_component/chassis/m_chest = tool + if (m_chest.total_damage >= m_chest.max_damage) + USE_FEEDBACK_FAILURE("\The [m_chest] is too badly damaged to attach!") + return TRUE if (!install_component(tool, user)) return TRUE body = tool @@ -391,6 +395,12 @@ if (head) USE_FEEDBACK_FAILURE("\The [src] already has \a [head] installed.") return TRUE + if(!body) + USE_FEEDBACK_FAILURE("You must attach a body before attaching sensors!") + return TRUE + if (body && (istype(body, /obj/item/mech_component/chassis/cubical))) + USE_FEEDBACK_FAILURE("This type of chassis cannot support sensors!") + return TRUE if (!install_component(tool, user)) return TRUE head = tool @@ -425,4 +435,4 @@ component.forceMove(get_turf(src)) user.put_in_hands(component) playsound(user.loc, 'sound/items/Deconstruct.ogg', 50, 1) - return TRUE + return TRUE \ No newline at end of file diff --git a/code/modules/mechs/components/head.dm b/code/modules/mechs/components/head.dm index 481b957fac502..c5bc012187996 100644 --- a/code/modules/mechs/components/head.dm +++ b/code/modules/mechs/components/head.dm @@ -7,9 +7,6 @@ var/see_invisible = 0 var/obj/item/robot_parts/robot_component/radio/radio var/obj/item/robot_parts/robot_component/camera/camera - var/obj/item/mech_component/control_module/software - /// Takes /obj/item/circuitboard/exosystem type paths for what boards get put in for prefabs - var/list/prebuilt_software = list() has_hardpoints = list(HARDPOINT_HEAD) var/active_sensors = 0 power_use = 15 @@ -18,7 +15,6 @@ /obj/item/mech_component/sensors/Destroy() QDEL_NULL(camera) QDEL_NULL(radio) - QDEL_NULL(software) . = ..() /obj/item/mech_component/sensors/show_missing_parts(mob/user) @@ -26,24 +22,18 @@ to_chat(user, SPAN_WARNING("It is missing a radio.")) if(!camera) to_chat(user, SPAN_WARNING("It is missing a camera.")) - if(!software) - to_chat(user, SPAN_WARNING("It is missing a software control module.")) /obj/item/mech_component/sensors/prebuild() radio = new(src) camera = new(src) - software = new(src) - for(var/board in prebuilt_software) - software.install_software(new board) /obj/item/mech_component/sensors/update_components() radio = locate() in src camera = locate() in src - software = locate() in src /obj/item/mech_component/sensors/proc/get_sight(powered) var/flags = 0 - if(total_damage >= 0.8 * max_damage || !powered) + if(total_damage >= max_damage || !powered || !camera) flags |= BLIND else if(active_sensors && powered) flags |= vision_flags @@ -52,25 +42,12 @@ /obj/item/mech_component/sensors/proc/get_invisible(powered) var/invisible = 0 - if((total_damage <= 0.8 * max_damage) && active_sensors && powered) + if(total_damage <= max_damage && active_sensors && powered && camera) invisible = see_invisible return invisible - - -/obj/item/mech_component/sensors/ready_to_install() - return (radio && camera) - /obj/item/mech_component/sensors/use_tool(obj/item/thing, mob/living/user, list/click_params) - if(istype(thing, /obj/item/mech_component/control_module)) - if(software) - to_chat(user, SPAN_WARNING("\The [src] already has a control modules installed.")) - return TRUE - if(install_component(thing, user)) - software = thing - return TRUE - - else if(istype(thing,/obj/item/robot_parts/robot_component/radio)) + if(istype(thing,/obj/item/robot_parts/robot_component/radio)) if(radio) to_chat(user, SPAN_WARNING("\The [src] already has a radio installed.")) return TRUE @@ -90,12 +67,6 @@ /obj/item/mech_component/sensors/return_diagnostics(mob/user) ..() - if(software) - to_chat(user, SPAN_NOTICE(" Installed Software")) - for(var/exosystem_software in software.installed_software) - to_chat(user, SPAN_NOTICE(" - [capitalize(exosystem_software)]")) - else - to_chat(user, SPAN_WARNING(" Control Module Missing or Non-functional.")) if(radio) to_chat(user, SPAN_NOTICE(" Radio Integrity: [round((((radio.max_dam - radio.total_dam) / radio.max_dam)) * 100)]%")) else @@ -105,53 +76,6 @@ else to_chat(user, SPAN_WARNING(" Camera Missing or Non-functional.")) - -/obj/item/mech_component/control_module - name = "exosuit control module" - desc = "A clump of circuitry and software chip docks, used to program exosuits." - icon_state = "control" - icon = 'icons/mecha/mech_equipment.dmi' - gender = NEUTER - color = COLOR_WHITE - var/list/installed_software = list() - var/max_installed_software = 2 - -/obj/item/mech_component/control_module/examine(mob/user) - . = ..() - to_chat(user, SPAN_NOTICE("It has [max_installed_software - LAZYLEN(installed_software)] empty slot\s remaining out of [max_installed_software].")) - -/obj/item/mech_component/control_module/use_tool(obj/item/thing, mob/living/user, list/click_params) - if(istype(thing, /obj/item/circuitboard/exosystem)) - install_software(thing, user) - return TRUE - - if(isScrewdriver(thing)) - var/result = ..() - update_software() - return result - else - return ..() - -/obj/item/mech_component/control_module/proc/install_software(obj/item/circuitboard/exosystem/software, mob/user) - if(length(installed_software) >= max_installed_software) - if(user) - to_chat(user, SPAN_WARNING("\The [src] can only hold [max_installed_software] software modules.")) - return - if(user && !user.unEquip(software)) - return - - if(user) - to_chat(user, SPAN_NOTICE("You load \the [software] into \the [src]'s memory.")) - - software.forceMove(src) - update_software() - -/obj/item/mech_component/control_module/proc/update_software() - installed_software = list() - for(var/obj/item/circuitboard/exosystem/program in contents) - installed_software |= program.contains_software - - /obj/item/mech_component/sensors/powerloader name = "exosuit sensors" gender = PLURAL @@ -159,7 +83,6 @@ desc = "A primitive set of sensors designed to work in tandem with most MKI Eyeball platforms." max_damage = 100 power_use = 0 - prebuilt_software = list(/obj/item/circuitboard/exosystem/utility, /obj/item/circuitboard/exosystem/engineering) /obj/item/mech_component/sensors/light name = "light sensors" @@ -171,7 +94,6 @@ see_invisible = SEE_INVISIBLE_NOLIGHTING power_use = 50 desc = "A series of high resolution optical sensors. They can overlay several images to give the pilot a sense of location even in total darkness. " - prebuilt_software = list(/obj/item/circuitboard/exosystem/medical, /obj/item/circuitboard/exosystem/utility) /obj/item/mech_component/sensors/heavy name = "heavy sensors" @@ -180,7 +102,6 @@ icon_state = "heavy_head" max_damage = 120 power_use = 0 - prebuilt_software = list(/obj/item/circuitboard/exosystem/weapons) /obj/item/mech_component/sensors/combat name = "combat sensors" @@ -189,5 +110,4 @@ icon_state = "combat_head" vision_flags = SEE_MOBS see_invisible = SEE_INVISIBLE_NOLIGHTING - power_use = 200 - prebuilt_software = list(/obj/item/circuitboard/exosystem/weapons) + power_use = 200 \ No newline at end of file diff --git a/code/modules/mechs/components/legs.dm b/code/modules/mechs/components/legs.dm index 4868f24e6aa25..9336ec003719a 100644 --- a/code/modules/mechs/components/legs.dm +++ b/code/modules/mechs/components/legs.dm @@ -19,9 +19,6 @@ if(!motivator) to_chat(user, SPAN_WARNING("It is missing an actuator.")) -/obj/item/mech_component/propulsion/ready_to_install() - return motivator - /obj/item/mech_component/propulsion/update_components() motivator = locate() in src diff --git a/code/modules/mechs/mech_construction.dm b/code/modules/mechs/mech_construction.dm index 1b038c1153bff..ec0479a828217 100644 --- a/code/modules/mechs/mech_construction.dm +++ b/code/modules/mechs/mech_construction.dm @@ -68,11 +68,11 @@ if(ME.restricted_hardpoints && !(system_hardpoint in ME.restricted_hardpoints)) return FALSE if(ME.restricted_software) - if(!head || !head.software) + if(!body || !body.software) return FALSE var/found for(var/software in ME.restricted_software) - if(software in head.software.installed_software) + if(software in body.software.installed_software) found = TRUE break if(!found) diff --git a/maps/away/scavver/scavver_gantry.dm b/maps/away/scavver/scavver_gantry.dm index cdbcc76b6d701..ee80cfca13d76 100644 --- a/maps/away/scavver/scavver_gantry.dm +++ b/maps/away/scavver/scavver_gantry.dm @@ -70,7 +70,7 @@ "Desperado" = list("nav_gantry_desperado") ) -/obj/item/mech_component/sensors/light/salvage +/obj/item/mech_component/chassis/pod/salvage prebuilt_software = list(/obj/item/circuitboard/exosystem/utility, /obj/item/circuitboard/exosystem/engineering) /mob/living/exosuit/premade/salvage_gantry @@ -79,7 +79,7 @@ /mob/living/exosuit/premade/salvage_gantry/Initialize() if(!body) - body = new /obj/item/mech_component/chassis/pod(src) + body = new /obj/item/mech_component/chassis/pod/salvage(src) body.color = COLOR_ORANGE if(!legs) legs = new /obj/item/mech_component/propulsion/spider(src) @@ -88,7 +88,7 @@ arms = new /obj/item/mech_component/manipulators/powerloader(src) arms.color = COLOR_GUNMETAL if(!head) - head = new /obj/item/mech_component/sensors/light/salvage(src) + head = new /obj/item/mech_component/sensors/light(src) head.color = COLOR_GUNMETAL . = ..() From b0b13262d106e890adfd9ee3cd6465486e9c10a0 Mon Sep 17 00:00:00 2001 From: githubuser4141 Date: Tue, 4 Feb 2025 23:58:06 +1300 Subject: [PATCH 2/6] Yes --- code/modules/mechs/components/_components.dm | 1 - code/modules/mechs/components/body.dm | 14 +++++--------- config/admins.txt | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/code/modules/mechs/components/_components.dm b/code/modules/mechs/components/_components.dm index 288e585b5c1f5..5a187425224b9 100644 --- a/code/modules/mechs/components/_components.dm +++ b/code/modules/mechs/components/_components.dm @@ -33,7 +33,6 @@ . = ..() if(ready_to_install()) to_chat(user, SPAN_NOTICE("It is ready for installation.")) - else show_missing_parts(user) //These icons have multiple directions but before they're attached we only want south. diff --git a/code/modules/mechs/components/body.dm b/code/modules/mechs/components/body.dm index b3d2c984ac69a..aee753c9d5809 100644 --- a/code/modules/mechs/components/body.dm +++ b/code/modules/mechs/components/body.dm @@ -234,8 +234,7 @@ pilot_coverage = 40 exosuit_desc_string = "an industrial rollcage" desc = "A Xion industrial brand roll cage. Technically OSHA compliant. Technically." - max_damage = 200 - mech_health = 400 + max_damage = 100 power_use = 0 climb_time = 6 prebuilt_software = list(/obj/item/circuitboard/exosystem/utility, /obj/item/circuitboard/exosystem/engineering) @@ -268,7 +267,7 @@ transparent_cabin = TRUE exosuit_desc_string = "an open and light chassis" icon_state = "light_body" - max_damage = 100 + max_damage = 50 power_use = 5 has_hardpoints = list(HARDPOINT_BACK, HARDPOINT_LEFT_SHOULDER) damage_sound = 'sound/effects/glass_crack1.ogg' @@ -298,8 +297,7 @@ transparent_cabin = TRUE exosuit_desc_string = "a spherical chassis" icon_state = "pod_body" - max_damage = 150 - mech_health = 400 + max_damage = 70 power_use = 5 has_hardpoints = list(HARDPOINT_BACK) desc = "The Necromundan Katamari series cockpits have won a massive tender by Imperium few years back. No one is sure why, but these terrible things keep popping up on every government facility." @@ -344,8 +342,8 @@ pilot_coverage = 100 exosuit_desc_string = "a heavily armoured chassis" icon_state = "heavy_body" - max_damage = 400 - mech_health = 750 + max_damage = 150 + mech_health = 500 power_use = 50 has_hardpoints = list(HARDPOINT_BACK) prebuilt_software = list(/obj/item/circuitboard/exosystem/weapons) @@ -376,8 +374,6 @@ pilot_coverage = 100 exosuit_desc_string = "an armoured chassis" icon_state = "combat_body" - max_damage = 300 - mech_health = 500 power_use = 40 prebuilt_software = list(/obj/item/circuitboard/exosystem/weapons) diff --git a/config/admins.txt b/config/admins.txt index e4af19335e7ef..be20d7222e892 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -6,7 +6,7 @@ ###################################################################### TheBananaBunch - Suzerain -Alanii - Saintess +Archinist - Saintess WoodenTucker - Archon Somenerd - RetiredAdmin From f7cf0e1ec3eb79f3262e9bcd420a55d657d8e171 Mon Sep 17 00:00:00 2001 From: githubuser4141 Date: Wed, 5 Feb 2025 00:01:07 +1300 Subject: [PATCH 3/6] Update admins.txt --- config/admins.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/admins.txt b/config/admins.txt index be20d7222e892..e4af19335e7ef 100644 --- a/config/admins.txt +++ b/config/admins.txt @@ -6,7 +6,7 @@ ###################################################################### TheBananaBunch - Suzerain -Archinist - Saintess +Alanii - Saintess WoodenTucker - Archon Somenerd - RetiredAdmin From d097e48ad24a274147f97423c7ef84861fbf5708 Mon Sep 17 00:00:00 2001 From: githubuser4141 Date: Wed, 5 Feb 2025 00:08:15 +1300 Subject: [PATCH 4/6] Yes --- code/modules/mechs/components/body.dm | 2 ++ code/modules/mechs/components/frame.dm | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mechs/components/body.dm b/code/modules/mechs/components/body.dm index aee753c9d5809..b729961e91770 100644 --- a/code/modules/mechs/components/body.dm +++ b/code/modules/mechs/components/body.dm @@ -40,6 +40,8 @@ has_hardpoints = list(HARDPOINT_BACK, HARDPOINT_LEFT_SHOULDER, HARDPOINT_RIGHT_SHOULDER) var/damage_sound = 'sound/effects/bang.ogg' var/climb_time = 25 + ///If the body type can hold a head. + var/sensor_housing = TRUE /// Takes /obj/item/circuitboard/exosystem type paths for what boards get put in for prefabs var/list/prebuilt_software = list() diff --git a/code/modules/mechs/components/frame.dm b/code/modules/mechs/components/frame.dm index 86b9f1a67721e..b3e297cfaf32a 100644 --- a/code/modules/mechs/components/frame.dm +++ b/code/modules/mechs/components/frame.dm @@ -398,7 +398,7 @@ if(!body) USE_FEEDBACK_FAILURE("You must attach a body before attaching sensors!") return TRUE - if (body && (istype(body, /obj/item/mech_component/chassis/cubical))) + if (body && !body.sensor_housing) USE_FEEDBACK_FAILURE("This type of chassis cannot support sensors!") return TRUE if (!install_component(tool, user)) @@ -435,4 +435,4 @@ component.forceMove(get_turf(src)) user.put_in_hands(component) playsound(user.loc, 'sound/items/Deconstruct.ogg', 50, 1) - return TRUE \ No newline at end of file + return TRUE From 8a16649464587acb10846c70bd70aadbf3ac58eb Mon Sep 17 00:00:00 2001 From: githubuser4141 Date: Wed, 5 Feb 2025 00:08:49 +1300 Subject: [PATCH 5/6] Update head.dm --- code/modules/mechs/components/head.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mechs/components/head.dm b/code/modules/mechs/components/head.dm index c5bc012187996..a039cf8b05c3a 100644 --- a/code/modules/mechs/components/head.dm +++ b/code/modules/mechs/components/head.dm @@ -110,4 +110,4 @@ icon_state = "combat_head" vision_flags = SEE_MOBS see_invisible = SEE_INVISIBLE_NOLIGHTING - power_use = 200 \ No newline at end of file + power_use = 200 From c51016f4744903a8e3339c711fc42482190f2e3d Mon Sep 17 00:00:00 2001 From: githubuser4141 Date: Wed, 5 Feb 2025 00:09:46 +1300 Subject: [PATCH 6/6] Update body.dm --- code/modules/mechs/components/body.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/mechs/components/body.dm b/code/modules/mechs/components/body.dm index b729961e91770..aa884e28d61c6 100644 --- a/code/modules/mechs/components/body.dm +++ b/code/modules/mechs/components/body.dm @@ -366,10 +366,6 @@ . = ..() m_armour = new /obj/item/robot_parts/robot_component/armour/exosuit/combat(src) -/obj/item/mech_component/chassis/cubical/prebuild() - . = ..() - m_armour = new /obj/item/robot_parts/robot_component/armour/exosuit/combat(src) - /obj/item/mech_component/chassis/combat name = "sealed exosuit chassis" hatch_descriptor = "canopy"