From df1d8c36e5e8b0773123c744a4acca473fb135ea Mon Sep 17 00:00:00 2001 From: Emisse <99158783+Emisse@users.noreply.github.com> Date: Mon, 8 Jan 2024 16:24:36 -0700 Subject: [PATCH] kill machine parts + migrate machine part spawners to salvage loot spawner (#23752) * kill machine parts * guidebook and artifact effect * worst test ive ever seen in my life * nuke test --- .../Interaction/MachineConstruction.cs | 29 --- .../Interaction/InteractionTest.Constants.cs | 5 - .../Markers/Spawners/Random/salvage.yml | 71 +------ .../Entities/Objects/Misc/machine_parts.yml | 181 ------------------ .../Entities/Structures/Machines/lathe.yml | 6 - Resources/Prototypes/Recipes/Lathes/Parts.yml | 60 ------ .../Prototypes/Research/experimental.yml | 28 --- .../XenoArch/Effects/normal_effects.yml | 26 +-- .../Guidebook/Science/MachineUpgrading.xml | 14 +- Resources/migration.yml | 22 +++ 10 files changed, 36 insertions(+), 406 deletions(-) diff --git a/Content.IntegrationTests/Tests/Construction/Interaction/MachineConstruction.cs b/Content.IntegrationTests/Tests/Construction/Interaction/MachineConstruction.cs index 17630405a4..f52f820a4c 100644 --- a/Content.IntegrationTests/Tests/Construction/Interaction/MachineConstruction.cs +++ b/Content.IntegrationTests/Tests/Construction/Interaction/MachineConstruction.cs @@ -56,34 +56,5 @@ public sealed class MachineConstruction : InteractionTest await Interact(Bin1, Bin1, Bin1, Manipulator1, Glass, Screw); AssertPrototype("Autolathe"); } - - [Test] - public async Task UpgradeLathe() - { - // Partially deconstruct a protolathe. - await SpawnTarget(Protolathe); - var serverTarget = SEntMan.GetEntity(Target!.Value); - - // Initially has all quality-1 parts. - foreach (var part in SConstruction.GetAllParts(serverTarget)) - { - Assert.That(part.Rating, Is.EqualTo(1)); - } - - // Partially deconstruct lathe - await Interact(Screw, Pry, Pry); - AssertPrototype(MachineFrame); - - // Reconstruct with better parts. - await Interact(ProtolatheBoard, Bin4, Bin4, Manipulator4, Manipulator4, Beaker, Beaker); - await Interact(Screw); - AssertPrototype(Protolathe); - - // Query now returns higher quality parts. - foreach (var part in SConstruction.GetAllParts(SEntMan.GetEntity(Target!.Value))) - { - Assert.That(part.Rating, Is.EqualTo(4)); - } - } } diff --git a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Constants.cs b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Constants.cs index 8ae36f1770..11381fb8cc 100644 --- a/Content.IntegrationTests/Tests/Interaction/InteractionTest.Constants.cs +++ b/Content.IntegrationTests/Tests/Interaction/InteractionTest.Constants.cs @@ -1,4 +1,3 @@ - namespace Content.IntegrationTests.Tests.Interaction; // This partial class contains various constant prototype IDs common to interaction tests. @@ -28,12 +27,8 @@ public abstract partial class InteractionTest // Parts protected const string Bin1 = "MatterBinStockPart"; - protected const string Bin4 = "BluespaceMatterBinStockPart"; protected const string Cap1 = "CapacitorStockPart"; - protected const string Cap4 = "QuadraticCapacitorStockPart"; protected const string Manipulator1 = "MicroManipulatorStockPart"; - protected const string Manipulator4 = "FemtoManipulatorStockPart"; protected const string Battery1 = "PowerCellSmall"; protected const string Battery4 = "PowerCellHyper"; } - diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/salvage.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/salvage.yml index 5ab5a154cd..34bf32d8d7 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/salvage.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/salvage.yml @@ -63,78 +63,23 @@ offset: 0.0 - type: entity - name: Salvage T2 Machine Parts Spawner - id: SalvagePartsT2Spawner + name: salvage loot spawner + id: SalvageLootSpawner parent: MarkerBase components: - type: Sprite layers: - state: red - - sprite: Objects/Misc/stock_parts.rsi - state: advanced_matter_bin + - sprite: Objects/Weapons/Melee/crusher.rsi + state: icon - type: RandomSpawner prototypes: - - AdvancedCapacitorStockPart - - NanoManipulatorStockPart - - AdvancedMatterBinStockPart + - WeaponCrusher + - WeaponCrusherDagger + - WeaponCrusherGlaive + - MiningDrill offset: 0.0 -- type: entity - parent: MarkerBase - id: SalvagePartsT3T4Spawner - name: tier 3/4 machine part - components: - - type: Sprite - layers: - - sprite: Objects/Misc/stock_parts.rsi - state: super_matter_bin - - type: RandomSpawner - rarePrototypes: - - QuadraticCapacitorStockPart - - FemtoManipulatorStockPart - - BluespaceMatterBinStockPart - rareChance: 0.05 - prototypes: - - SuperCapacitorStockPart - - PicoManipulatorStockPart - - SuperMatterBinStockPart - chance: 0.95 - offset: 0.0 - -- type: entity - parent: MarkerBase - id: SalvagePartsT3Spawner - name: tier 3 machine part - suffix: Spawner - components: - - type: Sprite - layers: - - sprite: Objects/Misc/stock_parts.rsi - state: super_matter_bin - - type: RandomSpawner - prototypes: - - SuperCapacitorStockPart - - PicoManipulatorStockPart - - SuperMatterBinStockPart - offset: 0.0 - -- type: entity - parent: MarkerBase - id: SalvagePartsT4Spawner - name: tier 4 machine part - suffix: Spawner - components: - - type: Sprite - layers: - - sprite: Objects/Misc/stock_parts.rsi - state: bluespace_matter_bin - - type: RandomSpawner - prototypes: - - QuadraticCapacitorStockPart - - PicoManipulatorStockPart - - BluespaceMatterBinStockPart - offset: 0.0 - - type: entity name: Salvage Mob Spawner id: SalvageMobSpawner diff --git a/Resources/Prototypes/Entities/Objects/Misc/machine_parts.yml b/Resources/Prototypes/Entities/Objects/Misc/machine_parts.yml index c38239a08d..4fe9a503ef 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/machine_parts.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/machine_parts.yml @@ -13,8 +13,6 @@ guides: - MachineUpgrading -# Rating 1 - - type: entity id: CapacitorStockPart name: capacitor @@ -56,182 +54,3 @@ - type: MachinePart part: MatterBin rating: 1 - -# Rating 2 - -- type: entity - id: AdvancedCapacitorStockPart - name: advanced capacitor - parent: CapacitorStockPart - description: An advanced capacitor used in the construction of a variety of devices. - suffix: Rating 2 - components: - - type: Sprite - state: adv_capacitor - - type: MachinePart - rating: 2 - -- type: entity - id: NanoManipulatorStockPart - name: advanced manipulator - parent: MicroManipulatorStockPart - description: An advanced manipulator used in the construction of a variety of devices. - suffix: Rating 2 - components: - - type: Sprite - state: nano_mani - - type: MachinePart - rating: 2 - -- type: entity - id: AdvancedMatterBinStockPart - name: advanced matter bin - parent: MatterBinStockPart - description: An advanced matter bin used in the construction of a variety of devices. - suffix: Rating 2 - components: - - type: Sprite - state: advanced_matter_bin - - type: MachinePart - rating: 2 - -# Rating 3 - -- type: entity - id: SuperCapacitorStockPart - name: super capacitor - parent: CapacitorStockPart - description: A super capacitor used in the construction of a variety of devices. - suffix: Rating 3 - components: - - type: Sprite - state: super_capacitor - - type: MachinePart - rating: 3 - -- type: entity - id: PicoManipulatorStockPart - name: super manipulator - parent: MicroManipulatorStockPart - description: A super manipulator used in the construction of a variety of devices. - suffix: Rating 3 - components: - - type: Sprite - state: pico_mani - - type: MachinePart - rating: 3 - -- type: entity - id: SuperMatterBinStockPart - name: super matter bin - parent: MatterBinStockPart - description: A super matter bin used in the construction of a variety of devices. - suffix: Rating 3 - components: - - type: Sprite - state: super_matter_bin - - type: MachinePart - rating: 3 - -# Rating 4 - -- type: entity - id: QuadraticCapacitorStockPart - name: bluespace capacitor - parent: CapacitorStockPart - description: A bluespace capacitor used in the construction of a variety of devices. - suffix: Rating 4 - components: - - type: Sprite - state: quadratic_capacitor - - type: MachinePart - rating: 4 - -- type: entity - id: FemtoManipulatorStockPart - name: bluespace manipulator - parent: MicroManipulatorStockPart - description: A bluespace manipulator used in the construction of a variety of devices. - suffix: Rating 4 - components: - - type: Sprite - state: femto_mani - - type: MachinePart - rating: 4 - -- type: entity - id: BluespaceMatterBinStockPart - name: bluespace matter bin - parent: MatterBinStockPart - description: A bluespace matter bin used in the construction of a variety of devices. - suffix: Rating 4 - components: - - type: Sprite - state: bluespace_matter_bin - - type: MachinePart - rating: 4 - -# Subspace stock parts (REMOVE THESE) - -- type: entity - id: AnsibleSubspaceStockPart - name: subspace ansible - parent: BaseStockPart - description: A compact module capable of sensing extradimensional activity. - components: - - type: Sprite - state: subspace_ansible - -- type: entity - id: FilterSubspaceStockPart - name: hyperwave filter - parent: BaseStockPart - description: A tiny device capable of filtering and converting super-intense radiowaves. - components: - - type: Sprite - state: hyperwave_filter - -- type: entity - id: AmplifierSubspaceStockPart - name: subspace amplifier - parent: BaseStockPart - description: A compact micro-machine capable of amplifying weak subspace transmissions. - components: - - type: Sprite - state: subspace_amplifier - -- type: entity - id: TreatmentSubspaceStockPart - name: subspace treatment disk - parent: BaseStockPart - description: A compact micro-machine capable of stretching out hyper-compressed radio waves. - components: - - type: Sprite - state: treatment_disk - -- type: entity - id: AnalyzerSubspaceStockPart - name: subspace wavelength analyzer - parent: BaseStockPart - description: A sophisticated analyzer capable of analyzing cryptic subspace wavelengths. - components: - - type: Sprite - state: wavelength_analyzer - -- type: entity - id: CrystalSubspaceStockPart - name: ansible crystal - parent: BaseStockPart - description: A crystal made from pure glass used to transmit laser databursts to subspace. - components: - - type: Sprite - state: ansible_crystal - -- type: entity - id: TransmitterSubspaceStockPart - name: subspace transmitter - parent: BaseStockPart - description: A large piece of equipment used to open a window into the subspace dimension. - components: - - type: Sprite - state: subspace_transmitter diff --git a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml index 0dae26e173..fe9dcd1d87 100644 --- a/Resources/Prototypes/Entities/Structures/Machines/lathe.yml +++ b/Resources/Prototypes/Entities/Structures/Machines/lathe.yml @@ -260,12 +260,6 @@ - PillCanister - ChemistryEmptyBottle01 - Drone - - AdvancedCapacitorStockPart - - AdvancedMatterBinStockPart - - NanoManipulatorStockPart - - SuperCapacitorStockPart - - SuperMatterBinStockPart - - PicoManipulatorStockPart - AdvMopItem - WeaponSprayNozzle - ClothingBackpackWaterTank diff --git a/Resources/Prototypes/Recipes/Lathes/Parts.yml b/Resources/Prototypes/Recipes/Lathes/Parts.yml index fdc1b9fd4a..658248c140 100644 --- a/Resources/Prototypes/Recipes/Lathes/Parts.yml +++ b/Resources/Prototypes/Recipes/Lathes/Parts.yml @@ -1,4 +1,3 @@ -#Rating 1 - type: latheRecipe id: CapacitorStockPart result: CapacitorStockPart @@ -22,62 +21,3 @@ materials: Steel: 50 Plastic: 50 - -#Rating 2 -- type: latheRecipe - id: AdvancedCapacitorStockPart - result: AdvancedCapacitorStockPart - completetime: 3 - materials: - Steel: 80 - Plastic: 80 - Plasma: 75 - -- type: latheRecipe - id: AdvancedMatterBinStockPart - result: AdvancedMatterBinStockPart - completetime: 3 - materials: - Steel: 80 - Plastic: 80 - Plasma: 75 - -- type: latheRecipe - id: NanoManipulatorStockPart - result: NanoManipulatorStockPart - completetime: 3 - materials: - Steel: 80 - Plastic: 80 - Plasma: 75 - -#Rating 3 -- type: latheRecipe - id: SuperCapacitorStockPart - result: SuperCapacitorStockPart - completetime: 3 - materials: - Steel: 150 - Plastic: 150 - Plasma: 75 - Gold: 75 - -- type: latheRecipe - id: SuperMatterBinStockPart - result: SuperMatterBinStockPart - completetime: 3 - materials: - Steel: 150 - Plastic: 150 - Plasma: 75 - Gold: 75 - -- type: latheRecipe - id: PicoManipulatorStockPart - result: PicoManipulatorStockPart - completetime: 3 - materials: - Steel: 150 - Plastic: 150 - Plasma: 75 - Gold: 75 diff --git a/Resources/Prototypes/Research/experimental.yml b/Resources/Prototypes/Research/experimental.yml index e447e219fa..c6289fa9c7 100644 --- a/Resources/Prototypes/Research/experimental.yml +++ b/Resources/Prototypes/Research/experimental.yml @@ -84,20 +84,6 @@ # Tier 2 -- type: technology - id: AdvancedParts - name: research-technology-advanced-parts - icon: - sprite: Objects/Misc/stock_parts.rsi - state: advanced_matter_bin - discipline: Experimental - tier: 2 - cost: 10000 - recipeUnlocks: - - AdvancedCapacitorStockPart - - AdvancedMatterBinStockPart - - NanoManipulatorStockPart - - type: technology id: AbnormalArtifactManipulation name: research-technology-abnormal-artifact-manipulation @@ -154,20 +140,6 @@ # Tier 3 -- type: technology - id: SuperParts - name: research-technology-super-parts - icon: - sprite: Objects/Misc/stock_parts.rsi - state: super_matter_bin - discipline: Experimental - tier: 3 - cost: 15000 - recipeUnlocks: - - SuperCapacitorStockPart - - SuperMatterBinStockPart - - PicoManipulatorStockPart - - type: technology id: GravityManipulation name: research-technology-gravity-manipulation diff --git a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml index 5fe619bd4f..c403fa6230 100644 --- a/Resources/Prototypes/XenoArch/Effects/normal_effects.yml +++ b/Resources/Prototypes/XenoArch/Effects/normal_effects.yml @@ -274,7 +274,7 @@ maxRange: 3 baseRadialAcceleration: 1 baseTangentialAcceleration: 3 - + - type: artifactEffect id: EffectAntiMagnet targetDepth: 1 @@ -388,8 +388,8 @@ orGroup: fauna maxAmount: 1 prob: 0.03 - - id: MobMouse - orGroup: fauna + - id: MobMouse + orGroup: fauna - id: MobParrot orGroup: fauna maxAmount: 1 @@ -583,24 +583,6 @@ messages: - shuffle-artifact-popup -- type: artifactEffect - id: EffectT4PartsSpawn - targetDepth: 3 - effectHint: artifact-effect-hint-creation - components: - - type: SpawnArtifact - maxSpawns: 10 - spawns: - - id: QuadraticCapacitorStockPart - prob: 0.5 - maxAmount: 3 - - id: FemtoManipulatorStockPart - prob: 0.5 - maxAmount: 3 - - id: BluespaceMatterBinStockPart - prob: 0.5 - maxAmount: 3 - - type: artifactEffect id: EffectFoamDangerous targetDepth: 3 @@ -681,4 +663,4 @@ - type: SpawnArtifact maxSpawns: 1 spawns: - - id: Singularity \ No newline at end of file + - id: Singularity diff --git a/Resources/ServerInfo/Guidebook/Science/MachineUpgrading.xml b/Resources/ServerInfo/Guidebook/Science/MachineUpgrading.xml index 286219b4d9..b6658f6671 100644 --- a/Resources/ServerInfo/Guidebook/Science/MachineUpgrading.xml +++ b/Resources/ServerInfo/Guidebook/Science/MachineUpgrading.xml @@ -10,14 +10,7 @@ Machines help the station run smoothly, and as a scientist, you can help them ru -You can examine each machine part to see both the type and the rating, which range from 1 to 4. - -Parts of higher levels can be researched as well as found through artifacts or salvage. - - - - - +Machine Parts can be used to create many machines. ## Upgrading To know if a machine can be upgraded, you can examine it and check for the [color=#a4885c]lightning bolt[/color] icon in the lower right corner. Clicking on it will allow you to see what kinds of upgrades the machine has. @@ -29,10 +22,7 @@ To check what parts a machine needs, you can examine its board. Try it here: -You can use any rating part for any part requirement. Using higher rated parts will increase how effective the machine is. -If you want to upgrade an existing machine, simply deconstruct it with a screwdriver and crowbar, and replace the existing parts with parts of a higher level. - -You can also quickly upgrade machines by using an RPED, loading it with machine parts, and then clicking on a machine. It will quickly be upgraded with whatever parts were inserted. +You can also quickly build machines by using an RPED, loading it with machine parts, and then clicking on a machine. diff --git a/Resources/migration.yml b/Resources/migration.yml index 8de131d87b..afb581d315 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -131,3 +131,25 @@ DrinkGoldschlagerGlass: DrinkGildlagerGlass # 2024-01-07 MonkeyCubeBox: VariantCubeBox +# 2024-01-08 +SalvagePartsT4Spawner: SalvageLootSpawner +SalvagePartsT3Spawner: SalvageLootSpawner +SalvagePartsT3T4Spawner: SalvageLootSpawner +SalvagePartsT2Spawner: SalvageLootSpawner +AdvancedCapacitorStockPart: CapacitorStockPart +SuperCapacitorStockPart: CapacitorStockPart +QuadraticCapacitorStockPart: CapacitorStockPart +NanoManipulatorStockPart: MicroManipulatorStockPart +PicoManipulatorStockPart: MicroManipulatorStockPart +FemtoManipulatorStockPart: MicroManipulatorStockPart +AdvancedMatterBinStockPart: MatterBinStockPart +SuperMatterBinStockPart: MatterBinStockPart +BluespaceMatterBinStockPart: MatterBinStockPart +AnsibleSubspaceStockPart: null +FilterSubspaceStockPart: null +AmplifierSubspaceStockPart: null +TreatmentSubspaceStockPart: null +AnalyzerSubspaceStockPart: null +CrystalSubspaceStockPart: null +TransmitterSubspaceStockPart: null +