Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 25 additions & 1 deletion Content.Client/SubFloor/SubFloorHideSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public sealed partial class SubFloorHideSystem : SharedSubFloorHideSystem
{
[Dependency] private SharedAppearanceSystem _appearance = default!;
[Dependency] private IUserInterfaceManager _ui = default!;
[Dependency] private readonly SpriteSystem _sprite = default!; // LuaM

private bool _showAll;

Expand Down Expand Up @@ -86,7 +87,9 @@ private void OnAppearanceChanged(EntityUid uid, SubFloorHideComponent component,

args.Sprite.Visible = hasVisibleLayer || revealed;

// Commented by LuaM
// allows a t-ray to show wires/pipes above carpets/puddles
/*
if (scannerRevealed)
{
if (component.OriginalDrawDepth is not null)
Expand All @@ -101,7 +104,28 @@ private void OnAppearanceChanged(EntityUid uid, SubFloorHideComponent component,
component.OriginalDrawDepth = null;
}
}

*/
// LuaM-start:
if (ShowAll)
{
component.OriginalDrawDepth ??= args.Sprite.DrawDepth;
_sprite.SetDrawDepth((uid, args.Sprite), (int)Shared.DrawDepth.DrawDepth.Overdoors);
}
else if (scannerRevealed)
{
if (component.OriginalDrawDepth is not null)
return;
component.OriginalDrawDepth = args.Sprite.DrawDepth;
var drawDepthDifference = Shared.DrawDepth.DrawDepth.ThickPipe - Shared.DrawDepth.DrawDepth.Puddles;
_sprite.SetDrawDepth((uid, args.Sprite), args.Sprite.DrawDepth - (drawDepthDifference - 1));
}
else if (component.OriginalDrawDepth.HasValue)
{
_sprite.SetDrawDepth((uid, args.Sprite), component.OriginalDrawDepth.Value);
component.OriginalDrawDepth = null;
}
}
// LuaM-end.
private void UpdateAll()
{
var query = AllEntityQuery<SubFloorHideComponent, AppearanceComponent>();
Expand Down
20 changes: 12 additions & 8 deletions Content.Shared/Localizations/ContentLocalizationManager.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using Robust.Shared.Log;
using Robust.Shared.Log; // LuaM
using Robust.Shared.Utility;

namespace Content.Shared.Localizations
{
public sealed partial class ContentLocalizationManager
{
[Dependency] private ILocalizationManager _loc = default!;
[Dependency] private ILogManager _logManager = default!;
[Dependency] private ILogManager _logManager = default!; // LuaM

// If you want to change your codebase's language, do it here.
private const string Culture = "ru-RU";
private const string FallbackCulture = "en-US";
private const string Culture = "ru-RU"; // LuaM
private const string FallbackCulture = "en-US"; // LuaM: Culture > FallbackCulture

/// <summary>
/// Custom format strings used for parsing and displaying minutes:seconds timespans.
Expand All @@ -28,14 +28,16 @@ public sealed partial class ContentLocalizationManager

public void Initialize()
{
_logManager.GetSawmill("loc").Level = LogLevel.Error;
_logManager.GetSawmill("loc").Level = LogLevel.Error; // LuaM
var culture = new CultureInfo(Culture);
var fallbackCulture = new CultureInfo(FallbackCulture);
var fallbackCulture = new CultureInfo(FallbackCulture); // LuaM

_loc.LoadCulture(culture);
// LuaM-start:
_loc.LoadCulture(fallbackCulture);
_loc.SetFallbackCluture(fallbackCulture);
_loc.AddFunction(culture, "MANY", FormatMany);
// LuaM-end.
_loc.AddFunction(culture, "PRESSURE", FormatPressure);
_loc.AddFunction(culture, "POWERWATTS", FormatPowerWatts);
_loc.AddFunction(culture, "POWERJOULES", FormatPowerJoules);
Expand All @@ -58,6 +60,7 @@ public void Initialize()

_loc.AddFunction(cultureEn, "MAKEPLURAL", FormatMakePlural);
_loc.AddFunction(cultureEn, "MANY", FormatMany);
// LuaM-start:
_loc.AddFunction(cultureEn, "PRESSURE", FormatPressure);
_loc.AddFunction(cultureEn, "POWERWATTS", FormatPowerWatts);
_loc.AddFunction(cultureEn, "POWERJOULES", FormatPowerJoules);
Expand All @@ -69,6 +72,7 @@ public void Initialize()
_loc.AddFunction(cultureEn, "NATURALPERCENT", FormatNaturalPercent);
_loc.AddFunction(cultureEn, "PLAYTIME", FormatPlaytime);
_loc.AddFunction(cultureEn, "GASQUANTITY", FormatGasQuantity);
// LuaM-end.
}

private ILocValue FormatMany(LocArgs args)
Expand Down Expand Up @@ -136,8 +140,8 @@ public static string FormatList(List<string> list)
{
<= 0 => string.Empty,
1 => list[0],
2 => $"{list[0]} {Loc.GetString("comp-hands-examine-and")} {list[1]}",
_ => $"{string.Join(", ", list.GetRange(0, list.Count - 1))}, {Loc.GetString("comp-hands-examine-and")} {list[^1]}"
2 => $"{list[0]} {Loc.GetString("comp-hands-examine-and")} {list[1]}", // LuaM: and > {Loc.GetString("comp-hands-examine-and")}
_ => $"{string.Join(", ", list.GetRange(0, list.Count - 1))}, {Loc.GetString("comp-hands-examine-and")} {list[^1]}" // LuaM: and > {Loc.GetString("comp-hands-examine-and")}
};
}

Expand Down
2 changes: 0 additions & 2 deletions Resources/Locale/en-US/_LuaM/Actions.ftl

This file was deleted.

5 changes: 0 additions & 5 deletions Resources/Locale/en-US/_LuaM/Organs.ftl

This file was deleted.

15 changes: 0 additions & 15 deletions Resources/Locale/ru-RU/_ADT/production.ftl

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions Resources/Locale/ru-RU/_ADT/prototypes/Body/Parts/demon.ftl

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading