2021-03-05 11:13:00 +01:00
|
|
|
|
#nullable enable
|
2021-02-27 04:12:09 +01:00
|
|
|
|
using System.Collections.Generic;
|
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;
|
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
2019-04-03 21:20:26 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Maps
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
|
|
|
|
|
[Prototype("tile")]
|
2021-02-20 00:05:24 +01:00
|
|
|
|
public sealed class ContentTileDefinition : IPrototype, ITileDefinition
|
2019-04-03 21:20:26 +02:00
|
|
|
|
{
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[ViewVariables]
|
2021-02-20 00:05:24 +01:00
|
|
|
|
string IPrototype.ID => Name;
|
2019-04-03 21:20:26 +02:00
|
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[field: DataField("name", required: true)] public string Name { get; } = string.Empty;
|
|
|
|
|
|
|
2019-04-03 21:20:26 +02:00
|
|
|
|
public ushort TileId { get; private set; }
|
|
|
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[field: DataField("display_name")] public string DisplayName { get; } = string.Empty;
|
2019-04-03 21:20:26 +02:00
|
|
|
|
|
2021-03-05 01:08:38 +01:00
|
|
|
|
[field: 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-03-05 01:08:38 +01:00
|
|
|
|
[field: 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-03-05 01:08:38 +01:00
|
|
|
|
[field: DataField("footstep_sounds")] public string FootstepSounds { get; } = string.Empty;
|
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-03-05 01:08:38 +01:00
|
|
|
|
[field: DataField("item_drop")] 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; }
|
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
|
|
|
|
}
|
|
|
|
|
|
}
|