Material cleanup (#4025)

* work

* more work
This commit is contained in:
Vera Aguilera Puerto
2021-05-20 10:37:34 +02:00
committed by GitHub
parent afc8c9163c
commit 3a27490c59
17 changed files with 267 additions and 318 deletions

View File

@@ -34,6 +34,7 @@ namespace Content.Client
"Smes", "Smes",
"LightBulb", "LightBulb",
"Healing", "Healing",
"Material",
"RangedMagazine", "RangedMagazine",
"Ammo", "Ammo",
"HitscanWeaponCapacitor", "HitscanWeaponCapacitor",

View File

@@ -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
{
/// <summary>
/// Component to store data such as "this object is made out of steel".
/// This is not a storage system for say smelteries.
/// </summary>
[RegisterComponent]
public class MaterialComponent : Component
{
public override string Name => "Material";
[ViewVariables]
[DataField("materials", customTypeSerializer:typeof(PrototypeIdListSerializer<MaterialPrototype>))]
// ReSharper disable once CollectionNeverUpdated.Local
private readonly List<string> _materials = new();
public IEnumerable<string> MaterialIds => _materials;
/// <summary>
/// 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.
/// </summary>
[ViewVariables]
public IEnumerable<MaterialPrototype> Materials
{
get
{
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
foreach (var id in MaterialIds)
{
if(prototypeManager.TryIndex<MaterialPrototype>(id, out var material))
yield return material;
else
Logger.Error($"Material prototype {id} does not exist! Entity: {Owner}");
}
}
}
}
}

View File

@@ -3,10 +3,10 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Content.Server.GameObjects.Components.Materials;
using Content.Server.GameObjects.Components.Power.ApcNetComponents; using Content.Server.GameObjects.Components.Power.ApcNetComponents;
using Content.Server.GameObjects.Components.Stack; using Content.Server.GameObjects.Components.Stack;
using Content.Server.Utility; using Content.Server.Utility;
using Content.Shared.GameObjects.Components.Materials;
using Content.Shared.GameObjects.Components.Power; using Content.Shared.GameObjects.Components.Power;
using Content.Shared.GameObjects.Components.Research; using Content.Shared.GameObjects.Components.Research;
using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Interfaces.GameObjects.Components;
@@ -160,37 +160,37 @@ namespace Content.Server.GameObjects.Components.Research
var totalAmount = 0; var totalAmount = 0;
// Check if it can insert all materials. // 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. // 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; totalAmount += VolumePerSheet * multiplier;
} }
// Check if it can take ALL of the material's volume. // Check if it can take ALL of the material's volume.
if (storage.CanTakeAmount(totalAmount)) return false; 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; State = LatheState.Inserting;
switch (material.MaterialTypes.First().Value.Name) switch (material.Materials.FirstOrDefault()?.ID)
{ {
case "steel": case "Steel":
SetAppearance(LatheVisualState.InsertingMetal); SetAppearance(LatheVisualState.InsertingMetal);
break; break;
case "glass": case "Glass":
SetAppearance(LatheVisualState.InsertingGlass); SetAppearance(LatheVisualState.InsertingGlass);
break; break;
case "gold": case "Gold":
SetAppearance(LatheVisualState.InsertingGold); SetAppearance(LatheVisualState.InsertingGold);
break; break;
case "plastic": case "Plastic":
SetAppearance(LatheVisualState.InsertingPlastic); SetAppearance(LatheVisualState.InsertingPlastic);
break; break;
case "plasma": case "Plasma":
SetAppearance(LatheVisualState.InsertingPlasma); SetAppearance(LatheVisualState.InsertingPlasma);
break; break;
} }

View File

@@ -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
{
/// <summary>
/// Component to store data such as "this object is made out of steel".
/// This is not a storage system for say smelteries.
/// </summary>
[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<MaterialDataEntry> _materials = new();
public IEnumerable<KeyValuePair<object, MaterialPrototype>> MaterialTypes
{
get
{
foreach (var entry in _materials)
{
var prototype = _prototypeManager.Index<MaterialPrototype>(entry.Value);
yield return new KeyValuePair<object, MaterialPrototype>(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<MaterialPrototype>))]
public string Value = default!;
void ISerializationHooks.AfterDeserialization()
{
var refl = IoCManager.Resolve<IReflectionManager>();
if (refl.TryParseEnumReference(StringKey, out var @enum))
{
Key = @enum;
return;
}
Key = StringKey;
}
}
}
public enum MaterialKeys
{
Stack,
}
}

