diff --git a/Content.Client/Overlays/StencilOverlay.Weather.cs b/Content.Client/Overlays/StencilOverlay.Weather.cs index 31bc88af45d1d0..19ee75f05fc26e 100644 --- a/Content.Client/Overlays/StencilOverlay.Weather.cs +++ b/Content.Client/Overlays/StencilOverlay.Weather.cs @@ -12,6 +12,8 @@ public sealed partial class StencilOverlay private void DrawWeather(in OverlayDrawArgs args, WeatherPrototype weatherProto, float alpha, Matrix3 invMatrix) { + if (weatherProto.Sprite == null) + return; var worldHandle = args.WorldHandle; var mapId = args.MapId; var worldAABB = args.WorldAABB; @@ -38,7 +40,7 @@ private void DrawWeather(in OverlayDrawArgs args, WeatherPrototype weatherProto, foreach (var tile in grid.Comp.GetTilesIntersecting(worldAABB)) { // Ignored tiles for stencil - if (_weather.CanWeatherAffect(grid, tile)) + if (_weather.CanWeatherAffect(grid.Owner, grid, tile)) { continue; } diff --git a/Content.Client/Overlays/StencilOverlay.cs b/Content.Client/Overlays/StencilOverlay.cs index e475dca75947b5..04c12a6ab2c5b6 100644 --- a/Content.Client/Overlays/StencilOverlay.cs +++ b/Content.Client/Overlays/StencilOverlay.cs @@ -60,7 +60,8 @@ protected override void Draw(in OverlayDrawArgs args) { if (!_protoManager.TryIndex(proto, out var weatherProto)) continue; - + if (weatherProto.Sprite == null) + continue; var alpha = _weather.GetPercent(weather, mapUid); DrawWeather(args, weatherProto, alpha, invMatrix); } diff --git a/Content.Client/Weather/WeatherSystem.cs b/Content.Client/Weather/WeatherSystem.cs index 24de0bc8c4c405..d4cdb481b28a84 100644 --- a/Content.Client/Weather/WeatherSystem.cs +++ b/Content.Client/Weather/WeatherSystem.cs @@ -2,16 +2,11 @@ using Content.Shared.Weather; using Robust.Client.Audio; using Robust.Client.GameObjects; -using Robust.Client.Graphics; using Robust.Client.Player; -using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Map.Components; -using Robust.Shared.Physics; -using Robust.Shared.Physics.Components; -using Robust.Shared.Physics.Systems; using Robust.Shared.Player; using AudioComponent = Robust.Shared.Audio.Components.AudioComponent; @@ -62,7 +57,7 @@ protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype if (TryComp(entXform.GridUid, out var grid)) { var gridId = entXform.GridUid.Value; - // Floodfill to the nearest tile and use that for audio. + // FloodFill to the nearest tile and use that for audio. var seed = _mapSystem.GetTileRef(gridId, grid, entXform.Coordinates); var frontier = new Queue(); frontier.Enqueue(seed); @@ -75,7 +70,7 @@ protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype if (!visited.Add(node.GridIndices)) continue; - if (!CanWeatherAffect(grid, node)) + if (!CanWeatherAffect(entXform.GridUid.Value, grid, node)) { // Add neighbors // TODO: Ideally we pick some deterministically random direction and use that @@ -107,7 +102,7 @@ protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype if (nearestNode != null) { var entPos = _transform.GetMapCoordinates(entXform); - var nodePosition = nearestNode.Value.ToMap(EntityManager, _transform).Position; + var nodePosition = _transform.ToMapCoordinates(nearestNode.Value).Position; var delta = nodePosition - entPos.Position; var distance = delta.Length(); occlusion = _audio.GetOcclusion(entPos, delta, distance); @@ -164,7 +159,7 @@ private void OnWeatherHandleState(EntityUid uid, WeatherComponent component, ref continue; // New weather - StartWeather(component, ProtoMan.Index(proto), weather.EndTime); + StartWeather(uid, component, ProtoMan.Index(proto), weather.EndTime); } } } diff --git a/Content.Server/Weather/WeatherSystem.cs b/Content.Server/Weather/WeatherSystem.cs index bacdce2b347c57..687db4ba7c4ff1 100644 --- a/Content.Server/Weather/WeatherSystem.cs +++ b/Content.Server/Weather/WeatherSystem.cs @@ -1,17 +1,41 @@ using System.Linq; +using System.Numerics; using Content.Server.Administration; using Content.Shared.Administration; +using Content.Shared.Maps; using Content.Shared.Weather; using Robust.Shared.Console; using Robust.Shared.GameStates; using Robust.Shared.Map; using Robust.Shared.Map.Components; +using Content.Shared.Atmos; +using Robust.Server.Player; +using Robust.Shared.GameObjects; +using Robust.Server.GameObjects; +using Content.Server.Atmos.Components; +using Content.Server.Atmos.EntitySystems; +using Robust.Shared.Map; +using Content.Server.GameTicking; +using Content.Server.Chat.Systems; +using Robust.Shared.Random; +using Content.Server.Radiation.Systems; namespace Content.Server.Weather; public sealed class WeatherSystem : SharedWeatherSystem { [Dependency] private readonly IConsoleHost _console = default!; + [Dependency] private readonly SharedMapSystem _mapSystem = default!; + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly RadiationSystem _radiation = default!; + [Dependency] private readonly TransformSystem _xform = default!; + + private List> _grids = new(); public override void Initialize() { @@ -22,6 +46,20 @@ public override void Initialize() Loc.GetString("cmd-weather-help"), WeatherTwo, WeatherCompletion); + SubscribeLocalEvent(OnMapInit); + } + + private void OnMapInit(EntityUid uid, WeatherComponent component, MapInitEvent args) + { + Logger.InfoS("weather", $"UID = {uid}!"); + EnsureComp(uid); + var mapId = _entManager.GetComponent(uid).MapID; + if (!ProtoMan.TryIndex("Default", out var weatherProto)) + return; + var curTime = Timing.CurTime; + Logger.InfoS("weather", $"proto = {weatherProto}!"); + SetWeather(mapId, weatherProto, curTime + TimeSpan.FromSeconds(30)); + } private void OnWeatherGetState(EntityUid uid, WeatherComponent component, ref ComponentGetState args) @@ -30,61 +68,54 @@ private void OnWeatherGetState(EntityUid uid, WeatherComponent component, ref Co } [AdminCommand(AdminFlags.Fun)] - private void WeatherTwo(IConsoleShell shell, string argstr, string[] args) + private void WeatherTwo(IConsoleShell shell, string argStr, string[] args) { if (args.Length < 2) { - shell.WriteError($"A"); + shell.WriteError(Loc.GetString("cmd-weather-error-no-arguments")); return; } if (!int.TryParse(args[0], out var mapInt)) - { return; - } var mapId = new MapId(mapInt); if (!MapManager.MapExists(mapId)) - { return; + + if (!_mapSystem.TryGetMap(mapId, out var mapUid)) + return; + + var weatherComp = EnsureComp(mapUid.Value); + + //Weather Proto parsing + WeatherPrototype? weather = null; + if (!args[1].Equals("null")) + { + if (!ProtoMan.TryIndex(args[1], out weather)) + { + shell.WriteError(Loc.GetString("cmd-weather-error-unknown-proto")); + return; + } } + //Time parsing TimeSpan? endTime = null; - if (args.Length == 3) { + var curTime = Timing.CurTime; if (int.TryParse(args[2], out var durationInt)) { - var curTime = Timing.CurTime; - var maxTime = TimeSpan.MaxValue; - - // If it's already running then just fade out with how much time we're into the weather. - if (TryComp(MapManager.GetMapEntityId(mapId), out var weatherComp) && - weatherComp.Weather.TryGetValue(args[1], out var existing)) - { - maxTime = curTime - existing.StartTime; - } - endTime = curTime + TimeSpan.FromSeconds(durationInt); - - if (endTime > maxTime) - endTime = maxTime; + } + else + { + shell.WriteError(Loc.GetString("cmd-weather-error-wrong-time")); } } - if (args[1].Equals("null")) - { - SetWeather(mapId, null, endTime); - } - else if (ProtoMan.TryIndex(args[1], out var weatherProto)) - { - SetWeather(mapId, weatherProto, endTime); - } - else - { - shell.WriteError($"Unable to parse weather prototype"); - } + SetWeather(mapId, weather, endTime); } private CompletionResult WeatherCompletion(IConsoleShell shell, string[] args) @@ -95,4 +126,68 @@ private CompletionResult WeatherCompletion(IConsoleShell shell, string[] args) var a = CompletionHelper.PrototypeIDs(true, ProtoMan); return CompletionResult.FromHintOptions(a, Loc.GetString("cmd-weather-hint")); } + + protected override void Run(EntityUid uid, WeatherData weather, WeatherPrototype weatherProto, float frameTime) + { + var atmosphereSystem = _entManager.System(); + + foreach (var session in _playerManager.Sessions) + { + if (session.AttachedEntity is not {Valid: true} entity) + continue; + var transform = Transform(entity); + var gridUid = transform.GridUid; + + if (!TryComp(gridUid, out var map)) + return; + var tiles = map.GetTilesIntersecting(Box2.CenteredAround(transform.WorldPosition, + new Vector2(5, 5))).ToArray(); + + foreach(var tile in tiles) + { + var tileDef = (ContentTileDefinition) _tileDefManager[tile.Tile.TypeId]; + var environment = atmosphereSystem.GetTileMixture(tile.GridUid, transform.MapUid, tile.GridIndices, false); + if(environment == null) + continue; + if(tileDef.Weather) + environment.Temperature = weatherProto.Temperature; + else + environment.Temperature = 293.15f; + } + } + } + + public override void SelectNewWeather(EntityUid uid, WeatherComponent component, string proto) + { + var mapId = _entManager.GetComponent(uid).MapID; + if (!TryComp(MapManager.GetMapEntityId(mapId), out var weatherComp)) + return; + var curTime = Timing.CurTime; + + if(proto == "Default") + { + if (!ProtoMan.TryGetRandom(_random, out var wproto)) + return; + Logger.InfoS("weather", $"new weather = {proto}!"); + var weatherProto = (WeatherPrototype) wproto; + SetWeather(mapId, weatherProto, curTime + TimeSpan.FromSeconds(weatherProto.Duration)); + if(weatherProto.ShowMessage && weatherProto.Message != string.Empty) + { + var message = Loc.GetString(weatherProto.Message); + var sender = weatherProto.Sender != null ? Loc.GetString(weatherProto.Sender) : "Inner feeling"; + var color = weatherProto.Color != null ? weatherProto.Color : Color.LightGray; + _chat.DispatchGlobalAnnouncement(message, sender, playSound: false, null, color); + } + } + + else + { + if(!ProtoMan.TryIndex("Default", out var weatherProto)) + return; + Logger.InfoS("weather", $"proto = {weatherProto}!"); + SetWeather(mapId, weatherProto, curTime + TimeSpan.FromSeconds(weatherProto.Duration)); + + } + } + } diff --git a/Content.Shared/Weather/SharedWeatherSystem.cs b/Content.Shared/Weather/SharedWeatherSystem.cs index 45a2afe7cd980f..425de85df38ad1 100644 --- a/Content.Shared/Weather/SharedWeatherSystem.cs +++ b/Content.Shared/Weather/SharedWeatherSystem.cs @@ -1,12 +1,12 @@ using Content.Shared.Maps; -using Robust.Shared.Audio; using Robust.Shared.Audio.Systems; using Robust.Shared.Map; using Robust.Shared.Map.Components; -using Robust.Shared.Physics.Components; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Timing; +using Robust.Shared.Random; +using Robust.Shared.GameObjects; namespace Content.Shared.Weather; @@ -18,15 +18,16 @@ public abstract class SharedWeatherSystem : EntitySystem [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!; [Dependency] private readonly MetaDataSystem _metadata = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly IEntityManager _entManager = default!; + [Dependency] private readonly SharedMapSystem _mapSystem = default!; private EntityQuery _blockQuery; - private EntityQuery _physicsQuery; public override void Initialize() { base.Initialize(); _blockQuery = GetEntityQuery(); - _physicsQuery = GetEntityQuery(); SubscribeLocalEvent(OnWeatherUnpaused); } @@ -41,9 +42,7 @@ private void OnWeatherUnpaused(EntityUid uid, WeatherComponent component, ref En } } - public bool CanWeatherAffect( - MapGridComponent grid, - TileRef tileRef) + public bool CanWeatherAffect(EntityUid uid, MapGridComponent grid, TileRef tileRef) { if (tileRef.Tile.IsEmpty) return true; @@ -53,9 +52,9 @@ public bool CanWeatherAffect( if (!tileDef.Weather) return false; - var anchoredEnts = grid.GetAnchoredEntitiesEnumerator(tileRef.GridIndices); + var anchoredEntities = _mapSystem.GetAnchoredEntitiesEnumerator(uid, grid, tileRef.GridIndices); - while (anchoredEnts.MoveNext(out var ent)) + while (anchoredEntities.MoveNext(out var ent)) { if (_blockQuery.HasComponent(ent.Value)) return false; @@ -89,6 +88,32 @@ public float GetPercent(WeatherData component, EntityUid mapUid) return alpha; } + public virtual void SelectNewWeather(EntityUid uid, WeatherComponent component, string proto) + { + Logger.InfoS("weather", $"UID = {uid}!"); + var mapId = _entManager.GetComponent(uid).MapID; + if (!TryComp(MapManager.GetMapEntityId(mapId), out var weatherComp)) + return; + var curTime = Timing.CurTime; + + if(proto == "Default") + { + if (!ProtoMan.TryGetRandom(_random, out var weatherProto)) + return; + Logger.InfoS("weather", $"proto = {weatherProto}!"); + + SetWeather(mapId, (WeatherPrototype) weatherProto, curTime + TimeSpan.FromSeconds(30)); + } + + else + { + if(!ProtoMan.TryIndex("Default", out var weatherProto)) + return; + Logger.InfoS("weather", $"proto = {weatherProto}!"); + SetWeather(mapId, weatherProto, curTime + TimeSpan.FromSeconds(30)); + + } + } public override void Update(float frameTime) { @@ -104,7 +129,8 @@ public override void Update(float frameTime) { if (comp.Weather.Count == 0) continue; - + try + { foreach (var (proto, weather) in comp.Weather) { var endTime = weather.EndTime; @@ -113,6 +139,7 @@ public override void Update(float frameTime) if (endTime != null && endTime < curTime) { EndWeather(uid, comp, proto); + SelectNewWeather(uid, comp, proto); continue; } @@ -123,6 +150,7 @@ public override void Update(float frameTime) { Log.Error($"Unable to find weather prototype for {comp.Weather}, ending!"); EndWeather(uid, comp, proto); + SelectNewWeather(uid, comp, proto); continue; } @@ -146,6 +174,11 @@ public override void Update(float frameTime) // Run whatever code we need. Run(uid, weather, weatherProto, frameTime); } + } + catch(InvalidOperationException) + { + // we have it since dictionary is changed in foreach loop when weather is changing. It seem not to affect anything + } } } @@ -154,20 +187,25 @@ public override void Update(float frameTime) /// public void SetWeather(MapId mapId, WeatherPrototype? proto, TimeSpan? endTime) { - var mapUid = MapManager.GetMapEntityId(mapId); - var weatherComp = EnsureComp(mapUid); + if (!_mapSystem.TryGetMap(mapId, out var mapUid)) + return; + + var weatherComp = EnsureComp(mapUid.Value); foreach (var (eProto, weather) in weatherComp.Weather) { + // if we turn off the weather, we don't want endTime = null + if (proto == null) + endTime ??= Timing.CurTime + WeatherComponent.ShutdownTime; + // Reset cooldown if it's an existing one. - if (eProto == proto?.ID) + if (proto is not null && eProto == proto.ID) { weather.EndTime = endTime; - if (weather.State == WeatherState.Ending) weather.State = WeatherState.Running; - Dirty(mapUid, weatherComp); + Dirty(mapUid.Value, weatherComp); continue; } @@ -177,12 +215,12 @@ public void SetWeather(MapId mapId, WeatherPrototype? proto, TimeSpan? endTime) if (weather.EndTime == null || weather.EndTime > end) { weather.EndTime = end; - Dirty(mapUid, weatherComp); + Dirty(mapUid.Value, weatherComp); } } if (proto != null) - StartWeather(weatherComp, proto, endTime); + StartWeather(mapUid.Value, weatherComp, proto, endTime); } /// @@ -190,7 +228,7 @@ public void SetWeather(MapId mapId, WeatherPrototype? proto, TimeSpan? endTime) /// protected virtual void Run(EntityUid uid, WeatherData weather, WeatherPrototype weatherProto, float frameTime) {} - protected void StartWeather(WeatherComponent component, WeatherPrototype weather, TimeSpan? endTime) + protected void StartWeather(EntityUid uid, WeatherComponent component, WeatherPrototype weather, TimeSpan? endTime) { if (component.Weather.ContainsKey(weather.ID)) return; @@ -229,9 +267,9 @@ protected virtual bool SetState(WeatherState state, WeatherComponent component, [Serializable, NetSerializable] protected sealed class WeatherComponentState : ComponentState { - public Dictionary Weather; + public Dictionary, WeatherData> Weather; - public WeatherComponentState(Dictionary weather) + public WeatherComponentState(Dictionary, WeatherData> weather) { Weather = weather; } diff --git a/Content.Shared/Weather/WeatherComponent.cs b/Content.Shared/Weather/WeatherComponent.cs index df73109ac4949d..eaf901fb4245c9 100644 --- a/Content.Shared/Weather/WeatherComponent.cs +++ b/Content.Shared/Weather/WeatherComponent.cs @@ -1,8 +1,7 @@ -using Robust.Shared.Audio; using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Shared.Weather; @@ -12,8 +11,8 @@ public sealed partial class WeatherComponent : Component /// /// Currently running weathers /// - [ViewVariables, DataField("weather", customTypeSerializer:typeof(PrototypeIdDictionarySerializer))] - public Dictionary Weather = new(); + [DataField] + public Dictionary, WeatherData> Weather = new(); public static readonly TimeSpan StartupTime = TimeSpan.FromSeconds(15); public static readonly TimeSpan ShutdownTime = TimeSpan.FromSeconds(15); @@ -29,19 +28,19 @@ public sealed partial class WeatherData /// /// When the weather started if relevant. /// - [ViewVariables, DataField("startTime", customTypeSerializer: typeof(TimeOffsetSerializer))] + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] //TODO: Remove Custom serializer public TimeSpan StartTime = TimeSpan.Zero; /// /// When the applied weather will end. /// - [ViewVariables(VVAccess.ReadWrite), DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))] + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] //TODO: Remove Custom serializer public TimeSpan? EndTime; [ViewVariables] public TimeSpan Duration => EndTime == null ? TimeSpan.MaxValue : EndTime.Value - StartTime; - [DataField("state")] + [DataField] public WeatherState State = WeatherState.Invalid; } diff --git a/Content.Shared/Weather/WeatherPrototype.cs b/Content.Shared/Weather/WeatherPrototype.cs index 3803c37d4ce886..5c476cef7a439c 100644 --- a/Content.Shared/Weather/WeatherPrototype.cs +++ b/Content.Shared/Weather/WeatherPrototype.cs @@ -9,8 +9,8 @@ public sealed partial class WeatherPrototype : IPrototype { [IdDataField] public string ID { get; } = default!; - [ViewVariables(VVAccess.ReadWrite), DataField("sprite", required: true)] - public SpriteSpecifier Sprite = default!; + [ViewVariables(VVAccess.ReadWrite), DataField("sprite")] + public SpriteSpecifier? Sprite; [ViewVariables(VVAccess.ReadWrite), DataField("color")] public Color? Color; @@ -20,4 +20,47 @@ public sealed partial class WeatherPrototype : IPrototype /// [ViewVariables(VVAccess.ReadWrite), DataField("sound")] public SoundSpecifier? Sound; + + /// + /// Weather temperature applied to floors. + /// + [ViewVariables(VVAccess.ReadWrite), DataField("temperature")] + public float Temperature = 308.15f; + + /// + /// Locale id of the weather announcement message. + /// + [ViewVariables(VVAccess.ReadWrite), DataField("message")] + public LocId Message = string.Empty; + + /// + /// Locale id of the announcement's sender, defaults to Inner Feeling. + /// + [ViewVariables(VVAccess.ReadWrite), DataField("sender")] + public LocId? Sender; + + /// + /// Whenever to show message about new weather or not. + /// + [ViewVariables(VVAccess.ReadWrite), DataField("showMessage")] + public Boolean ShowMessage = false; + + /// + /// If weather should deal radiation damage. + /// + [ViewVariables(VVAccess.ReadWrite), DataField("radioactive")] + public Boolean Radioactive = false; + + /// + /// How many rads damage per second + /// + [ViewVariables(VVAccess.ReadWrite), DataField("rads")] + public float RadsPerSecond = 1; + + /// + /// How long is the weather, in seconds + /// + [ViewVariables(VVAccess.ReadWrite), DataField("duration")] + public float Duration = 300; + } diff --git a/Resources/Locale/en-US/Nuclear14/Special/reagent-effects.ftl b/Resources/Locale/en-US/Nuclear14/Special/reagent-effects.ftl deleted file mode 100644 index 742cb8d4ce47e1..00000000000000 --- a/Resources/Locale/en-US/Nuclear14/Special/reagent-effects.ftl +++ /dev/null @@ -1,43 +0,0 @@ -# guidebook reagent special effects - -reagent-effect-guidebook-strength-modifier = - { $chance -> - [1] Modifies - *[other] modify - } strength by {$strength} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} - -reagent-effect-guidebook-perception-modifier = - { $chance -> - [1] Modifies - *[other] modify - } perception by {$perception} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} - -reagent-effect-guidebook-endurance-modifier = - { $chance -> - [1] Modifies - *[other] modify - } endurance by {$endurance} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} - -reagent-effect-guidebook-charisma-modifier = - { $chance -> - [1] Modifies - *[other] modify - } charisma by {$charisma} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} - -reagent-effect-guidebook-intelligence-modifier = - { $chance -> - [1] Modifies - *[other] modify - } intelligence by {$intelligence} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} - -reagent-effect-guidebook-agility-modifier = - { $chance -> - [1] Modifies - *[other] modify - } agility by {$agility} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} - -reagent-effect-guidebook-luck-modifier = - { $chance -> - [1] Modifies - *[other] modify - } luck by {$luck} for at least {NATURALFIXED($time, 3)} {MANY("second", $time)} diff --git a/Resources/Locale/en-US/Nuclear14/Special/special-character-screen-description.ftl b/Resources/Locale/en-US/Nuclear14/Special/special-character-screen-description.ftl deleted file mode 100644 index 30b2fad3757fdd..00000000000000 --- a/Resources/Locale/en-US/Nuclear14/Special/special-character-screen-description.ftl +++ /dev/null @@ -1,8 +0,0 @@ -# Description of Special labels in character creation screen -special-character-creation-description-strength = Modifies your Melee damage -special-character-creation-description-perception = Modifies your shooting accuracy -special-character-creation-description-endurance = Modifies your HP -special-character-creation-description-charisma = Gives you accent if below 3 -special-character-creation-description-intelligence = Modifies medicine -special-character-creation-description-agility = Agility -special-character-creation-description-luck = Gives you 1% chance to pass bullet \ No newline at end of file diff --git a/Resources/Locale/en-US/Nuclear14/Special/special-character-screen.ftl b/Resources/Locale/en-US/Nuclear14/Special/special-character-screen.ftl deleted file mode 100644 index 60138f1fcf49d7..00000000000000 --- a/Resources/Locale/en-US/Nuclear14/Special/special-character-screen.ftl +++ /dev/null @@ -1,14 +0,0 @@ -humanoid-profile-editor-special-priority-one-button = 1 -humanoid-profile-editor-special-priority-two-button = 2 -humanoid-profile-editor-special-priority-three-button = 3 -humanoid-profile-editor-special-priority-four-button = 4 -humanoid-profile-editor-special-priority-five-button = 5 -humanoid-profile-editor-special-priority-six-button = 6 -humanoid-profile-editor-special-priority-seven-button = 7 -humanoid-profile-editor-special-priority-eight-button = 8 -humanoid-profile-editor-special-priority-nine-button = 9 -humanoid-profile-editor-special-priority-ten-button = 10 - -humanoid-profile-editor-specials-tab = Special - -humanoid-profile-editor-special-points-label = {$points} left of {$max} points \ No newline at end of file diff --git a/Resources/Locale/en-US/Nuclear14/Special/special.ftl b/Resources/Locale/en-US/Nuclear14/Special/special.ftl deleted file mode 100644 index e0f3bd94bca277..00000000000000 --- a/Resources/Locale/en-US/Nuclear14/Special/special.ftl +++ /dev/null @@ -1,26 +0,0 @@ -# Clothing Special Modifiers examine -clothing-special-examinable-verb-text = Special Modifiers -clothing-special-examinable-verb-message = Examine clothing special modifiers. - -clothing-strength-increase-equal-examine = strength is increased by [color=green]{$strength}[/color] -clothing-strength-decrease-equal-examine = strength is decreased by [color=red]{$strength}[/color] - -clothing-perception-increase-equal-examine = perception is increased by [color=green]{$perception}[/color] -clothing-perception-decrease-equal-examine = perception is decreased by [color=red]{$perception}[/color] - -clothing-endurance-increase-equal-examine = endurance is increased by [color=green]{$endurance}[/color] -clothing-endurance-decrease-equal-examine = endurance is decreased by [color=red]{$endurance}[/color] - -clothing-charisma-increase-equal-examine = charisma is increased by [color=green]{$charisma}[/color] -clothing-charisma-decrease-equal-examine = charisma is decreased by [color=red]{$charisma}[/color] - -clothing-intelligence-increase-equal-examine = intelligence is increased by [color=green]{$intelligence}[/color] -clothing-intelligence-decrease-equal-examine = intelligence is decreased by [color=red]{$intelligence}[/color] - -clothing-agility-increase-equal-examine = agility is increased by [color=green]{$agility}[/color] -clothing-agility-decrease-equal-examine = agility is decreased by [color=red]{$agility}[/color] - -clothing-luck-increase-equal-examine = luck is increased by [color=green]{$luck}[/color] -clothing-luck-decrease-equal-examine = luck is decreased by [color=red]{$luck}[/color] - -player-component-not-enough-strength-weild = You need at least {$number} Strength to weild this diff --git a/Resources/Locale/en-US/_NF/respawn/respawn-system.ftl b/Resources/Locale/en-US/_Nuclear14/respawn/respawn-system.ftl similarity index 100% rename from Resources/Locale/en-US/_NF/respawn/respawn-system.ftl rename to Resources/Locale/en-US/_Nuclear14/respawn/respawn-system.ftl diff --git a/Resources/Locale/en-US/_Nuclear14/weather.ftl b/Resources/Locale/en-US/_Nuclear14/weather.ftl new file mode 100644 index 00000000000000..108bf16f8acae5 --- /dev/null +++ b/Resources/Locale/en-US/_Nuclear14/weather.ftl @@ -0,0 +1,18 @@ +weather-announcement = The weather is changing. +weather-ashfall = Ashfall is approaching. +weather-ashfall-light = Ashfall is approaching. +weather-ashfall-heavy = Heavy ashfall is approaching. +weather-default = The weather is clearing up. +weather-fallout = Fallout is approaching. +weather-hail = Hail is approaching. +weather-rain = Rain is approaching. +weather-sandstorm = Sandstorm is approaching. +weather-sandstorm-heavy = Sandstorm is approaching. +weather-snowfall-light = Snowfall is approaching. +weather-snowfall-medium = Snowfall is approaching. +weather-snowfall-heavy = Heavy snowfall is approaching. +weather-storm = Storm is approaching. + + +weather-sandstorm-extreme = Extreme sandstorm is approaching. +weather-snowfall-extreme = Extreme snowfall is approaching. \ No newline at end of file diff --git a/Resources/Locale/en-US/weather/weather.ftl b/Resources/Locale/en-US/weather/weather.ftl index de5dbd88905742..67e6eec35f2ce2 100644 --- a/Resources/Locale/en-US/weather/weather.ftl +++ b/Resources/Locale/en-US/weather/weather.ftl @@ -1,3 +1,7 @@ cmd-weather-desc = Sets the weather for the current map. cmd-weather-help = weather cmd-weather-hint = Weather prototype + +cmd-weather-error-no-arguments = Not enough arguments! +cmd-weather-error-unknown-proto = Unknown Weather prototype! +cmd-weather-error-wrong-time = Time is in the wrong format! \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Mobs/Species/base.yml b/Resources/Prototypes/Entities/Mobs/Species/base.yml index 36e8780f5fb45d..25670c2135d8c3 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/base.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/base.yml @@ -277,6 +277,7 @@ - type: Blindable # Other - type: Temperature + AtmosTemperatureTransferEfficiency: 0.5 heatDamageThreshold: 325 coldDamageThreshold: 260 currentTemperature: 310.15 diff --git a/Resources/Prototypes/_Nuclear14/Tiles/floors.yml b/Resources/Prototypes/_Nuclear14/Tiles/floors.yml index 39cdfa78375539..fba961179a043a 100644 --- a/Resources/Prototypes/_Nuclear14/Tiles/floors.yml +++ b/Resources/Prototypes/_Nuclear14/Tiles/floors.yml @@ -12,7 +12,7 @@ itemDrop: FloorTileItemMetalBlue thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalBlueSolid name: metal blue solid @@ -26,7 +26,7 @@ itemDrop: FloorTileItemMetalBlueSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalGreen name: metal green @@ -40,7 +40,7 @@ itemDrop: FloorTileItemMetalGreen thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalGreenSolid name: metal green solid @@ -54,7 +54,7 @@ itemDrop: FloorTileItemMetalGreenSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalGrey name: metal grey @@ -68,7 +68,7 @@ itemDrop: FloorTileItemMetalGrey thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalGreySolid name: metal grey solid @@ -82,7 +82,7 @@ itemDrop: FloorTileItemMetalGreySolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalGreyDark name: metal grey dark @@ -96,7 +96,7 @@ itemDrop: FloorTileItemMetalGreyDark thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalGreyDarkSolid name: metal grey dark solid @@ -110,7 +110,7 @@ itemDrop: FloorTileItemMetalGreyDarkSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalPurple name: metal purple @@ -124,7 +124,7 @@ itemDrop: FloorTileItemMetalPurple thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalPurpleSolid name: metal purple solid @@ -138,7 +138,7 @@ itemDrop: FloorTileItemMetalPurpleSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalRed name: metal red @@ -152,7 +152,7 @@ itemDrop: FloorTileItemMetalRed thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalRedSolid name: metal red solid @@ -166,7 +166,7 @@ itemDrop: FloorTileItemMetalRedSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalTeal name: metal teal @@ -180,7 +180,7 @@ itemDrop: FloorTileItemMetalTeal thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalTealSolid name: metal teal solid @@ -194,7 +194,7 @@ itemDrop: FloorTileItemMetalTealSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalWhite name: metal white @@ -208,7 +208,7 @@ itemDrop: FloorTileItemMetalWhite thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalWhiteSolid name: metal white solid @@ -222,7 +222,7 @@ itemDrop: FloorTileItemMetalWhiteSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalYellow name: metal yellow @@ -236,7 +236,7 @@ itemDrop: FloorTileItemMetalYellow thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalYellowSolid name: metal yellow solid @@ -250,7 +250,7 @@ itemDrop: FloorTileItemMetalYellowSolid thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalFreezer name: metal freezer @@ -264,7 +264,7 @@ itemDrop: FloorTileItemMetalFreezer thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalTunnel name: tunnel floor @@ -277,7 +277,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalTunnelRusty name: rusty tunnel floor @@ -290,7 +290,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorMetalTunnelWasteland name: wasteland tunnel floor @@ -370,7 +370,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + # Interior - type: tile id: FloorWoodOak @@ -387,7 +387,7 @@ itemDrop: FloorTileItemWoodOak thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorWoodOakBroken name: wood oak broken @@ -402,7 +402,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorWoodHouse name: wood house @@ -418,7 +418,7 @@ itemDrop: FloorTileItemWoodHouse thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorWoodHouseBroken name: wood house broken @@ -433,7 +433,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorWoodBurntBroken name: wood burnt broken @@ -448,7 +448,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + - type: tile id: FloorWoodMaple name: wood maple @@ -723,7 +723,8 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + weather: true + - type: tile id: N14FloorConcreteTileGoon name: concrete tile @@ -736,7 +737,8 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + weather: true + - type: tile id: N14FloorConcreteGreyBay name: concrete grey @@ -749,7 +751,8 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + weather: true + - type: tile id: N14FloorConcreteHexacrete name: concrete hexacrete @@ -762,7 +765,8 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + weather: true + - type: tile id: N14FloorConcreteHexacreteDark name: concrete hexacrete dark @@ -774,7 +778,8 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + weather: true + - type: tile id: N14FloorConcreteDark name: concrete dark @@ -788,7 +793,8 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 - + weather: true + - type: tile id: N14FloorConcreteRoad name: concrete road @@ -802,6 +808,7 @@ friction: 0.30 thermalConductivity: 0.04 heatCapacity: 10000 + weather: true # MS13 Concrete & Brick - type: tile @@ -1673,7 +1680,8 @@ footstepSounds: collection: N14FootstepDirt heatCapacity: 10000 - + weather: false + - type: tile id: FloorRubble name: rubble @@ -1716,6 +1724,7 @@ footstepSounds: collection: FootstepAsteroid heatCapacity: 10000 + weather: true # Water - type: tile diff --git a/Resources/Prototypes/_Nuclear14/weather.yml b/Resources/Prototypes/_Nuclear14/weather.yml new file mode 100644 index 00000000000000..791de23d0f5e46 --- /dev/null +++ b/Resources/Prototypes/_Nuclear14/weather.yml @@ -0,0 +1,31 @@ +- type: weather + id: SandstormHeavyExtreme + sprite: + sprite: /Textures/Effects/weather.rsi + state: sandstorm_heavy + sound: + path: /Audio/Effects/Weather/snowstorm.ogg + params: + loop: true + volume: -6 + temperature: 400 # + duration: 60 + showMessage: true + sender: weather-announcement + message: weather-sandstorm-extreme + +- type: weather + id: SnowfallHeavyExtreme + sprite: + sprite: /Textures/Effects/weather.rsi + state: snowfall_heavy + sound: + path: /Audio/Effects/Weather/snowstorm.ogg + params: + loop: true + volume: -6 + temperature: 2 # - + duration: 60 + showMessage: true + sender: weather-announcement + message: weather-snowfall-extreme \ No newline at end of file diff --git a/Resources/Prototypes/weather.yml b/Resources/Prototypes/weather.yml index a71e59354af0a5..55c00853d4e22c 100644 --- a/Resources/Prototypes/weather.yml +++ b/Resources/Prototypes/weather.yml @@ -8,6 +8,9 @@ params: loop: true volume: -6 + temperature: 330 + duration: 500 + message: weather-ashfall - type: weather id: AshfallLight @@ -19,6 +22,9 @@ params: loop: true volume: -6 + temperature: 320 + duration: 500 + message: weather-ashfall-light - type: weather id: AshfallHeavy @@ -30,6 +36,17 @@ params: loop: true volume: -6 + temperature: 340 + duration: 20 + showMessage: true + sender: weather-announcement + message: weather-ashfall-heavy + +- type: weather + id: Default + temperature: 310 + duration: 600 + message: weather-default - type: weather id: Fallout @@ -41,6 +58,12 @@ params: loop: true volume: -6 + temperature: 340 + duration: 500 + showMessage: true + sender: weather-announcement + message: weather-fallout + radioactive: true - type: weather id: Hail @@ -53,6 +76,9 @@ params: loop: true volume: -6 + temperature: 300 + duration: 500 + message: weather-hail - type: weather id: Rain @@ -64,6 +90,9 @@ params: loop: true volume: -6 + temperature: 300 + duration: 500 + message: weather-rain - type: soundCollection id: Rain @@ -81,6 +110,9 @@ params: loop: true volume: -6 + temperature: 320 + duration: 500 + message: weather-sandstorm - type: weather id: SandstormHeavy @@ -92,6 +124,11 @@ params: loop: true volume: -6 + temperature: 330 + duration: 500 + showMessage: true + sender: weather-announcement + message: weather-sandstorm-heavy - type: weather id: SnowfallLight @@ -103,6 +140,9 @@ params: loop: true volume: -6 + temperature: 280 + duration: 500 + message: weather-snowfall-light - type: weather id: SnowfallMedium @@ -114,6 +154,9 @@ params: loop: true volume: -6 + temperature: 270 + duration: 500 + message: weather-snowfall-medium - type: weather id: SnowfallHeavy @@ -125,6 +168,11 @@ params: loop: true volume: -6 + temperature: 260 + duration: 500 + showMessage: true + sender: weather-announcement + message: weather-snowfall-heavy - type: weather id: Storm @@ -136,3 +184,8 @@ params: loop: true volume: -6 + temperature: 310 + duration: 500 + showMessage: true + sender: weather-announcement + message: weather-storm