2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2020-02-22 20:30:36 -03:00
|
|
|
using JetBrains.Annotations;
|
2021-02-11 01:13:03 -08:00
|
|
|
using Robust.Shared.Map;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-05-27 11:39:30 +02:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2021-07-10 17:35:33 +02:00
|
|
|
using System.Collections.Generic;
|
2021-11-30 11:42:48 +01:00
|
|
|
using Content.Shared.Atmos;
|
2019-04-03 21:20:26 +02:00
|
|
|
|
|
|
|
|
namespace Content.Shared.Maps
|
|
|
|
|
{
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
[Prototype("tile")]
|
2021-12-02 19:06:48 -07:00
|
|
|
public sealed class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
|
2019-04-03 21:20:26 +02:00
|
|
|
{
|
2021-12-02 19:06:48 -07:00
|
|
|
[DataField("parent", customTypeSerializer:typeof(PrototypeIdSerializer<ContentTileDefinition>))]
|
|
|
|
|
public string? Parent { get; private set; }
|
|
|
|
|
|
|
|
|
|
[NeverPushInheritance]
|
|
|
|
|
[DataField("abstract")]
|
|
|
|
|
public bool Abstract { get; private set; }
|
|
|
|
|
|
2021-07-15 18:30:50 +00:00
|
|
|
public string Path => "/Textures/Tiles/";
|
2021-07-12 10:32:23 +02:00
|
|
|
|
2022-01-04 16:26:07 -08:00
|
|
|
[DataField("id", required: true)] public string ID { get; } = string.Empty;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2019-04-03 21:20:26 +02:00
|
|
|
public ushort TileId { get; private set; }
|
|
|
|
|
|
2022-01-04 16:26:07 -08:00
|
|
|
[DataField("name")] public string Name { get; } = string.Empty;
|
2019-04-03 21:20:26 +02:00
|
|
|
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("texture")] public string SpriteName { get; } = string.Empty;
|
2019-04-04 15:09:06 +02:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("is_subfloor")] public bool IsSubFloor { get; private set; }
|
2020-02-22 20:30:36 -03:00
|
|
|
|
2021-05-04 15:37:16 +02:00
|
|
|
[DataField("base_turfs")] public List<string> BaseTurfs { get; } = new();
|
2019-04-04 15:09:06 +02:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("can_crowbar")] public bool CanCrowbar { get; private set; }
|
2020-11-25 10:48:49 +01:00
|
|
|
|
2021-11-12 11:22:36 +01:00
|
|
|
[DataField("footstep_sounds")] public SoundSpecifier? FootstepSounds { get; }
|
2019-04-05 02:04:34 +02:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("friction")] public float Friction { get; set; }
|
2019-04-11 17:04:48 +02:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("thermalConductivity")] public float ThermalConductivity { get; set; } = 0.05f;
|
2019-11-23 16:10:05 -05:00
|
|
|
|
2021-11-30 11:42:48 +01:00
|
|
|
// Heat capacity is opt-in, not opt-out.
|
|
|
|
|
[DataField("heatCapacity")] public float HeatCapacity = Atmospherics.MinimumHeatCapacity;
|
|
|
|
|
|
2021-05-27 11:39:30 +02:00
|
|
|
[DataField("item_drop", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
public string ItemDropPrototypeName { get; } = "FloorTileItemSteel";
|
2020-08-13 14:18:26 +02:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("is_space")] public bool IsSpace { get; private set; }
|
2021-10-23 19:32:33 -05:00
|
|
|
[DataField("sturdy")] public bool Sturdy { get; private set; } = true;
|
2019-11-23 16:10:05 -05:00
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
public void AssignTileId(ushort id)
|
|
|
|
|
{
|
|
|
|
|
TileId = id;
|
|
|
|
|
}
|
2019-04-03 21:20:26 +02:00
|
|
|
}
|
|
|
|
|
}
|