View File

@@ -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
{
/// <summary>
/// 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).
/// </summary>
[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;
/// <summary>
/// Volumetric mass density, in kg.m^-3.
/// </summary>
[DataField("density")]
public double Density { get; private set; } = 1;
/// <summary>
/// Electrical resistivity, NOT resistance.
/// Unit is ohm-meter (Ω⋅m).
/// </summary>
[DataField("electricResistivity")]
public double ElectricResistivity { get; private set; } = 1;
/// <summary>
/// Thermal conductivity, in W.m-1.K-1
/// </summary>
[DataField("thermalConductivity")]
public double ThermalConductivity { get; private set; } = 1;
/// <summary>
/// Specific heat, in J.kg-1.K-1
/// </summary>
[DataField("specificHeat")]
public double SpecificHeat { get; private set; } = 1;
/// <summary>
/// Controls how durable the material is.
/// Basically how slowly it degrades.
/// </summary>
[DataField("durability")]
public double Durability { get; private set; } = 1;
/// <summary>
/// Multiplier for how much this resists damage.
/// So higher means armor is more effective, for example.
/// </summary>
[DataField("hardness")]
public double Hardness { get; private set; } = 1;
/// <summary>
/// Multiplier that determines damage on sharpness-based weapons like knives.
/// Higher means more damage is done.
/// </summary>
[DataField("sharpDamage")]
public double SharpDamage { get; private set; } = 1;
/// <summary>
/// Multiplier that determines damage on blunt-based weapons like clubs.
/// Higher means more damage is done.
/// </summary>
[DataField("bluntDamage")]
public double BluntDamage { get; private set; } = 1;
/// <summary>
/// An icon used to represent the material in graphic interfaces.
/// </summary>
[DataField("icon")]
public SpriteSpecifier Icon { get; private set; } = SpriteSpecifier.Invalid;
[DataField("parent")]
public string? Parent { get; }
[DataField("abstract")]
public bool Abstract { get; }
}
}

View File

@@ -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
{
/// <summary>
/// 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).
/// </summary>
[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<StackPrototype>))]
public string? StackId { get; } = null;
[ViewVariables]
[DataField("name")]
public string Name { get; } = "unobtanium";
[ViewVariables]
[DataField("color")]
public Color Color { get; } = Color.Gray;
/// <summary>
/// An icon used to represent the material in graphic interfaces.
/// </summary>
[ViewVariables]
[DataField("icon")]
public SpriteSpecifier Icon { get; } = SpriteSpecifier.Invalid;
}
}

View File

