From c862883228969e221ffd4bb1ea1d287dbb09642e Mon Sep 17 00:00:00 2001 From: chuga-git <98280110+chuga-git@users.noreply.github.com> Date: Sun, 21 Jun 2026 11:58:42 -0500 Subject: [PATCH] Adds the Ore Magnet (#3921) Co-authored-by: Corrupt --- .../Prototypes/Recipes/Lathes/Packs/cargo.yml | 1 + Resources/Prototypes/Research/industrial.yml | 1 + .../Spawners/Random/scrap_processor.yml | 1 + .../Devices/Circuitboards/Machine/salvage.yml | 15 +++ .../Structures/Machines/ore_magnet.yml | 123 ++++++++++++++++++ .../_Mono/Recipes/Lathes/electronics.yml | 5 + .../Inventories/flatpackvend.yml | 1 + .../Spawners/Random/dungeon_items_general.yml | 1 + .../Spawners/Random/dungeon_items_supply.yml | 1 + 9 files changed, 149 insertions(+) create mode 100644 Resources/Prototypes/_Mono/Entities/Objects/Devices/Circuitboards/Machine/salvage.yml create mode 100644 Resources/Prototypes/_Mono/Entities/Structures/Machines/ore_magnet.yml diff --git a/Resources/Prototypes/Recipes/Lathes/Packs/cargo.yml b/Resources/Prototypes/Recipes/Lathes/Packs/cargo.yml index bf13cb643a2..ae465a7953c 100644 --- a/Resources/Prototypes/Recipes/Lathes/Packs/cargo.yml +++ b/Resources/Prototypes/Recipes/Lathes/Packs/cargo.yml @@ -27,6 +27,7 @@ id: CargoBoards recipes: - OreProcessorIndustrialMachineCircuitboard + - OreMagnetMachineCircuitboard # Mono # - CargoTelepadMachineCircuitboard # Frontier - ShuttleGunKineticCircuitboard - WeaponTurretM25Circuitboard # Mono diff --git a/Resources/Prototypes/Research/industrial.yml b/Resources/Prototypes/Research/industrial.yml index c3ef9cb7632..2d5736c2bd1 100644 --- a/Resources/Prototypes/Research/industrial.yml +++ b/Resources/Prototypes/Research/industrial.yml @@ -12,6 +12,7 @@ - WeaponGrapplingGun # Frontier - MineralScannerEmpty - OreProcessorIndustrialMachineCircuitboard + - OreMagnetMachineCircuitboard - ClothingMaskWeldingGas - ClothingShoesBootsJump - MechEquipmentDrill # Goobstation diff --git a/Resources/Prototypes/_Mono/Entities/Markers/Spawners/Random/scrap_processor.yml b/Resources/Prototypes/_Mono/Entities/Markers/Spawners/Random/scrap_processor.yml index 5960d6e1e2e..83d6d854a10 100644 --- a/Resources/Prototypes/_Mono/Entities/Markers/Spawners/Random/scrap_processor.yml +++ b/Resources/Prototypes/_Mono/Entities/Markers/Spawners/Random/scrap_processor.yml @@ -266,6 +266,7 @@ - id: MaterialReclaimerMachineCircuitboard - id: OreProcessorIndustrialMachineCircuitboard - id: OreProcessorMachineCircuitboard + - id: OreMagnetMachineCircuitboard # Mono - id: ShredderMachineCircuitboard - id: ShuttleGunKineticCircuitboard - id: NFScrapProcessorCircuitboard diff --git a/Resources/Prototypes/_Mono/Entities/Objects/Devices/Circuitboards/Machine/salvage.yml b/Resources/Prototypes/_Mono/Entities/Objects/Devices/Circuitboards/Machine/salvage.yml new file mode 100644 index 00000000000..9b2d134a45d --- /dev/null +++ b/Resources/Prototypes/_Mono/Entities/Objects/Devices/Circuitboards/Machine/salvage.yml @@ -0,0 +1,15 @@ +- type: entity + id: OreMagnetMachineCircuitboard + parent: BaseMachineCircuitboard + name: ore magnet machine board + description: A machine printed circuit board for an ore magnet. + components: + - type: Sprite + state: engineering + - type: MachineBoard + prototype: MachineOreMagnet + requirements: + Capacitor: 4 + stackRequirements: + Steel: 5 + CableHV: 5 diff --git a/Resources/Prototypes/_Mono/Entities/Structures/Machines/ore_magnet.yml b/Resources/Prototypes/_Mono/Entities/Structures/Machines/ore_magnet.yml new file mode 100644 index 00000000000..eab121579a6 --- /dev/null +++ b/Resources/Prototypes/_Mono/Entities/Structures/Machines/ore_magnet.yml @@ -0,0 +1,123 @@ +- type: entity + parent: [BaseMachinePowered, ConstructibleMachine] + id: MachineOreMagnet + name: ore magnet + description: Uses a powerful magnet to suck in ore. Has an internal storage. + components: + - type: MagnetPickup + magnetEnabled: false + magnetCanBeEnabled: false + range: 30 + - type: Sprite + sprite: Structures/Machines/salvage.rsi + layers: + - state: salvage-magnet + - state: salvage-magnet-o4 + shader: unshaded + map: [ "enum.PowerDeviceVisualLayers.Powered" ] + - state: salvage-magnet-ready-blinking + visible: false + map: [ "enum.ToggleableVisuals.Layer" ] + - type: LitOnPowered + - type: PointLight + radius: 1.5 + energy: 1.6 + color: "#3db83b" + castShadows: false + - type: AmbientSound + volume: -10 + range: 5 + sound: + path: /Audio/Ambience/Objects/hdd_buzz.ogg + - type: Appearance + - type: ApcPowerReceiver + powerLoad: 7000 + - type: ExtensionCableReceiver + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 300 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 1 + max: 2 + - type: Rotatable + - type: Physics + bodyType: Static + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.5,-0.5,0.5,0.5" + density: 500 + mask: + - MachineMask + layer: + - MachineLayer + - type: Storage + grid: + - 0,0,19,9 + maxItemSize: Normal + storageOpenSound: /Audio/Effects/closetopen.ogg + storageCloseSound: /Audio/Effects/closetclose.ogg + whitelist: + tags: + - Ore + - ArtifactFragment + - type: UserInterface + interfaces: + enum.StorageUiKey.Key: + type: StorageBoundUserInterface + - type: Dumpable + multiplier: 0.15 + - type: ItemToggle + soundActivate: &soundActivate + collection: sparks + params: + variation: 0.25 + soundDeactivate: *soundActivate + onUse: false + onAltUse: true + onActivate: false + - type: GenericVisualizer + visuals: + enum.PowerDeviceVisuals.Powered: + enum.PowerDeviceVisualLayers.Powered: + True: { visible: true } + False: { visible: false } + enum.ToggleableVisuals.Enabled: + enum.ToggleableVisuals.Layer: + True: { visible: True } + False: { visible: False } + - type: ItemToggleExamine + on: item-toggle-examine-magnet-on + off: item-toggle-examine-magnet-off + - type: Machine + board: OreMagnetMachineCircuitboard + - type: ContainerContainer + containers: + storagebase: !type:Container + ents: [] + machine_board: !type:Container + machine_parts: !type:Container + +- type: entity + name: ore magnet flatpack + id: OreMagnetFlatpack + parent: BaseNFFlatpack + description: A flatpack used for constructing an ore magnet. + components: + - type: Flatpack + entity: MachineOreMagnet + - type: StaticPrice + price: 6500 + vendPrice: 10000 diff --git a/Resources/Prototypes/_Mono/Recipes/Lathes/electronics.yml b/Resources/Prototypes/_Mono/Recipes/Lathes/electronics.yml index cf7f518e521..bb426890e86 100644 --- a/Resources/Prototypes/_Mono/Recipes/Lathes/electronics.yml +++ b/Resources/Prototypes/_Mono/Recipes/Lathes/electronics.yml @@ -102,3 +102,8 @@ parent: BaseGoldCircuitboardRecipe id: CentrifugeLatheMiniCircuitboard result: CentrifugeLatheMiniCircuitboard + +- type: latheRecipe + parent: BaseGoldCircuitboardRecipe + id: OreMagnetMachineCircuitboard + result: OreMagnetMachineCircuitboard diff --git a/Resources/Prototypes/_NF/Catalog/VendingMachines/Inventories/flatpackvend.yml b/Resources/Prototypes/_NF/Catalog/VendingMachines/Inventories/flatpackvend.yml index 2ad77805df3..f4d1ee001dd 100644 --- a/Resources/Prototypes/_NF/Catalog/VendingMachines/Inventories/flatpackvend.yml +++ b/Resources/Prototypes/_NF/Catalog/VendingMachines/Inventories/flatpackvend.yml @@ -3,6 +3,7 @@ startingInventory: #ShuttleGunKineticFlatpack: 4294967295 # Infinite OreProcessorFlatpack: 4294967295 # Infinite + OreMagnetFlatpack: 4294967295 # Infinite AutolatheFlatpack: 4294967295 # Infinite HydroponicsTrayEmptyFlatpack: 4294967295 # Get a food ship, or an atmost ship - Mono Infinite ExosuitFabricatorFlatpack: 4294967295 # Infinite diff --git a/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_general.yml b/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_general.yml index 16d1d71c439..0547dd7a6c7 100644 --- a/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_general.yml +++ b/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_general.yml @@ -699,6 +699,7 @@ - PortableGeneratorPacmanMachineCircuitboard - ReagentGrinderMachineCircuitboard - OreProcessorMachineCircuitboard + - OreMagnetMachineCircuitboard - MicrowaveMachineCircuitboard - SurveillanceWirelessCameraMovableCircuitboard - PowerComputerCircuitboard diff --git a/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_supply.yml b/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_supply.yml index 6251a49c922..17918298a58 100644 --- a/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_supply.yml +++ b/Resources/Prototypes/_NF/Entities/Markers/Spawners/Random/dungeon_items_supply.yml @@ -277,6 +277,7 @@ - SalvageTechFabCircuitboardNF - AutolatheMachineCircuitboard - OreProcessorMachineCircuitboard + - OreMagnetMachineCircuitboard # Machines - MaterialReclaimerMachineCircuitboard - SpaceHeaterMachineCircuitBoard