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
This commit is contained in:
Emisse
2024-01-08 16:24:36 -07:00
committed by GitHub
parent e0e4d769ae
commit df1d8c36e5
10 changed files with 36 additions and 406 deletions

View File

@@ -56,34 +56,5 @@ public sealed class MachineConstruction : InteractionTest
await Interact(Bin1, Bin1, Bin1, Manipulator1, Glass, Screw); await Interact(Bin1, Bin1, Bin1, Manipulator1, Glass, Screw);
AssertPrototype("Autolathe"); 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));
}
}
} }

View File

@@ -1,4 +1,3 @@
namespace Content.IntegrationTests.Tests.Interaction; namespace Content.IntegrationTests.Tests.Interaction;
// This partial class contains various constant prototype IDs common to interaction tests. // This partial class contains various constant prototype IDs common to interaction tests.
@@ -28,12 +27,8 @@ public abstract partial class InteractionTest
// Parts // Parts
protected const string Bin1 = "MatterBinStockPart"; protected const string Bin1 = "MatterBinStockPart";
protected const string Bin4 = "BluespaceMatterBinStockPart";
protected const string Cap1 = "CapacitorStockPart"; protected const string Cap1 = "CapacitorStockPart";
protected const string Cap4 = "QuadraticCapacitorStockPart";
protected const string Manipulator1 = "MicroManipulatorStockPart"; protected const string Manipulator1 = "MicroManipulatorStockPart";
protected const string Manipulator4 = "FemtoManipulatorStockPart";
protected const string Battery1 = "PowerCellSmall"; protected const string Battery1 = "PowerCellSmall";
protected const string Battery4 = "PowerCellHyper"; protected const string Battery4 = "PowerCellHyper";
} }

View File

@@ -63,78 +63,23 @@
offset: 0.0 offset: 0.0
- type: entity - type: entity
name: Salvage T2 Machine Parts Spawner name: salvage loot spawner
id: SalvagePartsT2Spawner id: SalvageLootSpawner
parent: MarkerBase parent: MarkerBase
components: components:
- type: Sprite - type: Sprite
layers: layers:
- state: red - state: red
- sprite: Objects/Misc/stock_parts.rsi - sprite: Objects/Weapons/Melee/crusher.rsi
state: advanced_matter_bin state: icon
- type: RandomSpawner - type: RandomSpawner
prototypes: prototypes:
- AdvancedCapacitorStockPart - WeaponCrusher
- NanoManipulatorStockPart - WeaponCrusherDagger
- AdvancedMatterBinStockPart - WeaponCrusherGlaive
- MiningDrill
offset: 0.0 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 - type: entity
name: Salvage Mob Spawner name: Salvage Mob Spawner
id: SalvageMobSpawner id: SalvageMobSpawner

View File

@@ -13,8 +13,6 @@
guides: guides:
- MachineUpgrading - MachineUpgrading
# Rating 1
- type: entity - type: entity
id: CapacitorStockPart id: CapacitorStockPart
name: capacitor name: capacitor
@@ -56,182 +54,3 @@
- type: MachinePart - type: MachinePart
part: MatterBin part: MatterBin
rating: 1 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

View File

@@ -260,12 +260,6 @@
- PillCanister - PillCanister
- ChemistryEmptyBottle01 - ChemistryEmptyBottle01
- Drone - Drone
- AdvancedCapacitorStockPart
- AdvancedMatterBinStockPart
- NanoManipulatorStockPart
- SuperCapacitorStockPart
- SuperMatterBinStockPart
- PicoManipulatorStockPart
- AdvMopItem - AdvMopItem
- WeaponSprayNozzle - WeaponSprayNozzle
- ClothingBackpackWaterTank - ClothingBackpackWaterTank

View File

@@ -1,4 +1,3 @@
#Rating 1
- type: latheRecipe - type: latheRecipe
id: CapacitorStockPart id: CapacitorStockPart
result: CapacitorStockPart result: CapacitorStockPart
@@ -22,62 +21,3 @@
materials: materials:
Steel: 50 Steel: 50
Plastic: 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

View File

@@ -84,20 +84,6 @@
# Tier 2 # 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 - type: technology
id: AbnormalArtifactManipulation id: AbnormalArtifactManipulation
name: research-technology-abnormal-artifact-manipulation name: research-technology-abnormal-artifact-manipulation
@@ -154,20 +140,6 @@
# Tier 3 # 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 - type: technology
id: GravityManipulation id: GravityManipulation
name: research-technology-gravity-manipulation name: research-technology-gravity-manipulation

View File

@@ -274,7 +274,7 @@
maxRange: 3 maxRange: 3
baseRadialAcceleration: 1 baseRadialAcceleration: 1
baseTangentialAcceleration: 3 baseTangentialAcceleration: 3
- type: artifactEffect - type: artifactEffect
id: EffectAntiMagnet id: EffectAntiMagnet
targetDepth: 1 targetDepth: 1
@@ -388,8 +388,8 @@
orGroup: fauna orGroup: fauna
maxAmount: 1 maxAmount: 1
prob: 0.03 prob: 0.03
- id: MobMouse - id: MobMouse
orGroup: fauna orGroup: fauna
- id: MobParrot - id: MobParrot
orGroup: fauna orGroup: fauna
maxAmount: 1 maxAmount: 1
@@ -583,24 +583,6 @@
messages: messages:
- shuffle-artifact-popup - 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 - type: artifactEffect
id: EffectFoamDangerous id: EffectFoamDangerous
targetDepth: 3 targetDepth: 3
@@ -681,4 +663,4 @@
- type: SpawnArtifact - type: SpawnArtifact
maxSpawns: 1 maxSpawns: 1
spawns: spawns:
- id: Singularity - id: Singularity

View File

@@ -10,14 +10,7 @@ Machines help the station run smoothly, and as a scientist, you can help them ru
<GuideEntityEmbed Entity="MatterBinStockPart"/> <GuideEntityEmbed Entity="MatterBinStockPart"/>
<GuideEntityEmbed Entity="MicroManipulatorStockPart"/> <GuideEntityEmbed Entity="MicroManipulatorStockPart"/>
</Box> </Box>
You can examine each machine part to see both the type and the rating, which range from 1 to 4. Machine Parts can be used to create many machines.
Parts of higher levels can be researched as well as found through artifacts or salvage.
<Box>
<GuideEntityEmbed Entity="AdvancedMatterBinStockPart"/>
<GuideEntityEmbed Entity="SuperMatterBinStockPart"/>
<GuideEntityEmbed Entity="BluespaceMatterBinStockPart"/>
</Box>
## Upgrading ## 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. 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:
<GuideEntityEmbed Entity="TraversalDistorterMachineCircuitboard"/> <GuideEntityEmbed Entity="TraversalDistorterMachineCircuitboard"/>
<GuideEntityEmbed Entity="ThermomachineFreezerMachineCircuitBoard"/> <GuideEntityEmbed Entity="ThermomachineFreezerMachineCircuitBoard"/>
</Box> </Box>
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 build machines by using an RPED, loading it with machine parts, and then clicking on a machine.
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.
<GuideEntityEmbed Entity="RPED"/> <GuideEntityEmbed Entity="RPED"/>
</Document> </Document>

View File

@@ -131,3 +131,25 @@ DrinkGoldschlagerGlass: DrinkGildlagerGlass
# 2024-01-07 # 2024-01-07
MonkeyCubeBox: VariantCubeBox 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