@@ -18,11 +18,11 @@
parent: SheetGlassBase parent: SheetGlassBase
id: SheetGlass id: SheetGlass
name: glass name: glass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Glass
mat: glass
- type: Stack - type: Stack
stackType: Glass stackType: Glass
- type: Sprite - type: Sprite
@@ -47,6 +47,7 @@
parent: SheetGlass parent: SheetGlass
id: SheetGlass1 id: SheetGlass1
name: glass name: glass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: glass state: glass
@@ -57,11 +58,11 @@
parent: SheetGlassBase parent: SheetGlassBase
id: SheetRGlass id: SheetRGlass
name: reinforced glass name: reinforced glass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - ReinforcedGlass
mat: rglass
- type: Stack - type: Stack
stackType: ReinforcedGlass stackType: ReinforcedGlass
- type: Sprite - type: Sprite
@@ -86,6 +87,7 @@
parent: SheetRGlass parent: SheetRGlass
id: SheetRGlass1 id: SheetRGlass1
name: reinforced glass name: reinforced glass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: rglass state: rglass
@@ -96,11 +98,11 @@
parent: SheetGlassBase parent: SheetGlassBase
id: SheetPGlass id: SheetPGlass
name: plasma glass name: plasma glass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - PlasmaGlass
mat: pglass
- type: Stack - type: Stack
stackType: PlasmaGlass stackType: PlasmaGlass
- type: Sprite - type: Sprite
@@ -122,6 +124,7 @@
parent: SheetPGlass parent: SheetPGlass
id: SheetPGlass1 id: SheetPGlass1
name: plasma glass name: plasma glass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: pglass state: pglass
@@ -132,11 +135,11 @@
parent: SheetGlassBase parent: SheetGlassBase
id: SheetRPGlass id: SheetRPGlass
name: reinforced plasma glass name: reinforced plasma glass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - ReinforcedPlasmaGlass
mat: rpglass
- type: Stack - type: Stack
stackType: ReinforcedPlasmaGlass stackType: ReinforcedPlasmaGlass
- type: Sprite - type: Sprite
@@ -158,6 +161,7 @@
parent: SheetPGlass parent: SheetPGlass
id: SheetRPGlass1 id: SheetRPGlass1
name: reinforced plasma glass name: reinforced plasma glass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: rpglass state: rpglass
@@ -168,11 +172,11 @@
parent: SheetGlassBase parent: SheetGlassBase
id: SheetTitaniumGlass id: SheetTitaniumGlass
name: titanium glass name: titanium glass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - TitaniumGlass
mat: titaniumglass
- type: Stack - type: Stack
stackType: TitaniumGlass stackType: TitaniumGlass
- type: Sprite - type: Sprite
@@ -191,6 +195,7 @@
parent: SheetTitaniumGlass parent: SheetTitaniumGlass
id: SheetTitaniumGlass1 id: SheetTitaniumGlass1
name: titanium glass name: titanium glass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: titaniumglass state: titaniumglass
@@ -201,11 +206,11 @@
parent: SheetGlassBase parent: SheetGlassBase
id: SheetPlastitaniumGlass id: SheetPlastitaniumGlass
name: plastitanium glass name: plastitanium glass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - PlastitaniumGlass
mat: plastitaniumglass
- type: Stack - type: Stack
stackType: PlastitaniumGlass stackType: PlastitaniumGlass
- type: Sprite - type: Sprite
@@ -224,6 +229,7 @@
parent: SheetPlastitaniumGlass parent: SheetPlastitaniumGlass
id: SheetPlastitaniumGlass1 id: SheetPlastitaniumGlass1
name: plastitanium glass name: plastitanium glass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: plastitaniumglass state: plastitaniumglass

View File

@@ -18,11 +18,11 @@
parent: SheetMetalBase parent: SheetMetalBase
id: SheetSteel id: SheetSteel
name: steel name: steel
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Steel
mat: steel
- type: Stack - type: Stack
stackType: Steel stackType: Steel
- type: Sprite - type: Sprite
@@ -44,6 +44,7 @@
parent: SheetSteel parent: SheetSteel
id: SheetSteel1 id: SheetSteel1
name: steel name: steel
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: steel state: steel
@@ -54,11 +55,11 @@
parent: SheetMetalBase parent: SheetMetalBase
id: SheetPlasteel id: SheetPlasteel
name: plasteel name: plasteel
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Plasteel
mat: plasteel
- type: Stack - type: Stack
stackType: Plasteel stackType: Plasteel
- type: Sprite - type: Sprite
@@ -77,6 +78,7 @@
parent: SheetPlasteel parent: SheetPlasteel
id: SheetPlasteel1 id: SheetPlasteel1
name: plasteel name: plasteel
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: plasteel state: plasteel
@@ -87,11 +89,11 @@
parent: SheetMetalBase parent: SheetMetalBase
id: SheetTitanium id: SheetTitanium
name: titanium name: titanium
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Titanium
mat: titanium
- type: Stack - type: Stack
stackType: Titanium stackType: Titanium
- type: Sprite - type: Sprite
@@ -110,6 +112,7 @@
parent: SheetTitanium parent: SheetTitanium
id: SheetTitanium1 id: SheetTitanium1
name: titanium name: titanium
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: titanium state: titanium
@@ -120,11 +123,11 @@
parent: SheetMetalBase parent: SheetMetalBase
id: SheetPlastitanium id: SheetPlastitanium
name: plastitanium name: plastitanium
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Plastitanium
mat: plastitanium
- type: Stack - type: Stack
stackType: Plastitanium stackType: Plastitanium
- type: Sprite - type: Sprite
@@ -143,6 +146,7 @@
parent: SheetPlastitanium parent: SheetPlastitanium
id: SheetPlastitanium1 id: SheetPlastitanium1
name: plastitanium name: plastitanium
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: plastitanium state: plastitanium
@@ -153,11 +157,11 @@
parent: SheetMetalBase parent: SheetMetalBase
id: SheetBrass id: SheetBrass
name: brass name: brass
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Brass
mat: brass
- type: Stack - type: Stack
stackType: Brass stackType: Brass
- type: Sprite - type: Sprite
@@ -176,6 +180,7 @@
parent: SheetBrass parent: SheetBrass
id: SheetBrass1 id: SheetBrass1
name: brass name: brass
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: brass state: brass

