Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
Мержконфликты
Browse files Browse the repository at this point in the history
  • Loading branch information
Vonsant committed Apr 28, 2024
2 parents 8be2297 + f04c266 commit 4c48ee9
Show file tree
Hide file tree
Showing 230 changed files with 20,123 additions and 14,111 deletions.
5 changes: 5 additions & 0 deletions Content.Client/Shuttles/UI/NavScreen.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
HorizontalExpand="True"
Margin="3"
Name="ReadonlyDisplay">
<controls:Label Text="{controls:Loc 'shuttle-console-designation'}"/>
<controls:Label Name="ShuttleDesignation"
Text="{controls:Loc 'shuttle-console-designation-unknown'}"
HorizontalExpand="True"
Align="Right"/>
<controls:Label Text="{controls:Loc 'shuttle-console-position'}"/>
<controls:Label Name="GridPosition"
Text="0.0, 0.0"
Expand Down
16 changes: 16 additions & 0 deletions Content.Client/Shuttles/UI/NavScreen.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Robust.Client.Graphics;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Physics.Components;

Expand Down Expand Up @@ -52,6 +53,21 @@ private void OnIffSearchChanged(string text)
public void SetShuttle(EntityUid? shuttle)
{
_shuttleEntity = shuttle;

// Frontier - PR #1284 Add Shuttle Designation
if (_entManager.TryGetComponent<MetaDataComponent>(shuttle, out var metadata))
{
var shipNameParts = metadata.EntityName.Split(' ');
var designation = shipNameParts[^1];
if (designation[2] == '-')
{
NavDisplayLabel.Text = string.Join(' ', shipNameParts[..^1]);
ShuttleDesignation.Text = designation;
}
else
NavDisplayLabel.Text = metadata.EntityName;
}
// End Frontier - PR #1284
}

private void OnIFFTogglePressed(BaseButton.ButtonEventArgs args)
Expand Down
81 changes: 55 additions & 26 deletions Content.Server/Atmos/EntitySystems/AtmosphereSystem.Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Server.Atmos.Components;
using Content.Shared.Administration;
using Content.Shared.Atmos;
using Content.Shared.Atmos.Components;
using Robust.Shared.Console;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
Expand Down Expand Up @@ -104,44 +105,72 @@ private void FixGridAtmosCommand(IConsoleShell shell, string argstr, string[] ar
continue;
}

var transform = Transform(euid.Value);
// Force Invalidate & update air on all tiles
Entity<GridAtmosphereComponent, GasTileOverlayComponent, MapGridComponent, TransformComponent> grid =
new(euid.Value, gridAtmosphere, Comp<GasTileOverlayComponent>(euid.Value), gridComp, Transform(euid.Value));

foreach (var (indices, tileMain) in gridAtmosphere.Tiles)
{
var tile = tileMain.Air;
if (tile == null)
continue;
RebuildGridTiles(grid);

if (!_mapSystem.TryGetTile(gridComp, indices, out var gTile) || gTile.IsEmpty)
{
gridAtmosphere.Tiles.Remove(indices);
var query = GetEntityQuery<AtmosFixMarkerComponent>();
foreach (var (indices, tile) in gridAtmosphere.Tiles.ToArray())
{
if (tile.Air is not {Immutable: false} air)
continue;
}

if (tile.Immutable && !IsTileSpace(euid, transform.MapUid, indices))
{
tile = new GasMixture(tile.Volume) { Temperature = tile.Temperature };
tileMain.Air = tile;
}

tile.Clear();
air.Clear();
var mixtureId = 0;
foreach (var entUid in gridComp.GetAnchoredEntities(indices))
var enumerator = _mapSystem.GetAnchoredEntitiesEnumerator(grid, grid, indices);
while (enumerator.MoveNext(out var entUid))
{
if (!TryComp(entUid, out AtmosFixMarkerComponent? afm))
continue;
mixtureId = afm.Mode;
break;
if (query.TryComp(entUid, out var marker))
mixtureId = marker.Mode;
}
var mixture = mixtures[mixtureId];
Merge(tile, mixture);
tile.Temperature = mixture.Temperature;

gridAtmosphere.InvalidatedCoords.Add(indices);
var mixture = mixtures[mixtureId];
Merge(air, mixture);
air.Temperature = mixture.Temperature;
}
}
}

