From 6f33d3a7f82438ed0a00b08a802cd958b64a3853 Mon Sep 17 00:00:00 2001
From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Date: Wed, 7 Sep 2022 20:35:34 +1200
Subject: [PATCH] Fix more prototypes for save/spawn test (#11087)
---
.../Tests/PrototypeSaveTest.cs | 14 ----
.../EntitySystems/ChemistrySystem.Injector.cs | 1 +
Content.Shared/Tag/TagSystem.cs | 11 +--
.../Clothing/Head/base_clothinghead.yml | 2 +
.../Entities/Clothing/Head/hardhats.yml | 4 +
.../Consumable/Food/Containers/bowl.yml | 3 +
.../Consumable/Food/Containers/condiments.yml | 73 +++++++++++++------
.../Objects/Specific/Medical/healing.yml | 12 +--
.../Entities/Objects/Specific/chemistry.yml | 11 ++-
.../Structures/Power/cable_terminal.yml | 1 +
10 files changed, 81 insertions(+), 51 deletions(-)
diff --git a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs
index 8522b72a91..a792202df6 100644
--- a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs
+++ b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs
@@ -111,16 +111,11 @@ public sealed class PrototypeSaveTest
"CrateArtifactContainer",
"CloningPod",
"DrinkColaCan",
- "FoodBowlBig",
- "FoodBowlFancy",
"MachineFrame",
"WeaponImprovisedPneumaticCannon",
"LauncherCreamPie",
"GravityGenerator",
"GravityGeneratorMini",
- "FoodCondimentPacket",
- "FoodCondimentBottle",
- "FoodCondimentBottleSmall",
"Autolathe",
"Protolathe",
"CircuitImprinter",
@@ -140,25 +135,16 @@ public sealed class PrototypeSaveTest
"LargeBeaker",
"CryostasisBeaker",
"BluespaceBeaker",
- "Syringe",
"ClusterBang",
"ClusterBangFull",
"CargoTelepad",
- "ClothingHeadHatHardhatBlue",
- "ClothingHeadHatHardhatOrange",
- "ClothingHeadHatHardhatRed",
- "ClothingHeadHatHardhatWhite",
- "ClothingHeadHatHardhatYellow",
"Vaccinator",
"AirlockExternalShuttleLocked",
"AirlockExternalGlassShuttleLocked",
"AirlockExternalGlassShuttleEmergencyLocked",
"ConveyorBelt",
"ClothingHeadHatChef",
- "ClothingHeadHelmetFire",
- "ClothingHeadHelmetAtmosFire",
"Bucket",
- "CableTerminal",
"AirlockShuttle",
"AirlockGlassShuttle"
};
diff --git a/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs b/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs
index 01e47ae176..db61b9f522 100644
--- a/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs
+++ b/Content.Server/Chemistry/EntitySystems/ChemistrySystem.Injector.cs
@@ -143,6 +143,7 @@ public sealed partial class ChemistrySystem
private void OnInjectorStartup(EntityUid uid, InjectorComponent component, ComponentStartup args)
{
+ /// ???? why ?????
Dirty(component);
}
diff --git a/Content.Shared/Tag/TagSystem.cs b/Content.Shared/Tag/TagSystem.cs
index d037abf95b..d082f1da0e 100644
--- a/Content.Shared/Tag/TagSystem.cs
+++ b/Content.Shared/Tag/TagSystem.cs
@@ -69,9 +69,8 @@ public sealed class TagSystem : EntitySystem
/// Thrown if no exists with the given id.
///
public bool AddTag(EntityUid entity, string id)
-{
- return EntityManager.EnsureComponent(entity, out var component) &&
- AddTag(component, id);
+ {
+ return AddTag(EnsureComp(entity), id);
}
///
@@ -87,8 +86,7 @@ public sealed class TagSystem : EntitySystem
///
public bool AddTags(EntityUid entity, params string[] ids)
{
- return EntityManager.EnsureComponent(entity, out var component) &&
- AddTags(component, ids);
+ return AddTags(EnsureComp(entity), ids);
}
///
@@ -104,8 +102,7 @@ public sealed class TagSystem : EntitySystem
///
public bool AddTags(EntityUid entity, IEnumerable ids)
{
- return EntityManager.EnsureComponent(entity, out var component) &&
- AddTags(component, ids);
+ return AddTags(EnsureComp(entity), ids);
}
///
diff --git a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml
index 09764de104..a8055f0097 100644
--- a/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml
+++ b/Resources/Prototypes/Entities/Clothing/Head/base_clothinghead.yml
@@ -38,6 +38,8 @@
visible: false
map: [ "light" ]
- type: Clothing
+ equippedPrefix: off
+ - type: Item
heldPrefix: off
- type: ToggleableLightVisuals
- type: PointLight
diff --git a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml
index b50c336fce..ac04b37299 100644
--- a/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml
+++ b/Resources/Prototypes/Entities/Clothing/Head/hardhats.yml
@@ -37,6 +37,10 @@
- type: PowerCellSlot
cellSlot:
startingItem: PowerCellMedium
+ - type: ContainerContainer
+ containers:
+ cell_slot: !type:ContainerSlot
+ - type: ItemSlots
- type: entity
parent: ClothingHeadHatHardhatBase
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
index 5927f90660..95a6bda222 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/bowl.yml
@@ -52,6 +52,9 @@
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
+ - type: Tag
+ tags:
+ - Trash
- type: entity
name: broken bowl
diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/condiments.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/condiments.yml
index 2eca61dda2..f7da7d9d64 100644
--- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/condiments.yml
+++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Containers/condiments.yml
@@ -5,8 +5,9 @@
# Since this one is closed, the only way to insert liquid is with a syringe.
- type: entity
parent: BaseItem
- id: FoodCondimentPacket
+ id: BaseFoodCondimentPacket
name: condiment packet
+ abstract: true
description: A small plastic pack with condiments to put on your food.
components:
- type: Drink
@@ -40,7 +41,15 @@
solution: food
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
+ id: FoodCondimentPacket
+ components:
+ - type: Tag
+ tags:
+ - Trash
+
+- type: entity
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketAstrotame
name: Astrotame
description: The sweetness of a thousand sugars but none of the calories.
@@ -66,7 +75,7 @@
fillBaseName: packet-trans-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketBbq
name: BBQ sauce
description: Hand wipes not included.
@@ -92,7 +101,7 @@
fillBaseName: packet-trans-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketCornoil
name: corn oil
description: Corn oil. A delicious oil used in cooking. Made from corn.
@@ -118,7 +127,7 @@
fillBaseName: packet-trans-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketFrostoil
name: coldsauce
description: Coldsauce. Leaves the tongue numb in its passage.
@@ -144,7 +153,7 @@
fillBaseName: packet-trans-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketHorseradish
name: horseradish sauce
description: A packet of smelly horseradish sauce.
@@ -170,7 +179,7 @@
fillBaseName: packet-solid-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketHotsauce
name: hotsauce
description: You can almost TASTE the stomach ulcers now!
@@ -196,7 +205,7 @@
fillBaseName: packet-trans-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketKetchup
name: ketchup
description: You feel more American already.
@@ -221,7 +230,7 @@
fillBaseName: packet-solid-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketPepper
name: black pepper
description: Often used to flavor food or make people sneeze.
@@ -246,7 +255,7 @@
fillBaseName: packet-solid-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketSalt
name: salt
description: Salt. From space oceans, presumably.
@@ -273,7 +282,7 @@
fillBaseName: packet-solid-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketSoy
name: soy sauce
description: A salty soy-based flavoring.
@@ -298,7 +307,7 @@
fillBaseName: packet-solid-
- type: entity
- parent: FoodCondimentPacket
+ parent: BaseFoodCondimentPacket
id: FoodCondimentPacketSugar
name: sugar
description: Tasty spacey sugar!
@@ -326,7 +335,8 @@
- type: entity
parent: BaseItem
- id: FoodCondimentBottle
+ id: BaseFoodCondimentBottle
+ abstract: true
name: condiment bottle
description: A thin glass bottle used to store condiments.
components:
@@ -358,7 +368,15 @@
solution: food
- type: entity
- parent: FoodCondimentBottle
+ parent: BaseFoodCondimentBottle
+ id: FoodCondimentBottle
+ components:
+ - type: Tag
+ tags:
+ - Trash
+
+- type: entity
+ parent: BaseFoodCondimentBottle
id: FoodCondimentBottleColdsauce
name: coldsauce bottle
description: Leaves the tongue numb in its passage.
@@ -381,7 +399,7 @@
state: bottle-coldsauce
- type: entity
- parent: FoodCondimentBottle
+ parent: BaseFoodCondimentBottle
id: FoodCondimentBottleEnzyme
name: universal enzyme
description: Used in cooking various dishes.
@@ -404,7 +422,7 @@
state: bottle-enzyme
- type: entity
- parent: FoodCondimentBottle
+ parent: BaseFoodCondimentBottle
id: FoodCondimentBottleHotsauce
name: hotsauce
description: You can almost TASTE the stomach ulcers now!
@@ -427,7 +445,7 @@
state: bottle-hotsauce
- type: entity
- parent: FoodCondimentBottle
+ parent: BaseFoodCondimentBottle
id: FoodCondimentBottleKetchup
name: ketchup
description: You feel more American already.
@@ -450,7 +468,7 @@
state: bottle-ketchup
- type: entity
- parent: FoodCondimentBottle
+ parent: BaseFoodCondimentBottle
id: FoodCondimentBottleBBQ
name: BBQ sauce
description: Hand wipes not included.
@@ -477,7 +495,8 @@
- type: entity
parent: BaseItem
- id: FoodCondimentBottleSmall
+ id: BaseFoodCondimentBottleSmall
+ abstract: true
name: condiment bottle
description: A smaller glass bottle used to store condiments.
components:
@@ -507,7 +526,15 @@
solution: food
- type: entity
- parent: FoodCondimentBottleSmall
+ parent: BaseFoodCondimentBottleSmall
+ id: FoodCondimentBottleSmall
+ components:
+ - type: Tag
+ tags:
+ - Trash
+
+- type: entity
+ parent: BaseFoodCondimentBottleSmall
id: FoodCondimentBottleSmallColdsauce
name: coldsauce bottle
description: Leaves the tongue numb in its passage.
@@ -530,7 +557,7 @@
state: bottle-s-coldsauce
- type: entity
- parent: FoodCondimentBottleSmall
+ parent: BaseFoodCondimentBottleSmall
id: FoodCondimentBottleSmallHotsauce
name: hotsauce
description: You can almost TASTE the stomach ulcers now!
@@ -553,7 +580,7 @@
state: bottle-s-hotsauce
- type: entity
- parent: FoodCondimentBottleSmall
+ parent: BaseFoodCondimentBottleSmall
id: FoodCondimentBottleSmallKetchup
name: ketchup
description: You feel more American already.
@@ -576,7 +603,7 @@
state: bottle-s-ketchup
- type: entity
- parent: FoodCondimentBottleSmall
+ parent: BaseFoodCondimentBottleSmall
id: FoodCondimentBottleSmallVinegar
name: vinegar
description: Used in cooking to enhance flavor.
diff --git a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml
index 6e1dc23e74..34e2bca274 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/Medical/healing.yml
@@ -222,7 +222,7 @@
# Syringes
- type: entity
name: ephedrine syringe
- parent: Syringe
+ parent: BaseSyringe
id: SyringeEphedrine
components:
- type: SolutionContainerManager
@@ -235,7 +235,7 @@
- type: entity
name: inaprovaline syringe
- parent: Syringe
+ parent: BaseSyringe
id: SyringeInaprovaline
components:
- type: SolutionContainerManager
@@ -248,7 +248,7 @@
- type: entity
name: tranexamic acid syringe
- parent: Syringe
+ parent: BaseSyringe
id: SyringeTranexamicAcid
components:
- type: SolutionContainerManager
@@ -261,7 +261,7 @@
- type: entity
name: spaceacillin syringe
- parent: Syringe
+ parent: BaseSyringe
id: SyringeSpaceacillin
components:
- type: SolutionContainerManager
@@ -274,7 +274,7 @@
- type: entity
name: ipecac syringe
- parent: Syringe
+ parent: BaseSyringe
id: SyringeIpecac
components:
- type: SolutionContainerManager
@@ -288,7 +288,7 @@
#this is where all the syringes are so i didn't know where to put it
- type: entity
name: corpium syringe
- parent: Syringe
+ parent: BaseSyringe
id: SyringeCorpium
components:
- type: SolutionContainerManager
diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
index 8bb3e3f52b..2c806a84dc 100644
--- a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
+++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml
@@ -210,7 +210,8 @@
name: syringe
parent: BaseItem
description: Used to draw blood samples from mobs, or to inject them with reagents.
- id: Syringe
+ id: BaseSyringe
+ abstract: true
components:
- type: Sprite
sprite: Objects/Specific/Chemistry/syringe.rsi
@@ -239,6 +240,14 @@
maxFillLevels: 4
fillBaseName: syringe
+- type: entity
+ parent: BaseSyringe
+ id: Syringe
+ components:
+ - type: Tag
+ tags:
+ - Trash
+
- type: entity
name: pill
parent: BaseItem
diff --git a/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml b/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml
index 4ae73f7b53..8e65f39c83 100644
--- a/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml
+++ b/Resources/Prototypes/Entities/Structures/Power/cable_terminal.yml
@@ -11,6 +11,7 @@
drawdepth: BelowFloor
- type: Clickable
- type: InteractionOutline
+ - type: CollideOnAnchor
- type: Transform
anchored: true
- type: Damageable