View File

@@ -18,6 +18,7 @@
parent: SheetOtherBase parent: SheetOtherBase
id: SheetPaper id: SheetPaper
name: paper name: paper
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Paper stackType: Paper
@@ -37,6 +38,7 @@
parent: SheetPaper parent: SheetPaper
id: SheetPaper1 id: SheetPaper1
name: paper name: paper
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: paper state: paper
@@ -47,11 +49,11 @@
parent: SheetOtherBase parent: SheetOtherBase
id: SheetPhoron id: SheetPhoron
name: phoron name: phoron
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Phoron
mat: phoron
- type: Stack - type: Stack
stackType: Phoron stackType: Phoron
- type: Sprite - type: Sprite
@@ -63,7 +65,7 @@
parent: SheetPhoron parent: SheetPhoron
id: SheetPhoron1 id: SheetPhoron1
name: phoron name: phoron
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -72,11 +74,11 @@
parent: SheetOtherBase parent: SheetOtherBase
id: SheetPlasma id: SheetPlasma
name: plasma name: plasma
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Plasma
mat: plasma
- type: Stack - type: Stack
stackType: Plasma stackType: Plasma
- type: Sprite - type: Sprite
@@ -95,6 +97,7 @@
parent: SheetPlasma parent: SheetPlasma
id: SheetPlasma1 id: SheetPlasma1
name: plasma name: plasma
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: plasma state: plasma
@@ -105,11 +108,11 @@
parent: SheetOtherBase parent: SheetOtherBase
id: SheetPlastic id: SheetPlastic
name: plastic name: plastic
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Plastic
mat: plastic
- type: Stack - type: Stack
stackType: Plastic stackType: Plastic
- type: Sprite - type: Sprite
@@ -128,6 +131,7 @@
parent: SheetPlastic parent: SheetPlastic
id: SheetPlastic1 id: SheetPlastic1
name: plastic name: plastic
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: plastic state: plastic
@@ -138,6 +142,7 @@
parent: SheetOtherBase parent: SheetOtherBase
id: SheetUranium id: SheetUranium
name: uranium name: uranium
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Uranium stackType: Uranium
@@ -150,7 +155,7 @@
parent: SheetUranium parent: SheetUranium
id: SheetUranium1 id: SheetUranium1
name: uranium name: uranium
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1

View File

@@ -18,11 +18,11 @@
parent: IngotBase parent: IngotBase
id: IngotAdamantine id: IngotAdamantine
name: adamantine bar name: adamantine bar
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Adamantine
mat: adamantine
- type: Stack - type: Stack
stackType: Adamantine stackType: Adamantine
- type: Sprite - type: Sprite
@@ -41,6 +41,7 @@
parent: IngotAdamantine parent: IngotAdamantine
id: IngotAdamantine1 id: IngotAdamantine1
name: adamantine bar name: adamantine bar
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: adamantine state: adamantine
@@ -51,11 +52,11 @@
parent: IngotBase parent: IngotBase
id: IngotCopper id: IngotCopper
name: copper bar name: copper bar
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Copper
mat: copper
- type: Stack - type: Stack
stackType: Copper stackType: Copper
- type: Sprite - type: Sprite
@@ -74,6 +75,7 @@
parent: IngotCopper parent: IngotCopper
id: IngotCopper1 id: IngotCopper1
name: copper bar name: copper bar
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: copper state: copper
@@ -84,11 +86,11 @@
parent: IngotBase parent: IngotBase
id: IngotGold id: IngotGold
name: gold bar name: gold bar
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Gold
mat: gold
- type: Stack - type: Stack
stackType: Gold stackType: Gold
- type: Sprite - type: Sprite
@@ -107,6 +109,7 @@
parent: IngotGold parent: IngotGold
id: IngotGold1 id: IngotGold1
name: gold bar name: gold bar
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: gold state: gold
@@ -117,11 +120,11 @@
parent: IngotBase parent: IngotBase
id: IngotHydrogen id: IngotHydrogen
name: hydrogen bar name: hydrogen bar
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Hydrogen
mat: hydrogen
- type: Stack - type: Stack
stackType: Hydrogen stackType: Hydrogen
- type: Sprite - type: Sprite
@@ -140,6 +143,7 @@
parent: IngotHydrogen parent: IngotHydrogen
id: IngotHydrogen1 id: IngotHydrogen1
name: hydrogen bar name: hydrogen bar
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: hydrogen state: hydrogen
@@ -150,11 +154,11 @@
parent: IngotBase parent: IngotBase
id: IngotIron id: IngotIron
name: iron bar name: iron bar
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Iron
mat: iron
- type: Stack - type: Stack
stackType: Iron stackType: Iron
- type: Sprite - type: Sprite
@@ -173,6 +177,7 @@
parent: IngotIron parent: IngotIron
id: IngotIron1 id: IngotIron1
name: iron bar name: iron bar
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: iron state: iron
@@ -183,11 +188,11 @@
parent: IngotBase parent: IngotBase
id: IngotSilver id: IngotSilver
name: silver bar name: silver bar
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Silver
mat: silver
- type: Stack - type: Stack
stackType: Silver stackType: Silver
- type: Sprite - type: Sprite
@@ -206,6 +211,7 @@
parent: IngotSilver parent: IngotSilver
id: IngotSilver1 id: IngotSilver1
name: silver bar name: silver bar
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: silver state: silver

