Files
tbd-station-14/Content.Shared/Maps/ContentTileDefinition.cs
Vera Aguilera Puerto 94fa6efefb Misc Atmos Improvements (#5613)
* Revert "Remove atmos archiving."

This reverts commit 7fa10bd17b.

* Explosive Depressurization now brings tiles down to TCMB.

* Tiles now specify heat capacity.

* Do not serialize archived gas mixture values.

* Remove bad idea

* dumb typo

* Space gas mixtures now have a harcoded heat capacity.
This is a bit of a hack, but rooms exposed to space now cool down properly when monstermos is disabled.
Huge thanks to @LemonInTheDark for helping me with this!

* Clean up heat capacity methods

* Better logging based on the original monstermos' logging

* Comment explosive depressurization hack better
2021-11-30 11:42:48 +01:00

57 lines
2.0 KiB
C#

using Content.Shared.Sound;
using JetBrains.Annotations;
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
using System.Collections.Generic;
using Content.Shared.Atmos;
namespace Content.Shared.Maps
{
[UsedImplicitly]
[Prototype("tile")]
public sealed class ContentTileDefinition : IPrototype, ITileDefinition
{
[ViewVariables]
string IPrototype.ID => Name;
public string Path => "/Textures/Tiles/";
[DataField("name", required: true)] public string Name { get; } = string.Empty;
public ushort TileId { get; private set; }
[DataField("display_name")] public string DisplayName { get; } = string.Empty;
[DataField("texture")] public string SpriteName { get; } = string.Empty;
[DataField("is_subfloor")] public bool IsSubFloor { get; private set; }
[DataField("base_turfs")] public List<string> BaseTurfs { get; } = new();
[DataField("can_crowbar")] public bool CanCrowbar { get; private set; }
[DataField("footstep_sounds")] public SoundSpecifier? FootstepSounds { get; }
[DataField("friction")] public float Friction { get; set; }
[DataField("thermalConductivity")] public float ThermalConductivity { get; set; } = 0.05f;
// Heat capacity is opt-in, not opt-out.
[DataField("heatCapacity")] public float HeatCapacity = Atmospherics.MinimumHeatCapacity;
[DataField("item_drop", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string ItemDropPrototypeName { get; } = "FloorTileItemSteel";
[DataField("is_space")] public bool IsSpace { get; private set; }
[DataField("sturdy")] public bool Sturdy { get; private set; } = true;
public void AssignTileId(ushort id)
{
TileId = id;
}
}
}