diff --git a/Content.Client/IgnoredComponents.cs b/Content.Client/IgnoredComponents.cs
index 5a42a8e583..4b4fe6adc7 100644
--- a/Content.Client/IgnoredComponents.cs
+++ b/Content.Client/IgnoredComponents.cs
@@ -34,6 +34,7 @@ namespace Content.Client
"Smes",
"LightBulb",
"Healing",
+ "Material",
"RangedMagazine",
"Ammo",
"HitscanWeaponCapacitor",
diff --git a/Content.Server/GameObjects/Components/Materials/MaterialComponent.cs b/Content.Server/GameObjects/Components/Materials/MaterialComponent.cs
new file mode 100644
index 0000000000..0d4836e116
--- /dev/null
+++ b/Content.Server/GameObjects/Components/Materials/MaterialComponent.cs
@@ -0,0 +1,49 @@
+using System.Collections.Generic;
+using Content.Shared.Materials;
+using Robust.Shared.GameObjects;
+using Robust.Shared.IoC;
+using Robust.Shared.Log;
+using Robust.Shared.Prototypes;
+using Robust.Shared.Serialization.Manager.Attributes;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
+using Robust.Shared.ViewVariables;
+
+namespace Content.Server.GameObjects.Components.Materials
+{
+ ///
+ /// Component to store data such as "this object is made out of steel".
+ /// This is not a storage system for say smelteries.
+ ///
+ [RegisterComponent]
+ public class MaterialComponent : Component
+ {
+ public override string Name => "Material";
+
+ [ViewVariables]
+ [DataField("materials", customTypeSerializer:typeof(PrototypeIdListSerializer))]
+ // ReSharper disable once CollectionNeverUpdated.Local
+ private readonly List _materials = new();
+ public IEnumerable MaterialIds => _materials;
+
+ ///
+ /// Returns all materials which make up this entity.
+ /// This property has an IoC resolve and is generally slow, so be sure to cache the results if needed.
+ ///
+ [ViewVariables]
+ public IEnumerable Materials
+ {
+ get
+ {
+ var prototypeManager = IoCManager.Resolve();
+
+ foreach (var id in MaterialIds)
+ {
+ if(prototypeManager.TryIndex(id, out var material))
+ yield return material;
+ else
+ Logger.Error($"Material prototype {id} does not exist! Entity: {Owner}");
+ }
+ }
+ }
+ }
+}
diff --git a/Content.Server/GameObjects/Components/Research/LatheComponent.cs b/Content.Server/GameObjects/Components/Research/LatheComponent.cs
index f07d2f19e2..531ea8fd95 100644
--- a/Content.Server/GameObjects/Components/Research/LatheComponent.cs
+++ b/Content.Server/GameObjects/Components/Research/LatheComponent.cs
@@ -3,10 +3,10 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using Content.Server.GameObjects.Components.Materials;
using Content.Server.GameObjects.Components.Power.ApcNetComponents;
using Content.Server.GameObjects.Components.Stack;
using Content.Server.Utility;
-using Content.Shared.GameObjects.Components.Materials;
using Content.Shared.GameObjects.Components.Power;
using Content.Shared.GameObjects.Components.Research;
using Content.Shared.Interfaces.GameObjects.Components;
@@ -160,37 +160,37 @@ namespace Content.Server.GameObjects.Components.Research
var totalAmount = 0;
// Check if it can insert all materials.
- foreach (var (_, mat) in material.MaterialTypes)
+ foreach (var mat in material.MaterialIds)
{
// TODO: Change how MaterialComponent works so this is not hard-coded.
- if (!storage.CanInsertMaterial(mat.ID, VolumePerSheet * multiplier)) return false;
+ if (!storage.CanInsertMaterial(mat, VolumePerSheet * multiplier)) return false;
totalAmount += VolumePerSheet * multiplier;
}
// Check if it can take ALL of the material's volume.
if (storage.CanTakeAmount(totalAmount)) return false;
- foreach (var (_, mat) in material.MaterialTypes)
+ foreach (var mat in material.MaterialIds)
{
- storage.InsertMaterial(mat.ID, VolumePerSheet * multiplier);
+ storage.InsertMaterial(mat, VolumePerSheet * multiplier);
}
State = LatheState.Inserting;
- switch (material.MaterialTypes.First().Value.Name)
+ switch (material.Materials.FirstOrDefault()?.ID)
{
- case "steel":
+ case "Steel":
SetAppearance(LatheVisualState.InsertingMetal);
break;
- case "glass":
+ case "Glass":
SetAppearance(LatheVisualState.InsertingGlass);
break;
- case "gold":
+ case "Gold":
SetAppearance(LatheVisualState.InsertingGold);
break;
- case "plastic":
+ case "Plastic":
SetAppearance(LatheVisualState.InsertingPlastic);
break;
- case "plasma":
+ case "Plasma":
SetAppearance(LatheVisualState.InsertingPlasma);
break;
}
diff --git a/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs b/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs
deleted file mode 100644
index 7af11b96d0..0000000000
--- a/Content.Shared/GameObjects/Components/Materials/MaterialComponent.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using System.Collections.Generic;
-using Content.Shared.Materials;
-using Robust.Shared.GameObjects;
-using Robust.Shared.IoC;
-using Robust.Shared.Prototypes;
-using Robust.Shared.Reflection;
-using Robust.Shared.Serialization;
-using Robust.Shared.Serialization.Manager.Attributes;
-using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
-
-namespace Content.Shared.GameObjects.Components.Materials
-{
- ///
- /// Component to store data such as "this object is made out of steel".
- /// This is not a storage system for say smelteries.
- ///
- [RegisterComponent]
- public class MaterialComponent : Component, ISerializationHooks
- {
- [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
-
- public const string SerializationCache = "mat";
-
- public override string Name => "Material";
-
- [DataField("materials")] private List _materials = new();
-
- public IEnumerable> MaterialTypes
- {
- get
- {
- foreach (var entry in _materials)
- {
- var prototype = _prototypeManager.Index(entry.Value);
-
- yield return new KeyValuePair(entry.Key, prototype);
- }
- }
- }
-
- [DataDefinition]
- public class MaterialDataEntry : ISerializationHooks
- {
- public object Key = default!;
-
- [DataField("key", required: true)]
- public string StringKey = default!;
-
- [DataField("mat", required: true, customTypeSerializer:typeof(PrototypeIdSerializer))]
- public string Value = default!;
-
- void ISerializationHooks.AfterDeserialization()
- {
- var refl = IoCManager.Resolve();
-
- if (refl.TryParseEnumReference(StringKey, out var @enum))
- {
- Key = @enum;
- return;
- }
-
- Key = StringKey;
- }
- }
- }
-
- public enum MaterialKeys
- {
- Stack,
- }
-}
diff --git a/Content.Shared/Materials/Material.cs b/Content.Shared/Materials/Material.cs
deleted file mode 100644
index a6f9a52091..0000000000
--- a/Content.Shared/Materials/Material.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-#nullable enable
-using Robust.Shared.Maths;
-using Robust.Shared.Prototypes;
-using Robust.Shared.Serialization.Manager.Attributes;
-using Robust.Shared.Utility;
-using Robust.Shared.ViewVariables;
-
-namespace Content.Shared.Materials
-{
- ///
- /// Materials are read-only storage for the properties of specific materials.
- /// Properties should be intrinsic (or at least as much is necessary for game purposes).
- ///
- [Prototype("material")]
- [DataDefinition]
- public class MaterialPrototype : IPrototype, IInheritingPrototype
- {
- [ViewVariables]
- [DataField("id", required: true)]
- public string ID { get; } = default!;
-
- [DataField("name")] public string Name { get; private set; } = "unobtanium";
-
- [DataField("color")] public Color Color { get; private set; } = Color.Gray;
-
- ///
- /// Volumetric mass density, in kg.m^-3.
- ///
- [DataField("density")]
- public double Density { get; private set; } = 1;
-
- ///
- /// Electrical resistivity, NOT resistance.
- /// Unit is ohm-meter (Ω⋅m).
- ///
- [DataField("electricResistivity")]
- public double ElectricResistivity { get; private set; } = 1;
-
- ///
- /// Thermal conductivity, in W.m-1.K-1
- ///
- [DataField("thermalConductivity")]
- public double ThermalConductivity { get; private set; } = 1;
-
- ///
- /// Specific heat, in J.kg-1.K-1
- ///
- [DataField("specificHeat")]
- public double SpecificHeat { get; private set; } = 1;
-
- ///
- /// Controls how durable the material is.
- /// Basically how slowly it degrades.
- ///
- [DataField("durability")]
- public double Durability { get; private set; } = 1;
-
- ///
- /// Multiplier for how much this resists damage.
- /// So higher means armor is more effective, for example.
- ///
- [DataField("hardness")]
- public double Hardness { get; private set; } = 1;
-
- ///
- /// Multiplier that determines damage on sharpness-based weapons like knives.
- /// Higher means more damage is done.
- ///
- [DataField("sharpDamage")]
- public double SharpDamage { get; private set; } = 1;
-
- ///
- /// Multiplier that determines damage on blunt-based weapons like clubs.
- /// Higher means more damage is done.
- ///
- [DataField("bluntDamage")]
- public double BluntDamage { get; private set; } = 1;
-
- ///
- /// An icon used to represent the material in graphic interfaces.
- ///
- [DataField("icon")]
- public SpriteSpecifier Icon { get; private set; } = SpriteSpecifier.Invalid;
-
- [DataField("parent")]
- public string? Parent { get; }
-
- [DataField("abstract")]
- public bool Abstract { get; }
- }
-}
diff --git a/Content.Shared/Materials/MaterialPrototype.cs b/Content.Shared/Materials/MaterialPrototype.cs
new file mode 100644
index 0000000000..d2cdce2411
--- /dev/null
+++ b/Content.Shared/Materials/MaterialPrototype.cs
@@ -0,0 +1,50 @@
+#nullable enable
+using Content.Shared.Stacks;
+using Robust.Shared.Maths;
+using Robust.Shared.Prototypes;
+using Robust.Shared.Serialization.Manager.Attributes;
+using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
+using Robust.Shared.Utility;
+using Robust.Shared.ViewVariables;
+
+namespace Content.Shared.Materials
+{
+ ///
+ /// Materials are read-only storage for the properties of specific materials.
+ /// Properties should be intrinsic (or at least as much is necessary for game purposes).
+ ///
+ [Prototype("material")]
+ public class MaterialPrototype : IPrototype, IInheritingPrototype
+ {
+ [ViewVariables]
+ [DataField("parent")]
+ public string? Parent { get; } = null;
+
+ [ViewVariables]
+ [DataField("abstract")]
+ public bool Abstract { get; } = false;
+
+ [ViewVariables]
+ [DataField("id", required: true)]
+ public string ID { get; } = default!;
+
+ [ViewVariables]
+ [DataField("stack", customTypeSerializer:typeof(PrototypeIdSerializer))]
+ public string? StackId { get; } = null;
+
+ [ViewVariables]
+ [DataField("name")]
+ public string Name { get; } = "unobtanium";
+
+ [ViewVariables]
+ [DataField("color")]
+ public Color Color { get; } = Color.Gray;
+
+ ///
+ /// An icon used to represent the material in graphic interfaces.
+ ///
+ [ViewVariables]
+ [DataField("icon")]
+ public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid;
+ }
+}
diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml
index 7195df2ff9..e669d5cb6d 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/glass.yml
@@ -18,11 +18,11 @@
parent: SheetGlassBase
id: SheetGlass
name: glass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: glass
+ - Glass
- type: Stack
stackType: Glass
- type: Sprite
@@ -47,6 +47,7 @@
parent: SheetGlass
id: SheetGlass1
name: glass
+ suffix: Single
components:
- type: Sprite
state: glass
@@ -57,11 +58,11 @@
parent: SheetGlassBase
id: SheetRGlass
name: reinforced glass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: rglass
+ - ReinforcedGlass
- type: Stack
stackType: ReinforcedGlass
- type: Sprite
@@ -86,6 +87,7 @@
parent: SheetRGlass
id: SheetRGlass1
name: reinforced glass
+ suffix: Single
components:
- type: Sprite
state: rglass
@@ -96,11 +98,11 @@
parent: SheetGlassBase
id: SheetPGlass
name: plasma glass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: pglass
+ - PlasmaGlass
- type: Stack
stackType: PlasmaGlass
- type: Sprite
@@ -122,6 +124,7 @@
parent: SheetPGlass
id: SheetPGlass1
name: plasma glass
+ suffix: Single
components:
- type: Sprite
state: pglass
@@ -132,11 +135,11 @@
parent: SheetGlassBase
id: SheetRPGlass
name: reinforced plasma glass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: rpglass
+ - ReinforcedPlasmaGlass
- type: Stack
stackType: ReinforcedPlasmaGlass
- type: Sprite
@@ -158,6 +161,7 @@
parent: SheetPGlass
id: SheetRPGlass1
name: reinforced plasma glass
+ suffix: Single
components:
- type: Sprite
state: rpglass
@@ -168,11 +172,11 @@
parent: SheetGlassBase
id: SheetTitaniumGlass
name: titanium glass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: titaniumglass
+ - TitaniumGlass
- type: Stack
stackType: TitaniumGlass
- type: Sprite
@@ -191,6 +195,7 @@
parent: SheetTitaniumGlass
id: SheetTitaniumGlass1
name: titanium glass
+ suffix: Single
components:
- type: Sprite
state: titaniumglass
@@ -201,11 +206,11 @@
parent: SheetGlassBase
id: SheetPlastitaniumGlass
name: plastitanium glass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: plastitaniumglass
+ - PlastitaniumGlass
- type: Stack
stackType: PlastitaniumGlass
- type: Sprite
@@ -224,6 +229,7 @@
parent: SheetPlastitaniumGlass
id: SheetPlastitaniumGlass1
name: plastitanium glass
+ suffix: Single
components:
- type: Sprite
state: plastitaniumglass
diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml
index cde17b4cf9..90f199947a 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/metal.yml
@@ -18,11 +18,11 @@
parent: SheetMetalBase
id: SheetSteel
name: steel
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: steel
+ - Steel
- type: Stack
stackType: Steel
- type: Sprite
@@ -44,6 +44,7 @@
parent: SheetSteel
id: SheetSteel1
name: steel
+ suffix: Single
components:
- type: Sprite
state: steel
@@ -54,11 +55,11 @@
parent: SheetMetalBase
id: SheetPlasteel
name: plasteel
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: plasteel
+ - Plasteel
- type: Stack
stackType: Plasteel
- type: Sprite
@@ -77,6 +78,7 @@
parent: SheetPlasteel
id: SheetPlasteel1
name: plasteel
+ suffix: Single
components:
- type: Sprite
state: plasteel
@@ -87,11 +89,11 @@
parent: SheetMetalBase
id: SheetTitanium
name: titanium
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: titanium
+ - Titanium
- type: Stack
stackType: Titanium
- type: Sprite
@@ -110,6 +112,7 @@
parent: SheetTitanium
id: SheetTitanium1
name: titanium
+ suffix: Single
components:
- type: Sprite
state: titanium
@@ -120,11 +123,11 @@
parent: SheetMetalBase
id: SheetPlastitanium
name: plastitanium
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: plastitanium
+ - Plastitanium
- type: Stack
stackType: Plastitanium
- type: Sprite
@@ -143,6 +146,7 @@
parent: SheetPlastitanium
id: SheetPlastitanium1
name: plastitanium
+ suffix: Single
components:
- type: Sprite
state: plastitanium
@@ -153,11 +157,11 @@
parent: SheetMetalBase
id: SheetBrass
name: brass
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: brass
+ - Brass
- type: Stack
stackType: Brass
- type: Sprite
@@ -176,6 +180,7 @@
parent: SheetBrass
id: SheetBrass1
name: brass
+ suffix: Single
components:
- type: Sprite
state: brass
diff --git a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml
index 7d95f39d01..71c81c55d0 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/Sheets/other.yml
@@ -18,6 +18,7 @@
parent: SheetOtherBase
id: SheetPaper
name: paper
+ suffix: Full
components:
- type: Stack
stackType: Paper
@@ -37,6 +38,7 @@
parent: SheetPaper
id: SheetPaper1
name: paper
+ suffix: Single
components:
- type: Sprite
state: paper
@@ -47,11 +49,11 @@
parent: SheetOtherBase
id: SheetPhoron
name: phoron
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: phoron
+ - Phoron
- type: Stack
stackType: Phoron
- type: Sprite
@@ -63,7 +65,7 @@
parent: SheetPhoron
id: SheetPhoron1
name: phoron
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -72,11 +74,11 @@
parent: SheetOtherBase
id: SheetPlasma
name: plasma
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: plasma
+ - Plasma
- type: Stack
stackType: Plasma
- type: Sprite
@@ -95,6 +97,7 @@
parent: SheetPlasma
id: SheetPlasma1
name: plasma
+ suffix: Single
components:
- type: Sprite
state: plasma
@@ -105,11 +108,11 @@
parent: SheetOtherBase
id: SheetPlastic
name: plastic
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: plastic
+ - Plastic
- type: Stack
stackType: Plastic
- type: Sprite
@@ -128,6 +131,7 @@
parent: SheetPlastic
id: SheetPlastic1
name: plastic
+ suffix: Single
components:
- type: Sprite
state: plastic
@@ -138,6 +142,7 @@
parent: SheetOtherBase
id: SheetUranium
name: uranium
+ suffix: Full
components:
- type: Stack
stackType: Uranium
@@ -150,7 +155,7 @@
parent: SheetUranium
id: SheetUranium1
name: uranium
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
diff --git a/Resources/Prototypes/Entities/Objects/Materials/ingots.yml b/Resources/Prototypes/Entities/Objects/Materials/ingots.yml
index 2595a65f23..f33022fc65 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/ingots.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/ingots.yml
@@ -18,11 +18,11 @@
parent: IngotBase
id: IngotAdamantine
name: adamantine bar
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: adamantine
+ - Adamantine
- type: Stack
stackType: Adamantine
- type: Sprite
@@ -41,6 +41,7 @@
parent: IngotAdamantine
id: IngotAdamantine1
name: adamantine bar
+ suffix: Single
components:
- type: Sprite
state: adamantine
@@ -51,11 +52,11 @@
parent: IngotBase
id: IngotCopper
name: copper bar
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: copper
+ - Copper
- type: Stack
stackType: Copper
- type: Sprite
@@ -74,6 +75,7 @@
parent: IngotCopper
id: IngotCopper1
name: copper bar
+ suffix: Single
components:
- type: Sprite
state: copper
@@ -84,11 +86,11 @@
parent: IngotBase
id: IngotGold
name: gold bar
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: gold
+ - Gold
- type: Stack
stackType: Gold
- type: Sprite
@@ -107,6 +109,7 @@
parent: IngotGold
id: IngotGold1
name: gold bar
+ suffix: Single
components:
- type: Sprite
state: gold
@@ -117,11 +120,11 @@
parent: IngotBase
id: IngotHydrogen
name: hydrogen bar
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: hydrogen
+ - Hydrogen
- type: Stack
stackType: Hydrogen
- type: Sprite
@@ -140,6 +143,7 @@
parent: IngotHydrogen
id: IngotHydrogen1
name: hydrogen bar
+ suffix: Single
components:
- type: Sprite
state: hydrogen
@@ -150,11 +154,11 @@
parent: IngotBase
id: IngotIron
name: iron bar
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: iron
+ - Iron
- type: Stack
stackType: Iron
- type: Sprite
@@ -173,6 +177,7 @@
parent: IngotIron
id: IngotIron1
name: iron bar
+ suffix: Single
components:
- type: Sprite
state: iron
@@ -183,11 +188,11 @@
parent: IngotBase
id: IngotSilver
name: silver bar
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: silver
+ - Silver
- type: Stack
stackType: Silver
- type: Sprite
@@ -206,6 +211,7 @@
parent: IngotSilver
id: IngotSilver1
name: silver bar
+ suffix: Single
components:
- type: Sprite
state: silver
diff --git a/Resources/Prototypes/Entities/Objects/Materials/materials.yml b/Resources/Prototypes/Entities/Objects/Materials/materials.yml
index d24f573809..7a49f6547a 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/materials.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/materials.yml
@@ -15,6 +15,7 @@
parent: MaterialBase
id: MaterialBananium
name: bananium
+ suffix: Full
components:
- type: Stack
stackType: Bananium
@@ -24,7 +25,7 @@
- type: entity
parent: MaterialBananium
id: MaterialBananium1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -33,6 +34,7 @@
parent: MaterialBase
id: MaterialCloth
name: cloth
+ suffix: Full
components:
- type: Stack
stackType: Cloth
@@ -49,6 +51,7 @@
- type: entity
parent: MaterialCloth
id: MaterialCloth1
+ suffix: Single
components:
- type: Sprite
state: cloth
@@ -59,6 +62,7 @@
parent: MaterialBase
id: MaterialCotton
name: cotton
+ suffix: Full
components:
- type: Stack
stackType: Cotton
@@ -75,6 +79,7 @@
- type: entity
parent: MaterialCotton
id: MaterialCotton1
+ suffix: Single
components:
- type: Sprite
state: cotton
@@ -85,6 +90,7 @@
parent: MaterialBase
id: MaterialDiamond
name: refined diamond
+ suffix: Full
components:
- type: Stack
stackType: Diamond
@@ -96,7 +102,7 @@
- type: entity
parent: MaterialDiamond
id: MaterialDiamond1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -105,6 +111,7 @@
parent: MaterialBase
id: MaterialDurathread
name: durathread
+ suffix: Full
components:
- type: Stack
stackType: Durathread
@@ -121,6 +128,7 @@
- type: entity
parent: MaterialDurathread
id: MaterialDurathread1
+ suffix: Single
components:
- type: Sprite
state: durathread
@@ -131,6 +139,7 @@
parent: MaterialBase
id: MaterialDurathreadRaw
name: raw durathread
+ suffix: Full
components:
- type: Stack
stackType: RawDurathread
@@ -147,6 +156,7 @@
- type: entity
parent: MaterialDurathreadRaw
id: MaterialDurathreadRaw1
+ suffix: Single
components:
- type: Sprite
state: durathreadraw
@@ -157,6 +167,7 @@
parent: MaterialBase
id: MaterialHide
name: hide
+ suffix: Full
components:
- type: Stack
stackType: Hide
@@ -173,6 +184,7 @@
- type: entity
parent: MaterialHide
id: MaterialHide1
+ suffix: Single
components:
- type: Sprite
state: hide
@@ -183,6 +195,7 @@
parent: MaterialBase
id: MaterialLeather
name: leather
+ suffix: Full
components:
- type: Stack
stackType: Leather
@@ -199,6 +212,7 @@
- type: entity
parent: MaterialLeather
id: MaterialLeather1
+ suffix: Single
components:
- type: Sprite
state: leather
@@ -209,11 +223,11 @@
parent: MaterialBase
id: MaterialWoodPlank
name: wood
+ suffix: Full
components:
- type: Material
materials:
- - key: enum.MaterialKeys.Stack
- mat: wood
+ - Wood
- type: Stack
stackType: WoodPlank
- type: Sprite
@@ -224,7 +238,7 @@
- type: entity
parent: MaterialWoodPlank
id: MaterialWoodPlank1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
diff --git a/Resources/Prototypes/Entities/Objects/Materials/ore.yml b/Resources/Prototypes/Entities/Objects/Materials/ore.yml
index 13d26dcc41..28c366d234 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/ore.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/ore.yml
@@ -18,6 +18,7 @@
parent: OreBase
id: AdamantineOre
name: adamantine ore
+ suffix: Full
components:
- type: Stack
stackType: AdamantineOre
@@ -27,7 +28,7 @@
- type: entity
parent: AdamantineOre
id: AdamantineOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -36,6 +37,7 @@
parent: OreBase
id: Ammonia
name: ammonia
+ suffix: Full
components:
- type: Stack
stackType: Ammonia
@@ -45,7 +47,7 @@
- type: entity
parent: Ammonia
id: Ammonia1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -54,6 +56,7 @@
parent: OreBase
id: BananiumOre
name: bananium ore
+ suffix: Full
components:
- type: Stack
stackType: BananiumOre
@@ -63,7 +66,7 @@
- type: entity
parent: BananiumOre
id: BananiumOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -72,6 +75,7 @@
parent: OreBase
id: DiamondRaw
name: raw diamond
+ suffix: Full
components:
- type: Stack
stackType: DiamondOre
@@ -81,7 +85,7 @@
- type: entity
parent: DiamondRaw
id: DiamondRaw1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -90,6 +94,7 @@
parent: OreBase
id: GoldOre
name: gold ore
+ suffix: Full
components:
- type: Stack
stackType: GoldOre
@@ -99,7 +104,7 @@
- type: entity
parent: GoldOre
id: GoldOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -108,6 +113,7 @@
parent: OreBase
id: IronOre
name: iron ore
+ suffix: Full
components:
- type: Stack
stackType: IronOre
@@ -117,7 +123,7 @@
- type: entity
id: IronOre1
parent: IronOre
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -126,6 +132,7 @@
parent: OreBase
id: PhoronOre
name: phoron ore
+ suffix: Full
components:
- type: Stack
stackType: PhoronOre
@@ -135,7 +142,7 @@
- type: entity
parent: PhoronOre
id: PhoronOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -144,6 +151,7 @@
parent: OreBase
id: PlasmaOre
name: plasma ore
+ suffix: Full
components:
- type: Stack
stackType: PlasmaOre
@@ -153,7 +161,7 @@
- type: entity
parent: PlasmaOre
id: PlasmaOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -162,6 +170,7 @@
parent: OreBase
id: Sand
name: sand
+ suffix: Full
components:
- type: Stack
stackType: Sand
@@ -171,7 +180,7 @@
- type: entity
parent: Sand
id: Sand1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -180,6 +189,7 @@
parent: OreBase
id: SandBlack
name: black sand
+ suffix: Full
components:
- type: Stack
stackType: BlackSand
@@ -189,7 +199,7 @@
- type: entity
parent: SandBlack
id: SandBlack1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -198,6 +208,7 @@
parent: OreBase
id: SilverOre
name: silver ore
+ suffix: Full
components:
- type: Stack
stackType: SilverOre
@@ -207,7 +218,7 @@
- type: entity
parent: SilverOre
id: SilverOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -216,6 +227,7 @@
parent: OreBase
id: Slag
name: slag
+ suffix: Full
components:
- type: Stack
stackType: Slag
@@ -225,7 +237,7 @@
- type: entity
parent: Slag
id: Slag1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -234,6 +246,7 @@
parent: OreBase
id: TitaniumOre
name: titanium ore
+ suffix: Full
components:
- type: Stack
stackType: TitaniumOre
@@ -243,7 +256,7 @@
- type: entity
parent: TitaniumOre
id: TitaniumOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
@@ -252,6 +265,7 @@
parent: OreBase
id: UraniumOre
name: uranium ore
+ suffix: Full
components:
- type: Stack
stackType: UraniumOre
@@ -261,7 +275,7 @@
- type: entity
parent: UraniumOre
id: UraniumOre1
- suffix: 1
+ suffix: Single
components:
- type: Stack
count: 1
diff --git a/Resources/Prototypes/Entities/Objects/Materials/parts.yml b/Resources/Prototypes/Entities/Objects/Materials/parts.yml
index fa88d76047..9b735dc5c9 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/parts.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/parts.yml
@@ -15,6 +15,7 @@
parent: PartBase
id: PartRodMetal
name: metals rods
+ suffix: Full
components:
- type: Stack
stackType: MetalRod
@@ -43,6 +44,7 @@
parent: PartRodMetal
id: PartRodMetal1
name: metal rod
+ suffix: Single
components:
- type: Sprite
state: rods
diff --git a/Resources/Prototypes/Reagents/Materials/glass.yml b/Resources/Prototypes/Reagents/Materials/glass.yml
index 32f34622db..c056c78967 100644
--- a/Resources/Prototypes/Reagents/Materials/glass.yml
+++ b/Resources/Prototypes/Reagents/Materials/glass.yml
@@ -1,45 +1,35 @@
- type: material
- id: GlassMaterialBase
- density: 2500
- electricResistivity: 1.0e+13
- thermalConductivity: 0.9
- specificHeat: 840
-
-- type: material
- id: glass
+ id: Glass
+ stack: Glass
name: glass
icon: Objects/Materials/Sheets/glass.rsi/glass.png
- parent: GlassMaterialBase
- type: material
- id: rglass
+ id: ReinforcedGlass
+ stack: ReinforcedGlass
name: reinforced glass
icon: Objects/Materials/Sheets/glass.rsi/rglass.png
- density: 5000
- electricResistivity: 1.0e+13
- thermalConductivity: 0.9
- specificHeat: 5000
- type: material
- id: pglass
+ id: PlasmaGlass
+ stack: PlasmaGlass
name: plasma glass
icon: Objects/Materials/Sheets/glass.rsi/pglass.png
- parent: GlassMaterialBase
- type: material
- id: rpglass
+ id: ReinforcedPlasmaGlass
+ stack: ReinforcedPlasmaGlass
name: reinforced plasma glass
icon: Objects/Materials/Sheets/glass.rsi/rpglass.png
- parent: GlassMaterialBase
- type: material
- id: titaniumglass
+ id: TitaniumGlass
+ stack: TitaniumGlass
name: titanium glass
icon: Objects/Materials/Sheets/glass.rsi/titaniumglass.png
- parent: GlassMaterialBase
- type: material
- id: plastitaniumglass
+ id: PlastitaniumGlass
+ stack: PlastitaniumGlass
name: plastitanium glass
icon: Objects/Materials/Sheets/glass.rsi/plastitaniumglass.png
- parent: GlassMaterialBase
diff --git a/Resources/Prototypes/Reagents/Materials/materials.yml b/Resources/Prototypes/Reagents/Materials/materials.yml
index 7ad318ed04..0d9e94e9e8 100644
--- a/Resources/Prototypes/Reagents/Materials/materials.yml
+++ b/Resources/Prototypes/Reagents/Materials/materials.yml
@@ -1,42 +1,23 @@
- type: material
- id: MaterialBase
- density: 5000
- electricResistivity: 6.9e-7
- thermalConductivity: 18
- specificHeat: 500
-
-- type: material
- id: plasma
+ id: Plasma
+ stack: Plasma
name: plasma
icon: Objects/Materials/Sheets/other.rsi/plasma.png
- density: 200
- electricResistivity: 2.1e-1
- thermalConductivity: 80
- specificHeat: 2000
- type: material
- id: phoron
+ id: Phoron
+ stack: Phoron
name: phoron
icon: Objects/Materials/Sheets/other.rsi/phoron.png
- density: 200
- electricResistivity: 2.1e-1
- thermalConductivity: 80
- specificHeat: 2000
- type: material
- id: plastic
+ id: Plastic
+ stack: Plastic
name: plastic
icon: Objects/Materials/Sheets/other.rsi/plastic.png
- density: 6500
- electricResistivity: 1.0e+13
- thermalConductivity: 1.5
- specificHeat: 600
- type: material
- id: wood
+ id: Wood
+ stack: WoodPlank
name: wood
icon: Objects/Materials/materials.rsi/wood.png
- density: 6000
- electricResistivity: 1.0e+13
- thermalConductivity: 1.5
- specificHeat: 600
diff --git a/Resources/Prototypes/Reagents/Materials/metals.yml b/Resources/Prototypes/Reagents/Materials/metals.yml
index 6c5426129b..18c4ad33fe 100644
--- a/Resources/Prototypes/Reagents/Materials/metals.yml
+++ b/Resources/Prototypes/Reagents/Materials/metals.yml
@@ -1,78 +1,65 @@
- type: material
- id: MetalMaterialBase
- density: 7700
- electricResistivity: 6.9e-7
- thermalConductivity: 18
- specificHeat: 500
-
-- type: material
- id: steel
+ id: Steel
+ stack: Steel
name: steel
icon: Objects/Materials/Sheets/metal.rsi/steel.png
- parent: MetalMaterialBase
- type: material
- id: adamantine
+ id: Adamantine
+ stack: Adamantine
name: adamantine
icon: Objects/Materials/ingots.rsi/adamantine.png
- parent: MetalMaterialBase
- type: material
- id: copper
+ id: Copper
+ stack: Copper
name: copper
icon: Objects/Materials/ingots.rsi/copper.png
- parent: MetalMaterialBase
- type: material
- id: gold
+ id: Gold
+ stack: Gold
name: gold
icon: Objects/Materials/ingots.rsi/gold.png
- density: 10000
- electricResistivity: 8.0e-9
- thermalConductivity: 30
- specificHeat: 1000
- type: material
- id: hydrogen
+ id: Hydrogen
+ stack: Hydrogen
name: hydrogen
icon: Objects/Materials/ingots.rsi/hydrogen.png
- parent: MetalMaterialBase
- type: material
- id: iron
+ id: Iron
+ stack: Iron
name: iron
icon: Objects/Materials/ingots.rsi/iron.png
- parent: MetalMaterialBase
- type: material
- id: silver
+ id: Silver
+ stack: Silver
name: silver
icon: Objects/Materials/ingots.rsi/silver.png
- parent: MetalMaterialBase
- type: material
- id: plasteel
+ id: Plasteel
+ stack: Plasteel
name: plasteel
icon: Objects/Materials/Sheets/metal.rsi/plasteel.png
- density: 15400 # literally arbitrary values...
- electricResistivity: 6.9e-7
- thermalConductivity: 18
- specificHeat: 200
- type: material
- id: brass
+ id: Brass
+ stack: Brass
name: brass
icon: Objects/Materials/Sheets/metal.rsi/brass.png
- parent: MetalMaterialBase
- type: material
- id: titanium
+ id: Titanium
+ stack: Titanium
name: titanium
icon: Objects/Materials/Sheets/metal.rsi/titanium.png
- parent: MetalMaterialBase
- type: material
- id: plastitanium
+ id: Plastitanium
+ stack: Plastitanium
name: plastitanium
icon: Objects/Materials/Sheets/metal.rsi/plastitanium.png
- parent: MetalMaterialBase
diff --git a/SpaceStation14.sln.DotSettings b/SpaceStation14.sln.DotSettings
index fe00eccf41..f49a075a8b 100644
--- a/SpaceStation14.sln.DotSettings
+++ b/SpaceStation14.sln.DotSettings
@@ -178,6 +178,7 @@
True
True
True
+ True
True
True
True