View File

@@ -15,6 +15,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialBananium id: MaterialBananium
name: bananium name: bananium
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Bananium stackType: Bananium
@@ -24,7 +25,7 @@
- type: entity - type: entity
parent: MaterialBananium parent: MaterialBananium
id: MaterialBananium1 id: MaterialBananium1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -33,6 +34,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialCloth id: MaterialCloth
name: cloth name: cloth
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Cloth stackType: Cloth
@@ -49,6 +51,7 @@
- type: entity - type: entity
parent: MaterialCloth parent: MaterialCloth
id: MaterialCloth1 id: MaterialCloth1
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: cloth state: cloth
@@ -59,6 +62,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialCotton id: MaterialCotton
name: cotton name: cotton
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Cotton stackType: Cotton
@@ -75,6 +79,7 @@
- type: entity - type: entity
parent: MaterialCotton parent: MaterialCotton
id: MaterialCotton1 id: MaterialCotton1
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: cotton state: cotton
@@ -85,6 +90,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialDiamond id: MaterialDiamond
name: refined diamond name: refined diamond
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Diamond stackType: Diamond
@@ -96,7 +102,7 @@
- type: entity - type: entity
parent: MaterialDiamond parent: MaterialDiamond
id: MaterialDiamond1 id: MaterialDiamond1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -105,6 +111,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialDurathread id: MaterialDurathread
name: durathread name: durathread
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Durathread stackType: Durathread
@@ -121,6 +128,7 @@
- type: entity - type: entity
parent: MaterialDurathread parent: MaterialDurathread
id: MaterialDurathread1 id: MaterialDurathread1
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: durathread state: durathread
@@ -131,6 +139,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialDurathreadRaw id: MaterialDurathreadRaw
name: raw durathread name: raw durathread
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: RawDurathread stackType: RawDurathread
@@ -147,6 +156,7 @@
- type: entity - type: entity
parent: MaterialDurathreadRaw parent: MaterialDurathreadRaw
id: MaterialDurathreadRaw1 id: MaterialDurathreadRaw1
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: durathreadraw state: durathreadraw
@@ -157,6 +167,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialHide id: MaterialHide
name: hide name: hide
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Hide stackType: Hide
@@ -173,6 +184,7 @@
- type: entity - type: entity
parent: MaterialHide parent: MaterialHide
id: MaterialHide1 id: MaterialHide1
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: hide state: hide
@@ -183,6 +195,7 @@
parent: MaterialBase parent: MaterialBase
id: MaterialLeather id: MaterialLeather
name: leather name: leather
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Leather stackType: Leather
@@ -199,6 +212,7 @@
- type: entity - type: entity
parent: MaterialLeather parent: MaterialLeather
id: MaterialLeather1 id: MaterialLeather1
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: leather state: leather
@@ -209,11 +223,11 @@
parent: MaterialBase parent: MaterialBase
id: MaterialWoodPlank id: MaterialWoodPlank
name: wood name: wood
suffix: Full
components: components:
- type: Material - type: Material
materials: materials:
- key: enum.MaterialKeys.Stack - Wood
mat: wood
- type: Stack - type: Stack
stackType: WoodPlank stackType: WoodPlank
- type: Sprite - type: Sprite
@@ -224,7 +238,7 @@
- type: entity - type: entity
parent: MaterialWoodPlank parent: MaterialWoodPlank
id: MaterialWoodPlank1 id: MaterialWoodPlank1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1