/// <summary>
/// Clears & re-creates all references to <see cref="TileAtmosphere"/>s stored on a grid.
/// </summary>
private void RebuildGridTiles(
Entity<GridAtmosphereComponent, GasTileOverlayComponent, MapGridComponent, TransformComponent> ent)
{
foreach (var indices in ent.Comp1.Tiles.Keys)
{
InvalidateVisuals((ent, ent), indices);
}

var atmos = ent.Comp1;
atmos.MapTiles.Clear();
atmos.ActiveTiles.Clear();
atmos.ExcitedGroups.Clear();
atmos.HotspotTiles.Clear();
atmos.SuperconductivityTiles.Clear();
atmos.HighPressureDelta.Clear();
atmos.CurrentRunTiles.Clear();
atmos.CurrentRunExcitedGroups.Clear();
atmos.InvalidatedCoords.Clear();
atmos.CurrentRunInvalidatedTiles.Clear();
atmos.PossiblyDisconnectedTiles.Clear();
atmos.Tiles.Clear();

var volume = GetVolumeForTiles(ent);
TryComp(ent.Comp4.MapUid, out MapAtmosphereComponent? mapAtmos);

var enumerator = _map.GetAllTilesEnumerator(ent, ent);
while (enumerator.MoveNext(out var tileRef))
{
var tile = GetOrNewTile(ent, ent, tileRef.Value.GridIndices);
UpdateTileData(ent, mapAtmos, tile);
UpdateAdjacentTiles(ent, tile, activate: true);
UpdateTileAir(ent, tile, volume);
}
}

