* fix a lot of spaces in shuttle call reason * fix tts fatal without api url * Physics Based Air Throws (#342) I've made it so that when a room is explosively depressurized(or when a body of high pressure air flows into one of lower pressure air), that entities inside are launched by the air pressure with effects according to their mass. An entity's mass is now used as an innate resistance to forced movement by airflow, and more massive entities are both less likely to be launched, and will launch less far than others. While lighter entities are launched far more easily, and will shoot off into space quite quickly! Spacing departments has never been so exciting! This can be made extraordinarily fun if more objects are given the ability to injure people when colliding with them at high speeds. As a note, Humans are very unlikely to be sucked into space at a typical force generated from a 101kpa room venting into 0kpa, unless they happened to be standing right next to the opening to space when it was created. The same cannot be said for "Lighter-Than-Human" species such as Felinids and Harpies. I guess that's just the price to pay for being cute. :) On a plus side, because the math behind this is simplified even further than it was before, this actually runs more efficiently than the previous system. Nothing, this is basically done. I've spent a good 6 hours straight finely tuning the system until I was satisfied that it reflects something close to reality. **Before the Space Wind Rework:** https://github.com/Simple-Station/Einstein-Engines/assets/16548818/0bf56c50-58e6-4aef-97f8-027fbe62331e **With this Rework:** https://github.com/Simple-Station/Einstein-Engines/assets/16548818/6be507a9-e9de-4bb8-9d46-8b7c83ed5f1d 🆑 VMSolidus - add: Atmospheric "Throws" are now calculated using object mass, and behave accordingly. Tiny objects will shoot out of rooms quite fast! --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com> * fixes --------- Signed-off-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: VMSolidus <evilexecutive@gmail.com> Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
128 lines
4.6 KiB
C#
128 lines
4.6 KiB
C#
using Content.Shared.Atmos;
|
|
using Content.Shared.Movement.Systems;
|
|
using Content.Shared.Tools;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Shared.Maps
|
|
{
|
|
[Prototype("tile")]
|
|
public sealed partial class ContentTileDefinition : IPrototype, IInheritingPrototype, ITileDefinition
|
|
{
|
|
[ValidatePrototypeId<ToolQualityPrototype>]
|
|
public const string PryingToolQuality = "Prying";
|
|
|
|
public const string SpaceID = "Space";
|
|
|
|
[ParentDataFieldAttribute(typeof(AbstractPrototypeIdArraySerializer<ContentTileDefinition>))]
|
|
public string[]? Parents { get; private set; }
|
|
|
|
[NeverPushInheritance]
|
|
[AbstractDataFieldAttribute]
|
|
public bool Abstract { get; private set; }
|
|
|
|
[IdDataField] public string ID { get; } = string.Empty;
|
|
|
|
public ushort TileId { get; private set; }
|
|
|
|
[DataField("name")]
|
|
public string Name { get; private set; } = "";
|
|
[DataField("sprite")] public ResPath? Sprite { get; private set; }
|
|
|
|
[DataField("edgeSprites")] public Dictionary<Direction, ResPath> EdgeSprites { get; private set; } = new();
|
|
|
|
[DataField("edgeSpritePriority")] public int EdgeSpritePriority { get; private set; } = 0;
|
|
|
|
[DataField("isSubfloor")] public bool IsSubFloor { get; private set; }
|
|
|
|
[DataField("baseTurf")]
|
|
public string BaseTurf { get; private set; } = string.Empty;
|
|
|
|
[DataField]
|
|
public PrototypeFlags<ToolQualityPrototype> DeconstructTools { get; set; } = new();
|
|
|
|
/// <remarks>
|
|
/// Legacy AF but nice to have.
|
|
/// </remarks>
|
|
public bool CanCrowbar => DeconstructTools.Contains(PryingToolQuality);
|
|
|
|
/// <summary>
|
|
/// These play when the mob has shoes on.
|
|
/// </summary>
|
|
[DataField("footstepSounds")] public SoundSpecifier? FootstepSounds { get; private set; }
|
|
|
|
/// <summary>
|
|
/// These play when the mob has no shoes on.
|
|
/// </summary>
|
|
[DataField("barestepSounds")] public SoundSpecifier? BarestepSounds { get; private set; } = new SoundCollectionSpecifier("BarestepHard");
|
|
|
|
[DataField("friction")] public float Friction { get; set; } = 0.2f;
|
|
|
|
[DataField("variants")] public byte Variants { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// This controls what variants the `variantize` command is allowed to use.
|
|
/// </summary>
|
|
[DataField("placementVariants")] public float[] PlacementVariants { get; set; } = { 1f };
|
|
|
|
[DataField("thermalConductivity")] public float ThermalConductivity = 0.04f;
|
|
|
|
// Heat capacity is opt-in, not opt-out.
|
|
[DataField("heatCapacity")] public float HeatCapacity = Atmospherics.MinimumHeatCapacity;
|
|
|
|
[DataField("itemDrop", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string ItemDropPrototypeName { get; private set; } = "FloorTileItemSteel";
|
|
|
|
// TODO rename data-field in yaml
|
|
/// <summary>
|
|
/// Whether or not the tile is exposed to the map's atmosphere.
|
|
/// </summary>
|
|
[DataField("isSpace")] public bool MapAtmosphere { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Friction override for mob mover in <see cref="SharedMoverController"/>
|
|
/// </summary>
|
|
[DataField("mobFriction")]
|
|
public float? MobFriction { get; private set; }
|
|
|
|
/// <summary>
|
|
/// No-input friction override for mob mover in <see cref="SharedMoverController"/>
|
|
/// </summary>
|
|
[DataField("mobFrictionNoInput")]
|
|
public float? MobFrictionNoInput { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Accel override for mob mover in <see cref="SharedMoverController"/>
|
|
/// </summary>
|
|
[DataField("mobAcceleration")]
|
|
public float? MobAcceleration { get; private set; }
|
|
|
|
[DataField("sturdy")] public bool Sturdy { get; private set; } = true;
|
|
|
|
/// <summary>
|
|
/// Can weather affect this tile.
|
|
/// </summary>
|
|
[DataField("weather")] public bool Weather = false;
|
|
|
|
/// <summary>
|
|
/// Is this tile immune to RCD deconstruct.
|
|
/// </summary>
|
|
[DataField("indestructible")] public bool Indestructible = false;
|
|
|
|
public void AssignTileId(ushort id)
|
|
{
|
|
TileId = id;
|
|
}
|
|
|
|
[DataField]
|
|
public bool Reinforced = false;
|
|
|
|
[DataField]
|
|
public float TileRipResistance = 125f;
|
|
}
|
|
}
|