View File

@@ -18,6 +18,7 @@
parent: OreBase parent: OreBase
id: AdamantineOre id: AdamantineOre
name: adamantine ore name: adamantine ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: AdamantineOre stackType: AdamantineOre
@@ -27,7 +28,7 @@
- type: entity - type: entity
parent: AdamantineOre parent: AdamantineOre
id: AdamantineOre1 id: AdamantineOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -36,6 +37,7 @@
parent: OreBase parent: OreBase
id: Ammonia id: Ammonia
name: ammonia name: ammonia
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Ammonia stackType: Ammonia
@@ -45,7 +47,7 @@
- type: entity - type: entity
parent: Ammonia parent: Ammonia
id: Ammonia1 id: Ammonia1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -54,6 +56,7 @@
parent: OreBase parent: OreBase
id: BananiumOre id: BananiumOre
name: bananium ore name: bananium ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: BananiumOre stackType: BananiumOre
@@ -63,7 +66,7 @@
- type: entity - type: entity
parent: BananiumOre parent: BananiumOre
id: BananiumOre1 id: BananiumOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -72,6 +75,7 @@
parent: OreBase parent: OreBase
id: DiamondRaw id: DiamondRaw
name: raw diamond name: raw diamond
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: DiamondOre stackType: DiamondOre
@@ -81,7 +85,7 @@
- type: entity - type: entity
parent: DiamondRaw parent: DiamondRaw
id: DiamondRaw1 id: DiamondRaw1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -90,6 +94,7 @@
parent: OreBase parent: OreBase
id: GoldOre id: GoldOre
name: gold ore name: gold ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: GoldOre stackType: GoldOre
@@ -99,7 +104,7 @@
- type: entity - type: entity
parent: GoldOre parent: GoldOre
id: GoldOre1 id: GoldOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -108,6 +113,7 @@
parent: OreBase parent: OreBase
id: IronOre id: IronOre
name: iron ore name: iron ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: IronOre stackType: IronOre
@@ -117,7 +123,7 @@
- type: entity - type: entity
id: IronOre1 id: IronOre1
parent: IronOre parent: IronOre
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -126,6 +132,7 @@
parent: OreBase parent: OreBase
id: PhoronOre id: PhoronOre
name: phoron ore name: phoron ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: PhoronOre stackType: PhoronOre
@@ -135,7 +142,7 @@
- type: entity - type: entity
parent: PhoronOre parent: PhoronOre
id: PhoronOre1 id: PhoronOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -144,6 +151,7 @@
parent: OreBase parent: OreBase
id: PlasmaOre id: PlasmaOre
name: plasma ore name: plasma ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: PlasmaOre stackType: PlasmaOre
@@ -153,7 +161,7 @@
- type: entity - type: entity
parent: PlasmaOre parent: PlasmaOre
id: PlasmaOre1 id: PlasmaOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -162,6 +170,7 @@
parent: OreBase parent: OreBase
id: Sand id: Sand
name: sand name: sand
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Sand stackType: Sand
@@ -171,7 +180,7 @@
- type: entity - type: entity
parent: Sand parent: Sand
id: Sand1 id: Sand1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -180,6 +189,7 @@
parent: OreBase parent: OreBase
id: SandBlack id: SandBlack
name: black sand name: black sand
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: BlackSand stackType: BlackSand
@@ -189,7 +199,7 @@
- type: entity - type: entity
parent: SandBlack parent: SandBlack
id: SandBlack1 id: SandBlack1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -198,6 +208,7 @@
parent: OreBase parent: OreBase
id: SilverOre id: SilverOre
name: silver ore name: silver ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: SilverOre stackType: SilverOre
@@ -207,7 +218,7 @@
- type: entity - type: entity
parent: SilverOre parent: SilverOre
id: SilverOre1 id: SilverOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -216,6 +227,7 @@
parent: OreBase parent: OreBase
id: Slag id: Slag
name: slag name: slag
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: Slag stackType: Slag
@@ -225,7 +237,7 @@
- type: entity - type: entity
parent: Slag parent: Slag
id: Slag1 id: Slag1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -234,6 +246,7 @@
parent: OreBase parent: OreBase
id: TitaniumOre id: TitaniumOre
name: titanium ore name: titanium ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: TitaniumOre stackType: TitaniumOre
@@ -243,7 +256,7 @@
- type: entity - type: entity
parent: TitaniumOre parent: TitaniumOre
id: TitaniumOre1 id: TitaniumOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1
@@ -252,6 +265,7 @@
parent: OreBase parent: OreBase
id: UraniumOre id: UraniumOre
name: uranium ore name: uranium ore
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: UraniumOre stackType: UraniumOre
@@ -261,7 +275,7 @@
- type: entity - type: entity
parent: UraniumOre parent: UraniumOre
id: UraniumOre1 id: UraniumOre1
suffix: 1 suffix: Single
components: components:
- type: Stack - type: Stack
count: 1 count: 1

