From 0bf2b9f7ebbd6cbe8bfde9fb5e9f7454c9db1c3f Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Tue, 9 Sep 2025 16:09:37 -0400 Subject: [PATCH 01/22] Attempt to fix and debug random away-site unit test failures --- .../_machines_base/machine_construction/_construction.dm | 4 ++++ .../machinery/_machines_base/machine_construction/airlock.dm | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/code/game/machinery/_machines_base/machine_construction/_construction.dm b/code/game/machinery/_machines_base/machine_construction/_construction.dm index 8ae207901bbc..3555ee7173f1 100644 --- a/code/game/machinery/_machines_base/machine_construction/_construction.dm +++ b/code/game/machinery/_machines_base/machine_construction/_construction.dm @@ -76,6 +76,10 @@ return MCS_CHANGE if(istext(fail)) to_chat(user, fail) + // This logging exists so that random CI fails due to state change failures will be caught. + #ifdef UNIT_TEST + log_unit_test("[log_info_line(machine)]: [fail]") + #endif return MCS_BLOCK return fail return MCS_CONTINUE diff --git a/code/game/machinery/_machines_base/machine_construction/airlock.dm b/code/game/machinery/_machines_base/machine_construction/airlock.dm index 48de7420a1b7..c6a8a4fa6f15 100644 --- a/code/game/machinery/_machines_base/machine_construction/airlock.dm +++ b/code/game/machinery/_machines_base/machine_construction/airlock.dm @@ -8,6 +8,10 @@ // Prevent access locks on doors from interfering with our interactions. for(var/obj/item/stock_parts/access_lock/lock in machine.get_all_components_of_type(/obj/item/stock_parts/access_lock)) lock.locked = FALSE + // And ensure the door's closed + var/obj/machinery/door/the_door = machine + if(istype(the_door)) // just in case + the_door.operating = FALSE // A lot of doors refuse to change states if operating. // Test hacking state if(!machine.attackby(screwdriver, user)) return "Machine [log_info_line(machine)] did not respond to attackby with screwdriver." From 0b4703c019a62a52d4484a664fbab07d3da44ab6 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Tue, 23 Sep 2025 14:12:33 -0400 Subject: [PATCH 02/22] Simplify some code via `drop_from_slot()` --- code/modules/mob/living/inventory.dm | 2 +- code/modules/organs/external/_external.dm | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/inventory.dm b/code/modules/mob/living/inventory.dm index 21b92392fbdd..4d3d35090dc6 100644 --- a/code/modules/mob/living/inventory.dm +++ b/code/modules/mob/living/inventory.dm @@ -153,8 +153,8 @@ // For any old slots which had no equivalent, drop the item into the world for(var/old_slot_id in old_slots) + drop_from_slot(old_slot_id) var/datum/inventory_slot/old_slot = old_slots[old_slot_id] - drop_from_inventory(old_slot.get_equipped_item()) old_slot.clear_slot() // Call this manually since it is no longer in _inventory_slots qdel(old_slot) diff --git a/code/modules/organs/external/_external.dm b/code/modules/organs/external/_external.dm index 3f62d4a17485..4cafbfe2e108 100644 --- a/code/modules/organs/external/_external.dm +++ b/code/modules/organs/external/_external.dm @@ -527,19 +527,21 @@ if(!in_place) parent.update_wounds() +/// Drops all clothing covered by this body part. /obj/item/organ/external/proc/drop_equipped_clothing() if(!owner) return + // TODO: Determine if this is even necessary; slots that require organ tags will vanish when the organ is lost if((body_part & SLOT_FOOT_LEFT) || (body_part & SLOT_FOOT_RIGHT)) - owner.drop_from_inventory(owner.get_equipped_item(slot_shoes_str)) + owner.drop_from_slot(slot_shoes_str) if((body_part & SLOT_HAND_LEFT) || (body_part & SLOT_HAND_RIGHT)) - owner.drop_from_inventory(owner.get_equipped_item(slot_gloves_str)) + owner.drop_from_slot(slot_gloves_str) if(body_part & SLOT_HEAD) - owner.drop_from_inventory(owner.get_equipped_item(slot_head_str)) - owner.drop_from_inventory(owner.get_equipped_item(slot_glasses_str)) - owner.drop_from_inventory(owner.get_equipped_item(slot_l_ear_str)) - owner.drop_from_inventory(owner.get_equipped_item(slot_r_ear_str)) - owner.drop_from_inventory(owner.get_equipped_item(slot_wear_mask_str)) + owner.drop_from_slot(slot_head_str) + owner.drop_from_slot(slot_glasses_str) + owner.drop_from_slot(slot_l_ear_str) + owner.drop_from_slot(slot_r_ear_str) + owner.drop_from_slot(slot_wear_mask_str) //Helper proc used by various tools for repairing robot limbs /obj/item/organ/external/proc/robo_repair(var/repair_amount, var/damage_type, var/damage_desc, obj/item/tool, mob/living/user) From e456493b0c680ee5c258f0086fe88c57643a6bf5 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Wed, 24 Sep 2025 10:37:41 +1000 Subject: [PATCH 03/22] Attempting to fix issues with skillset loading. --- code/modules/mob/skills/skillset.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/skills/skillset.dm b/code/modules/mob/skills/skillset.dm index 1b0544de7423..5e9928b3bf4a 100644 --- a/code/modules/mob/skills/skillset.dm +++ b/code/modules/mob/skills/skillset.dm @@ -37,7 +37,7 @@ var/global/list/all_skill_verbs for(var/datum/skill_buff/SB in skill_buffs) . += SB.buffs[skill_path] -/datum/skillset/proc/obtain_from_mob(mob/mob) +/datum/skillset/proc/obtain_from_mob(mob/living/mob) if(!istype(mob) || !skills_transferable || !mob.skillset.skills_transferable) return skill_list = mob.skillset.skill_list From 4942aba4dcab5c6cb5a0f61694c5e805401103a0 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 20:49:52 -0400 Subject: [PATCH 04/22] Remove some entirely-unused defunct variables --- code/game/machinery/_machines_base/stock_parts/cupholder.dm | 1 - .../game/machinery/_machines_base/stock_parts/network_lock.dm | 1 - code/game/machinery/alarm.dm | 1 - .../machinery/embedded_controller/embedded_controller_base.dm | 2 -- code/game/machinery/turret_control.dm | 1 - code/game/machinery/turrets/_turrets.dm | 4 ---- code/game/objects/effects/wet_floor.dm | 1 - code/game/objects/items/devices/chameleonproj.dm | 1 - code/game/objects/items/devices/radio/radio.dm | 1 - code/game/objects/random/subtypes/misc.dm | 1 - code/game/objects/structures/fires.dm | 1 - code/game/objects/structures/tables.dm | 1 - code/modules/backgrounds/citizenship/_citizenship.dm | 1 - code/modules/client/client_defines.dm | 1 - code/modules/clothing/spacesuits/rig/modules/infiltration.dm | 1 - code/modules/clothing/suits/_suit.dm | 1 - code/modules/codex/codex_cataloguer.dm | 2 -- code/modules/lighting/lighting_corner.dm | 3 --- code/modules/mob/living/simple_animal/_simple_animal.dm | 1 - 19 files changed, 26 deletions(-) diff --git a/code/game/machinery/_machines_base/stock_parts/cupholder.dm b/code/game/machinery/_machines_base/stock_parts/cupholder.dm index da49b9b5e9c1..3a3b0aafeba3 100644 --- a/code/game/machinery/_machines_base/stock_parts/cupholder.dm +++ b/code/game/machinery/_machines_base/stock_parts/cupholder.dm @@ -7,7 +7,6 @@ part_flags = PART_FLAG_HAND_REMOVE place_verb = "place" eject_handler = /decl/interaction_handler/remove_held_item/cup - var/image/cupholder_overlay var/obj/item/cup /obj/item/stock_parts/item_holder/cupholder/Destroy() diff --git a/code/game/machinery/_machines_base/stock_parts/network_lock.dm b/code/game/machinery/_machines_base/stock_parts/network_lock.dm index d5cd653186e4..f3be2c31c429 100644 --- a/code/game/machinery/_machines_base/stock_parts/network_lock.dm +++ b/code/game/machinery/_machines_base/stock_parts/network_lock.dm @@ -21,7 +21,6 @@ var/interact_sounds = list("keyboard", "keystroke") var/interact_sound_volume = 40 - var/static/legacy_compatibility_mode = TRUE // Makes legacy access on ids play well with mapped devices with network locks. Override if your server is fully using network-enabled ids or has no mapped access. /obj/item/stock_parts/network_receiver/network_lock/modify_mapped_vars(map_hash) ..() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index ea3a147ad7ea..4e52cbc8c9c1 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -845,7 +845,6 @@ FIRE ALARM var/time = 1 SECOND var/timing = FALSE var/last_process = 0 - var/static/list/overlays_cache var/sound_id var/datum/sound_token/sound_token diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 5b622e965a41..6e25b53fb5c3 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -61,8 +61,6 @@ var/tmp/screen_state = "screen_standby" ///Bitflag to indicate which indicator lights are on so dummy controllers can match the same state var/tmp/indicator_state = 0 - ///If set, this controller will route its commands to the master controller with the same id_tag. - var/obj/machinery/embedded_controller/radio/master ///Radio connection to use for emiting commands var/datum/radio_frequency/radio_connection diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 4955f4173658..c91249ac56d6 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -20,7 +20,6 @@ var/lethal = 0 var/locked = 1 var/area/control_area //can be area name, path or nothing. - var/mob/living/silicon/ai/master_ai var/check_arrest = 1 //checks if the perp is set to arrest var/check_records = 1 //checks if a security record exists at all diff --git a/code/game/machinery/turrets/_turrets.dm b/code/game/machinery/turrets/_turrets.dm index d0e2354b8d57..8fe7e01dc0d6 100644 --- a/code/game/machinery/turrets/_turrets.dm +++ b/code/game/machinery/turrets/_turrets.dm @@ -23,10 +23,6 @@ var/image/transverse_left // Images for displaying the range of the turret's transverse var/image/transverse_right - // Sounds - var/turn_on_sound = null // Played when turret goes from off to on. - var/turn_off_sound = null // The above, in reverse. - // Shooting var/obj/item/gun/installed_gun = /obj/item/gun/energy/laser/practice // Instance of the gun inside the turret. var/gun_looting_prob = 25 // If the turret dies and then is disassembled, this is the odds of getting the gun. diff --git a/code/game/objects/effects/wet_floor.dm b/code/game/objects/effects/wet_floor.dm index 664d777a3887..cef4e3b2c8f9 100644 --- a/code/game/objects/effects/wet_floor.dm +++ b/code/game/objects/effects/wet_floor.dm @@ -5,7 +5,6 @@ mouse_opacity = MOUSE_OPACITY_UNCLICKABLE simulated = FALSE var/wetness = 0 - var/image/wet_overlay = null var/wet_timer_id /atom/movable/wet_floor/Initialize() diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index f09470bc64ec..fc743829ceef 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -103,7 +103,6 @@ anchored = TRUE is_spawnable_type = FALSE movement_handlers = list(/datum/movement_handler/delay/chameleon_projector) - var/can_move = TRUE var/obj/item/chameleon/master = null /obj/effect/dummy/chameleon/Initialize(mapload, var/obj/item/chameleon/projector) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 7277834d2d25..92c10b97b1bb 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -56,7 +56,6 @@ var/broadcasting = FALSE var/listening = TRUE var/list/channels - var/default_color = "#6d3f40" var/decrypt_all_messages = FALSE var/can_use_analog = TRUE var/datum/extension/network_device/radio/radio_device_type = /datum/extension/network_device/radio diff --git a/code/game/objects/random/subtypes/misc.dm b/code/game/objects/random/subtypes/misc.dm index 01f0b1fb231c..27d600db80a6 100644 --- a/code/game/objects/random/subtypes/misc.dm +++ b/code/game/objects/random/subtypes/misc.dm @@ -117,7 +117,6 @@ desc = "This is some random junk." icon = 'icons/obj/items/storage/trashbag.dmi' icon_state = "trashbag3" - var/spawn_choice /obj/random/junk/spawn_choices() var/static/list/spawnable_choices diff --git a/code/game/objects/structures/fires.dm b/code/game/objects/structures/fires.dm index 6f4821ea174c..1b3832173b7e 100644 --- a/code/game/objects/structures/fires.dm +++ b/code/game/objects/structures/fires.dm @@ -57,7 +57,6 @@ var/light_color_low = "#ff0000" var/list/affected_exterior_turfs - var/next_fuel_consumption = 0 var/last_fuel_burn_temperature = T20C // TODO: Replace this and the fuel var with just tracking currently-burning matter? // Or use atom fires when those are implemented? diff --git a/code/game/objects/structures/tables.dm b/code/game/objects/structures/tables.dm index ab9fbf3e716e..fb9dda2bf289 100644 --- a/code/game/objects/structures/tables.dm +++ b/code/game/objects/structures/tables.dm @@ -26,7 +26,6 @@ var/can_flip = TRUE var/is_flipped = FALSE var/decl/material/additional_reinf_material - var/base_type = /obj/structure/table var/top_surface_noun = "tabletop" diff --git a/code/modules/backgrounds/citizenship/_citizenship.dm b/code/modules/backgrounds/citizenship/_citizenship.dm index e16cc9455ac7..d6c349aa1edd 100644 --- a/code/modules/backgrounds/citizenship/_citizenship.dm +++ b/code/modules/backgrounds/citizenship/_citizenship.dm @@ -1,7 +1,6 @@ /decl/background_detail/citizenship abstract_type = /decl/background_detail/citizenship category = /decl/background_category/citizenship - var/ruling_body = "Other Faction" var/capital var/size_heading = "Systems" var/size_value diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index b3487b5e361b..15d3d676b993 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -34,7 +34,6 @@ //IRC admin that spoke with them last. var/irc_admin - var/mute_irc = 0 // Prevents people from being spammed about multikeying every time their mob changes. var/warned_about_multikeying = 0 diff --git a/code/modules/clothing/spacesuits/rig/modules/infiltration.dm b/code/modules/clothing/spacesuits/rig/modules/infiltration.dm index 0fe76208c172..c0cdb63b43d6 100644 --- a/code/modules/clothing/spacesuits/rig/modules/infiltration.dm +++ b/code/modules/clothing/spacesuits/rig/modules/infiltration.dm @@ -185,7 +185,6 @@ interface_name = "dead man's switch" interface_desc = "An integrated automatic self-destruct module. When the wearer dies, so does the surrounding area. Can be triggered manually." var/list/explosion_values = list(1,2,4,5) - var/blinking = 0 var/blink_mode = 0 var/blink_delay = 10 var/blink_time = 40 diff --git a/code/modules/clothing/suits/_suit.dm b/code/modules/clothing/suits/_suit.dm index 7b4809a3b42d..82fdbbb486c5 100644 --- a/code/modules/clothing/suits/_suit.dm +++ b/code/modules/clothing/suits/_suit.dm @@ -11,7 +11,6 @@ valid_accessory_slots = list(ACCESSORY_SLOT_ARMBAND, ACCESSORY_SLOT_OVER) fallback_slot = slot_wear_suit_str var/protects_against_weather = FALSE - var/fire_resist = T0C+100 /obj/item/clothing/suit/gives_weather_protection() return protects_against_weather diff --git a/code/modules/codex/codex_cataloguer.dm b/code/modules/codex/codex_cataloguer.dm index a465ab387b48..ecca7be613bf 100644 --- a/code/modules/codex/codex_cataloguer.dm +++ b/code/modules/codex/codex_cataloguer.dm @@ -22,8 +22,6 @@ var/scan_speed_modifier = 1 /// How many tiles away it can scan. Changing this also changes the box size. var/scan_range = 3 - /// If another person is within this radius, they will also be credited with a successful scan. - var/credit_sharing_range = 14 /// How much to make the next scan shorter. var/tmp/partial_scan_time = 0 /// Weakref of the thing that was last scanned if inturrupted. Used to allow for partial scans to be resumed. diff --git a/code/modules/lighting/lighting_corner.dm b/code/modules/lighting/lighting_corner.dm index 3170ed85d090..3d150896b47b 100644 --- a/code/modules/lighting/lighting_corner.dm +++ b/code/modules/lighting/lighting_corner.dm @@ -61,9 +61,6 @@ var/global/list/REVERSE_LIGHTING_CORNER_DIAGONAL = list(0, 0, 0, 0, 3, 4, 0, 0, var/cache_b = 0 var/cache_mx = 0 - /// Used for planet lighting. Probably needs a better system to prevent over-updating when not needed at some point. - var/update_gen = 0 - /datum/lighting_corner/New(turf/new_turf, diagonal, oi) SSlighting.total_lighting_corners += 1 diff --git a/code/modules/mob/living/simple_animal/_simple_animal.dm b/code/modules/mob/living/simple_animal/_simple_animal.dm index e569fc44d985..28c2a4c16e30 100644 --- a/code/modules/mob/living/simple_animal/_simple_animal.dm +++ b/code/modules/mob/living/simple_animal/_simple_animal.dm @@ -81,7 +81,6 @@ var/return_damage_min var/return_damage_max - var/performing_delayed_life_action = FALSE var/glowing_eyes = FALSE var/mob_icon_state_flags = 0 From d27b8a82b51689961e3b2e8ddcc86fe2acbc2b4e Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 21:09:44 -0400 Subject: [PATCH 05/22] Fix load_event not working due to unused variable --- code/controllers/subsystems/configuration.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/controllers/subsystems/configuration.dm b/code/controllers/subsystems/configuration.dm index b342f71f85d3..a61105bc0644 100644 --- a/code/controllers/subsystems/configuration.dm +++ b/code/controllers/subsystems/configuration.dm @@ -15,7 +15,7 @@ SUBSYSTEM_DEF(configuration) load_files() load_sql() - load_event() + load_event(load_event_from) for(var/client/C) C.update_post_config_load() From 5478df383963131f2e04eb5eb76a579e13e70714 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 21:10:21 -0400 Subject: [PATCH 06/22] Remove unused, broken crew manifest spawner --- code/game/objects/effects/manifest.dm | 19 ------------------- nebula.dme | 1 - 2 files changed, 20 deletions(-) delete mode 100644 code/game/objects/effects/manifest.dm diff --git a/code/game/objects/effects/manifest.dm b/code/game/objects/effects/manifest.dm deleted file mode 100644 index 6b84dae52a08..000000000000 --- a/code/game/objects/effects/manifest.dm +++ /dev/null @@ -1,19 +0,0 @@ -/obj/effect/manifest - name = "manifest" - icon = 'icons/effects/markers.dmi' - icon_state = "x" - -/obj/effect/manifest/Initialize() - . = ..() - set_invisibility(INVISIBILITY_ABSTRACT) - -/obj/effect/manifest/proc/manifest() - var/dat = "Crew Manifest:
" - for(var/mob/living/human/M in SSmobs.mob_list) - dat += text(" [] - []
", M.name, M.get_assignment()) - var/obj/item/paper/P = new /obj/item/paper( src.loc ) - P.info = dat - P.SetName("paper- 'Crew Manifest'") - //SN src = null - qdel(src) - return \ No newline at end of file diff --git a/nebula.dme b/nebula.dme index 8a80aa8dfcb0..a897c4435032 100644 --- a/nebula.dme +++ b/nebula.dme @@ -1036,7 +1036,6 @@ #include "code\game\objects\effects\landmarks.dm" #include "code\game\objects\effects\landmarks_endgame.dm" #include "code\game\objects\effects\landmarks_latejoin.dm" -#include "code\game\objects\effects\manifest.dm" #include "code\game\objects\effects\mines.dm" #include "code\game\objects\effects\misc.dm" #include "code\game\objects\effects\overlays.dm" From b7836652f4015a3d443ae2d109decee6e18f61c7 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 21:20:11 -0400 Subject: [PATCH 07/22] Replace deprecated bodytype `has_eyes` variable --- code/modules/bodytype/_bodytype.dm | 4 +--- mods/content/corporate/datum/robolimbs.dm | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/code/modules/bodytype/_bodytype.dm b/code/modules/bodytype/_bodytype.dm index a60007dda2e4..e706f5b387ae 100644 --- a/code/modules/bodytype/_bodytype.dm +++ b/code/modules/bodytype/_bodytype.dm @@ -53,8 +53,6 @@ var/global/list/bodytypes_by_category = list() var/nail_noun /// What tech levels should limbs of this type use/need? var/limb_tech = @'{"biotech":2}' - /// Determines if eyes should render on heads using this bodytype. - var/has_eyes = TRUE /// Prefixed to the initial name of the limb, if non-null. var/modifier_string /// Modifies min and max broken damage for the limb. @@ -231,7 +229,7 @@ var/global/list/bodytypes_by_category = list() var/eye_contaminant_guard = 0 /// Are the eyes of this bodytype resistant to flashes? var/eye_innate_flash_protection = FLASH_PROTECTION_NONE - /// Icon to draw eye overlays from. + /// Icon to draw eye overlays from. If null, eyes will not be drawn. var/eye_icon = 'icons/mob/human_races/species/default_eyes.dmi' /// Do the eyes of this mob apply a pref colour like hair? var/apply_eye_colour = TRUE diff --git a/mods/content/corporate/datum/robolimbs.dm b/mods/content/corporate/datum/robolimbs.dm index 4eba38ba1b61..bf0ad145495f 100644 --- a/mods/content/corporate/datum/robolimbs.dm +++ b/mods/content/corporate/datum/robolimbs.dm @@ -13,7 +13,7 @@ name = "Bishop Rook" desc = "This limb has a polished metallic casing and a holographic face emitter." icon_base = 'mods/content/corporate/icons/cyberlimbs/bishop/bishop_rook.dmi' - has_eyes = FALSE + eye_icon = null // Do not draw eyes. bodytype_category = BODYTYPE_HUMANOID organ_material = /decl/material/solid/metal/steel matter = list( @@ -32,7 +32,7 @@ name = "Hephaestus Titan" desc = "This limb has a casing of an olive drab finish, providing a reinforced housing look." icon_base = 'mods/content/corporate/icons/cyberlimbs/hephaestus/hephaestus_titan.dmi' - has_eyes = FALSE + eye_icon = null // Do not draw eyes. bodytype_category = BODYTYPE_HUMANOID uid = "bodytype_prosthetic_hephaestus_titan" @@ -88,7 +88,7 @@ name = "Morpheus Mantis" desc = "This limb has a casing of sleek black metal and repulsive insectile design." icon_base = 'mods/content/corporate/icons/cyberlimbs/morpheus/morpheus_mantis.dmi' - has_eyes = FALSE + eye_icon = null // Do not draw eyes. uid = "bodytype_prosthetic_morpheus_mantis" /decl/bodytype/prosthetic/veymed From aafb8698d04eabd6c030cea1e4cfd715d2673ad2 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 23:02:50 -0400 Subject: [PATCH 08/22] Replace defunct show_reagent_name variable --- code/game/objects/items/welding/weldingtool_tank.dm | 4 ++-- code/modules/reagents/reagent_containers.dm | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/items/welding/weldingtool_tank.dm b/code/game/objects/items/welding/weldingtool_tank.dm index 7cb3e5bd84a0..b28b73115dff 100644 --- a/code/game/objects/items/welding/weldingtool_tank.dm +++ b/code/game/objects/items/welding/weldingtool_tank.dm @@ -11,7 +11,7 @@ atom_flags = ATOM_FLAG_OPEN_CONTAINER obj_flags = OBJ_FLAG_HOLLOW volume = 20 - show_reagent_name = TRUE + presentation_flags = PRESENTATION_FLAG_NAME current_health = 40 max_health = 40 material = /decl/material/solid/metal/steel @@ -123,7 +123,7 @@ size_in_use = ITEM_SIZE_LARGE unlit_force = 9 lit_force = 15 - show_reagent_name = FALSE + presentation_flags = 0 _base_attack_force = 8 var/tmp/last_gen = 0 diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 2bf3103378e2..23ed47bc72e5 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -14,7 +14,6 @@ var/volume = 30 var/label_text var/presentation_flags = 0 - var/show_reagent_name = FALSE var/detail_color var/detail_state From de3e782dfca76b6e4478c880427d23b399c93740 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Fri, 26 Sep 2025 14:23:48 -0400 Subject: [PATCH 09/22] Replace spawns in effect trail with timers and waitfor=FALSE --- code/game/objects/effects/effect_system.dm | 49 +++++++++++----------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 3b5ef1fd60b7..52c615b4daeb 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -385,31 +385,30 @@ steam.start() -- spawns the effect /datum/effect/effect/system/trail/start() - if(!src.on) - src.on = 1 - src.processing = 1 - if(src.processing) - src.processing = 0 - spawn(0) - var/turf/T = get_turf(src.holder) - if(T != src.oldposition) - if(is_type_in_list(T, specific_turfs) && (!max_number || number < max_number)) - var/obj/effect/effect/trail = new trail_type(oldposition) - src.oldposition = T - effect(trail) - number++ - spawn( duration_of_effect ) - number-- - qdel(trail) - spawn(2) - if(src.on) - src.processing = 1 - src.start() - else - spawn(2) - if(src.on) - src.processing = 1 - src.start() + set waitfor = FALSE + if(!on) + on = TRUE + processing = TRUE + if(processing) + processing = FALSE + var/turf/our_turf = get_turf(holder) + if(our_turf != oldposition) + if(is_type_in_list(our_turf, specific_turfs) && (!max_number || number < max_number)) + var/obj/effect/effect/trail = new trail_type(oldposition) + oldposition = our_turf + effect(trail) + number++ + addtimer(CALLBACK(src, PROC_REF(end_trail_effect), trail), duration_of_effect) + addtimer(CALLBACK(src, PROC_REF(try_start)), 0.2 SECONDS) + +/datum/effect/effect/system/trail/proc/try_start() + if(on) + processing = TRUE + start() + +/datum/effect/effect/system/trail/proc/end_trail_effect(obj/effect/effect/trail) + number-- + qdel(trail) /datum/effect/effect/system/trail/proc/stop() src.processing = 0 From 540104bd11095ee87114119a9364656d0fcd4ce1 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Fri, 26 Sep 2025 14:24:10 -0400 Subject: [PATCH 10/22] Replace spawn in nurse spider AI with timer --- .../hostile/giant_spiders/ai_nurse.dm | 63 ++++++++++--------- 1 file changed, 34 insertions(+), 29 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spiders/ai_nurse.dm b/code/modules/mob/living/simple_animal/hostile/giant_spiders/ai_nurse.dm index 5d2dd604740f..6b280878a5f0 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spiders/ai_nurse.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spiders/ai_nurse.dm @@ -83,35 +83,40 @@ body.visible_message(SPAN_NOTICE("\The [body] begins to secrete a sticky substance around \the [cocoon_target].")) stop_wandering() body.stop_automove() - spawn(5 SECONDS) - if(get_activity() == AI_ACTIVITY_BUILDING) - if(cocoon_target && isturf(cocoon_target.loc) && get_dist(body, cocoon_target) <= 1) - var/obj/effect/spider/cocoon/C = new(cocoon_target.loc) - var/large_cocoon = 0 - C.pixel_x = cocoon_target.pixel_x - C.pixel_y = cocoon_target.pixel_y - for(var/mob/living/M in C.loc) - large_cocoon = 1 - spooder.fed++ - spooder.max_eggs++ - body.visible_message(SPAN_WARNING("\The [body] sticks a proboscis into \the [cocoon_target] and sucks a viscous substance out.")) - M.forceMove(C) - C.pixel_x = M.pixel_x - C.pixel_y = M.pixel_y - break - for(var/obj/item/I in C.loc) - I.forceMove(C) - for(var/obj/structure/S in C.loc) - if(!S.anchored) - S.forceMove(C) - for(var/obj/machinery/M in C.loc) - if(!M.anchored) - M.forceMove(C) - if(large_cocoon) - C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3") - cocoon_target = null - set_activity(AI_ACTIVITY_IDLE) - resume_wandering() + addtimer(CALLBACK(src, PROC_REF(build_cocoon)), 5 SECONDS) + +/datum/mob_controller/aggressive/giant_spider/nurse/proc/build_cocoon() + if(get_activity() != AI_ACTIVITY_BUILDING) + return FALSE + var/mob/living/simple_animal/hostile/giant_spider/nurse/spooder = body + if(cocoon_target && isturf(cocoon_target.loc) && get_dist(body, cocoon_target) <= 1) + var/obj/effect/spider/cocoon/C = new(cocoon_target.loc) + var/large_cocoon = 0 + C.pixel_x = cocoon_target.pixel_x + C.pixel_y = cocoon_target.pixel_y + for(var/mob/living/M in C.loc) + large_cocoon = 1 + spooder.fed++ + spooder.max_eggs++ + body.visible_message(SPAN_WARNING("\The [body] sticks a proboscis into \the [cocoon_target] and sucks a viscous substance out.")) + M.forceMove(C) + C.pixel_x = M.pixel_x + C.pixel_y = M.pixel_y + break + for(var/obj/item/I in C.loc) + I.forceMove(C) + for(var/obj/structure/S in C.loc) + if(!S.anchored) + S.forceMove(C) + for(var/obj/machinery/M in C.loc) + if(!M.anchored) + M.forceMove(C) + if(large_cocoon) + C.icon_state = pick("cocoon_large1","cocoon_large2","cocoon_large3") + cocoon_target = null + set_activity(AI_ACTIVITY_IDLE) + resume_wandering() + return TRUE /datum/mob_controller/aggressive/giant_spider/nurse/handle_death(gibbed) . = ..() From 91657e1262e71523483651f8f5a48aaf0f7fbef7 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Fri, 13 Jun 2025 19:46:42 -0400 Subject: [PATCH 11/22] Move custom circuit system into a modpack --- code/__defines/machinery_public_vars.dm | 11 ++++ .../_machines_base/machinery_public_vars.dm | 22 ++++---- .../machinery_public_vars_common.dm | 18 +++---- code/game/machinery/air_sensor.dm | 6 +-- code/game/machinery/buttons.dm | 2 +- code/game/machinery/doors/airlock_control.dm | 12 ++--- .../objects/items/devices/paint_sprayer.dm | 5 ++ code/game/objects/items/weapons/cards_ids.dm | 34 ++++++------ code/game/objects/random/subtypes/multi.dm | 5 -- code/game/objects/random/subtypes/tech.dm | 15 ------ code/modules/admin/create_object.dm | 2 +- code/modules/atmospherics/atmos_primitives.dm | 4 +- .../components/binary_devices/passive_gate.dm | 8 +-- .../components/binary_devices/pump.dm | 2 +- .../components/unary/outlet_injector.dm | 2 +- .../components/unary/vent_pump.dm | 6 +-- .../components/unary/vent_scrubber.dm | 6 +-- .../designs/general/designs_tools.dm | 9 ---- .../protolathe/designs_hardsuit_modules.dm | 3 -- .../designs/protolathe/designs_misc.dm | 7 --- .../designs/robotics/designs_augments.dm | 3 -- .../integrated_electronics/_defines.dm | 4 -- .../core/_electronics.dm | 5 -- code/modules/mob/living/silicon/pai/pai.dm | 4 +- .../silicon/robot/modules/module_research.dm | 1 - .../device_types/_network_device.dm | 16 +++--- code/unit_tests/json.dm | 21 ++++---- maps/__map_modpack_compatibility.dm | 4 +- maps/antag_spawn/ert/ert_base.dmm | 2 +- maps/away/unishi/unishi.dm | 1 + maps/exodus/exodus-2.dmm | 2 +- maps/exodus/exodus.dm | 1 + maps/ministation/ministation.dm | 1 + maps/modpack_testing/modpack_testing.dm | 1 + maps/tradeship/tradeship.dm | 1 + maps/~mapsystem/maps_antagonism.dm | 1 - mods/content/dungeon_loot/subtypes/maint.dm | 1 - .../_integrated_electronics.dm | 21 ++++---- .../_integrated_electronics.dme | 54 +++++++++++++++++++ .../assemblies/_assemblies.dm | 12 ++--- .../assemblies/circuit_augment.dm | 8 ++- .../circuit_serialization.dm | 0 .../integrated_electronics/circuit_tests.dm | 13 ++++- .../components/_integrated_circuit.dm | 6 +-- .../components}/access.dm | 0 .../components}/arithmetic.dm | 0 .../components}/converters.dm | 0 .../components}/data_transfer.dm | 0 .../components}/filter.dm | 0 .../components}/input.dm | 0 .../components}/lists.dm | 0 .../components}/logic.dm | 0 .../components}/manipulation.dm | 0 .../components}/memory.dm | 0 .../components}/output.dm | 0 .../components}/passive.dm | 2 +- .../components}/power.dm | 2 +- .../components/power_passive.dm | 1 - .../components}/reagents.dm | 0 .../components}/smart.dm | 0 .../components}/time.dm | 0 .../components}/trig.dm | 0 .../fabricator_designs.dm | 20 +++++++ .../integrated_electronics}/helpers.dm | 0 .../integrated_electronics/overrides.dm | 12 +++++ .../integrated_electronics/pins/_pins.dm | 10 ++-- .../pins}/boolean_pin.dm | 2 +- .../integrated_electronics/pins}/char_pin.dm | 2 +- .../integrated_electronics/pins}/color_pin.dm | 2 +- .../integrated_electronics/pins}/dir_pin.dm | 2 +- .../integrated_electronics/pins}/index_pin.dm | 2 +- .../integrated_electronics/pins}/list_pin.dm | 2 +- .../pins}/number_pin.dm | 2 +- .../integrated_electronics/pins}/ref_pin.dm | 2 +- .../pins}/string_pin.dm | 2 +- .../integrated_electronics}/prefab/prefab.dm | 6 +-- .../integrated_electronics}/prefab/prefabs.dm | 6 ++- .../prefab/test/testprefabs.dm | 2 +- mods/content/integrated_electronics/random.dm | 4 ++ .../subsystems}/circuit.dm | 8 +-- .../subsystems/circuit_component.dm | 0 .../toggle_circuits_secret.dm | 0 .../integrated_electronics/tools}/analyzer.dm | 7 ++- .../integrated_electronics/tools}/debugger.dm | 12 ++--- .../integrated_electronics/tools}/detailer.dm | 15 +++--- .../integrated_electronics/tools}/printer.dm | 0 .../integrated_electronics/tools}/wirer.dm | 15 +++--- mods/content/xenobiology/_xenobiology.dme | 1 - mods/~compatibility/patches/circuits.dm | 8 +++ .../patches/circuits/loot_circuits.dm | 6 +++ .../patches/circuits/xenobio_circuits.dm} | 0 mods/~compatibility/~compatibility.dm | 4 ++ nebula.dme | 49 +---------------- tools/map_migrations/0000_legacy.txt | 2 +- 94 files changed, 309 insertions(+), 263 deletions(-) create mode 100644 code/__defines/machinery_public_vars.dm delete mode 100644 code/modules/integrated_electronics/_defines.dm delete mode 100644 code/modules/integrated_electronics/core/_electronics.dm rename code/__defines/integrated_circuits.dm => mods/content/integrated_electronics/_integrated_electronics.dm (78%) create mode 100644 mods/content/integrated_electronics/_integrated_electronics.dme rename code/modules/integrated_electronics/core/assemblies.dm => mods/content/integrated_electronics/assemblies/_assemblies.dm (98%) rename code/modules/augment/active/circuit.dm => mods/content/integrated_electronics/assemblies/circuit_augment.dm (79%) rename code/modules/integrated_electronics/core/saved_circuits.dm => mods/content/integrated_electronics/circuit_serialization.dm (100%) rename code/unit_tests/integrated_circuits.dm => mods/content/integrated_electronics/circuit_tests.dm (91%) rename code/modules/integrated_electronics/core/integrated_circuit.dm => mods/content/integrated_electronics/components/_integrated_circuit.dm (98%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/access.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/arithmetic.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/converters.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/data_transfer.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/filter.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/input.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/lists.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/logic.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/manipulation.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/memory.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/output.dm (100%) rename {code/modules/integrated_electronics/passive => mods/content/integrated_electronics/components}/passive.dm (54%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/power.dm (99%) rename code/modules/integrated_electronics/passive/power.dm => mods/content/integrated_electronics/components/power_passive.dm (99%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/reagents.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/smart.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/time.dm (100%) rename {code/modules/integrated_electronics/subtypes => mods/content/integrated_electronics/components}/trig.dm (100%) create mode 100644 mods/content/integrated_electronics/fabricator_designs.dm rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics}/helpers.dm (100%) create mode 100644 mods/content/integrated_electronics/overrides.dm rename code/modules/integrated_electronics/core/pins.dm => mods/content/integrated_electronics/pins/_pins.dm (95%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/boolean_pin.dm (96%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/char_pin.dm (97%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/color_pin.dm (98%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/dir_pin.dm (97%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/index_pin.dm (96%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/list_pin.dm (99%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/number_pin.dm (96%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/ref_pin.dm (94%) rename {code/modules/integrated_electronics/core/special_pins => mods/content/integrated_electronics/pins}/string_pin.dm (97%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics}/prefab/prefab.dm (91%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics}/prefab/prefabs.dm (72%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics}/prefab/test/testprefabs.dm (97%) create mode 100644 mods/content/integrated_electronics/random.dm rename {code/controllers/subsystems/processing => mods/content/integrated_electronics/subsystems}/circuit.dm (93%) rename {code/controllers => mods/content/integrated_electronics}/subsystems/circuit_component.dm (100%) rename code/modules/admin/secrets/admin_secrets/toggle_circuits.dm => mods/content/integrated_electronics/toggle_circuits_secret.dm (100%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics/tools}/analyzer.dm (83%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics/tools}/debugger.dm (91%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics/tools}/detailer.dm (84%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics/tools}/printer.dm (100%) rename {code/modules/integrated_electronics/core => mods/content/integrated_electronics/tools}/wirer.dm (91%) create mode 100644 mods/~compatibility/patches/circuits.dm create mode 100644 mods/~compatibility/patches/circuits/loot_circuits.dm rename mods/{content/xenobiology/circuit.dm => ~compatibility/patches/circuits/xenobio_circuits.dm} (100%) diff --git a/code/__defines/machinery_public_vars.dm b/code/__defines/machinery_public_vars.dm new file mode 100644 index 000000000000..80937653bf53 --- /dev/null +++ b/code/__defines/machinery_public_vars.dm @@ -0,0 +1,11 @@ +// Displayed along with the pin name to show what type of pin it is. +#define VAR_FORMAT_ANY "\" +#define VAR_FORMAT_STRING "\" +#define VAR_FORMAT_CHAR "\" +#define VAR_FORMAT_COLOR "\" +#define VAR_FORMAT_NUMBER "\" +#define VAR_FORMAT_DIR "\" +#define VAR_FORMAT_BOOLEAN "\" +#define VAR_FORMAT_REF "\" +#define VAR_FORMAT_LIST "\" +#define VAR_FORMAT_INDEX "\" diff --git a/code/game/machinery/_machines_base/machinery_public_vars.dm b/code/game/machinery/_machines_base/machinery_public_vars.dm index 594aa0238e02..81871d962fa5 100644 --- a/code/game/machinery/_machines_base/machinery_public_vars.dm +++ b/code/game/machinery/_machines_base/machinery_public_vars.dm @@ -5,7 +5,7 @@ /decl/public_access/public_variable var/expected_type var/can_write = FALSE - var/var_type = IC_FORMAT_BOOLEAN // Reuses IC defines for better compatibility. + var/var_type = VAR_FORMAT_BOOLEAN // Reuses IC defines for better compatibility. var/has_updates = FALSE // Can register listeners for updates on change. var/list/listeners = list() @@ -40,27 +40,27 @@ Must be implemented by subtypes. /decl/public_access/public_variable/proc/check_input_type(new_value) . = FALSE switch(var_type) - if(IC_FORMAT_ANY) + if(VAR_FORMAT_ANY) return TRUE - if(IC_FORMAT_STRING) + if(VAR_FORMAT_STRING) return istext(new_value) - if(IC_FORMAT_CHAR) + if(VAR_FORMAT_CHAR) return istext(new_value) && length(new_value) == 1 - if(IC_FORMAT_COLOR) + if(VAR_FORMAT_COLOR) return sanitize_hexcolor(new_value, null) == new_value - if(IC_FORMAT_NUMBER) + if(VAR_FORMAT_NUMBER) return isnum(new_value) - if(IC_FORMAT_DIR) + if(VAR_FORMAT_DIR) return new_value in global.alldirs - if(IC_FORMAT_BOOLEAN) + if(VAR_FORMAT_BOOLEAN) return new_value == !!new_value - if(IC_FORMAT_REF) + if(VAR_FORMAT_REF) return isweakref(new_value) // Public variables of these types need to against the contents of the list and the index for validity themselves. - if(IC_FORMAT_LIST) + if(VAR_FORMAT_LIST) return islist(new_value) - if(IC_FORMAT_INDEX) + if(VAR_FORMAT_INDEX) return isnum(new_value) /* diff --git a/code/game/machinery/_machines_base/machinery_public_vars_common.dm b/code/game/machinery/_machines_base/machinery_public_vars_common.dm index 30de5ce9da63..8906b31d08c5 100644 --- a/code/game/machinery/_machines_base/machinery_public_vars_common.dm +++ b/code/game/machinery/_machines_base/machinery_public_vars_common.dm @@ -36,7 +36,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th desc = "An automatically generated area id, if this machine is tied to an area controller." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/area_uid/access_var(obj/machinery/machine) return machine.area_uid() @@ -51,7 +51,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th desc = "A generic variable intended to give machines a text designator to sort them into categories by function." can_write = TRUE has_updates = TRUE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/identifier/access_var(obj/machinery/machine) return machine.identifier @@ -67,7 +67,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th desc = "Whether the machine is off (0) or on (positive). Some machines have multiple power states. Writing to this variable may turn the machine off or on." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/use_power/access_var(obj/machinery/machine) return machine.use_power @@ -85,7 +85,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th desc = "The machine's name." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/name/access_var(obj/machinery/machine) return machine.name @@ -101,7 +101,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th desc = "Obtain the list of reagents and their data in the machine." can_write = FALSE has_updates = TRUE - var_type = IC_FORMAT_LIST + var_type = VAR_FORMAT_LIST /decl/public_access/public_variable/reagents/access_var(obj/machinery/machine) return machine?.reagents?.reagent_data @@ -109,7 +109,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th /decl/public_access/public_variable/reagents/volumes name = "reagents volumes" desc = "Obtain the list of reagents and their volumes in the machine." - var_type = IC_FORMAT_LIST + var_type = VAR_FORMAT_LIST /decl/public_access/public_variable/reagents/volumes/access_var(obj/machinery/machine) return machine?.reagents?.reagent_volumes @@ -117,7 +117,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th /decl/public_access/public_variable/reagents/free_space name = "reagents free space" desc = "Obtain the volume of free space left for reagents in the machine." - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/reagents/free_space/access_var(obj/machinery/machine) return REAGENTS_FREE_SPACE(machine?.reagents) @@ -125,7 +125,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th /decl/public_access/public_variable/reagents/total_volume name = "reagents total volume" desc = "Obtain the total volume of reagents in the machine." - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/reagents/total_volume/access_var(obj/machinery/machine) return machine?.reagents?.total_volume @@ -133,7 +133,7 @@ Public vars at /obj/machinery level. Just because they are here does not mean th /decl/public_access/public_variable/reagents/maximum_volume name = "reagents maximum volume" desc = "Obtain the maximum volume of reagents that can fit in the machine." - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/reagents/maximum_volume/access_var(obj/machinery/machine) return machine?.reagents?.maximum_volume diff --git a/code/game/machinery/air_sensor.dm b/code/game/machinery/air_sensor.dm index aa53b70818e9..bfbb9236ed3e 100644 --- a/code/game/machinery/air_sensor.dm +++ b/code/game/machinery/air_sensor.dm @@ -36,7 +36,7 @@ desc = "A list of gas data from the sensor location; the list entries are two-entry lists with \"symbol\" and \"percent\" fields." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_LIST + var_type = VAR_FORMAT_LIST /decl/public_access/public_variable/gas/access_var(obj/machinery/sensor) var/datum/gas_mixture/air_sample = sensor.return_air() @@ -58,7 +58,7 @@ desc = "The pressure of the gas at the sensor." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/pressure/access_var(obj/machinery/sensor) var/datum/gas_mixture/air_sample = sensor.return_air() @@ -70,7 +70,7 @@ desc = "The temperature of the gas at the sensor." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/temperature/access_var(obj/machinery/sensor) var/datum/gas_mixture/air_sample = sensor.return_air() diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 9e19104b483a..eda811c59e8f 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -120,7 +120,7 @@ desc = "Whether the button is currently in the on state." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_BOOLEAN + var_type = VAR_FORMAT_BOOLEAN /decl/public_access/public_variable/button_state/access_var(obj/machinery/button/button) return button.state diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index c1f9b50ebf6d..3ac2040598f2 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -74,7 +74,7 @@ desc = "Whether the door is closed (\"closed\") or not (\"open\")." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/airlock_door_state/access_var(obj/machinery/door/airlock/door) return door.density ? "closed" : "open" @@ -85,7 +85,7 @@ desc = "Whether the door is bolted (\"locked\") or not (\"unlocked\")." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/airlock_bolt_state/access_var(obj/machinery/door/airlock/door) return door.locked ? "locked" : "unlocked" @@ -190,7 +190,7 @@ desc = "The pressure of the location where the sensor is placed." can_write = FALSE has_updates = TRUE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/airlock_pressure/access_var(obj/machinery/airlock_sensor/sensor) return sensor.pressure @@ -209,7 +209,7 @@ /decl/public_access/public_variable/set_airlock_cycling/airlock_sensor expected_type = /obj/machinery/airlock_sensor can_write = TRUE - var_type = IC_FORMAT_BOOLEAN + var_type = VAR_FORMAT_BOOLEAN /decl/public_access/public_variable/set_airlock_cycling/airlock_sensor/access_var(obj/machinery/airlock_sensor/owner) return owner.master_cycling @@ -359,7 +359,7 @@ /decl/public_access/public_variable/set_airlock_cycling/access_button expected_type = /obj/machinery/button/access can_write = TRUE - var_type = IC_FORMAT_BOOLEAN + var_type = VAR_FORMAT_BOOLEAN /decl/public_access/public_variable/set_airlock_cycling/access_button/access_var(obj/machinery/button/access/owner) return owner.master_cycling @@ -376,7 +376,7 @@ desc = "The command this access button sends when pressed." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/button_command/access_var(obj/machinery/button/access/button) return button.command diff --git a/code/game/objects/items/devices/paint_sprayer.dm b/code/game/objects/items/devices/paint_sprayer.dm index 33f49ba11395..a6c34a1707b9 100644 --- a/code/game/objects/items/devices/paint_sprayer.dm +++ b/code/game/objects/items/devices/paint_sprayer.dm @@ -114,6 +114,11 @@ else change_color(new_color, user) + else if(istype(A, /obj/item/card/data)) // TODO: un-hardcode this please. better yet redo how this entire proc is done + var/obj/item/card/data/data_card = A + data_card.detail_color = spray_color + . = TRUE + else if (istype(A, /turf/wall)) . = paint_wall(A, user) diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 2dadd2bbf4d5..5bca85e73be3 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -1,16 +1,11 @@ /* Cards * Contains: - * DATA CARD - * ID CARD - * FINGERPRINT CARD HOLDER - * FINGERPRINT CARD + * UNION CARD + * DATA CARDS + * EMAG & BROKEN EMAG + * ID CARDS */ - - -/* - * DATA CARDS - Used for the IC data card reader - */ /obj/item/card name = "card" desc = "Does card things." @@ -21,6 +16,10 @@ drop_sound = 'sound/foley/paperpickup1.ogg' pickup_sound = 'sound/foley/paperpickup2.ogg' +/* + * UNION CARD + */ + /obj/item/card/union name = "union card" desc = "A card showing membership in the local worker's union." @@ -47,6 +46,10 @@ return TRUE return ..() +/* + * DATA CARDS - Used for the IC data card reader and, for some reason, faxes and teleporters. + */ +// Please modpack this once those last two are made to use data disks instead. /obj/item/card/data name = "data card" desc = "A plastic magstripe card for simple and speedy data storage and transfer. This one has a stripe running down the middle." @@ -63,13 +66,6 @@ . = ..() add_overlay(overlay_image(icon, "[icon_state]-color", detail_color)) -/obj/item/card/data/attackby(obj/item/used_item, mob/user) - if(istype(used_item, /obj/item/integrated_electronics/detailer)) - var/obj/item/integrated_electronics/detailer/D = used_item - detail_color = D.detail_color - update_icon() - return ..() - /obj/item/card/data/full_color desc = "A plastic magstripe card for simple and speedy data storage and transfer. This one has the entire card colored." icon_state = "data_2" @@ -82,7 +78,7 @@ return detail_color /* - * ID CARDS + * EMAG & BROKEN EMAG */ /obj/item/card/emag_broken @@ -149,6 +145,10 @@ var/global/const/NO_EMAG_ACT = -50 if(user.skill_check(SKILL_DEVICES,SKILL_ADEPT)) . += SPAN_WARNING("This ID card has some form of non-standard modifications.") +/* + * ID CARDS + */ + /obj/item/card/id name = "identification card" desc = "A card used to provide ID and determine access." diff --git a/code/game/objects/random/subtypes/multi.dm b/code/game/objects/random/subtypes/multi.dm index a0268faecaeb..ca95e015af2c 100644 --- a/code/game/objects/random/subtypes/multi.dm +++ b/code/game/objects/random/subtypes/multi.dm @@ -19,8 +19,3 @@ name = "Multi Point - Captain's Spare" id = "Captain's spare id" item_path = /obj/item/card/id/captains_spare - -/obj/random_multi/single_item/hand_tele - name = "Multi Point - Hand Teleporter" - id = "Hand teleporter" - item_path = /obj/prefab/hand_teleporter diff --git a/code/game/objects/random/subtypes/tech.dm b/code/game/objects/random/subtypes/tech.dm index 23c298283fae..a1b1ab86e65d 100644 --- a/code/game/objects/random/subtypes/tech.dm +++ b/code/game/objects/random/subtypes/tech.dm @@ -94,21 +94,6 @@ ) return spawnable_choices -/obj/random/assembly - name = "random assembly" - desc = "This is a random circuit assembly." - icon = 'icons/obj/items/gift_wrapped.dmi' - icon_state = "gift_1" - -/obj/random/assembly/spawn_choices() - var/static/list/spawnable_choices = list( - /obj/item/electronic_assembly, - /obj/item/electronic_assembly/medium, - /obj/item/electronic_assembly/large, - /obj/item/electronic_assembly/drone - ) - return spawnable_choices - /obj/random/advdevice name = "random advanced device" desc = "This is a random advanced device." diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm index 23da2d37f267..4852f28a58e6 100644 --- a/code/modules/admin/create_object.dm +++ b/code/modules/admin/create_object.dm @@ -13,7 +13,7 @@ var/global/create_object_html = null /datum/admins/proc/quick_create_object(var/mob/user) var/quick_create_object_html = null - var/path = input("Select the path of the object you wish to create.", "Path", /obj) as null|anything in list(/obj,/obj/structure,/obj/item,/obj/item,/obj/item/clothing,/obj/machinery,/obj/prefab) + var/path = input("Select the path of the object you wish to create.", "Path", /obj) as null|anything in list(/obj,/obj/structure,/obj/item,/obj/item,/obj/item/clothing,/obj/machinery) if(!path) return diff --git a/code/modules/atmospherics/atmos_primitives.dm b/code/modules/atmospherics/atmos_primitives.dm index 720b2ac3ff76..4d78c3a4553a 100644 --- a/code/modules/atmospherics/atmos_primitives.dm +++ b/code/modules/atmospherics/atmos_primitives.dm @@ -517,7 +517,7 @@ desc = "The most recent data on the amount of power the machine used." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/power_draw/access_var(obj/machinery/atmospherics/machine) return machine.last_power_draw @@ -528,7 +528,7 @@ desc = "The most recent data on the volume of air the machine moved." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/flow_rate/access_var(obj/machinery/atmospherics/machine) return machine.last_flow_rate \ No newline at end of file diff --git a/code/modules/atmospherics/components/binary_devices/passive_gate.dm b/code/modules/atmospherics/components/binary_devices/passive_gate.dm index c55ea099f96c..caacc188ddab 100644 --- a/code/modules/atmospherics/components/binary_devices/passive_gate.dm +++ b/code/modules/atmospherics/components/binary_devices/passive_gate.dm @@ -196,7 +196,7 @@ desc = "Whether or not the valve is open, allowing gas to pass in one direction." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_BOOLEAN + var_type = VAR_FORMAT_BOOLEAN /decl/public_access/public_variable/passive_gate_unlocked/access_var(obj/machinery/atmospherics/binary/passive_gate/machine) return machine.unlocked @@ -213,7 +213,7 @@ desc = "A cap on the volume flow rate of the gate." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/passive_gate_flow_rate/access_var(obj/machinery/atmospherics/binary/passive_gate/machine) return machine.set_flow_rate @@ -230,7 +230,7 @@ desc = "A number describing the form of regulation the gate is attempting. The possible values are 0 (no air passed), 1 (regulates input pressure), or 2 (regulates output pressure)." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/passive_gate_mode/access_var(obj/machinery/atmospherics/binary/passive_gate/machine) return machine.regulate_mode @@ -247,7 +247,7 @@ desc = "The input or output pressure the gate aims to stay below." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/passive_gate_target_pressure/access_var(obj/machinery/atmospherics/binary/passive_gate/machine) return machine.target_pressure diff --git a/code/modules/atmospherics/components/binary_devices/pump.dm b/code/modules/atmospherics/components/binary_devices/pump.dm index b1ec04c332d7..eeb70c699672 100644 --- a/code/modules/atmospherics/components/binary_devices/pump.dm +++ b/code/modules/atmospherics/components/binary_devices/pump.dm @@ -173,7 +173,7 @@ Thus, the two variables affect pump operation are set in New(): desc = "The output pressure of the pump." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/pump_target_output/access_var(obj/machinery/atmospherics/binary/pump/machine) return machine.target_pressure diff --git a/code/modules/atmospherics/components/unary/outlet_injector.dm b/code/modules/atmospherics/components/unary/outlet_injector.dm index 20a9ee0a3b24..1ed273483573 100644 --- a/code/modules/atmospherics/components/unary/outlet_injector.dm +++ b/code/modules/atmospherics/components/unary/outlet_injector.dm @@ -141,7 +141,7 @@ desc = "The rate at which the machine pumps (a number)." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_NUMBER + var_type = VAR_FORMAT_NUMBER /decl/public_access/public_variable/volume_rate/access_var(obj/machinery/atmospherics/unary/outlet_injector/machine) return machine.volume_rate diff --git a/code/modules/atmospherics/components/unary/vent_pump.dm b/code/modules/atmospherics/components/unary/vent_pump.dm index 20f4d41f2594..c463a0687ce1 100644 --- a/code/modules/atmospherics/components/unary/vent_pump.dm +++ b/code/modules/atmospherics/components/unary/vent_pump.dm @@ -368,7 +368,7 @@ desc = "The pump mode of the vent. Expected values are \"siphon\" or \"release\"." can_write = TRUE has_updates = TRUE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/pump_dir/access_var(obj/machinery/atmospherics/unary/vent_pump/machine) return machine.pump_direction ? "release" : "siphon" @@ -386,7 +386,7 @@ desc = "Numerical codes for whether the pump checks internal or internal pressure (or both) prior to operating. Can also be supplied the string keyword \"default\"." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_ANY + var_type = VAR_FORMAT_ANY /decl/public_access/public_variable/pump_checks/access_var(obj/machinery/atmospherics/unary/vent_pump/machine) return machine.pressure_checks @@ -405,7 +405,7 @@ desc = "The bound on internal pressure used in checks (a number). When writing, can be supplied the string keyword \"default\" instead." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_ANY + var_type = VAR_FORMAT_ANY /decl/public_access/public_variable/pressure_bound/access_var(obj/machinery/atmospherics/unary/vent_pump/machine) return machine.internal_pressure_bound diff --git a/code/modules/atmospherics/components/unary/vent_scrubber.dm b/code/modules/atmospherics/components/unary/vent_scrubber.dm index 4ff8c0e85b87..9ab3bc3e4976 100644 --- a/code/modules/atmospherics/components/unary/vent_scrubber.dm +++ b/code/modules/atmospherics/components/unary/vent_scrubber.dm @@ -266,7 +266,7 @@ desc = "The scrubbing mode code, which identifies what the scrubber is doing." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_STRING + var_type = VAR_FORMAT_STRING /decl/public_access/public_variable/scrubbing/access_var(obj/machinery/atmospherics/unary/vent_scrubber/machine) return machine.scrubbing @@ -286,7 +286,7 @@ desc = "Whether or not the scrubber is in panic mode." can_write = TRUE has_updates = FALSE - var_type = IC_FORMAT_BOOLEAN + var_type = VAR_FORMAT_BOOLEAN /decl/public_access/public_variable/panic/access_var(obj/machinery/atmospherics/unary/vent_scrubber/machine) return machine.panic @@ -308,7 +308,7 @@ desc = "A list of gases that this scrubber is scrubbing." can_write = FALSE has_updates = FALSE - var_type = IC_FORMAT_LIST + var_type = VAR_FORMAT_LIST /decl/public_access/public_variable/scrubbing_gas/access_var(obj/machinery/atmospherics/unary/vent_scrubber/machine) return machine.scrubbing_gas.Copy() diff --git a/code/modules/fabrication/designs/general/designs_tools.dm b/code/modules/fabrication/designs/general/designs_tools.dm index a7893fe4e1bd..1c9fc7d94818 100644 --- a/code/modules/fabrication/designs/general/designs_tools.dm +++ b/code/modules/fabrication/designs/general/designs_tools.dm @@ -2,15 +2,6 @@ path = /obj/item/crowbar category = "Tools" -/datum/fabricator_recipe/tool/int_wirer - path = /obj/item/integrated_electronics/wirer - -/datum/fabricator_recipe/tool/int_debugger - path = /obj/item/integrated_electronics/debugger - -/datum/fabricator_recipe/tool/int_analyzer - path = /obj/item/integrated_electronics/analyzer - /datum/fabricator_recipe/tool/multitool path = /obj/item/multitool diff --git a/code/modules/fabrication/designs/protolathe/designs_hardsuit_modules.dm b/code/modules/fabrication/designs/protolathe/designs_hardsuit_modules.dm index 8faa81dd4ddc..219883e737e1 100644 --- a/code/modules/fabrication/designs/protolathe/designs_hardsuit_modules.dm +++ b/code/modules/fabrication/designs/protolathe/designs_hardsuit_modules.dm @@ -61,6 +61,3 @@ /datum/fabricator_recipe/protolathe/rig/cooling_unit path = /obj/item/rig_module/cooling_unit - -/datum/fabricator_recipe/protolathe/rig/integrated_printer - path = /obj/item/integrated_circuit_printer diff --git a/code/modules/fabrication/designs/protolathe/designs_misc.dm b/code/modules/fabrication/designs/protolathe/designs_misc.dm index ae9ad75f43ef..0d406749fae2 100644 --- a/code/modules/fabrication/designs/protolathe/designs_misc.dm +++ b/code/modules/fabrication/designs/protolathe/designs_misc.dm @@ -55,10 +55,3 @@ /datum/fabricator_recipe/protolathe/misc/radio_beacon path = /obj/item/radio_beacon - - -/datum/fabricator_recipe/protolathe/integrated_printer_upgrade_advanced - path = /obj/item/disk/integrated_circuit/upgrade/advanced - -/datum/fabricator_recipe/protolathe/integrated_printer_upgrade_clone - path = /obj/item/disk/integrated_circuit/upgrade/clone diff --git a/code/modules/fabrication/designs/robotics/designs_augments.dm b/code/modules/fabrication/designs/robotics/designs_augments.dm index 85cc0d421d51..8ca2afdfe5ed 100644 --- a/code/modules/fabrication/designs/robotics/designs_augments.dm +++ b/code/modules/fabrication/designs/robotics/designs_augments.dm @@ -28,6 +28,3 @@ /datum/fabricator_recipe/robotics/augment/nanounit path = /obj/item/organ/internal/augment/active/nanounit - -/datum/fabricator_recipe/robotics/augment/circuit - path = /obj/item/organ/internal/augment/active/simple/circuit diff --git a/code/modules/integrated_electronics/_defines.dm b/code/modules/integrated_electronics/_defines.dm deleted file mode 100644 index 69c2b2eb593d..000000000000 --- a/code/modules/integrated_electronics/_defines.dm +++ /dev/null @@ -1,4 +0,0 @@ -#define IC_TOPIC_UNHANDLED 0 -#define IC_TOPIC_HANDLED 1 -#define IC_TOPIC_REFRESH 2 -#define IC_FLAG_CAN_FIRE 1 \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/_electronics.dm b/code/modules/integrated_electronics/core/_electronics.dm deleted file mode 100644 index d96c32f9aec4..000000000000 --- a/code/modules/integrated_electronics/core/_electronics.dm +++ /dev/null @@ -1,5 +0,0 @@ -/obj/item/integrated_electronics - abstract_type = /obj/item/integrated_electronics - obj_flags = OBJ_FLAG_CONDUCTIBLE - w_class = ITEM_SIZE_SMALL - material = /decl/material/solid/metal/aluminium diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index db413c265061..8a5bc7ae6728 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -181,7 +181,7 @@ var/global/list/possible_say_verbs = list( return set_special_ability_cooldown(10 SECONDS) //I'm not sure how much of this is necessary, but I would rather avoid issues. - if(istype(card.loc,/obj/item/rig_module) || istype(card.loc,/obj/item/integrated_circuit/manipulation/ai/)) + if(isitem(card.loc) && !card.loc.storage) // this used to be a more specific check for ai holder parts but this should cover them still to_chat(src, "There is no room to unfold inside \the [card.loc]. You're good and stuck.") return 0 else if(ismob(card.loc)) @@ -192,7 +192,7 @@ var/global/list/possible_say_verbs = list( if(card in affecting.implants) affecting.take_damage(rand(30,50)) LAZYREMOVE(affecting.implants, card) - H.visible_message("\The [src] explodes out of \the [H]'s [affecting.name] in a shower of gore!") + H.visible_message(SPAN_DANGER("\The [src] explodes out of \the [H]'s [affecting.name] in a shower of gore!")) break holder.drop_from_inventory(card) diff --git a/code/modules/mob/living/silicon/robot/modules/module_research.dm b/code/modules/mob/living/silicon/robot/modules/module_research.dm index 3b02f263e528..78de4222ad41 100644 --- a/code/modules/mob/living/silicon/robot/modules/module_research.dm +++ b/code/modules/mob/living/silicon/robot/modules/module_research.dm @@ -32,7 +32,6 @@ synths = list( /datum/matter_synth/nanite = 10000 ) - emag = /obj/prefab/hand_teleporter skills = list( SKILL_LITERACY = SKILL_ADEPT, SKILL_FINANCE = SKILL_EXPERT, diff --git a/code/modules/modular_computers/networking/device_types/_network_device.dm b/code/modules/modular_computers/networking/device_types/_network_device.dm index 71a3eb7c1e78..292b7c9b0c87 100644 --- a/code/modules/modular_computers/networking/device_types/_network_device.dm +++ b/code/modules/modular_computers/networking/device_types/_network_device.dm @@ -394,29 +394,29 @@ /datum/extension/network_device/proc/sanitize_command_args(command_args, var_type) // First check if the command is a list; if it is, only accept it if the expected type is a list. if(islist(command_args)) - if(var_type == IC_FORMAT_LIST) + if(var_type == VAR_FORMAT_LIST) return command_args else return null switch(var_type) - if(IC_FORMAT_ANY) + if(VAR_FORMAT_ANY) return command_args - if(IC_FORMAT_STRING) + if(VAR_FORMAT_STRING) return "[command_args]" - if(IC_FORMAT_CHAR) + if(VAR_FORMAT_CHAR) if(istext(command_args) && length(command_args) == 1) return command_args - if(IC_FORMAT_COLOR) + if(VAR_FORMAT_COLOR) return sanitize_hexcolor(command_args, null) - if(IC_FORMAT_NUMBER, IC_FORMAT_INDEX) + if(VAR_FORMAT_NUMBER, VAR_FORMAT_INDEX) if(istext(command_args)) return text2num(command_args) if(isnum(command_args)) return command_args - if(IC_FORMAT_DIR) + if(VAR_FORMAT_DIR) if(istext(command_args)) return text2dir(command_args) - if(IC_FORMAT_BOOLEAN) + if(VAR_FORMAT_BOOLEAN) if(istext(command_args)) switch(uppertext(command_args)) if("TRUE") diff --git a/code/unit_tests/json.dm b/code/unit_tests/json.dm index 1ac8aa5cb571..f08cbbf6c7ed 100644 --- a/code/unit_tests/json.dm +++ b/code/unit_tests/json.dm @@ -31,12 +31,10 @@ /datum/unit_test/atoms_should_use_valid_json name = "JSON: Atoms using JSON should have valid JSON values" -/datum/unit_test/atoms_should_use_valid_json/start_test() - // Tried doing this with a list, but accessing initial vars is noodly - // without an object instance so I'm being slack and hardcoding it. - var/list/failures +// This exists so that modpacks can easily add their own JSON tests. +// TODO: declize this or something +/datum/unit_test/atoms_should_use_valid_json/proc/get_json_to_check() var/list/json_to_check - for(var/atom/movable/subtype as anything in typesof(/obj)) if(TYPE_IS_ABSTRACT(subtype)) continue @@ -82,12 +80,13 @@ var/check_json = quad_bodytype.riding_offset if(istext(check_json)) LAZYSET(json_to_check, "[quad_bodytype_path].riding_offset", check_json) - var/list/prefabs = decls_repository.get_decls_of_subtype(/decl/prefab/ic_assembly) - for(var/assembly_path in prefabs) - var/decl/prefab/ic_assembly/assembly = prefabs[assembly_path] - var/check_json = assembly.data - if(!isnull(check_json)) - LAZYSET(json_to_check, "[assembly_path].data", check_json) + return json_to_check + +/datum/unit_test/atoms_should_use_valid_json/start_test() + // Tried doing this with a list, but accessing initial vars is noodly + // without an object instance so I'm being slack and hardcoding it. + var/list/failures + var/list/json_to_check = get_json_to_check() // Validate JSON. for(var/check_key in json_to_check) try diff --git a/maps/__map_modpack_compatibility.dm b/maps/__map_modpack_compatibility.dm index 288644f46e27..27024354094b 100644 --- a/maps/__map_modpack_compatibility.dm +++ b/maps/__map_modpack_compatibility.dm @@ -22,4 +22,6 @@ } /// This spawner is used to optionally spawn the aliumizer if the random aliens modpack is included. -OPTIONAL_SPAWNER(aliumizer, null) \ No newline at end of file +OPTIONAL_SPAWNER(aliumizer, null) +/// This spawner is used to optionally spawn the hand teleporter if the integrated electronics modpack is included. +OPTIONAL_SPAWNER(hand_tele, null) // todo: add a non-prefab hand tele variant for use without the modpack? \ No newline at end of file diff --git a/maps/antag_spawn/ert/ert_base.dmm b/maps/antag_spawn/ert/ert_base.dmm index 445cad5e6ae8..331f3bca8288 100644 --- a/maps/antag_spawn/ert/ert_base.dmm +++ b/maps/antag_spawn/ert/ert_base.dmm @@ -1340,7 +1340,7 @@ /area/map_template/rescue_base/base) "dE" = ( /obj/structure/table/reinforced, -/obj/prefab/hand_teleporter, +/obj/abstract/modpack_compat/hand_tele, /turf/unsimulated/floor/vault, /area/map_template/rescue_base/base) "dF" = ( diff --git a/maps/away/unishi/unishi.dm b/maps/away/unishi/unishi.dm index bb5d0d2d9572..9876826f1ff6 100644 --- a/maps/away/unishi/unishi.dm +++ b/maps/away/unishi/unishi.dm @@ -1,5 +1,6 @@ #include "unishi_areas.dm" #include "unishi_jobs.dm" +#include "../../../mods/content/integrated_electronics/_integrated_electronics.dme" // this is used for just one prop, todo: remove? #include "../../../mods/content/xenobiology/_xenobiology.dme" #include "../../../mods/content/supermatter/_supermatter.dme" #include "../../../mods/content/beekeeping/_beekeeping.dme" diff --git a/maps/exodus/exodus-2.dmm b/maps/exodus/exodus-2.dmm index c83892c7fd92..83affb57b561 100644 --- a/maps/exodus/exodus-2.dmm +++ b/maps/exodus/exodus-2.dmm @@ -39141,7 +39141,7 @@ /area/exodus/turret_protected/ai_cyborg_station) "bEE" = ( /obj/structure/table, -/obj/prefab/hand_teleporter, +/obj/abstract/prefab/hand_teleporter, /obj/machinery/light, /obj/machinery/atmospherics/unary/vent_scrubber/on{ dir = 1 diff --git a/maps/exodus/exodus.dm b/maps/exodus/exodus.dm index 676c84a62503..5a5d207d3c62 100644 --- a/maps/exodus/exodus.dm +++ b/maps/exodus/exodus.dm @@ -8,6 +8,7 @@ #include "../../mods/content/blob/_blob.dme" #include "../../mods/content/corporate/_corporate.dme" #include "../../mods/content/government/_government.dme" + #include "../../mods/content/integrated_electronics/_integrated_electronics.dme" #include "../../mods/content/matchmaking/_matchmaking.dme" #include "../../mods/content/modern_earth/_modern_earth.dme" #include "../../mods/content/mouse_highlights/_mouse_highlight.dme" diff --git a/maps/ministation/ministation.dm b/maps/ministation/ministation.dm index 9c62ac3bdccf..87ebbd49b8d8 100644 --- a/maps/ministation/ministation.dm +++ b/maps/ministation/ministation.dm @@ -24,6 +24,7 @@ Twice... #include "../../mods/content/blob/_blob.dme" #include "../../mods/content/corporate/_corporate.dme" #include "../../mods/content/government/_government.dme" + #include "../../mods/content/integrated_electronics/_integrated_electronics.dme" #include "../../mods/content/matchmaking/_matchmaking.dme" #include "../../mods/content/modern_earth/_modern_earth.dme" #include "../../mods/content/mouse_highlights/_mouse_highlight.dme" diff --git a/maps/modpack_testing/modpack_testing.dm b/maps/modpack_testing/modpack_testing.dm index 0c77a158eb9f..52d46b1e1396 100644 --- a/maps/modpack_testing/modpack_testing.dm +++ b/maps/modpack_testing/modpack_testing.dm @@ -18,6 +18,7 @@ #include "../../mods/content/generic_shuttles/_generic_shuttles.dme" #include "../../mods/content/government/_government.dme" #include "../../mods/content/inertia/_inertia.dme" + #include "../../mods/content/integrated_electronics/_integrated_electronics.dme" #include "../../mods/content/item_sharpening/_item_sharpening.dme" #include "../../mods/content/matchmaking/_matchmaking.dme" #include "../../mods/content/modern_earth/_modern_earth.dme" diff --git a/maps/tradeship/tradeship.dm b/maps/tradeship/tradeship.dm index ec261eac45aa..95820435eef9 100644 --- a/maps/tradeship/tradeship.dm +++ b/maps/tradeship/tradeship.dm @@ -21,6 +21,7 @@ #include "../../mods/content/corporate/_corporate.dme" #include "../../mods/content/dungeon_loot/_dungeon_loot.dme" #include "../../mods/content/government/_government.dme" + #include "../../mods/content/integrated_electronics/_integrated_electronics.dme" #include "../../mods/content/matchmaking/_matchmaking.dme" #include "../../mods/content/modern_earth/_modern_earth.dme" #include "../../mods/content/mouse_highlights/_mouse_highlight.dme" diff --git a/maps/~mapsystem/maps_antagonism.dm b/maps/~mapsystem/maps_antagonism.dm index b2a1741eaa16..db59a1035aee 100644 --- a/maps/~mapsystem/maps_antagonism.dm +++ b/maps/~mapsystem/maps_antagonism.dm @@ -1,7 +1,6 @@ /datum/map var/list/potential_theft_targets = list( "the captain's antique laser gun" = /obj/item/gun/energy/captain, - "a wormhole generator" = /obj/item/integrated_circuit/manipulation/wormhole, "an RCD" = /obj/item/rcd, "a jetpack" = /obj/item/tank/jetpack, "a captain's jumpsuit" = /obj/item/clothing/jumpsuit/captain, diff --git a/mods/content/dungeon_loot/subtypes/maint.dm b/mods/content/dungeon_loot/subtypes/maint.dm index dd04faa5a42f..c4a3d31a6bed 100644 --- a/mods/content/dungeon_loot/subtypes/maint.dm +++ b/mods/content/dungeon_loot/subtypes/maint.dm @@ -312,7 +312,6 @@ /obj/item/aiModule/reset, /obj/item/stock_parts/smes_coil/super_capacity, /obj/item/stock_parts/smes_coil/super_io, - /obj/item/disk/integrated_circuit/upgrade/advanced, /obj/item/camera/tvcamera, /obj/item/aicard, /obj/item/borg/upgrade/jetpack, diff --git a/code/__defines/integrated_circuits.dm b/mods/content/integrated_electronics/_integrated_electronics.dm similarity index 78% rename from code/__defines/integrated_circuits.dm rename to mods/content/integrated_electronics/_integrated_electronics.dm index a7681271e397..5da63a6e255b 100644 --- a/code/__defines/integrated_circuits.dm +++ b/mods/content/integrated_electronics/_integrated_electronics.dm @@ -1,3 +1,8 @@ +#define IC_TOPIC_UNHANDLED 0 +#define IC_TOPIC_HANDLED 1 +#define IC_TOPIC_REFRESH 2 +#define IC_FLAG_CAN_FIRE 1 + #define IC_INPUT "I" #define IC_OUTPUT "O" #define IC_ACTIVATOR "A" @@ -15,18 +20,7 @@ #define IC_ACTION_COMBAT BITFLAG(1) // If the circuit can cause harm #define IC_ACTION_LONG_RANGE BITFLAG(2) // If the circuit communicate with something outside of the assembly -// Displayed along with the pin name to show what type of pin it is. -#define IC_FORMAT_ANY "\" -#define IC_FORMAT_STRING "\" -#define IC_FORMAT_CHAR "\" -#define IC_FORMAT_COLOR "\" -#define IC_FORMAT_NUMBER "\" -#define IC_FORMAT_DIR "\" -#define IC_FORMAT_BOOLEAN "\" -#define IC_FORMAT_REF "\" -#define IC_FORMAT_LIST "\" -#define IC_FORMAT_INDEX "\" - +// extra format type just for ICs #define IC_FORMAT_PULSE "\" // Used inside input/output list to tell the constructor what pin to make. @@ -46,3 +40,6 @@ // Data limits. #define IC_MAX_LIST_LENGTH 500 + +/decl/modpack/integrated_electronics + name = "Custom Circuits Content" diff --git a/mods/content/integrated_electronics/_integrated_electronics.dme b/mods/content/integrated_electronics/_integrated_electronics.dme new file mode 100644 index 000000000000..7a5c25290367 --- /dev/null +++ b/mods/content/integrated_electronics/_integrated_electronics.dme @@ -0,0 +1,54 @@ +#ifndef CONTENT_PACK_CIRCUITS +#define CONTENT_PACK_CIRCUITS +// BEGIN_INCLUDE +#include "_integrated_electronics.dm" +#include "circuit_serialization.dm" +#include "circuit_tests.dm" +#include "fabricator_designs.dm" +#include "helpers.dm" +#include "overrides.dm" +#include "random.dm" +#include "toggle_circuits_secret.dm" +#include "assemblies\_assemblies.dm" +#include "assemblies\circuit_augment.dm" +#include "components\_integrated_circuit.dm" +#include "components\access.dm" +#include "components\arithmetic.dm" +#include "components\converters.dm" +#include "components\data_transfer.dm" +#include "components\filter.dm" +#include "components\input.dm" +#include "components\lists.dm" +#include "components\logic.dm" +#include "components\manipulation.dm" +#include "components\memory.dm" +#include "components\output.dm" +#include "components\passive.dm" +#include "components\power.dm" +#include "components\power_passive.dm" +#include "components\reagents.dm" +#include "components\smart.dm" +#include "components\time.dm" +#include "components\trig.dm" +#include "pins\_pins.dm" +#include "pins\boolean_pin.dm" +#include "pins\char_pin.dm" +#include "pins\color_pin.dm" +#include "pins\dir_pin.dm" +#include "pins\index_pin.dm" +#include "pins\list_pin.dm" +#include "pins\number_pin.dm" +#include "pins\ref_pin.dm" +#include "pins\string_pin.dm" +#include "prefab\prefab.dm" +#include "prefab\prefabs.dm" +#include "prefab\test\testprefabs.dm" +#include "subsystems\circuit.dm" +#include "subsystems\circuit_component.dm" +#include "tools\analyzer.dm" +#include "tools\debugger.dm" +#include "tools\detailer.dm" +#include "tools\printer.dm" +#include "tools\wirer.dm" +// END_INCLUDE +#endif diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/mods/content/integrated_electronics/assemblies/_assemblies.dm similarity index 98% rename from code/modules/integrated_electronics/core/assemblies.dm rename to mods/content/integrated_electronics/assemblies/_assemblies.dm index 4e784c115474..86339c892428 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/mods/content/integrated_electronics/assemblies/_assemblies.dm @@ -413,7 +413,7 @@ for(var/obj/item/integrated_circuit/input/S in assembly_components) S.attackby_react(used_item, user, user.get_intent()) return ..() - else if(IS_MULTITOOL(used_item) || istype(used_item, /obj/item/integrated_electronics/wirer) || istype(used_item, /obj/item/integrated_electronics/debugger)) + else if(IS_MULTITOOL(used_item) || istype(used_item, /obj/item/wirer) || istype(used_item, /obj/item/debugger)) if(opened) interact(user) return TRUE @@ -442,8 +442,8 @@ to_chat(user, "You slot \the [cell] inside \the [src]'s power supplier.") return TRUE return FALSE - else if(istype(used_item, /obj/item/integrated_electronics/detailer)) - var/obj/item/integrated_electronics/detailer/D = used_item + else if(istype(used_item, /obj/item/detailer)) + var/obj/item/detailer/D = used_item detail_color = D.detail_color update_icon() else if(IS_SCREWDRIVER(used_item)) @@ -543,12 +543,6 @@ desc = "It's a case, for building small electronics with. This one resembles a PDA." slot_flags = SLOT_LOWER_BODY | SLOT_ID -/obj/item/electronic_assembly/augment - name = "augment electronic assembly" - icon_state = "setup_augment" - desc = "It's a case, for building small electronics with. This one is designed to go inside a cybernetic augment." - circuit_flags = IC_FLAG_CAN_FIRE - /obj/item/electronic_assembly/medium name = "electronic mechanism" icon_state = "setup_medium" diff --git a/code/modules/augment/active/circuit.dm b/mods/content/integrated_electronics/assemblies/circuit_augment.dm similarity index 79% rename from code/modules/augment/active/circuit.dm rename to mods/content/integrated_electronics/assemblies/circuit_augment.dm index a6a86bd6ad61..cc3b522aa6ee 100644 --- a/code/modules/augment/active/circuit.dm +++ b/mods/content/integrated_electronics/assemblies/circuit_augment.dm @@ -1,3 +1,9 @@ +/obj/item/electronic_assembly/augment + name = "augment electronic assembly" + icon_state = "setup_augment" + desc = "It's a case, for building small electronics with. This one is designed to go inside a cybernetic augment." + circuit_flags = IC_FLAG_CAN_FIRE + /obj/item/organ/internal/augment/active/simple/circuit name = "integrated circuit frame" action_button_name = "Activate Circuit" @@ -6,7 +12,7 @@ holding = null //We must get the holding item externally //Limited to robolimbs augment_flags = AUGMENTATION_MECHANIC - desc = "A DIY modular assembly. Circuitry not included" + desc = "A DIY modular assembly. Circuitry not included." material = /decl/material/solid/metal/steel origin_tech = @'{"materials":1,"magnets":1,"engineering":1,"programming":2}' diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/mods/content/integrated_electronics/circuit_serialization.dm similarity index 100% rename from code/modules/integrated_electronics/core/saved_circuits.dm rename to mods/content/integrated_electronics/circuit_serialization.dm diff --git a/code/unit_tests/integrated_circuits.dm b/mods/content/integrated_electronics/circuit_tests.dm similarity index 91% rename from code/unit_tests/integrated_circuits.dm rename to mods/content/integrated_electronics/circuit_tests.dm index 84de2ac2ff34..8188d49a3010 100644 --- a/code/unit_tests/integrated_circuits.dm +++ b/mods/content/integrated_electronics/circuit_tests.dm @@ -121,4 +121,15 @@ all_expected_outputs = list(list(5,null,null,null),list(null,6,null,null),list(null,null,7,null),list(null,null,null,8)) circuit_type = /obj/item/integrated_circuit/transfer/demultiplexer/medium -#undef IC_TEST_ANY_OUTPUT \ No newline at end of file +#undef IC_TEST_ANY_OUTPUT + +// Check prefab json. +/datum/unit_test/atoms_should_use_valid_json/get_json_to_check() + var/list/json_to_check = ..() + var/list/prefabs = decls_repository.get_decls_of_subtype(/decl/prefab/ic_assembly) + for(var/assembly_path in prefabs) + var/decl/prefab/ic_assembly/assembly = prefabs[assembly_path] + var/check_json = assembly.data + if(!isnull(check_json)) + LAZYSET(json_to_check, "[assembly_path].data", check_json) + return json_to_check \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/mods/content/integrated_electronics/components/_integrated_circuit.dm similarity index 98% rename from code/modules/integrated_electronics/core/integrated_circuit.dm rename to mods/content/integrated_electronics/components/_integrated_circuit.dm index fe377c2824e9..454b80a3b6ae 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/mods/content/integrated_electronics/components/_integrated_circuit.dm @@ -253,7 +253,7 @@ a creative player the means to solve many problems. Circuits are held inside an if(href_list["link"]) linked = locate(href_list["link"]) in pin.linked - if(istype(held_item, /obj/item/integrated_electronics)) + if(istype(held_item, /obj/item/wirer) || istype(held_item, /obj/item/debugger)) pin.handle_wire(linked, held_item, href_list["act"], usr) . = IC_TOPIC_REFRESH else @@ -263,8 +263,8 @@ a creative player the means to solve many problems. Circuits are held inside an assembly.add_allowed_scanner(usr.ckey) else if(href_list["scan"]) - if(istype(held_item, /obj/item/integrated_electronics/debugger)) - var/obj/item/integrated_electronics/debugger/D = held_item + if(istype(held_item, /obj/item/debugger)) + var/obj/item/debugger/D = held_item if(D.accepting_refs) D.afterattack(src, usr, TRUE) . = IC_TOPIC_REFRESH diff --git a/code/modules/integrated_electronics/subtypes/access.dm b/mods/content/integrated_electronics/components/access.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/access.dm rename to mods/content/integrated_electronics/components/access.dm diff --git a/code/modules/integrated_electronics/subtypes/arithmetic.dm b/mods/content/integrated_electronics/components/arithmetic.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/arithmetic.dm rename to mods/content/integrated_electronics/components/arithmetic.dm diff --git a/code/modules/integrated_electronics/subtypes/converters.dm b/mods/content/integrated_electronics/components/converters.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/converters.dm rename to mods/content/integrated_electronics/components/converters.dm diff --git a/code/modules/integrated_electronics/subtypes/data_transfer.dm b/mods/content/integrated_electronics/components/data_transfer.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/data_transfer.dm rename to mods/content/integrated_electronics/components/data_transfer.dm diff --git a/code/modules/integrated_electronics/subtypes/filter.dm b/mods/content/integrated_electronics/components/filter.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/filter.dm rename to mods/content/integrated_electronics/components/filter.dm diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/mods/content/integrated_electronics/components/input.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/input.dm rename to mods/content/integrated_electronics/components/input.dm diff --git a/code/modules/integrated_electronics/subtypes/lists.dm b/mods/content/integrated_electronics/components/lists.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/lists.dm rename to mods/content/integrated_electronics/components/lists.dm diff --git a/code/modules/integrated_electronics/subtypes/logic.dm b/mods/content/integrated_electronics/components/logic.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/logic.dm rename to mods/content/integrated_electronics/components/logic.dm diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/mods/content/integrated_electronics/components/manipulation.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/manipulation.dm rename to mods/content/integrated_electronics/components/manipulation.dm diff --git a/code/modules/integrated_electronics/subtypes/memory.dm b/mods/content/integrated_electronics/components/memory.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/memory.dm rename to mods/content/integrated_electronics/components/memory.dm diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/mods/content/integrated_electronics/components/output.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/output.dm rename to mods/content/integrated_electronics/components/output.dm diff --git a/code/modules/integrated_electronics/passive/passive.dm b/mods/content/integrated_electronics/components/passive.dm similarity index 54% rename from code/modules/integrated_electronics/passive/passive.dm rename to mods/content/integrated_electronics/components/passive.dm index 02f03d48d7c4..9f635f56cc84 100644 --- a/code/modules/integrated_electronics/passive/passive.dm +++ b/mods/content/integrated_electronics/components/passive.dm @@ -1,4 +1,4 @@ -// 'Passive' components do not have any pins, and instead contribute in some form to the assembly holding them. +// 'Passive' components do not have any inputs, and instead contribute in some form to the assembly holding them. /obj/item/integrated_circuit/passive inputs = list() outputs = list() diff --git a/code/modules/integrated_electronics/subtypes/power.dm b/mods/content/integrated_electronics/components/power.dm similarity index 99% rename from code/modules/integrated_electronics/subtypes/power.dm rename to mods/content/integrated_electronics/components/power.dm index 527e9f751eb0..15e7214f6f34 100644 --- a/code/modules/integrated_electronics/subtypes/power.dm +++ b/mods/content/integrated_electronics/components/power.dm @@ -1,4 +1,4 @@ -/obj/item/integrated_circuit/power/ +/obj/item/integrated_circuit/power category_text = "Power - Active" /obj/item/integrated_circuit/power/transmitter diff --git a/code/modules/integrated_electronics/passive/power.dm b/mods/content/integrated_electronics/components/power_passive.dm similarity index 99% rename from code/modules/integrated_electronics/passive/power.dm rename to mods/content/integrated_electronics/components/power_passive.dm index 69ae5bae034c..f33dab219d4d 100644 --- a/code/modules/integrated_electronics/passive/power.dm +++ b/mods/content/integrated_electronics/components/power_passive.dm @@ -92,7 +92,6 @@ ethanol, nutriment, and blood in order of decreasing efficiency. It will consume fuel only if the battery can take more energy." atom_flags = ATOM_FLAG_OPEN_CONTAINER complexity = 4 - inputs = list() outputs = list("volume used" = IC_PINTYPE_NUMBER, "self reference" = IC_PINTYPE_REF) activators = list("push ref" = IC_PINTYPE_PULSE_IN) spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/mods/content/integrated_electronics/components/reagents.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/reagents.dm rename to mods/content/integrated_electronics/components/reagents.dm diff --git a/code/modules/integrated_electronics/subtypes/smart.dm b/mods/content/integrated_electronics/components/smart.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/smart.dm rename to mods/content/integrated_electronics/components/smart.dm diff --git a/code/modules/integrated_electronics/subtypes/time.dm b/mods/content/integrated_electronics/components/time.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/time.dm rename to mods/content/integrated_electronics/components/time.dm diff --git a/code/modules/integrated_electronics/subtypes/trig.dm b/mods/content/integrated_electronics/components/trig.dm similarity index 100% rename from code/modules/integrated_electronics/subtypes/trig.dm rename to mods/content/integrated_electronics/components/trig.dm diff --git a/mods/content/integrated_electronics/fabricator_designs.dm b/mods/content/integrated_electronics/fabricator_designs.dm new file mode 100644 index 000000000000..2018e9d5bae0 --- /dev/null +++ b/mods/content/integrated_electronics/fabricator_designs.dm @@ -0,0 +1,20 @@ +/datum/fabricator_recipe/tool/int_wirer + path = /obj/item/wirer + +/datum/fabricator_recipe/tool/int_debugger + path = /obj/item/debugger + +/datum/fabricator_recipe/tool/int_analyzer + path = /obj/item/analyzer + +/datum/fabricator_recipe/protolathe/integrated_printer + path = /obj/item/integrated_circuit_printer + +/datum/fabricator_recipe/protolathe/integrated_printer_upgrade_advanced + path = /obj/item/disk/integrated_circuit/upgrade/advanced + +/datum/fabricator_recipe/protolathe/integrated_printer_upgrade_clone + path = /obj/item/disk/integrated_circuit/upgrade/clone + +/datum/fabricator_recipe/robotics/augment/circuit + path = /obj/item/organ/internal/augment/active/simple/circuit diff --git a/code/modules/integrated_electronics/core/helpers.dm b/mods/content/integrated_electronics/helpers.dm similarity index 100% rename from code/modules/integrated_electronics/core/helpers.dm rename to mods/content/integrated_electronics/helpers.dm diff --git a/mods/content/integrated_electronics/overrides.dm b/mods/content/integrated_electronics/overrides.dm new file mode 100644 index 000000000000..f6fae6639ac8 --- /dev/null +++ b/mods/content/integrated_electronics/overrides.dm @@ -0,0 +1,12 @@ +// Allows the detailer to be used to set data cards' detail color, in addition to the paint sprayer. +/obj/item/card/data/attackby(obj/item/used_item, mob/user) + if(istype(used_item, /obj/item/detailer)) + var/obj/item/detailer/D = used_item + detail_color = D.detail_color + update_icon() + return TRUE + return ..() + +// Gives the research borg a hand tele. +/obj/item/robot_module/research + emag = /obj/abstract/prefab/hand_teleporter \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/pins.dm b/mods/content/integrated_electronics/pins/_pins.dm similarity index 95% rename from code/modules/integrated_electronics/core/pins.dm rename to mods/content/integrated_electronics/pins/_pins.dm index 14d5b38e1bfd..08f9194f2ca7 100644 --- a/code/modules/integrated_electronics/core/pins.dm +++ b/mods/content/integrated_electronics/pins/_pins.dm @@ -87,7 +87,7 @@ D [1]/ || return "(\[pulse\])" /datum/integrated_io/proc/display_pin_type() - return IC_FORMAT_ANY + return VAR_FORMAT_ANY /datum/integrated_io/activate/display_pin_type() return IC_FORMAT_PULSE @@ -105,16 +105,16 @@ D [1]/ || push_data() /datum/integrated_io/proc/handle_wire(datum/integrated_io/linked_pin, obj/item/tool, action, mob/living/user) - if(istype(tool, /obj/item/integrated_electronics/wirer)) - var/obj/item/integrated_electronics/wirer/wirer = tool + if(istype(tool, /obj/item/wirer)) + var/obj/item/wirer/wirer = tool if(linked_pin) wirer.wire(linked_pin, user) else wirer.wire(src, user) return TRUE - else if(istype(tool, /obj/item/integrated_electronics/debugger)) - var/obj/item/integrated_electronics/debugger/debugger = tool + else if(istype(tool, /obj/item/debugger)) + var/obj/item/debugger/debugger = tool debugger.write_data(src, user) return TRUE diff --git a/code/modules/integrated_electronics/core/special_pins/boolean_pin.dm b/mods/content/integrated_electronics/pins/boolean_pin.dm similarity index 96% rename from code/modules/integrated_electronics/core/special_pins/boolean_pin.dm rename to mods/content/integrated_electronics/pins/boolean_pin.dm index da59434b6534..b775aa9f8f89 100644 --- a/code/modules/integrated_electronics/core/special_pins/boolean_pin.dm +++ b/mods/content/integrated_electronics/pins/boolean_pin.dm @@ -18,7 +18,7 @@ push_data() /datum/integrated_io/boolean/display_pin_type() - return IC_FORMAT_BOOLEAN + return VAR_FORMAT_BOOLEAN /datum/integrated_io/boolean/display_data(var/input) if(data) diff --git a/code/modules/integrated_electronics/core/special_pins/char_pin.dm b/mods/content/integrated_electronics/pins/char_pin.dm similarity index 97% rename from code/modules/integrated_electronics/core/special_pins/char_pin.dm rename to mods/content/integrated_electronics/pins/char_pin.dm index 20f4190c71a2..0ab9a1c0f231 100644 --- a/code/modules/integrated_electronics/core/special_pins/char_pin.dm +++ b/mods/content/integrated_electronics/pins/char_pin.dm @@ -25,4 +25,4 @@ push_data() /datum/integrated_io/char/display_pin_type() - return IC_FORMAT_CHAR + return VAR_FORMAT_CHAR diff --git a/code/modules/integrated_electronics/core/special_pins/color_pin.dm b/mods/content/integrated_electronics/pins/color_pin.dm similarity index 98% rename from code/modules/integrated_electronics/core/special_pins/color_pin.dm rename to mods/content/integrated_electronics/pins/color_pin.dm index f7543de2f40b..39935b40ce14 100644 --- a/code/modules/integrated_electronics/core/special_pins/color_pin.dm +++ b/mods/content/integrated_electronics/pins/color_pin.dm @@ -35,7 +35,7 @@ push_data() /datum/integrated_io/color/display_pin_type() - return IC_FORMAT_COLOR + return VAR_FORMAT_COLOR /datum/integrated_io/color/display_data(var/input) if(!isnull(data)) diff --git a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm b/mods/content/integrated_electronics/pins/dir_pin.dm similarity index 97% rename from code/modules/integrated_electronics/core/special_pins/dir_pin.dm rename to mods/content/integrated_electronics/pins/dir_pin.dm index 552479163590..d850514d2e74 100644 --- a/code/modules/integrated_electronics/core/special_pins/dir_pin.dm +++ b/mods/content/integrated_electronics/pins/dir_pin.dm @@ -23,7 +23,7 @@ holder.on_data_written() /datum/integrated_io/dir/display_pin_type() - return IC_FORMAT_DIR + return VAR_FORMAT_DIR /datum/integrated_io/dir/display_data(var/input) if(!isnull(data)) diff --git a/code/modules/integrated_electronics/core/special_pins/index_pin.dm b/mods/content/integrated_electronics/pins/index_pin.dm similarity index 96% rename from code/modules/integrated_electronics/core/special_pins/index_pin.dm rename to mods/content/integrated_electronics/pins/index_pin.dm index e904c4c6d00e..e0820c1888b3 100644 --- a/code/modules/integrated_electronics/core/special_pins/index_pin.dm +++ b/mods/content/integrated_electronics/pins/index_pin.dm @@ -18,4 +18,4 @@ holder.on_data_written() /datum/integrated_io/index/display_pin_type() - return IC_FORMAT_INDEX + return VAR_FORMAT_INDEX diff --git a/code/modules/integrated_electronics/core/special_pins/list_pin.dm b/mods/content/integrated_electronics/pins/list_pin.dm similarity index 99% rename from code/modules/integrated_electronics/core/special_pins/list_pin.dm rename to mods/content/integrated_electronics/pins/list_pin.dm index 60f7561e46e2..3c032fde965c 100644 --- a/code/modules/integrated_electronics/core/special_pins/list_pin.dm +++ b/mods/content/integrated_electronics/pins/list_pin.dm @@ -120,7 +120,7 @@ holder.on_data_written() /datum/integrated_io/lists/display_pin_type() - return IC_FORMAT_LIST + return VAR_FORMAT_LIST /datum/integrated_io/lists/Topic(href, href_list) if(!holder.check_interactivity(usr)) diff --git a/code/modules/integrated_electronics/core/special_pins/number_pin.dm b/mods/content/integrated_electronics/pins/number_pin.dm similarity index 96% rename from code/modules/integrated_electronics/core/special_pins/number_pin.dm rename to mods/content/integrated_electronics/pins/number_pin.dm index e37eea3d9342..827cb1bec5f6 100644 --- a/code/modules/integrated_electronics/core/special_pins/number_pin.dm +++ b/mods/content/integrated_electronics/pins/number_pin.dm @@ -14,4 +14,4 @@ holder.on_data_written() /datum/integrated_io/number/display_pin_type() - return IC_FORMAT_NUMBER \ No newline at end of file + return VAR_FORMAT_NUMBER \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/special_pins/ref_pin.dm b/mods/content/integrated_electronics/pins/ref_pin.dm similarity index 94% rename from code/modules/integrated_electronics/core/special_pins/ref_pin.dm rename to mods/content/integrated_electronics/pins/ref_pin.dm index 461965f254bc..b3f73205a715 100644 --- a/code/modules/integrated_electronics/core/special_pins/ref_pin.dm +++ b/mods/content/integrated_electronics/pins/ref_pin.dm @@ -11,4 +11,4 @@ holder.on_data_written() /datum/integrated_io/ref/display_pin_type() - return IC_FORMAT_REF \ No newline at end of file + return VAR_FORMAT_REF \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/special_pins/string_pin.dm b/mods/content/integrated_electronics/pins/string_pin.dm similarity index 97% rename from code/modules/integrated_electronics/core/special_pins/string_pin.dm rename to mods/content/integrated_electronics/pins/string_pin.dm index 30403c4bccc5..7b44e6951a5c 100644 --- a/code/modules/integrated_electronics/core/special_pins/string_pin.dm +++ b/mods/content/integrated_electronics/pins/string_pin.dm @@ -25,4 +25,4 @@ push_data() /datum/integrated_io/string/display_pin_type() - return IC_FORMAT_STRING + return VAR_FORMAT_STRING diff --git a/code/modules/integrated_electronics/core/prefab/prefab.dm b/mods/content/integrated_electronics/prefab/prefab.dm similarity index 91% rename from code/modules/integrated_electronics/core/prefab/prefab.dm rename to mods/content/integrated_electronics/prefab/prefab.dm index 7cc153f10a1c..ae769b301a79 100644 --- a/code/modules/integrated_electronics/core/prefab/prefab.dm +++ b/mods/content/integrated_electronics/prefab/prefab.dm @@ -25,15 +25,15 @@ return assembly return null -/obj/prefab +/obj/abstract/prefab name = "prefab spawn" icon = 'icons/misc/mark.dmi' icon_state = "X" color = COLOR_PURPLE - abstract_type = /obj/prefab + abstract_type = /obj/abstract/prefab var/prefab_type -/obj/prefab/Initialize() +/obj/abstract/prefab/Initialize() ..() if(loc) var/decl/prefab/prefab = GET_DECL(prefab_type) diff --git a/code/modules/integrated_electronics/core/prefab/prefabs.dm b/mods/content/integrated_electronics/prefab/prefabs.dm similarity index 72% rename from code/modules/integrated_electronics/core/prefab/prefabs.dm rename to mods/content/integrated_electronics/prefab/prefabs.dm index 0efa5181a661..41d1d8b8b4a1 100644 --- a/code/modules/integrated_electronics/core/prefab/prefabs.dm +++ b/mods/content/integrated_electronics/prefab/prefabs.dm @@ -3,6 +3,8 @@ data = @'{"assembly":{"type":"type-a electronic mechanism","name":"Hand Teleporter", "detail_color":"#5d99be"},"components":[{"type":"teleporter locator"},{"type":"wormhole generator"},{"type":"button","name":"Open Wormhole"}],"wires":[[[1,"O",1],[2,"I",1]],[[2,"A",1],[3,"A",1]]]}' power_cell_type = /obj/item/cell/hyper -/obj/prefab/hand_teleporter +/obj/abstract/prefab/hand_teleporter name = "hand teleporter" - prefab_type = /decl/prefab/ic_assembly/hand_teleporter \ No newline at end of file + prefab_type = /decl/prefab/ic_assembly/hand_teleporter + +OPTIONAL_SPAWNER(hand_tele, /obj/abstract/prefab/hand_teleporter) \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/prefab/test/testprefabs.dm b/mods/content/integrated_electronics/prefab/test/testprefabs.dm similarity index 97% rename from code/modules/integrated_electronics/core/prefab/test/testprefabs.dm rename to mods/content/integrated_electronics/prefab/test/testprefabs.dm index c045f16f4a65..983536b1c873 100644 --- a/code/modules/integrated_electronics/core/prefab/test/testprefabs.dm +++ b/mods/content/integrated_electronics/prefab/test/testprefabs.dm @@ -3,6 +3,6 @@ data = @'{"assembly":{"type":"type-c electronic machine"},"components":[{"type":"starter"},{"type":"reagent funnel"},{"type":"big reagent storage"},{"type":"reagent pump","name":"Hot Pump","inputs":[[3,0,5]]},{"type":"reagent pump","name":"Cool Pump","inputs":[[3,0,5]]},{"type":"reagent heater","name":"Heater","inputs":[[1,0,80]]},{"type":"reagent cooler","name":"Cooler","inputs":[[1,0,-50]]},{"type":"button","name":"Heat And Cool"},{"type":"and gate","name":"Heater Active Check","inputs":[[1,0,0],[2,0,1]]},{"type":"and gate","name":"Cooler Active Check","inputs":[[1,0,0],[2,0,1]]},{"type":"custom delay circuit","name":"Heater Delay","inputs":[[1,0,100]]},{"type":"custom delay circuit","name":"Cooler Delay","inputs":[[1,0,100]]}],"wires":[[[1,"A",1],[3,"A",1]],[[1,"A",1],[6,"A",3]],[[1,"A",1],[7,"A",3]],[[2,"I",1],[3,"O",2]],[[3,"O",2],[4,"I",1]],[[3,"O",2],[5,"I",1]],[[4,"I",2],[6,"O",4]],[[4,"A",1],[8,"A",1]],[[4,"A",2],[6,"A",1]],[[5,"I",2],[7,"O",4]],[[5,"A",1],[8,"A",1]],[[5,"A",2],[7,"A",1]],[[6,"O",3],[9,"I",1]],[[6,"A",1],[11,"A",2]],[[6,"A",2],[9,"A",1]],[[7,"O",3],[10,"I",1]],[[7,"A",1],[12,"A",2]],[[7,"A",2],[10,"A",1]],[[9,"A",2],[11,"A",1]],[[10,"A",2],[12,"A",1]]]}' power_cell_type = /obj/item/cell/hyper -/obj/prefab/test_heatcool +/obj/abstract/prefab/test_heatcool name = "heating-cooling test" prefab_type = /decl/prefab/ic_assembly/test_heatercooler diff --git a/mods/content/integrated_electronics/random.dm b/mods/content/integrated_electronics/random.dm new file mode 100644 index 000000000000..34f557071fb4 --- /dev/null +++ b/mods/content/integrated_electronics/random.dm @@ -0,0 +1,4 @@ +/obj/random_multi/single_item/hand_tele + name = "Multi Point - Hand Teleporter" + id = "Hand teleporter" + item_path = /obj/abstract/prefab/hand_teleporter \ No newline at end of file diff --git a/code/controllers/subsystems/processing/circuit.dm b/mods/content/integrated_electronics/subsystems/circuit.dm similarity index 93% rename from code/controllers/subsystems/processing/circuit.dm rename to mods/content/integrated_electronics/subsystems/circuit.dm index 4151434dfe61..ccc6d5356e99 100644 --- a/code/controllers/subsystems/processing/circuit.dm +++ b/mods/content/integrated_electronics/subsystems/circuit.dm @@ -50,10 +50,10 @@ PROCESSING_SUBSYSTEM_DEF(circuit) circuit_fabricator_recipe_list["Assemblies"] = subtypesof(/obj/item/electronic_assembly) - list(/obj/item/electronic_assembly/medium, /obj/item/electronic_assembly/large, /obj/item/electronic_assembly/drone, /obj/item/electronic_assembly/wallmount) circuit_fabricator_recipe_list["Tools"] = list( - /obj/item/integrated_electronics/wirer, - /obj/item/integrated_electronics/debugger, - /obj/item/integrated_electronics/analyzer, - /obj/item/integrated_electronics/detailer, + /obj/item/wirer, + /obj/item/debugger, + /obj/item/analyzer, + /obj/item/detailer, /obj/item/card/data, /obj/item/card/data/full_color, /obj/item/card/data/disk diff --git a/code/controllers/subsystems/circuit_component.dm b/mods/content/integrated_electronics/subsystems/circuit_component.dm similarity index 100% rename from code/controllers/subsystems/circuit_component.dm rename to mods/content/integrated_electronics/subsystems/circuit_component.dm diff --git a/code/modules/admin/secrets/admin_secrets/toggle_circuits.dm b/mods/content/integrated_electronics/toggle_circuits_secret.dm similarity index 100% rename from code/modules/admin/secrets/admin_secrets/toggle_circuits.dm rename to mods/content/integrated_electronics/toggle_circuits_secret.dm diff --git a/code/modules/integrated_electronics/core/analyzer.dm b/mods/content/integrated_electronics/tools/analyzer.dm similarity index 83% rename from code/modules/integrated_electronics/core/analyzer.dm rename to mods/content/integrated_electronics/tools/analyzer.dm index ecc918cf4c26..6be5bec11856 100644 --- a/code/modules/integrated_electronics/core/analyzer.dm +++ b/mods/content/integrated_electronics/tools/analyzer.dm @@ -1,15 +1,18 @@ -/obj/item/integrated_electronics/analyzer +/obj/item/analyzer name = "circuit analyzer" desc = "This tool can scan an assembly and generate code necessary to recreate it in a circuit printer." icon = 'icons/obj/assemblies/circuit_analyzer.dmi' icon_state = ICON_STATE_WORLD + obj_flags = OBJ_FLAG_CONDUCTIBLE + w_class = ITEM_SIZE_SMALL + material = /decl/material/solid/metal/aluminium matter = list( /decl/material/solid/metal/steel = MATTER_AMOUNT_REINFORCEMENT, /decl/material/solid/fiberglass = MATTER_AMOUNT_TRACE, /decl/material/solid/organic/plastic = MATTER_AMOUNT_TRACE ) -/obj/item/integrated_electronics/analyzer/afterattack(var/atom/A, var/mob/living/user) +/obj/item/analyzer/afterattack(var/atom/A, var/mob/living/user) . = ..() if(istype(A, /obj/item/electronic_assembly)) var/saved = "[A.name] analyzed! On circuit printers with cloning enabled, you may use the code below to clone the circuit:

[SScircuit.save_electronic_assembly(A)]" diff --git a/code/modules/integrated_electronics/core/debugger.dm b/mods/content/integrated_electronics/tools/debugger.dm similarity index 91% rename from code/modules/integrated_electronics/core/debugger.dm rename to mods/content/integrated_electronics/tools/debugger.dm index 2c74e56a5c9a..32e88b5cfa28 100644 --- a/code/modules/integrated_electronics/core/debugger.dm +++ b/mods/content/integrated_electronics/tools/debugger.dm @@ -1,14 +1,14 @@ -/obj/item/integrated_electronics/debugger +/obj/item/debugger name = "circuit debugger" desc = "This small tool allows one working with custom machinery to directly set data to a specific pin, useful for writing \ settings to specific circuits, or for debugging purposes. It can also pulse activation pins." icon = 'icons/obj/assemblies/electronic_tools.dmi' icon_state = "debugger" - obj_flags = OBJ_FLAG_CONDUCTIBLE item_flags = ITEM_FLAG_NO_BLUDGEON - w_class = ITEM_SIZE_SMALL var/data_to_write = null var/accepting_refs = FALSE + obj_flags = OBJ_FLAG_CONDUCTIBLE + w_class = ITEM_SIZE_SMALL material = /decl/material/solid/metal/aluminium matter = list( /decl/material/solid/metal/steel = MATTER_AMOUNT_REINFORCEMENT, @@ -16,7 +16,7 @@ /decl/material/solid/organic/plastic = MATTER_AMOUNT_TRACE ) -/obj/item/integrated_electronics/debugger/attack_self(mob/user) +/obj/item/debugger/attack_self(mob/user) var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null") var/new_data = null @@ -42,7 +42,7 @@ data_to_write = null to_chat(user, "You set \the [src]'s memory to absolutely nothing.") -/obj/item/integrated_electronics/debugger/afterattack(atom/target, mob/living/user, proximity) +/obj/item/debugger/afterattack(atom/target, mob/living/user, proximity) . = ..() if(accepting_refs && proximity) data_to_write = weakref(target) @@ -51,7 +51,7 @@ now off.") accepting_refs = FALSE -/obj/item/integrated_electronics/debugger/proc/write_data(var/datum/integrated_io/io, mob/user) +/obj/item/debugger/proc/write_data(var/datum/integrated_io/io, mob/user) if(io.io_type == DATA_CHANNEL) io.write_data_to_pin(data_to_write) var/data_to_show = data_to_write diff --git a/code/modules/integrated_electronics/core/detailer.dm b/mods/content/integrated_electronics/tools/detailer.dm similarity index 84% rename from code/modules/integrated_electronics/core/detailer.dm rename to mods/content/integrated_electronics/tools/detailer.dm index 302140e38ce5..fe71e09208d4 100644 --- a/code/modules/integrated_electronics/core/detailer.dm +++ b/mods/content/integrated_electronics/tools/detailer.dm @@ -1,11 +1,14 @@ #define SCAN_COLOR "SCAN" -/obj/item/integrated_electronics/detailer +/obj/item/detailer name = "assembly detailer" desc = "A combination autopainter and flash anodizer designed to give electronic assemblies a colorful, wear-resistant finish." icon = 'icons/obj/assemblies/electronic_tools.dmi' icon_state = "detailer" item_flags = ITEM_FLAG_NO_BLUDGEON + obj_flags = OBJ_FLAG_CONDUCTIBLE + w_class = ITEM_SIZE_SMALL + material = /decl/material/solid/metal/aluminium matter = list( /decl/material/solid/metal/steel = MATTER_AMOUNT_REINFORCEMENT, /decl/material/solid/fiberglass = MATTER_AMOUNT_TRACE, @@ -33,15 +36,15 @@ "\[SCAN FROM ASSEMBLY\]" = SCAN_COLOR ) -/obj/item/integrated_electronics/detailer/Initialize() +/obj/item/detailer/Initialize() .=..() update_icon() -/obj/item/integrated_electronics/detailer/on_update_icon() +/obj/item/detailer/on_update_icon() . = ..() add_overlay(overlay_image('icons/obj/assemblies/electronic_tools.dmi', "detailer-color", detail_color)) -/obj/item/integrated_electronics/detailer/attack_self(mob/user) +/obj/item/detailer/attack_self(mob/user) var/color_choice = input(user, "Select color.", "Assembly Detailer") as null|anything in color_list if(!color_list[color_choice]) return @@ -55,7 +58,7 @@ detail_color = color_list[color_choice] update_icon() -/obj/item/integrated_electronics/detailer/afterattack(atom/target, mob/living/user, proximity) +/obj/item/detailer/afterattack(atom/target, mob/living/user, proximity) . = ..() if(!scanning_color || !proximity) return . @@ -67,5 +70,5 @@ var/obj/item/I = target detail_color = I.get_assembly_detail_color() -/obj/item/integrated_electronics/detailer/get_assembly_detail_color() +/obj/item/detailer/get_assembly_detail_color() return detail_color diff --git a/code/modules/integrated_electronics/core/printer.dm b/mods/content/integrated_electronics/tools/printer.dm similarity index 100% rename from code/modules/integrated_electronics/core/printer.dm rename to mods/content/integrated_electronics/tools/printer.dm diff --git a/code/modules/integrated_electronics/core/wirer.dm b/mods/content/integrated_electronics/tools/wirer.dm similarity index 91% rename from code/modules/integrated_electronics/core/wirer.dm rename to mods/content/integrated_electronics/tools/wirer.dm index 4b0b6749ca3f..365660a1ac58 100644 --- a/code/modules/integrated_electronics/core/wirer.dm +++ b/mods/content/integrated_electronics/tools/wirer.dm @@ -3,13 +3,16 @@ #define UNWIRE "unwire" #define UNWIRING "unwiring" -/obj/item/integrated_electronics/wirer +/obj/item/wirer name = "circuit wirer" desc = "It's a small wiring tool, with a wire roll, electric soldering iron, wire cutter, and more in one package. \ The wires used are generally useful for small electronics, such as circuitboards and breadboards, as opposed to larger wires \ used for power or data transmission." icon = 'icons/obj/assemblies/electronic_tools.dmi' icon_state = "wirer-wire" + obj_flags = OBJ_FLAG_CONDUCTIBLE + w_class = ITEM_SIZE_SMALL + material = /decl/material/solid/metal/aluminium matter = list( /decl/material/solid/metal/steel = MATTER_AMOUNT_REINFORCEMENT, /decl/material/solid/fiberglass = MATTER_AMOUNT_TRACE, @@ -18,11 +21,11 @@ var/datum/integrated_io/selected_io = null var/mode = WIRE -/obj/item/integrated_electronics/wirer/on_update_icon() +/obj/item/wirer/on_update_icon() . = ..() icon_state = "wirer-[mode]" -/obj/item/integrated_electronics/wirer/proc/wire(var/datum/integrated_io/io, mob/user) +/obj/item/wirer/proc/wire(var/datum/integrated_io/io, mob/user) if(!io.holder.assembly) to_chat(user, "\The [io.holder] needs to be secured inside an assembly first.") return @@ -80,7 +83,7 @@ to_chat(user, "\The [selected_io.holder]'s [selected_io.name] and \the [io.holder]'s \ [io.name] are not connected.") -/obj/item/integrated_electronics/wirer/proc/select_io(datum/integrated_io/io) +/obj/item/wirer/proc/select_io(datum/integrated_io/io) if(selected_io) unselect_io(selected_io) selected_io = io @@ -91,7 +94,7 @@ if(WIRE) mode = WIRING -/obj/item/integrated_electronics/wirer/proc/unselect_io(datum/integrated_io/io) +/obj/item/wirer/proc/unselect_io(datum/integrated_io/io) if(selected_io != io) return events_repository.unregister(/decl/observ/destroyed, selected_io, src) @@ -102,7 +105,7 @@ if(WIRING) mode = WIRE -/obj/item/integrated_electronics/wirer/attack_self(mob/user) +/obj/item/wirer/attack_self(mob/user) switch(mode) if(WIRE) mode = UNWIRE diff --git a/mods/content/xenobiology/_xenobiology.dme b/mods/content/xenobiology/_xenobiology.dme index 4057d6b485bd..a2d03305ef6a 100644 --- a/mods/content/xenobiology/_xenobiology.dme +++ b/mods/content/xenobiology/_xenobiology.dme @@ -3,7 +3,6 @@ // BEGIN_INCLUDE #include "_xenobiology.dm" #include "achievement.dm" -#include "circuit.dm" #include "emotes.dm" #include "food.dm" #include "overrides.dm" diff --git a/mods/~compatibility/patches/circuits.dm b/mods/~compatibility/patches/circuits.dm new file mode 100644 index 000000000000..457c3b4f855f --- /dev/null +++ b/mods/~compatibility/patches/circuits.dm @@ -0,0 +1,8 @@ +// Add xenobiology/slimes modpack circuits. +#ifdef CONTENT_PACK_XENOBIO +#include "circuits/xenobio_circuits.dm" +#endif +// Add circuit items to dungeon loot. +#ifdef MODPACK_DUNGEON_LOOT +#include "circuits/loot_circuits.dm" +#endif \ No newline at end of file diff --git a/mods/~compatibility/patches/circuits/loot_circuits.dm b/mods/~compatibility/patches/circuits/loot_circuits.dm new file mode 100644 index 000000000000..671660dbd2ce --- /dev/null +++ b/mods/~compatibility/patches/circuits/loot_circuits.dm @@ -0,0 +1,6 @@ +/obj/structure/loot_pile/maint/technical/get_uncommon_loot() + var/static/injected = FALSE + . = ..() + if(!injected) + . += /obj/item/disk/integrated_circuit/upgrade/advanced + injected = TRUE \ No newline at end of file diff --git a/mods/content/xenobiology/circuit.dm b/mods/~compatibility/patches/circuits/xenobio_circuits.dm similarity index 100% rename from mods/content/xenobiology/circuit.dm rename to mods/~compatibility/patches/circuits/xenobio_circuits.dm diff --git a/mods/~compatibility/~compatibility.dm b/mods/~compatibility/~compatibility.dm index b1c3329ee77a..84f09c182555 100644 --- a/mods/~compatibility/~compatibility.dm +++ b/mods/~compatibility/~compatibility.dm @@ -25,4 +25,8 @@ #ifdef MODPACK_CORPORATE #include "patches/corporate.dm" +#endif + +#ifdef CONTENT_PACK_CIRCUITS +#include "patches/circuits.dm" #endif \ No newline at end of file diff --git a/nebula.dme b/nebula.dme index a897c4435032..3a87fe3149e2 100644 --- a/nebula.dme +++ b/nebula.dme @@ -54,7 +54,6 @@ #include "code\__defines\holomap.dm" #include "code\__defines\hud.dm" #include "code\__defines\hydroponics.dm" -#include "code\__defines\integrated_circuits.dm" #include "code\__defines\intent.dm" #include "code\__defines\interactions.dm" #include "code\__defines\inventory_sizes.dm" @@ -66,6 +65,7 @@ #include "code\__defines\lighting.dm" #include "code\__defines\lists.dm" #include "code\__defines\machinery.dm" +#include "code\__defines\machinery_public_vars.dm" #include "code\__defines\mapping.dm" #include "code\__defines\materials.dm" #include "code\__defines\math_physics.dm" @@ -271,7 +271,6 @@ #include "code\controllers\subsystems\ambience.dm" #include "code\controllers\subsystems\ao.dm" #include "code\controllers\subsystems\atoms.dm" -#include "code\controllers\subsystems\circuit_component.dm" #include "code\controllers\subsystems\configuration.dm" #include "code\controllers\subsystems\daycycle.dm" #include "code\controllers\subsystems\disposals.dm" @@ -333,7 +332,6 @@ #include "code\controllers\subsystems\mob_ai\mob_ai.dm" #include "code\controllers\subsystems\processing\airflow.dm" #include "code\controllers\subsystems\processing\chatter.dm" -#include "code\controllers\subsystems\processing\circuit.dm" #include "code\controllers\subsystems\processing\fast_process.dm" #include "code\controllers\subsystems\processing\graphs.dm" #include "code\controllers\subsystems\processing\mobs.dm" @@ -1688,7 +1686,6 @@ #include "code\modules\admin\secrets\admin_secrets\show_crew_manifest.dm" #include "code\modules\admin\secrets\admin_secrets\show_game_mode.dm" #include "code\modules\admin\secrets\admin_secrets\show_law_changes.dm" -#include "code\modules\admin\secrets\admin_secrets\toggle_circuits.dm" #include "code\modules\admin\secrets\admin_secrets\toggle_overmap_movement.dm" #include "code\modules\admin\secrets\admin_secrets\traitors_and_objectives.dm" #include "code\modules\admin\secrets\debug\toggle_harddel.dm" @@ -1790,7 +1787,6 @@ #include "code\modules\augment\helping_hands.dm" #include "code\modules\augment\simple.dm" #include "code\modules\augment\active\armblades.dm" -#include "code\modules\augment\active\circuit.dm" #include "code\modules\augment\active\cyberbrain.dm" #include "code\modules\augment\active\polytool.dm" #include "code\modules\augment\active\tool\engineering.dm" @@ -2607,48 +2603,6 @@ #include "code\modules\implants\implant_types\tracking.dm" #include "code\modules\implants\implant_types\translator.dm" #include "code\modules\implants\implant_types\uplink.dm" -#include "code\modules\integrated_electronics\_defines.dm" -#include "code\modules\integrated_electronics\core\_electronics.dm" -#include "code\modules\integrated_electronics\core\analyzer.dm" -#include "code\modules\integrated_electronics\core\assemblies.dm" -#include "code\modules\integrated_electronics\core\debugger.dm" -#include "code\modules\integrated_electronics\core\detailer.dm" -#include "code\modules\integrated_electronics\core\helpers.dm" -#include "code\modules\integrated_electronics\core\integrated_circuit.dm" -#include "code\modules\integrated_electronics\core\pins.dm" -#include "code\modules\integrated_electronics\core\printer.dm" -#include "code\modules\integrated_electronics\core\saved_circuits.dm" -#include "code\modules\integrated_electronics\core\wirer.dm" -#include "code\modules\integrated_electronics\core\prefab\prefab.dm" -#include "code\modules\integrated_electronics\core\prefab\prefabs.dm" -#include "code\modules\integrated_electronics\core\prefab\test\testprefabs.dm" -#include "code\modules\integrated_electronics\core\special_pins\boolean_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\char_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\color_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\dir_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\index_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\list_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\number_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\ref_pin.dm" -#include "code\modules\integrated_electronics\core\special_pins\string_pin.dm" -#include "code\modules\integrated_electronics\passive\passive.dm" -#include "code\modules\integrated_electronics\passive\power.dm" -#include "code\modules\integrated_electronics\subtypes\access.dm" -#include "code\modules\integrated_electronics\subtypes\arithmetic.dm" -#include "code\modules\integrated_electronics\subtypes\converters.dm" -#include "code\modules\integrated_electronics\subtypes\data_transfer.dm" -#include "code\modules\integrated_electronics\subtypes\filter.dm" -#include "code\modules\integrated_electronics\subtypes\input.dm" -#include "code\modules\integrated_electronics\subtypes\lists.dm" -#include "code\modules\integrated_electronics\subtypes\logic.dm" -#include "code\modules\integrated_electronics\subtypes\manipulation.dm" -#include "code\modules\integrated_electronics\subtypes\memory.dm" -#include "code\modules\integrated_electronics\subtypes\output.dm" -#include "code\modules\integrated_electronics\subtypes\power.dm" -#include "code\modules\integrated_electronics\subtypes\reagents.dm" -#include "code\modules\integrated_electronics\subtypes\smart.dm" -#include "code\modules\integrated_electronics\subtypes\time.dm" -#include "code\modules\integrated_electronics\subtypes\trig.dm" #include "code\modules\interactions\_interactions.dm" #include "code\modules\interactions\interactions_atom.dm" #include "code\modules\interactions\interactions_reagents.dm" @@ -4066,7 +4020,6 @@ #include "code\unit_tests\fusion_plants.dm" #include "code\unit_tests\graph_tests.dm" #include "code\unit_tests\icon_tests.dm" -#include "code\unit_tests\integrated_circuits.dm" #include "code\unit_tests\items.dm" #include "code\unit_tests\job_tests.dm" #include "code\unit_tests\json.dm" diff --git a/tools/map_migrations/0000_legacy.txt b/tools/map_migrations/0000_legacy.txt index ccac8405c68a..7f3abebba23b 100644 --- a/tools/map_migrations/0000_legacy.txt +++ b/tools/map_migrations/0000_legacy.txt @@ -151,7 +151,7 @@ /obj/effect/decal/remains/@SUBTYPES : /obj/item/remains/@SUBTYPES{@OLD} # Circuit prefabs -/obj/item/hand_tele : /obj/prefab/hand_teleporter{@OLD} +/obj/item/hand_tele : /obj/abstract/prefab/hand_teleporter{@OLD} # Filing cabinets /obj/structure/filingcabinet : /obj/structure/filing_cabinet{@OLD} From ba8899240e48d08eaa091145a826b4716ec1984d Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Tue, 9 Sep 2025 15:29:10 -0400 Subject: [PATCH 12/22] Add map migrations for circuit modpack changes --- tools/map_migrations/5056_circuit_repaths.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tools/map_migrations/5056_circuit_repaths.txt diff --git a/tools/map_migrations/5056_circuit_repaths.txt b/tools/map_migrations/5056_circuit_repaths.txt new file mode 100644 index 000000000000..08bf6ca0318b --- /dev/null +++ b/tools/map_migrations/5056_circuit_repaths.txt @@ -0,0 +1,4 @@ +# PR #5056 removed `/obj/item/integrated_electronics` type +/obj/item/integrated_electronics/@SUBTYPES : /obj/item/@SUBTYPES{@OLD} +# PR #5056 repathed `/obj/prefab` to `/obj/abstract/prefab` +/obj/prefab/@SUBTYPES : /obj/abstract/prefab/@SUBTYPES{@OLD} From aed3446accbc7ada8f4523cee9df043532339e26 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 21:03:53 -0400 Subject: [PATCH 13/22] Implement initial network ID and key on network receivers --- .../machinery/_machines_base/stock_parts/network_lock.dm | 6 ------ .../_machines_base/stock_parts/network_receiver.dm | 9 ++++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/_machines_base/stock_parts/network_lock.dm b/code/game/machinery/_machines_base/stock_parts/network_lock.dm index f3be2c31c429..b3a275a51b6c 100644 --- a/code/game/machinery/_machines_base/stock_parts/network_lock.dm +++ b/code/game/machinery/_machines_base/stock_parts/network_lock.dm @@ -8,8 +8,6 @@ base_type = /obj/item/stock_parts/network_receiver/network_lock var/auto_deny_all // Set this to TRUE to deny all access attempts if network connection is lost. - var/initial_network_id // The address to the network - var/initial_network_key // network KEY var/selected_parent_group // Current selected parent_group for access assignment. var/list/groups // List of lists of groups. In order to access the device, users must have membership in at least one @@ -22,10 +20,6 @@ var/interact_sounds = list("keyboard", "keystroke") var/interact_sound_volume = 40 -/obj/item/stock_parts/network_receiver/network_lock/modify_mapped_vars(map_hash) - ..() - ADJUST_TAG_VAR(initial_network_id, map_hash) - /obj/item/stock_parts/network_receiver/network_lock/emag_act(remaining_charges, mob/user, emag_source) . = ..() if(istype(loc, /obj/machinery)) // Don't emag it outside; you can just cut access without it anyway. diff --git a/code/game/machinery/_machines_base/stock_parts/network_receiver.dm b/code/game/machinery/_machines_base/stock_parts/network_receiver.dm index 1b09080e57c1..aca5dd651908 100644 --- a/code/game/machinery/_machines_base/stock_parts/network_receiver.dm +++ b/code/game/machinery/_machines_base/stock_parts/network_receiver.dm @@ -5,10 +5,17 @@ desc = "A network receiver designed for use with machinery otherwise disconnected from a network." icon_state = "net_lock" part_flags = PART_FLAG_QDEL + var/initial_network_id // The address to the network + var/initial_network_key // network KEY + +/obj/item/stock_parts/network_receiver/network_lock/modify_mapped_vars(map_hash) + ..() + ADJUST_TAG_VAR(initial_network_id, map_hash) + ADJUST_TAG_VAR(initial_network_key, map_hash) /obj/item/stock_parts/network_receiver/Initialize(ml, material_key) . = ..() - set_extension(src, /datum/extension/network_device/stock_part) + set_extension(src, /datum/extension/network_device/stock_part, initial_network_id, initial_network_key) /obj/item/stock_parts/network_receiver/on_install(obj/machinery/machine) . = ..() From 99be960e7e19e42bded1677d91e5e28e1a9e87c4 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 25 Sep 2025 21:04:25 -0400 Subject: [PATCH 14/22] Fix network key not adjusting based on map hash --- .../machinery/_machines_base/stock_parts/network_receiver.dm | 2 +- code/game/objects/items/devices/radio/radio.dm | 5 +++++ code/modules/fabrication/_fabricator.dm | 1 + code/modules/research/design_console.dm | 1 + code/modules/research/design_database.dm | 1 + code/modules/research/design_database_analyzer.dm | 1 + 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/_machines_base/stock_parts/network_receiver.dm b/code/game/machinery/_machines_base/stock_parts/network_receiver.dm index aca5dd651908..b240744fa3d7 100644 --- a/code/game/machinery/_machines_base/stock_parts/network_receiver.dm +++ b/code/game/machinery/_machines_base/stock_parts/network_receiver.dm @@ -8,7 +8,7 @@ var/initial_network_id // The address to the network var/initial_network_key // network KEY -/obj/item/stock_parts/network_receiver/network_lock/modify_mapped_vars(map_hash) +/obj/item/stock_parts/network_receiver/modify_mapped_vars(map_hash) ..() ADJUST_TAG_VAR(initial_network_id, map_hash) ADJUST_TAG_VAR(initial_network_key, map_hash) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 92c10b97b1bb..fd4ef2152a3c 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -95,6 +95,11 @@ if(analog && frequency) analog_radio_connection = radio_controller.add_object(src, frequency, RADIO_CHAT) +/obj/item/radio/modify_mapped_vars(map_hash) + ..() + ADJUST_TAG_VAR(initial_network_id, map_hash) + ADJUST_TAG_VAR(initial_network_key, map_hash) + /obj/item/radio/Initialize() . = ..() wires = new(src) diff --git a/code/modules/fabrication/_fabricator.dm b/code/modules/fabrication/_fabricator.dm index d10d5064bc4f..23123ebfbdbb 100644 --- a/code/modules/fabrication/_fabricator.dm +++ b/code/modules/fabrication/_fabricator.dm @@ -96,6 +96,7 @@ /obj/machinery/fabricator/modify_mapped_vars(map_hash) ..() ADJUST_TAG_VAR(initial_network_id, map_hash) + ADJUST_TAG_VAR(initial_network_key, map_hash) /obj/machinery/fabricator/handle_post_network_connection() ..() diff --git a/code/modules/research/design_console.dm b/code/modules/research/design_console.dm index 5e2e43978ad3..10af9ac6bc97 100644 --- a/code/modules/research/design_console.dm +++ b/code/modules/research/design_console.dm @@ -26,6 +26,7 @@ /obj/machinery/computer/design_console/modify_mapped_vars(map_hash) ..() ADJUST_TAG_VAR(initial_network_id, map_hash) + ADJUST_TAG_VAR(initial_network_key, map_hash) /obj/machinery/computer/design_console/RefreshParts() . = ..() diff --git a/code/modules/research/design_database.dm b/code/modules/research/design_database.dm index 5c5a6b3cc410..bc52c9d40f21 100644 --- a/code/modules/research/design_database.dm +++ b/code/modules/research/design_database.dm @@ -106,6 +106,7 @@ var/global/list/default_initial_tech_levels /obj/machinery/design_database/modify_mapped_vars(map_hash) ..() ADJUST_TAG_VAR(initial_network_id, map_hash) + ADJUST_TAG_VAR(initial_network_key, map_hash) /obj/machinery/design_database/handle_post_network_connection() ..() diff --git a/code/modules/research/design_database_analyzer.dm b/code/modules/research/design_database_analyzer.dm index e4d6d06669d5..6d57b82a0633 100644 --- a/code/modules/research/design_database_analyzer.dm +++ b/code/modules/research/design_database_analyzer.dm @@ -23,6 +23,7 @@ /obj/machinery/destructive_analyzer/modify_mapped_vars(map_hash) ..() ADJUST_TAG_VAR(initial_network_id, map_hash) + ADJUST_TAG_VAR(initial_network_key, map_hash) /obj/machinery/destructive_analyzer/RefreshParts() var/T = 0 From bde57a66fbcdf50bd5d59dcc17d3914d1f39f57a Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 27 Sep 2025 23:22:03 +1000 Subject: [PATCH 15/22] Expanding mob controller handler-directing logic. --- code/datums/ai/_ai.dm | 24 ++++++++++++++++++++++-- code/datums/ai/hunter.dm | 40 ++++++++++++++++++++++------------------ 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/code/datums/ai/_ai.dm b/code/datums/ai/_ai.dm index 9c943dadb4fb..628dc3639b3c 100644 --- a/code/datums/ai/_ai.dm +++ b/code/datums/ai/_ai.dm @@ -2,7 +2,7 @@ * * 1. AI should not implement any bespoke mob logic within the proc it uses * to trigger or respond to game events. It should share entrypoints with - * action performed by players and should respect the same intents, etc. + * actions performed by players and should respect the same intents, etc. * that players have to manage, through the same procs players use. This * should mean that players can be slotted into the pilot seat of any mob, * suspending AI behavior, and should then be able to freely use any of the @@ -79,6 +79,9 @@ /// How long minimum between scans. var/target_scan_delay = 1 SECOND + /// Last mob to attempt to handle this mob. + var/weakref/last_handler + /datum/mob_controller/New(var/mob/living/target_body) body = target_body if(expected_type && !istype(body, expected_type)) @@ -215,4 +218,21 @@ if(!scary_grabber) return if(spooked_by_grab && !is_friend(scary_grabber)) - retaliate(scary_grabber) \ No newline at end of file + retaliate(scary_grabber) + +// General stubs for when another mob has directed this mob to attack. +/datum/mob_controller/proc/check_handler_can_order(mob/handler, atom/target, intent_flags) + return is_friend(handler) + +/datum/mob_controller/proc/process_handler_target(mob/handler, atom/target, intent_flags) + if(!check_handler_can_order(handler, target, intent_flags)) + return process_handler_failure(handler, target) + last_handler = weakref(handler) + return TRUE + +/datum/mob_controller/proc/process_handler_failure(mob/handler, atom/target) + return FALSE + +/datum/mob_controller/proc/process_holder_interaction(mob/handler) + last_handler = weakref(handler) + return body?.attack_hand_with_interaction_checks(handler) diff --git a/code/datums/ai/hunter.dm b/code/datums/ai/hunter.dm index e60294d4a87e..052d012fca3e 100644 --- a/code/datums/ai/hunter.dm +++ b/code/datums/ai/hunter.dm @@ -36,51 +36,55 @@ /datum/mob_controller/passive/hunter/get_target(atom/new_target) if(isnull(hunt_target)) return null - var/mob/living/prey = hunt_target.resolve() + var/atom/prey = hunt_target.resolve() if(!istype(prey) || QDELETED(prey)) set_target(null) return null return prey /datum/mob_controller/passive/hunter/set_target(atom/new_target) - if(isnull(new_target) || isliving(new_target)) - hunt_target = new_target ? weakref(new_target) : null - return TRUE - return FALSE + hunt_target = new_target ? weakref(new_target) : null + return TRUE /datum/mob_controller/passive/hunter/do_process(time_elapsed) - if(!(. = ..())) return - if(body.incapacitated() || body.current_posture?.prone || body.buckled || flee_target || !get_target()) return + process_hunting(get_target()) + +/datum/mob_controller/passive/hunter/proc/process_hunting(atom/target) - var/mob/living/target = get_target() if(!istype(target) || QDELETED(target) || !(target in view(body))) set_target(null) resume_wandering() - return + return FALSE // Find or pursue the target. if(!body.Adjacent(target)) stop_wandering() body.start_automove(target) - return + return FALSE - // Hunt/consume the target. - if(target.stat != DEAD) - try_attack_prey(target) + if(!ismob(target)) + return TRUE // Indicates a valid target that this base proc does not handle. - if(QDELETED(target)) + // Hunt/consume the target. + . = FALSE // we handle mobs already + var/mob/prey = target + if(prey.stat != DEAD && (!is_friend(prey) || !handle_friend_hunting(prey))) + try_attack_prey(prey) + if(QDELETED(prey)) set_target(null) resume_wandering() return - - if(target.stat != DEAD) + if(prey.stat != DEAD) return - // Eat the mob. set_target(null) resume_wandering() - consume_prey(target) + consume_prey(prey) + +// Stub for hawks to return to their handler and dock with the mothership. +/datum/mob_controller/passive/hunter/proc/handle_friend_hunting(mob/friend) + return FALSE From 6dc7aa0bbfa792b9c9b64e0bcab5c8c58686d18d Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 27 Sep 2025 23:22:18 +1000 Subject: [PATCH 16/22] Allowing scooping of mobs to silence messages. --- code/modules/mob/grab/simple/simple_control.dm | 8 ++++---- .../mob/living/simple_animal/hostile/slug.dm | 5 +++-- code/modules/mob_holder/holder_mobs.dm | 18 +++++++++++------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/grab/simple/simple_control.dm b/code/modules/mob/grab/simple/simple_control.dm index 62eb60e27292..bcab5545f070 100644 --- a/code/modules/mob/grab/simple/simple_control.dm +++ b/code/modules/mob/grab/simple/simple_control.dm @@ -38,13 +38,13 @@ // Override these for mobs that will respond to instructions from a rider. /mob/living/proc/handle_rider_harm_order(mob/user, atom/target, proximity) - return FALSE + return istype(ai) ? ai.process_handler_target(user, target, I_FLAG_HARM) : FALSE /mob/living/proc/handle_rider_grab_order(mob/user, atom/target, proximity) - return FALSE + return istype(ai) ? ai.process_handler_target(user, target, I_FLAG_GRAB) : FALSE /mob/living/proc/handle_rider_disarm_order(mob/user, atom/target, proximity) - return FALSE + return istype(ai) ? ai.process_handler_target(user, target, I_FLAG_DISARM) : FALSE /mob/living/proc/handle_rider_help_order(mob/user, atom/target, proximity) - return FALSE + return istype(ai) ? ai.process_handler_target(user, target, I_FLAG_HELP) : FALSE diff --git a/code/modules/mob/living/simple_animal/hostile/slug.dm b/code/modules/mob/living/simple_animal/hostile/slug.dm index 4218f9176bfa..bd2d79349b23 100644 --- a/code/modules/mob/living/simple_animal/hostile/slug.dm +++ b/code/modules/mob/living/simple_animal/hostile/slug.dm @@ -35,10 +35,11 @@ /mob/living/simple_animal/hostile/slug/proc/check_friendly_species(var/mob/living/M) return istype(M) && M.faction == faction -/mob/living/simple_animal/hostile/slug/get_scooped(var/mob/living/target, var/mob/living/initiator) +/mob/living/simple_animal/hostile/slug/get_scooped(mob/living/target, mob/living/initiator, silent = FALSE) if(target == initiator || check_friendly_species(initiator)) return ..() - to_chat(initiator, SPAN_WARNING("\The [src] wriggles out of your hands before you can pick it up!")) + if(!silent) + to_chat(initiator, SPAN_WARNING("\The [src] wriggles out of your hands before you can pick it up!")) /mob/living/simple_animal/hostile/slug/proc/attach(var/mob/living/human/H) var/obj/item/clothing/suit/space/S = H.get_covering_equipped_item_by_zone(BP_CHEST) diff --git a/code/modules/mob_holder/holder_mobs.dm b/code/modules/mob_holder/holder_mobs.dm index ec0527a41edf..f2539c7de24e 100644 --- a/code/modules/mob_holder/holder_mobs.dm +++ b/code/modules/mob_holder/holder_mobs.dm @@ -11,7 +11,7 @@ return species.get_holder_color(src) //Mob procs for scooping up -/mob/living/proc/get_scooped(var/mob/living/target, var/mob/living/initiator) +/mob/living/proc/get_scooped(mob/living/target, mob/living/initiator, silent = FALSE) if(!holder_type || buckled || LAZYLEN(pinned)) return FALSE @@ -23,20 +23,24 @@ H.w_class = get_object_size() if(initiator == src) if(!target.equip_to_slot_if_possible(H, slot_back_str, del_on_fail=0, disable_warning=1)) - to_chat(initiator, SPAN_WARNING("You can't climb onto [target]!")) + if(!silent) + to_chat(initiator, SPAN_WARNING("You can't climb onto [target]!")) return FALSE - to_chat(target, SPAN_NOTICE("\The [src] clambers onto you!")) - to_chat(initiator, SPAN_NOTICE("You climb up onto \the [target]!")) + if(!silent) + to_chat(target, SPAN_NOTICE("\The [src] clambers onto you!")) + to_chat(initiator, SPAN_NOTICE("You climb up onto \the [target]!")) else if(!ai?.scooped_by(initiator)) return FALSE // The AI canceled the scooping. if(!target.put_in_hands(H)) - to_chat(initiator, SPAN_WARNING("Your hands are full!")) + if(!silent) + to_chat(initiator, SPAN_WARNING("Your hands are full!")) return FALSE - to_chat(initiator, SPAN_NOTICE("You scoop up \the [src]!")) - to_chat(src, SPAN_NOTICE("\The [initiator] scoops you up!")) + if(!silent) + to_chat(initiator, SPAN_NOTICE("You scoop up \the [src]!")) + to_chat(src, SPAN_NOTICE("\The [initiator] scoops you up!")) forceMove(H) reset_offsets(0) From 69a55232199e59acba34ad5f1484d4620ed0e58e Mon Sep 17 00:00:00 2001 From: mistakenot4892 Date: Tue, 30 Sep 2025 11:48:06 +1000 Subject: [PATCH 17/22] Shifted rabbits down one size category. --- code/modules/mob/living/simple_animal/passive/rabbit.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/passive/rabbit.dm b/code/modules/mob/living/simple_animal/passive/rabbit.dm index 06169581056f..44afe0ed8698 100644 --- a/code/modules/mob/living/simple_animal/passive/rabbit.dm +++ b/code/modules/mob/living/simple_animal/passive/rabbit.dm @@ -5,7 +5,7 @@ max_health = 20 natural_weapon = /obj/item/natural_weapon/bite/weak speak_emote = list("chitters") - mob_size = MOB_SIZE_SMALL + mob_size = MOB_SIZE_TINY butchery_data = /decl/butchery_data/animal/rabbit holder_type = /obj/item/holder ai = /datum/mob_controller/passive/rabbit From 90298d0da033e69139550fd209b1adbbc462d3dc Mon Sep 17 00:00:00 2001 From: mistakenot4892 Date: Wed, 1 Oct 2025 11:57:26 +1000 Subject: [PATCH 18/22] Tweaking hunter AI params. --- code/datums/ai/hunter.dm | 10 +++++----- code/modules/mob/living/simple_animal/friendly/cat.dm | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/datums/ai/hunter.dm b/code/datums/ai/hunter.dm index 052d012fca3e..ef15d3226515 100644 --- a/code/datums/ai/hunter.dm +++ b/code/datums/ai/hunter.dm @@ -21,6 +21,8 @@ body.ClickOn(prey) /datum/mob_controller/passive/hunter/proc/consume_prey(mob/living/prey) + if(prey.stat != DEAD) + return body.visible_message(SPAN_DANGER("\The [body] consumes the body of \the [prey]!")) var/remains_type = prey.get_remains_type() if(remains_type) @@ -32,6 +34,8 @@ prey.gib() else qdel(prey) + set_target(null) + resume_wandering() /datum/mob_controller/passive/hunter/get_target(atom/new_target) if(isnull(hunt_target)) @@ -78,13 +82,9 @@ set_target(null) resume_wandering() return - if(prey.stat != DEAD) - return // Eat the mob. - set_target(null) - resume_wandering() consume_prey(prey) // Stub for hawks to return to their handler and dock with the mothership. -/datum/mob_controller/passive/hunter/proc/handle_friend_hunting(mob/friend) +/datum/mob_controller/passive/hunter/proc/handle_friend_hunting(mob/user) return FALSE diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index c36ff3e143b3..985e71554779 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -13,7 +13,11 @@ return ..() /datum/mob_controller/passive/hunter/cat/consume_prey(mob/living/prey) + if(prey.stat != DEAD) + return next_hunt = world.time + rand(1 SECONDS, 10 SECONDS) + set_target(null) + resume_wandering() /datum/mob_controller/passive/hunter/cat/can_hunt(mob/living/victim) return istype(victim, /mob/living/simple_animal/passive/mouse) && !victim.stat From b8069b1c50dcf42f922af6c75fabec1136d1e1d5 Mon Sep 17 00:00:00 2001 From: mistakenot4892 Date: Wed, 1 Oct 2025 11:57:55 +1000 Subject: [PATCH 19/22] Adding fadeout effect to go with fadein. --- code/game/objects/items/devices/fadein.dm | 17 +++++++++++++++++ code/game/objects/items/devices/fadeout.dm | 16 ++++++++++++++++ mods/content/fantasy/props/signpost.dm | 16 +--------------- nebula.dme | 2 ++ 4 files changed, 36 insertions(+), 15 deletions(-) create mode 100644 code/game/objects/items/devices/fadein.dm create mode 100644 code/game/objects/items/devices/fadeout.dm diff --git a/code/game/objects/items/devices/fadein.dm b/code/game/objects/items/devices/fadein.dm new file mode 100644 index 000000000000..3055f1bf3259 --- /dev/null +++ b/code/game/objects/items/devices/fadein.dm @@ -0,0 +1,17 @@ +/obj/effect/dummy/fadein/Initialize(mapload, fade_dir = SOUTH, atom/donor) + . = ..() + set_dir(fade_dir) + appearance = donor // grab appearance before ghostizing in case they fall over etc + var/initial_alpha = alpha + alpha = 0 + switch(dir) + if(NORTH) + pixel_z = -32 + if(SOUTH) + pixel_z = 32 + if(EAST) + pixel_w = -32 + if(WEST) + pixel_w = 32 + animate(src, pixel_z = 0, pixel_w = 0, alpha = initial_alpha, time = 1 SECOND) + QDEL_IN(src, 1 SECOND) diff --git a/code/game/objects/items/devices/fadeout.dm b/code/game/objects/items/devices/fadeout.dm new file mode 100644 index 000000000000..36ddf98facfe --- /dev/null +++ b/code/game/objects/items/devices/fadeout.dm @@ -0,0 +1,16 @@ +/obj/effect/dummy/fadeout/Initialize(mapload, fade_dir = SOUTH, atom/donor) + . = ..() + set_dir(fade_dir) + appearance = donor // grab appearance before ghostizing in case they fall over etc + switch(dir) + if(NORTH) + animate(src, pixel_z = 32, alpha = 0, time = 1 SECOND) + if(SOUTH) + animate(src, pixel_z = -32, alpha = 0, time = 1 SECOND) + if(EAST) + animate(src, pixel_w = 32, alpha = 0, time = 1 SECOND) + if(WEST) + animate(src, pixel_w = -32, alpha = 0, time = 1 SECOND) + else + animate(src, alpha = 0, time = 1 SECOND) + QDEL_IN(src, 1 SECOND) diff --git a/mods/content/fantasy/props/signpost.dm b/mods/content/fantasy/props/signpost.dm index 569657c72231..bcfddc878029 100644 --- a/mods/content/fantasy/props/signpost.dm +++ b/mods/content/fantasy/props/signpost.dm @@ -35,21 +35,7 @@ var/choice = alert(user, "Are you sure you wish to depart? This will permanently remove your character from the round.", "Venture Forth?", "No", "Yes") if(choice != "Yes" || QDELETED(user) || user.incapacitated() || QDELETED(src) || !user.Adjacent(src)) return TRUE - var/obj/effect/dummy/fadeout = new(get_turf(user)) - fadeout.set_dir(dir) - fadeout.appearance = user // grab appearance before ghostizing in case they fall over etc - switch(dir) - if(NORTH) - animate(fadeout, pixel_z = 32, alpha = 0, time = 1 SECOND) - if(SOUTH) - animate(fadeout, pixel_z = -32, alpha = 0, time = 1 SECOND) - if(EAST) - animate(fadeout, pixel_w = 32, alpha = 0, time = 1 SECOND) - if(WEST) - animate(fadeout, pixel_w = -32, alpha = 0, time = 1 SECOND) - else - animate(fadeout, alpha = 0, time = 1 SECOND) - QDEL_IN(fadeout, 1 SECOND) + new /obj/effect/dummy/fadeout(get_turf(user), dir, user) despawn_character(user) return TRUE diff --git a/nebula.dme b/nebula.dme index 3a87fe3149e2..56b6858163c7 100644 --- a/nebula.dme +++ b/nebula.dme @@ -1177,6 +1177,8 @@ #include "code\game\objects\items\devices\cable_painter.dm" #include "code\game\objects\items\devices\chameleonproj.dm" #include "code\game\objects\items\devices\dociler.dm" +#include "code\game\objects\items\devices\fadein.dm" +#include "code\game\objects\items\devices\fadeout.dm" #include "code\game\objects\items\devices\flash.dm" #include "code\game\objects\items\devices\geiger.dm" #include "code\game\objects\items\devices\gps.dm" From a584f6c756de158d7c6262a4c94b6ed6e9e2637d Mon Sep 17 00:00:00 2001 From: mistakenot4892 Date: Wed, 1 Oct 2025 11:58:09 +1000 Subject: [PATCH 20/22] Holder examine will now examine contents. --- code/modules/mob_holder/_holder.dm | 5 +++++ code/modules/mob_holder/holder_mobs.dm | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/mob_holder/_holder.dm b/code/modules/mob_holder/_holder.dm index 150f526f489b..3cc51f873e18 100644 --- a/code/modules/mob_holder/_holder.dm +++ b/code/modules/mob_holder/_holder.dm @@ -24,6 +24,11 @@ AM.vis_flags |= (VIS_INHERIT_ID|VIS_INHERIT_LAYER|VIS_INHERIT_PLANE) add_vis_contents(AM) +/obj/item/holder/examined_by(mob/user, distance, infix, suffix) + for(var/atom/thing in get_contained_external_atoms()) + thing.examined_by(user, distance, infix, suffix) + return TRUE + // No scooping mobs and handing them to people who can't scoop them. /obj/item/holder/equipped(mob/user, slot) . = ..() diff --git a/code/modules/mob_holder/holder_mobs.dm b/code/modules/mob_holder/holder_mobs.dm index f2539c7de24e..16ebd454351e 100644 --- a/code/modules/mob_holder/holder_mobs.dm +++ b/code/modules/mob_holder/holder_mobs.dm @@ -22,7 +22,7 @@ var/obj/item/holder/H = new holder_type(get_turf(src)) H.w_class = get_object_size() if(initiator == src) - if(!target.equip_to_slot_if_possible(H, slot_back_str, del_on_fail=0, disable_warning=1)) + if(!target.equip_to_slot_if_possible(H, slot_back_str, del_on_fail=0, disable_warning=1) && !target.put_in_hands(H)) if(!silent) to_chat(initiator, SPAN_WARNING("You can't climb onto [target]!")) return FALSE From 39d3ec71d692ee957397fa742e3f9c620729ef43 Mon Sep 17 00:00:00 2001 From: mistakenot4892 Date: Wed, 1 Oct 2025 11:59:09 +1000 Subject: [PATCH 21/22] Shirts are now named 'shirt' and not 'clothing'. --- code/modules/clothing/shirts/_shirts.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/clothing/shirts/_shirts.dm b/code/modules/clothing/shirts/_shirts.dm index 7b841100fd48..a98caa44df7a 100644 --- a/code/modules/clothing/shirts/_shirts.dm +++ b/code/modules/clothing/shirts/_shirts.dm @@ -1,4 +1,5 @@ /obj/item/clothing/shirt + name = "shirt" abstract_type = /obj/item/clothing/shirt body_parts_covered = SLOT_UPPER_BODY|SLOT_ARMS permeability_coefficient = 0.90 From 8c3c9234191efa1580804e593128fbc8c91428c7 Mon Sep 17 00:00:00 2001 From: mistakenot4892 Date: Wed, 1 Oct 2025 11:59:41 +1000 Subject: [PATCH 22/22] Adding trained bird module. --- .../mob/living/simple_animal/crow/crow.dm | 5 +- mods/content/birds/_birds.dm | 2 + mods/content/birds/_birds.dme | 11 +++ mods/content/birds/bird.dm | 31 +++++++ mods/content/birds/bird_crow.dm | 10 +++ mods/content/birds/bird_hawk.dm | 82 ++++++++++++++++++ mods/content/birds/bird_pigeon.dm | 67 ++++++++++++++ mods/content/birds/hutch.dm | 71 +++++++++++++++ mods/content/birds/icons/aviary.dmi | Bin 0 -> 718 bytes mods/content/birds/icons/crow.dmi | Bin 0 -> 3446 bytes mods/content/birds/icons/hawk.dmi | Bin 0 -> 10319 bytes mods/content/birds/icons/hutch.dmi | Bin 0 -> 641 bytes mods/content/birds/icons/pigeon.dmi | Bin 0 -> 3772 bytes mods/content/fantasy/datum/skills.dm | 7 +- mods/~compatibility/patches/fantasy.dm | 7 +- .../patches/fantasy/bird_fantasy.dm | 2 + 16 files changed, 290 insertions(+), 5 deletions(-) create mode 100644 mods/content/birds/_birds.dm create mode 100644 mods/content/birds/_birds.dme create mode 100644 mods/content/birds/bird.dm create mode 100644 mods/content/birds/bird_crow.dm create mode 100644 mods/content/birds/bird_hawk.dm create mode 100644 mods/content/birds/bird_pigeon.dm create mode 100644 mods/content/birds/hutch.dm create mode 100644 mods/content/birds/icons/aviary.dmi create mode 100644 mods/content/birds/icons/crow.dmi create mode 100644 mods/content/birds/icons/hawk.dmi create mode 100644 mods/content/birds/icons/hutch.dmi create mode 100644 mods/content/birds/icons/pigeon.dmi create mode 100644 mods/~compatibility/patches/fantasy/bird_fantasy.dm diff --git a/code/modules/mob/living/simple_animal/crow/crow.dm b/code/modules/mob/living/simple_animal/crow/crow.dm index 2ee46b3e0df2..8fd974b53c61 100644 --- a/code/modules/mob/living/simple_animal/crow/crow.dm +++ b/code/modules/mob/living/simple_animal/crow/crow.dm @@ -7,6 +7,7 @@ storage = /datum/storage/backpack/crow material = /decl/material/solid/organic/cloth +// TODO: Merge with /mob/living/simple_animal/passive/bird/crow /mob/living/simple_animal/crow name = "crow" desc = "A large crow. Caw caw." @@ -15,7 +16,7 @@ mob_size = MOB_SIZE_SMALL speak_emote = list("caws") ai = /datum/mob_controller/crow - natural_weapon = /obj/item/natural_weapon/crow_claws + natural_weapon = /obj/item/natural_weapon/bird_claws universal_speak = TRUE /datum/mob_controller/crow @@ -34,7 +35,7 @@ /mob/living/simple_animal/crow/get_bodytype() return GET_DECL(/decl/bodytype/animal/crow) -/obj/item/natural_weapon/crow_claws +/obj/item/natural_weapon/bird_claws name = "claws" gender = PLURAL attack_verb = "clawed" diff --git a/mods/content/birds/_birds.dm b/mods/content/birds/_birds.dm new file mode 100644 index 000000000000..f8a627b127f1 --- /dev/null +++ b/mods/content/birds/_birds.dm @@ -0,0 +1,2 @@ +/decl/modpack/birds + name = "Birds" diff --git a/mods/content/birds/_birds.dme b/mods/content/birds/_birds.dme new file mode 100644 index 000000000000..dac5a08b08a6 --- /dev/null +++ b/mods/content/birds/_birds.dme @@ -0,0 +1,11 @@ +#ifndef MODPACK_BIRDS +#define MODPACK_BIRDS +// BEGIN_INCLUDE +#include "_birds.dm" +#include "bird.dm" +#include "bird_crow.dm" +#include "bird_hawk.dm" +#include "bird_pigeon.dm" +#include "hutch.dm" +// END_INCLUDE +#endif diff --git a/mods/content/birds/bird.dm b/mods/content/birds/bird.dm new file mode 100644 index 000000000000..6be2df996f21 --- /dev/null +++ b/mods/content/birds/bird.dm @@ -0,0 +1,31 @@ +/mob/living/simple_animal/passive/bird + mob_size = MOB_SIZE_SMALL + pass_flags = PASS_FLAG_TABLE + abstract_type = /mob/living/simple_animal/passive/bird + natural_weapon = /obj/item/natural_weapon/bird_claws + holder_type = /obj/item/holder/bird + +/obj/item/holder/bird + w_class = MOB_SIZE_SMALL + +/obj/item/holder/bird/attack_self(mob/user) + var/mob/living/bird = locate() in contents + if(istype(bird?.ai) && bird.ai.process_holder_interaction(user)) + return TRUE + return ..() + +/obj/item/holder/bird/afterattack(atom/target, mob/user, proximity) + if(proximity) + return ..() + var/mob/living/bird = locate() in contents + . = ..() + if(!user || !bird || QDELETED(src) || bird.loc != src) + return + bird.dropInto(loc) + qdel(src) // This will happen shortly regardless, but might as well skip the 1ds delay. + if(isturf(target)) + bird.visible_message(SPAN_NOTICE("\The [user] releases \a [bird]!")) + else + bird.visible_message(SPAN_NOTICE("\The [user] indicates \the [target] and releases \a [bird]!")) + if(istype(bird.ai)) + bird.ai.process_handler_target(user, target, user.get_intent()?.intent_flags) diff --git a/mods/content/birds/bird_crow.dm b/mods/content/birds/bird_crow.dm new file mode 100644 index 000000000000..32a4836eac83 --- /dev/null +++ b/mods/content/birds/bird_crow.dm @@ -0,0 +1,10 @@ +/datum/mob_controller/passive/crow + emote_speech = list("Caw.","Caw!","Caw...") + emote_hear = list("croaks", "caws") + emote_see = list("preens its feathers", "hops around") + +/mob/living/simple_animal/passive/bird/crow + name = "crow" + icon = 'mods/content/birds/icons/crow.dmi' + ai = /datum/mob_controller/passive/crow + ability_handlers = list(/datum/ability_handler/predator) // should really be /scavenger diff --git a/mods/content/birds/bird_hawk.dm b/mods/content/birds/bird_hawk.dm new file mode 100644 index 000000000000..f391e1c63e0a --- /dev/null +++ b/mods/content/birds/bird_hawk.dm @@ -0,0 +1,82 @@ +/mob/living/simple_animal/passive/bird/hawk + name = "hawk" + icon = 'mods/content/birds/icons/hawk.dmi' + ai = /datum/mob_controller/passive/hunter/hawk + ability_handlers = list(/datum/ability_handler/predator) + +/datum/mob_controller/passive/hunter/hawk + emote_speech = list("Skree!","SKREE!","Skree!?") + emote_hear = list("screeches", "screams") + emote_see = list("preens its feathers", "flicks its wings", "looks sharply around") + var/handler_set_target = FALSE + var/handling_skill = SKILL_BOTANY + var/handling_difficulty = SKILL_ADEPT + +/datum/mob_controller/passive/hunter/hawk/consume_prey(mob/living/prey) + if(prey.stat == DEAD && last_handler && handler_set_target) + set_target(last_handler?.resolve()) + prey.try_make_grab(body, defer_hand = TRUE) + return + return ..() + +/datum/mob_controller/passive/hunter/hawk/set_target(atom/new_target) + . = ..() + handler_set_target = FALSE + +/datum/mob_controller/passive/hunter/hawk/process_handler_target(mob/handler, atom/target) + if((. = ..())) + set_target(target) + handler_set_target = TRUE + process_hunting(target) + +/datum/mob_controller/passive/hunter/hawk/can_hunt(mob/living/victim) + return handler_set_target || ..() + +/datum/mob_controller/passive/hunter/hawk/check_handler_can_order(mob/handler, atom/target, intent_flags) + if(!(. = ..()) && handler.skill_check(handling_skill, handling_difficulty)) + add_friend(handler) + return ..() + +/datum/mob_controller/passive/hunter/hawk/process_handler_failure(mob/handler, atom/target) + body?.visible_message(SPAN_DANGER("\The [body] ignores \the [target] in favour of attacking \the [handler]!")) + set_target(handler) + handler_set_target = TRUE + next_hunt = 0 + return ..() + +/datum/mob_controller/passive/hunter/hawk/handle_friend_hunting(mob/user) + ..() + set_target(null) + resume_wandering() + if(!body) + return + if(body.scoop_check(user) && body.get_scooped(user, body, silent = TRUE)) + body.visible_message(SPAN_NOTICE("\The [body] alights on \the [user].")) + else + body.visible_message(SPAN_NOTICE("\The [body] lands beside \the [user].")) + + for(var/obj/item/thing in body.get_equipped_items(include_carried = TRUE)) + body.drop_from_inventory(thing) + if(!QDELETED(thing)) + user.put_in_hands(thing) + var/equipped_to = user.get_equipped_slot_for_item(thing) + var/datum/inventory_slot/slot = equipped_to && user.get_inventory_slot_datum(equipped_to) + if(istype(slot)) + to_chat(user, SPAN_NOTICE("\The [body] drops \a [thing] into your [lowertext(slot.slot_name)].")) + else + to_chat(user, SPAN_NOTICE("\The [body] drops \a [thing].")) + + return TRUE + +/datum/mob_controller/passive/hunter/hawk/process_hunting(atom/target) + // Handles pathing to the target, and attacking the target if it's a mob. + if(!(. = ..())) + return + // Maybe consider handling structures at some point? + if(isitem(target) && body.Adjacent(target)) + body.put_in_hands(target) + if(target.loc != body) + body.visible_message(SPAN_WARNING("\The [body] fails to collect \the [target]!")) + // Return to handler. + set_target(last_handler?.resolve()) + return FALSE diff --git a/mods/content/birds/bird_pigeon.dm b/mods/content/birds/bird_pigeon.dm new file mode 100644 index 000000000000..40af24aeb746 --- /dev/null +++ b/mods/content/birds/bird_pigeon.dm @@ -0,0 +1,67 @@ +/mob/living/simple_animal/passive/bird/pigeon + name = "messenger pigeon" + icon = 'mods/content/birds/icons/pigeon.dmi' + ai = /datum/mob_controller/passive/pigeon + holder_type = /obj/item/holder/bird/pigeon + var/weakref/home_hutch + +/mob/living/simple_animal/passive/bird/pigeon/Initialize() + . = ..() + update_hutch() + +/mob/living/simple_animal/passive/bird/pigeon/proc/go_home(mob/releaser) + if(!is_outside()) + return + var/obj/structure/hutch/hutch = home_hutch?.resolve() + if(!istype(hutch) || QDELETED(hutch)) + return // todo: check if the hutch is accessible from the sky + if(releaser) + releaser.visible_message(SPAN_NOTICE("\The [releaser] releases \a [src], which flutters away into the sky.")) + else + visible_message(SPAN_NOTICE("\The [src] flutters away into the sky.")) + set_dir(SOUTH) + // this is done manually due to the actual flying state primarily being handled as a movement state. + icon_state = "world-flying" + new /obj/effect/dummy/fadeout(loc, NORTH, src) + new /obj/effect/dummy/fadein(get_turf(hutch), SOUTH, src) + update_icon() + + hutch.visible_message(SPAN_NOTICE("\A [src] alights on \the [hutch] in a flutter of wings.")) + var/obj/item/holder/bird_item = new holder_type + forceMove(bird_item) + bird_item.sync(src) + hutch.storage?.handle_item_insertion(null, bird_item) + if(bird_item.loc != hutch) + dropInto(hutch.loc) + qdel(bird_item) + +/obj/item/holder/bird/pigeon/attack_self(mob/user) + var/mob/living/simple_animal/passive/bird/pigeon/pigeon = locate() in contents + if(!istype(pigeon)) + return ..() + if(!is_outside()) + to_chat(user, SPAN_WARNING("You need to be outdoors to release \the [pigeon].")) + return TRUE + if(isnull(pigeon.home_hutch)) + var/decl/pronouns/pronouns = pigeon.get_pronouns() + to_chat(user, SPAN_WARNING("\The [pigeon] tilts [pronouns.his] head at you in confusion. [pronouns.He] must not have a hutch to return to.")) + else + user.drop_from_inventory(src) + pigeon.go_home(user) + qdel(src) + return TRUE + +/mob/living/simple_animal/passive/bird/pigeon/proc/update_hutch() + var/obj/structure/hutch/hutch = home_hutch?.resolve() + if(!istype(hutch) || QDELETED(hutch)) + hutch = get_recursive_loc_of_type(/obj/structure/hutch) + if(istype(hutch) && !QDELETED(hutch)) + home_hutch = weakref(hutch) + events_repository.unregister(/decl/observ/moved, src, src) + else + events_repository.register(/decl/observ/moved, src, src, TYPE_PROC_REF(/mob/living/simple_animal/passive/bird/pigeon, update_hutch)) + +/datum/mob_controller/passive/pigeon + emote_speech = list("Oo-ooo.","Oo-ooo?","Oo-ooo...") + emote_hear = list("coos") + emote_see = list("preens its feathers", "puffs out its neck", "ruffles its wings") diff --git a/mods/content/birds/hutch.dm b/mods/content/birds/hutch.dm new file mode 100644 index 000000000000..fae7915f735f --- /dev/null +++ b/mods/content/birds/hutch.dm @@ -0,0 +1,71 @@ +/datum/storage/hutch + can_hold = list(/obj/item/holder) + max_w_class = MOB_SIZE_SMALL + storage_slots = 10 + +/datum/storage/hutch/open(mob/user) + . = ..() + var/atom/hutch = holder + if(istype(hutch)) + hutch.queue_icon_update() + +/datum/storage/hutch/close(mob/user) + . = ..() + var/atom/hutch = holder + if(istype(hutch)) + hutch.queue_icon_update() + +/obj/structure/hutch + name = "hutch" + icon = 'mods/content/birds/icons/hutch.dmi' + desc = "A hutch for containing small animals like rabbits." + icon_state = ICON_STATE_WORLD + material = /decl/material/solid/organic/wood/oak + material_alteration = MAT_FLAG_ALTERATION_ALL + storage = /datum/storage/hutch + var/initial_animal_count = 5 + var/decl/material/door_material = /decl/material/solid/organic/plantmatter/grass/dry + var/initial_animal_type + +/obj/structure/hutch/Initialize(ml, _mat, _reinf_mat) + . = ..() + + if(ispath(door_material)) + door_material = GET_DECL(door_material) + + if(initial_animal_type && initial_animal_count) + for(var/i = 1 to initial_animal_count) + var/mob/bird_type = islist(initial_animal_type) ? pick(initial_animal_type) : initial_animal_type + var/bird_holder_type = bird_type::holder_type + var/obj/item/holder/bird/bird_item = new bird_holder_type(src) + bird_item.sync(new bird_type(bird_item)) + else + update_icon() + +/obj/structure/hutch/on_update_icon() + . = ..() + if(door_material) + add_overlay(overlay_image(icon, "[icon_state]-doors-[storage?.opened ? "open" : "closed"]", door_material.color, RESET_COLOR)) + +// Bird subtypes. +/obj/structure/hutch/aviary + name = "aviary" + desc = "A hutch for containing birds like hawks or crows." + icon = 'mods/content/birds/icons/aviary.dmi' + +/obj/structure/hutch/aviary/crow + initial_animal_type = /mob/living/simple_animal/passive/bird/crow + +/obj/structure/hutch/aviary/pigeon + initial_animal_type = /mob/living/simple_animal/passive/bird/pigeon + +/obj/structure/hutch/aviary/hawk + initial_animal_type = /mob/living/simple_animal/passive/bird/hawk + +// Rabbits are a kind of bird, right? +/obj/structure/hutch/rabbit + initial_animal_type = list( + /mob/living/simple_animal/passive/rabbit, + /mob/living/simple_animal/passive/rabbit/black, + /mob/living/simple_animal/passive/rabbit/brown + ) diff --git a/mods/content/birds/icons/aviary.dmi b/mods/content/birds/icons/aviary.dmi new file mode 100644 index 0000000000000000000000000000000000000000..8ba4c4443f9a168feb46f5251e69d23ee0fc278b GIT binary patch literal 718 zcmV;<0x|uGP)D@x2wg|Jao>89l87ZvL!=j0cslBOlUATKl~IzTAP|O$GY1$E-xc}*0X#rxJ;0LH z`(I_d!7)zRRa3Q3Q(N1Kpy98N?jIyd-K-wzJJwEJqlplv4l#nC914Ql+@+}teu5F5 zmjqzOsFRP7(8vNCW)c8_Op~L}+ zP>s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svAt8f3}gLpxYwH{%^4?xAjqp zUFoC^%Ck*qw<~mspF@nK65X0{I)ROK5GHuG91P#HOZk6+fXIIV1KJIP23+5zJf|U* zHlZ&@y5VKV-ejLR_2Nx`$Rj>yJXv}{7$hjEC=Tial$$U5|e>>TXD-(~7?R&Wc9 zb`oTQds64wn6?_7t7&-yI40l$4BFlNi9_VS{@0o7bOpG!4jnub73{bI?RJ6wNxNZ# zQZWh3t92ihU}4q*BDFeQodh7iE(333pfQH;u=c(J&5TftWt>z zfAXYPw(7p{Y*IhOtu(fKEqF&an-bC^uhxDYs-E1#fTBjQP1tz3k4iy4f2apNYtSaO@$n|CuyF>_Jyt_t zTSSRMb>T2*w0YWe_|_b1&-EW@CKAa$A)G9qB#+9_Uw*qyEW}i5gD4ZiCADNSd47F! zzr)V&BpoMY2DwZEXy#_>e!4>OON@S zI@i@G<;Z%&x7lZ#<`XpZ`=w$dOA>doSxsm#n{T56VL7|x3eeYn!rHIT*P{)>1l%`Tf(oWBwOKLqOR9smFU literal 0 HcmV?d00001 diff --git a/mods/content/birds/icons/hawk.dmi b/mods/content/birds/icons/hawk.dmi new file mode 100644 index 0000000000000000000000000000000000000000..304546724903226ba99808dc4555ddc3a5511947 GIT binary patch literal 10319 zcmZ9S2UJtf_V4MvD7}YXq$5pQKtMp0s`TCwq$8mPFiP)LX`zaWbP=QlqzMQSl%kZ- zA+!)`0wFwp_rCYP_x<-;XPq-=?LB3!b7s%yJCkH$q(@7|K}A47Kx?3{V@5zg=yY>w zQV`#~X=Sv~zbSB=JbI$r+uN%s#PCF!U0s9|2oRFwWYm{qyG=|e!9k%R!sDzWXeY;I zt-#^-P+WtD={60;LrG3+MNxHb%HqiTH&ro^(C59-7v~pJkri%!PaSHc%1BG2CBeqU z#*pa_R2Alm^)`reH8SC2QI=sfQDBR8Q_py&8|R{7a91Scv4jOs@P&oErlgRirihQR zjK?F%bdaf;BI{HAJ0+2(%7R>$(wu^1#1te%@qUj6gFAfgi3K@7rX(c}u+o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Kc|(1=Kufz literal 0 HcmV?d00001 diff --git a/mods/content/birds/icons/hutch.dmi b/mods/content/birds/icons/hutch.dmi new file mode 100644 index 0000000000000000000000000000000000000000..8d5f7e2165bdce250d504d2a3faa930b414e4100 GIT binary patch literal 641 zcmV-{0)G98P)D@x2wg|Jao>89l87ZvL!=j0cslBOlUATKRLgRNAP`iO+*i@NGVFbM?0rQ(AY{w` z|CKPnx+aR`l*%D31*Ow8GhHJ^5zsUP#c?VU0LBfB6YEn1(((xg!IBDXI~w4EBnb>g za3X0!OSB?lN+;P6sv2!bGD)D^uyJa)3MKUh5GE!ZTZKw##kfivRZ1t!m8}Ebw*<{a zJE}QiOQ^I!4+e@D`0`yNZm3{{avns&c_A=24yUr&6tbhC#s$AUA z%OSx~)gKb5$|xu*GYT@Jkc$_&_)k#XGI7&q;(y&qcdJP%4iwy-bew^^laBU3Zna|t bNGp5-Pa|u&o;?pe00000NkvXXu0mjfl6Mo| literal 0 HcmV?d00001 diff --git a/mods/content/birds/icons/pigeon.dmi b/mods/content/birds/icons/pigeon.dmi new file mode 100644 index 0000000000000000000000000000000000000000..678fd450c83e463481cf963e6f7c0d55817adcc0 GIT binary patch literal 3772 zcmZuxc{mhm)VFk#vLt0vmLwT8Mo6|S*`kJQNf<4*vW`Jxnha6O$R1+iMxn81modnY zJ;^rq88o&S>tL2|?(MtZU*G#Y?{l7Wp7)&dJHKV1vP98Hib2f#n_jA0sgKR8qxeVqE zDo3OGI&2T%t3T>PpD0++Zn_%Ugj|YX7$hk+J{>@QGI2`4cQ^I63uS)34g)ErPFaxN zZ~QnF;xX!HWe%2k>1AnVaiH^7R6o6m*Yxe?kis<}_X28@&*D`3r8wk6rTy_3Hv?jH z+GMwo94VxrKT3SD+B#Bw1xW`8C9qdzr7}({MNEJMoJxHP>_N4Ti*&VxTk^!&p@+)u zCT|F?dj}}X(XCAnM7uczAimV43O_}B*bR+M{-}B=mD6eCGUybo5yqx-StuS<2eCDUHraRouG@)okqQjG_Gm0@_3q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S#dv*s3AIhg6_mp|*ze#wVZ_Ak(5C+|{3F$07_iBM{ncpL8WJYC4~Q-S4A-Gy z(|?pwz;HPlMn}RX_5hd5pw2ZcqF@nVxEKxNRq1)R}{bhnu7Rc5P7gA&^U$ zm@j63qhUK-Z1NB{i})v7{a0N!8II9n5sPy|*<|}C&epGeh6o7$qDCk-!h?zV>)8-y zX@sD8*achyXOo-$RA2osJ@@_}de*kc+S_0uDA;dM$b)S1E}LY*Bf45>)i>wSQlZutfzj$nU|O8LbIn!C)t~zXVk*{{9Ng5!Ag)`nUO$H<0SS)%?A2RQqDlMG@B$o9NIdc+@ltw@P3nm z)^mKU+BLJxzt3uB;rz0SbwvO4CY){M{J4>-=UKfuwRj=TJ)t`eTkS8nO?qu;R(BzC zwg=$K%AKI|GDAx?T_0n!KY1JP%`0Wyg2ht5lqK;VG=%h>B#Nlj^3&# zu28i*J`yVyidX8~oNq(3yt*ITtM1(QOO(jWfdnngx1dh4s;ND#=zUW{Swq0)%nolI zeie6oq3`V-r}1@{<2=*4Gk2z|n}4Ig8#LE9o1W)ZK+3ugJm4xtQ&E_ApU;hpUQWSIZ0JPJY4#7BPcx#y(V#QhxTUWvu| s#TqZkK5vJ-y+RwN*dN-s!sXVaVPwkRxBD9$|1p`HSQ?jHz5DEc06!a)ivR!s literal 0 HcmV?d00001 diff --git a/mods/content/fantasy/datum/skills.dm b/mods/content/fantasy/datum/skills.dm index 30736399780b..54a75cacac59 100644 --- a/mods/content/fantasy/datum/skills.dm +++ b/mods/content/fantasy/datum/skills.dm @@ -230,8 +230,11 @@ "Master" = "You're a specialized animal caretaker. You can care for even the most exotic, fragile, or dangerous animals." ) -/obj/item/food/egg/examine_skill = SKILL_HUSBANDRY -/mob/living/simple_animal/chick/examine_skill = SKILL_HUSBANDRY +/obj/item/food/egg + examine_skill = SKILL_HUSBANDRY + +/mob/living/simple_animal/chick + examine_skill = SKILL_HUSBANDRY /datum/extension/milkable milking_skill = SKILL_HUSBANDRY diff --git a/mods/~compatibility/patches/fantasy.dm b/mods/~compatibility/patches/fantasy.dm index b0abba63bcd4..3f3ba3462e43 100644 --- a/mods/~compatibility/patches/fantasy.dm +++ b/mods/~compatibility/patches/fantasy.dm @@ -10,4 +10,9 @@ #ifdef MODPACK_BLACKSMITHY #include "fantasy/forging_fantasy.dm" -#endif \ No newline at end of file +#endif + +// Override hawk handling skill. +#ifdef MODPACK_BIRDS +#include "fantasy/bird_fantasy.dm" +#endif diff --git a/mods/~compatibility/patches/fantasy/bird_fantasy.dm b/mods/~compatibility/patches/fantasy/bird_fantasy.dm new file mode 100644 index 000000000000..f6b73ecf75a3 --- /dev/null +++ b/mods/~compatibility/patches/fantasy/bird_fantasy.dm @@ -0,0 +1,2 @@ +/datum/mob_controller/passive/hunter/hawk + handling_skill = SKILL_HUSBANDRY