Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/sunrise_public/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Resources/Locale/en-US/_strings/_sunrise/job/job-desc.ftl
#	Resources/Locale/en-US/_strings/_sunrise/job/job-names.ftl
VigersRay committed Jan 18, 2025
2 parents d1ee700 + 5ab39e5 commit a524d69
Showing 107 changed files with 1,679,362 additions and 189 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-wiki.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
update-wiki:
name: Build and Publish JSON blobs to wiki
runs-on: ubuntu-latest

steps:
- name: Checkout Master
uses: actions/checkout@v3.6.0
@@ -39,7 +39,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install Dependencies
run: dotnet restore
2 changes: 1 addition & 1 deletion Content.Client/Radiation/Systems/RadiationSystem.cs
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ public sealed class RadiationSystem : EntitySystem
{
[Dependency] private readonly IOverlayManager _overlayMan = default!;

public List<RadiationRay>? Rays;
public List<DebugRadiationRay>? Rays;
public Dictionary<NetEntity, Dictionary<Vector2i, float>>? ResistanceGrids;

public override void Initialize()
Original file line number Diff line number Diff line change
@@ -109,7 +109,15 @@ private void OnHoldingTankEjectMessage(EntityUid uid, GasCanisterComponent canis

var item = canister.GasTankSlot.Item;
_slots.TryEjectToHands(uid, canister.GasTankSlot, args.Actor);
_adminLogger.Add(LogType.CanisterTankEjected, LogImpact.Medium, $"Player {ToPrettyString(args.Actor):player} ejected tank {ToPrettyString(item):tank} from {ToPrettyString(uid):canister}");

if (canister.ReleaseValve)
{
_adminLogger.Add(LogType.CanisterTankEjected, LogImpact.High, $"Player {ToPrettyString(args.Actor):player} ejected tank {ToPrettyString(item):tank} from {ToPrettyString(uid):canister} while the valve was open, releasing [{GetContainedGasesString((uid, canister))}] to atmosphere");
}
else
{
_adminLogger.Add(LogType.CanisterTankEjected, LogImpact.Medium, $"Player {ToPrettyString(args.Actor):player} ejected tank {ToPrettyString(item):tank} from {ToPrettyString(uid):canister}");
}
}

private void OnCanisterChangeReleasePressure(EntityUid uid, GasCanisterComponent canister, GasCanisterChangeReleasePressureMessage args)
@@ -124,24 +132,24 @@ private void OnCanisterChangeReleasePressure(EntityUid uid, GasCanisterComponent

private void OnCanisterChangeReleaseValve(EntityUid uid, GasCanisterComponent canister, GasCanisterChangeReleaseValveMessage args)
{
var impact = LogImpact.High;
// filling a jetpack with plasma is less important than filling a room with it
impact = canister.GasTankSlot.HasItem ? LogImpact.Medium : LogImpact.High;
var hasItem = canister.GasTankSlot.HasItem;
var impact = hasItem ? LogImpact.Medium : LogImpact.High;

var containedGasDict = new Dictionary<Gas, float>();
var containedGasArray = Enum.GetValues(typeof(Gas));

for (int i = 0; i < containedGasArray.Length; i++)
{
containedGasDict.Add((Gas)i, canister.Air[i]);
}

_adminLogger.Add(LogType.CanisterValve, impact, $"{ToPrettyString(args.Actor):player} set the valve on {ToPrettyString(uid):canister} to {args.Valve:valveState} while it contained [{string.Join(", ", containedGasDict)}]");
_adminLogger.Add(
LogType.CanisterValve,
impact,
$"{ToPrettyString(args.Actor):player} {(args.Valve ? "opened" : "closed")} the valve on {ToPrettyString(uid):canister} to {(hasItem ? "inserted tank" : "environment")} while it contained [{GetContainedGasesString((uid, canister))}]");

canister.ReleaseValve = args.Valve;
DirtyUI(uid, canister);
}

private static string GetContainedGasesString(Entity<GasCanisterComponent> canister)
{
return string.Join(", ", canister.Comp.Air);
}

private void OnCanisterUpdated(EntityUid uid, GasCanisterComponent canister, ref AtmosDeviceUpdateEvent args)
{
_atmos.React(canister.Air, canister);
16 changes: 10 additions & 6 deletions Content.Server/Radiation/Systems/RadiationSystem.Debug.cs
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
using Content.Shared.Radiation.Events;
using Content.Shared.Radiation.Systems;
using Robust.Shared.Console;
using Robust.Shared.Debugging;
using Robust.Shared.Enums;
using Robust.Shared.Map.Components;
using Robust.Shared.Player;
@@ -42,12 +43,12 @@ public void ToggleDebugView(ICommonSession session)
/// </summary>
private void UpdateDebugOverlay(EntityEventArgs ev)
{
var sessions = _debugSessions.ToArray();
foreach (var session in sessions)
foreach (var session in _debugSessions)
{
if (session.Status != SessionStatus.InGame)
_debugSessions.Remove(session);
RaiseNetworkEvent(ev, session.Channel);
else
RaiseNetworkEvent(ev, session);
}
}

@@ -70,13 +71,16 @@ private void UpdateResistanceDebugOverlay()
UpdateDebugOverlay(ev);
}

private void UpdateGridcastDebugOverlay(double elapsedTime, int totalSources,
int totalReceivers, List<RadiationRay> rays)
private void UpdateGridcastDebugOverlay(
double elapsedTime,
int totalSources,
int totalReceivers,
List<DebugRadiationRay>? rays)
{
if (_debugSessions.Count == 0)
return;

var ev = new OnRadiationOverlayUpdateEvent(elapsedTime, totalSources, totalReceivers, rays);
var ev = new OnRadiationOverlayUpdateEvent(elapsedTime, totalSources, totalReceivers, rays ?? new());
UpdateDebugOverlay(ev);
}
}
Loading

0 comments on commit a524d69

Please sign in to comment.