Skip to content

Commit

Permalink
Merge branch 'master' into Loadout-new
Browse files Browse the repository at this point in the history
  • Loading branch information
Nrd-K authored Jan 19, 2025
2 parents 300b553 + eee538e commit 0173983
Show file tree
Hide file tree
Showing 178 changed files with 1,685,328 additions and 444 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update-wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Setup .NET Core
uses: actions/[email protected]
with:
dotnet-version: 8.0.x
dotnet-version: 9.0.x

- name: Install Dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Audio/ContentAudioSystem.LobbyMusic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private void PlayRestartSound(RoundRestartCleanupEvent ev)
file,
Filter.Local(),
false,
_roundEndSoundEffectParams.WithVolume(10f) // Sunrise-Edit
_roundEndSoundEffectParams.WithVolume(-3f) // Sunrise-Edit
)?.Entity;
}

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Radiation/Systems/RadiationSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public sealed partial class ToggleableGhostRoleComponent : Component
/// A list of mind roles that will be added to the entity's mind
/// </summary>
[DataField]
public List<EntProtoId> MindRoles;
public List<EntProtoId> MindRoles = new() { "MindRoleGhostRoleNeutral" };

/// <summary>
/// The displayed name of the verb to wipe the controlling player
Expand Down
16 changes: 10 additions & 6 deletions Content.Server/Radiation/Systems/RadiationSystem.Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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);
}
}
Expand Down
Loading

0 comments on commit 0173983

Please sign in to comment.