View File

@@ -15,6 +15,7 @@
parent: PartBase parent: PartBase
id: PartRodMetal id: PartRodMetal
name: metals rods name: metals rods
suffix: Full
components: components:
- type: Stack - type: Stack
stackType: MetalRod stackType: MetalRod
@@ -43,6 +44,7 @@
parent: PartRodMetal parent: PartRodMetal
id: PartRodMetal1 id: PartRodMetal1
name: metal rod name: metal rod
suffix: Single
components: components:
- type: Sprite - type: Sprite
state: rods state: rods

View File

@@ -1,45 +1,35 @@
- type: material - type: material
id: GlassMaterialBase id: Glass
density: 2500 stack: Glass
electricResistivity: 1.0e+13
thermalConductivity: 0.9
specificHeat: 840
- type: material
id: glass
name: glass name: glass
icon: Objects/Materials/Sheets/glass.rsi/glass.png icon: Objects/Materials/Sheets/glass.rsi/glass.png
parent: GlassMaterialBase
- type: material - type: material
id: rglass id: ReinforcedGlass
stack: ReinforcedGlass
name: reinforced glass name: reinforced glass
icon: Objects/Materials/Sheets/glass.rsi/rglass.png icon: Objects/Materials/Sheets/glass.rsi/rglass.png
density: 5000
electricResistivity: 1.0e+13
thermalConductivity: 0.9
specificHeat: 5000
- type: material - type: material
id: pglass id: PlasmaGlass
stack: PlasmaGlass
name: plasma glass name: plasma glass
icon: Objects/Materials/Sheets/glass.rsi/pglass.png icon: Objects/Materials/Sheets/glass.rsi/pglass.png
parent: GlassMaterialBase
- type: material - type: material
id: rpglass id: ReinforcedPlasmaGlass
stack: ReinforcedPlasmaGlass
name: reinforced plasma glass name: reinforced plasma glass
icon: Objects/Materials/Sheets/glass.rsi/rpglass.png icon: Objects/Materials/Sheets/glass.rsi/rpglass.png
parent: GlassMaterialBase
- type: material - type: material
id: titaniumglass id: TitaniumGlass
stack: TitaniumGlass
name: titanium glass name: titanium glass
icon: Objects/Materials/Sheets/glass.rsi/titaniumglass.png icon: Objects/Materials/Sheets/glass.rsi/titaniumglass.png
parent: GlassMaterialBase
- type: material - type: material
id: plastitaniumglass id: PlastitaniumGlass
stack: PlastitaniumGlass
name: plastitanium glass name: plastitanium glass
icon: Objects/Materials/Sheets/glass.rsi/plastitaniumglass.png icon: Objects/Materials/Sheets/glass.rsi/plastitaniumglass.png
parent: GlassMaterialBase

View File