private CompletionResult FixGridAtmosCommandCompletions(IConsoleShell shell, string[] args)
{
MapId? playerMap = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ public sealed partial class AtmosphereSystem
private int _currentRunAtmosphereIndex;
private bool _simulationPaused;

private TileAtmosphere GetOrNewTile(EntityUid owner, GridAtmosphereComponent atmosphere, Vector2i index)
private TileAtmosphere GetOrNewTile(EntityUid owner, GridAtmosphereComponent atmosphere, Vector2i index, bool invalidateNew = true)
{
var tile = atmosphere.Tiles.GetOrNew(index, out var existing);
if (existing)
return tile;

atmosphere.InvalidatedCoords.Add(index);
if (invalidateNew)
atmosphere.InvalidatedCoords.Add(index);

tile.GridIndex = owner;
tile.GridIndices = index;
return tile;
Expand Down Expand Up @@ -68,7 +70,7 @@ private bool ProcessRevalidate(Entity<GridAtmosphereComponent, GasTileOverlayCom
atmosphere.CurrentRunInvalidatedTiles.EnsureCapacity(atmosphere.InvalidatedCoords.Count);
foreach (var indices in atmosphere.InvalidatedCoords)
{
var tile = GetOrNewTile(uid, atmosphere, indices);
var tile = GetOrNewTile(uid, atmosphere, indices, invalidateNew: false);
atmosphere.CurrentRunInvalidatedTiles.Enqueue(tile);

// Update tile.IsSpace and tile.MapAtmosphere, and tile.AirtightData.
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Chat/Systems/ChatSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void TrySendInGameICMessage(
}

bool shouldCapitalize = (desiredType != InGameICChatType.Emote);
bool shouldPunctuate = _configurationManager.GetCVar(CCVars.ChatPunctuation) && (desiredType != InGameICChatType.Emote);
bool shouldPunctuate = _configurationManager.GetCVar(CCVars.ChatPunctuation);
// Capitalizing the word I only happens in English, so we check language here
bool shouldCapitalizeTheWordI = (!CultureInfo.CurrentCulture.IsNeutralCulture && CultureInfo.CurrentCulture.Parent.Name == "en")
|| (CultureInfo.CurrentCulture.IsNeutralCulture && CultureInfo.CurrentCulture.Name == "en");
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Speech/Components/GoblinAccentComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
using Content.Server.Speech.EntitySystems;

namespace Content.Server.Speech.Components;

[RegisterComponent]
[Access(typeof(GoblinAccentSystem))]
public sealed partial class GoblinAccentComponent : Component {}
31 changes: 31 additions & 0 deletions Content.Server/Speech/EntitySystems/GoblinAccentSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Content.Server.Speech.Components;
using Robust.Shared.Random;
using System.Text.RegularExpressions;

namespace Content.Server.Speech.EntitySystems;

public sealed class GoblinAccentSystem : EntitySystem
{
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;

public override void Initialize()
{
base.Initialize();

SubscribeLocalEvent<GoblinAccentComponent, AccentGetEvent>(OnAccentGet);
}

// converts left word when typed into the right word. For example typing you becomes ye.
public string Accentuate(string message, GoblinAccentComponent component)
{
var msg = message;

msg = _replacement.ApplyReplacements(msg, "goblin");
return msg;
}

private void OnAccentGet(EntityUid uid, GoblinAccentComponent component, AccentGetEvent args)
{
args.Message = Accentuate(args.Message, component);
}
}
2 changes: 1 addition & 1 deletion Content.Server/_NF/GameRule/NfAdventureRuleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private void OnStartup(RoundStartingEvent ev)

if (_map.TryLoad(mapId, cove, out var depotUid6s, new MapLoadOptions
{
Offset = _random.NextVector2(4650f, 6800f)
Offset = _random.NextVector2(10000f, 15000f)
}))
{
if (_prototypeManager.TryIndex<GameMapPrototype>("Cove", out var stationProto))
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/_NF/Goblin/Components/GoblinComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Server._NF.Goblin.Components;

[RegisterComponent]
public sealed partial class GoblinComponent : Component
{

}
8 changes: 7 additions & 1 deletion Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared._NF.LoggingExtensions;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration.Logs;
using Content.Shared.Database;
Expand Down Expand Up @@ -237,7 +238,12 @@ private void Insert(EntityUid uid, ItemSlot slot, EntityUid item, EntityUid? use

// Logging
if (inserted != null && inserted.Value && user != null)
_adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(user.Value)} inserted {ToPrettyString(item)} into {slot.ContainerSlot?.ID + " slot of "}{ToPrettyString(uid)}");
{
// Frontier modification: adds extra things to the log
var extraLogs = LoggingExtensions.GetExtraLogs(EntityManager, item);

_adminLogger.Add(LogType.Action, LogImpact.Low, $"{ToPrettyString(user.Value)} inserted {ToPrettyString(item)}{extraLogs} into {slot.ContainerSlot?.ID + " slot of "}{ToPrettyString(uid)}");
}

_audioSystem.PlayPredicted(slot.InsertSound, uid, excludeUserAudio ? user : null);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Shared._NF.LoggingExtensions;
using Content.Shared.Database;
using Content.Shared.Hands.Components;
using Content.Shared.Item;
Expand Down Expand Up @@ -223,7 +224,10 @@ public virtual void DoPickup(EntityUid uid, Hand hand, EntityUid entity, HandsCo
return;
}

_adminLogger.Add(LogType.Pickup, LogImpact.Low, $"{ToPrettyString(uid):user} picked up {ToPrettyString(entity):entity}");
// Frontier modification: adds extra things to the log
var extraLogs = LoggingExtensions.GetExtraLogs(EntityManager, entity);

_adminLogger.Add(LogType.Pickup, LogImpact.Low, $"{ToPrettyString(uid):user} picked up {ToPrettyString(entity):entity}{extraLogs}");

Dirty(uid, hands);

Expand Down
14 changes: 12 additions & 2 deletions Content.Shared/Interaction/SharedInteractionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared._NF.LoggingExtensions;
using Content.Shared.ActionBlocker;
using Content.Shared.Administration;
using Content.Shared.Administration.Logs;
Expand Down Expand Up @@ -419,7 +420,11 @@ public void InteractHand(EntityUid user, EntityUid target)
// all interactions should only happen when in range / unobstructed, so no range check is needed
var message = new InteractHandEvent(user, target);
RaiseLocalEvent(target, message, true);
_adminLogger.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target}");

// Frontier modification: adds extra things to the log
var extraLogs = LoggingExtensions.GetExtraLogs(EntityManager, target);

_adminLogger.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target}{extraLogs}");
DoContactInteraction(user, target, message);
if (message.Handled)
return;
Expand Down Expand Up @@ -1047,7 +1052,12 @@ public void DroppedInteraction(EntityUid user, EntityUid item)
var dropMsg = new DroppedEvent(user);
RaiseLocalEvent(item, dropMsg, true);
if (dropMsg.Handled)
_adminLogger.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}");
{
// Frontier modification: adds extra things to the log
var extraLogs = LoggingExtensions.GetExtraLogs(EntityManager, item);

_adminLogger.Add(LogType.Drop, LogImpact.Low, $"{ToPrettyString(user):user} dropped {ToPrettyString(item):entity}{extraLogs}");
}

// If the dropper is rotated then use their targetrelativerotation as the drop rotation
var rotation = Angle.Zero;
Expand Down
19 changes: 19 additions & 0 deletions Content.Shared/_NF/LoggingExtensions/LoggingExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Content.Shared.Stacks;

namespace Content.Shared._NF.LoggingExtensions;

public static class LoggingExtensions
{
public static string GetExtraLogs(EntityManager entityManager, EntityUid entity)
{
// Get details from the stack component to track amount of things in the stack.
if (entityManager.TryGetComponent<StackComponent>(entity, out var stack))
{
return $"(StackCount: {stack.Count.ToString()})";
}

// Add more logging things here when needed.

return "";
}
}
32 changes: 32 additions & 0 deletions Resources/Audio/_NF/Voice/Goblin/attributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
- files: ["goblin-cackle-01.ogg, goblin-cackle-02.ogg, goblin-cackle-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643664/"
- files: ["goblin-cackle-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/spookymodem/sounds/202096/"
- files: ["goblin-cackle-05.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by Nanakisan (https://freesound.org/people/Nanakisan/)"
source: "https://freesound.org/people/Nanakisan/sounds/253532/"
- files: ["goblin-scream-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643655/"
- files: ["goblin-scream-02.ogg, goblin-scream-03.ogg, goblin-scream-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/Duisterwho/sounds/643497/"
- files: ["goblin-cry-01.ogg, goblin-cry-02.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/SnowFightStudios/sounds/643657/
- files: ["goblin-chatter-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/)"
source: https://freesound.org/people/Fenodyrie/sounds/565923/
- files: ["goblin-hiss-01.ogg"]
license: "CC-BY-4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/)"
source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270389/
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
32 changes: 32 additions & 0 deletions Resources/Audio/_NF/Voice/Goblin/license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
- files: ["goblin-cackle-01.ogg, goblin-cackle-02.ogg, goblin-cackle-03.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643664/"
- files: ["goblin-cackle-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by spookymodem (https://freesound.org/people/spookymodem/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/spookymodem/sounds/202096/"
- files: ["goblin-cackle-05.ogg"]
license: "CC BY 4.0"
copyright: "Original file made by Nanakisan (https://freesound.org/people/Nanakisan/)"
source: "https://freesound.org/people/Nanakisan/sounds/253532/"
- files: ["goblin-scream-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/SnowFightStudios/sounds/643655/"
- files: ["goblin-scream-02.ogg, goblin-scream-03.ogg, goblin-scream-04.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Duisterwho (https://freesound.org/people/Duisterwho/), edited (cropped) by erhardsteinhauer (discord/github)"
source: "https://freesound.org/people/Duisterwho/sounds/643497/"
- files: ["goblin-cry-01.ogg, goblin-cry-02.ogg"]
license: "CC0-1.0"
copyright: "Original file made by SnowFightStudios (https://freesound.org/people/SnowFightStudios/), edited (cropped) by erhardsteinhauer (discord/github)"
source: https://freesound.org/people/SnowFightStudios/sounds/643657/
- files: ["goblin-chatter-01.ogg"]
license: "CC0-1.0"
copyright: "Original file made by Fenodyrie (https://freesound.org/people/Fenodyrie/)"
source: https://freesound.org/people/Fenodyrie/sounds/565923/
- files: ["goblin-hiss-01.ogg"]
license: "CC BY 4.0"
copyright: "Original file made by LittleRobotSoundFactory (https://freesound.org/people/LittleRobotSoundFactory/)"
source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270389/
Binary file removed Resources/Audio/_NF/Vulpikanin/bark.ogg
Binary file not shown.
Binary file removed Resources/Audio/_NF/Vulpikanin/growl1.ogg
Binary file not shown.
Binary file removed Resources/Audio/_NF/Vulpikanin/growl2.ogg
Binary file not shown.
Binary file removed Resources/Audio/_NF/Vulpikanin/growl3.ogg
Binary file not shown.
Binary file removed Resources/Audio/_NF/Vulpikanin/howl.ogg
Binary file not shown.
Binary file removed Resources/Audio/_NF/Vulpikanin/scream1.ogg
Binary file not shown.
Binary file removed Resources/Audio/_NF/Vulpikanin/scream2.ogg
Binary file not shown.
Loading

0 comments on commit 4c48ee9

Please sign in to comment.