@@ -1,42 +1,23 @@
- type: material - type: material
id: MaterialBase id: Plasma
density: 5000 stack: Plasma
electricResistivity: 6.9e-7
thermalConductivity: 18
specificHeat: 500
- type: material
id: plasma
name: plasma name: plasma
icon: Objects/Materials/Sheets/other.rsi/plasma.png icon: Objects/Materials/Sheets/other.rsi/plasma.png
density: 200
electricResistivity: 2.1e-1
thermalConductivity: 80
specificHeat: 2000
- type: material - type: material
id: phoron id: Phoron
stack: Phoron
name: phoron name: phoron
icon: Objects/Materials/Sheets/other.rsi/phoron.png icon: Objects/Materials/Sheets/other.rsi/phoron.png
density: 200
electricResistivity: 2.1e-1
thermalConductivity: 80
specificHeat: 2000
- type: material - type: material
id: plastic id: Plastic
stack: Plastic
name: plastic name: plastic
icon: Objects/Materials/Sheets/other.rsi/plastic.png icon: Objects/Materials/Sheets/other.rsi/plastic.png
density: 6500
electricResistivity: 1.0e+13
thermalConductivity: 1.5
specificHeat: 600
- type: material - type: material
id: wood id: Wood
stack: WoodPlank
name: wood name: wood
icon: Objects/Materials/materials.rsi/wood.png icon: Objects/Materials/materials.rsi/wood.png
density: 6000
electricResistivity: 1.0e+13
thermalConductivity: 1.5
specificHeat: 600

View File

@@ -1,78 +1,65 @@
- type: material - type: material
id: MetalMaterialBase id: Steel
density: 7700 stack: Steel
electricResistivity: 6.9e-7
thermalConductivity: 18
specificHeat: 500
- type: material
id: steel
name: steel name: steel
icon: Objects/Materials/Sheets/metal.rsi/steel.png icon: Objects/Materials/Sheets/metal.rsi/steel.png
parent: MetalMaterialBase
- type: material - type: material
id: adamantine id: Adamantine
stack: Adamantine
name: adamantine name: adamantine
icon: Objects/Materials/ingots.rsi/adamantine.png icon: Objects/Materials/ingots.rsi/adamantine.png
parent: MetalMaterialBase
- type: material - type: material
id: copper id: Copper
stack: Copper
name: copper name: copper
icon: Objects/Materials/ingots.rsi/copper.png icon: Objects/Materials/ingots.rsi/copper.png
parent: MetalMaterialBase
- type: material - type: material
id: gold id: Gold
stack: Gold
name: gold name: gold
icon: Objects/Materials/ingots.rsi/gold.png icon: Objects/Materials/ingots.rsi/gold.png
density: 10000
electricResistivity: 8.0e-9
thermalConductivity: 30
specificHeat: 1000
- type: material - type: material
id: hydrogen id: Hydrogen
stack: Hydrogen
name: hydrogen name: hydrogen
icon: Objects/Materials/ingots.rsi/hydrogen.png icon: Objects/Materials/ingots.rsi/hydrogen.png
parent: MetalMaterialBase
- type: material - type: material
id: iron id: Iron
stack: Iron
name: iron name: iron
icon: Objects/Materials/ingots.rsi/iron.png icon: Objects/Materials/ingots.rsi/iron.png
parent: MetalMaterialBase
- type: material - type: material
id: silver id: Silver
stack: Silver
name: silver name: silver
icon: Objects/Materials/ingots.rsi/silver.png icon: Objects/Materials/ingots.rsi/silver.png
parent: MetalMaterialBase
- type: material - type: material
id: plasteel id: Plasteel
stack: Plasteel
name: plasteel name: plasteel
icon: Objects/Materials/Sheets/metal.rsi/plasteel.png icon: Objects/Materials/Sheets/metal.rsi/plasteel.png
density: 15400 # literally arbitrary values...
electricResistivity: 6.9e-7
thermalConductivity: 18
specificHeat: 200
- type: material - type: material
id: brass id: Brass
stack: Brass
name: brass name: brass
icon: Objects/Materials/Sheets/metal.rsi/brass.png icon: Objects/Materials/Sheets/metal.rsi/brass.png
parent: MetalMaterialBase
- type: material - type: material
id: titanium id: Titanium
stack: Titanium
name: titanium name: titanium
icon: Objects/Materials/Sheets/metal.rsi/titanium.png icon: Objects/Materials/Sheets/metal.rsi/titanium.png
parent: MetalMaterialBase
- type: material - type: material
id: plastitanium id: Plastitanium
stack: Plastitanium
name: plastitanium name: plastitanium
icon: Objects/Materials/Sheets/metal.rsi/plastitanium.png icon: Objects/Materials/Sheets/metal.rsi/plastitanium.png
parent: MetalMaterialBase

View File

@@ -178,6 +178,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=unexcite/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=unexcite/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unequip/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Unequip/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unlockable/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=unlockable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unobtanium/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unoccluded/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Unoccluded/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=unweld/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=unweld/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=uplink/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=uplink/@EntryIndexedValue">True</s:Boolean>