Skip to content

Commit

Permalink
Merge branch 'master' into upstreams
Browse files Browse the repository at this point in the history
  • Loading branch information
CrimeMoot authored Nov 24, 2024
2 parents aeea8f4 + 24ebb17 commit 93d47e7
Show file tree
Hide file tree
Showing 5,044 changed files with 1,473,473 additions and 31,884 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .github/workflows/build-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
run: |
$env:DOTNET_gcServer=1
dotnet test --no-build --configuration DebugOpt Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0 NUnit.MapWarningTo=Failed
ci-success:
name: Build & Test Debug
needs:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ jobs:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}

# - name: Publish changelog (Discord)
# run: Tools/actions_changelogs_since_last_run.py
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}
- name: Publish changelog
run: Tools/actions_changelogs_since_last_run.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCORD_WEBHOOK_URL: ${{ secrets.CHANGELOG_DISCORD_WEBHOOK }}

# - name: Publish changelog (RSS)
# run: Tools/actions_changelog_rss.py
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/map-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Map Diff Checker

on:
pull_request:
paths:
- 'Resources/Maps/**/*.yml'

jobs:
check-map-diff:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Identify changed and deleted map files
id: map_diff
run: |
git fetch origin
git diff --name-status origin/${{ github.base_ref }} -- Resources/Maps/**/*.yml > map_changes.txt
if grep -qE '^[AMDR]\s+Resources/Maps/.*\.yml' map_changes.txt; then
echo "maps_changed=true" >> $GITHUB_ENV
else
echo "maps_changed=false" >> $GITHUB_ENV
fi
- name: Display map changes
if: env.maps_changed == 'true'
run: |
echo "### Измененные карты:" > map_changes_summary.txt
while IFS=$'\t' read -r status file_path; do
map_file=$(basename "$file_path")
author=$(git log -1 --pretty=format:'%an' "$file_path")
case "$status" in
A) change_type="Добавлена карта" ;;
M) change_type="Изменена карта" ;;
D) change_type="Удалена карта" ;;
R*) change_type="Переименована карта" ;;
esac
echo "- **$map_file** — $change_type, редактировал @${author}" >> map_changes_summary.txt
done < <(grep -E '^[AMDR]\s+Resources/Maps/.*\.yml' map_changes.txt)
- name: Create PR comment
if: env.maps_changed == 'true'
uses: marocchino/sticky-pull-request-comment@v2
with:
path: map_changes_summary.txt
92 changes: 0 additions & 92 deletions .github/workflows/update-wiki.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public BwoinkControl()
return a.IsPinned ? -1 : 1;

// First, sort by unread. Any chat with unread messages appears first.

var aUnread = ach.Unread > 0;
var bUnread = bch.Unread > 0;
if (aUnread != bUnread)
Expand Down
2 changes: 2 additions & 0 deletions Content.Client/Backmen/Sponsors/SponsorsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@ private void OnUpdate(MsgSponsorInfo message)
Reset();

#if DEBUG

foreach (var ghostProto in IoCManager.Resolve<Robust.Shared.Prototypes.IPrototypeManager>().EnumeratePrototypes<Shared.Backmen.GhostTheme.GhostThemePrototype>())
{
Prototypes.Add(ghostProto.ID);
}

#endif

if (message.Info == null)
Expand Down
15 changes: 4 additions & 11 deletions Content.Client/Camera/CameraRecoilSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ private void OnCameraKick(CameraKickEvent ev)
KickCamera(GetEntity(ev.NetEntity), ev.Recoil);
}

public override void KickCamera(
EntityUid uid,
Vector2 recoil,
CameraRecoilComponent? component = null,
float? kickMagnitudeMax = null // backmen: KickMagnitudeMax
)
public override void KickCamera(EntityUid uid, Vector2 recoil, CameraRecoilComponent? component = null)
{
if (_intensity == 0)
return;
Expand All @@ -44,15 +39,13 @@ public override void KickCamera(

recoil *= _intensity;

kickMagnitudeMax = kickMagnitudeMax ?? KickMagnitudeMax; // backmen: KickMagnitudeMax

// Use really bad math to "dampen" kicks when we're already kicked.
var existing = component.CurrentKick.Length();
var dampen = existing / kickMagnitudeMax.Value; // backmen: KickMagnitudeMax
var dampen = existing / KickMagnitudeMax;
component.CurrentKick += recoil * (1 - dampen);

if (component.CurrentKick.Length() > kickMagnitudeMax.Value) // backmen: KickMagnitudeMax
component.CurrentKick = component.CurrentKick.Normalized() * kickMagnitudeMax.Value; // backmen: KickMagnitudeMax
if (component.CurrentKick.Length() > KickMagnitudeMax)
component.CurrentKick = component.CurrentKick.Normalized() * KickMagnitudeMax;

component.LastKickTime = 0;
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Chat/Managers/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ public void SendMessage(string text, ChatSelectChannel channel)
break;

// start-backmen: telepathic

case ChatSelectChannel.Telepathic:
_consoleHost.ExecuteCommand($"tsay \"{CommandParsing.Escape(str)}\"");
break;
Expand All @@ -90,6 +89,7 @@ public void SendMessage(string text, ChatSelectChannel channel)
throw new ArgumentOutOfRangeException(nameof(channel), channel, null);
}
}

// start-backmen: telepathic
public void UpdatePermissions()
{
Expand Down
3 changes: 0 additions & 3 deletions Content.Client/Clothing/ClientClothingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ public sealed class ClientClothingSystem : ClothingSystem
{"pocket1", "POCKET1"},
{"pocket2", "POCKET2"},
{"suitstorage", "SUITSTORAGE"},
{"underpants", "UNDERPANTS"}, //backmen:underclothing
{"undershirt", "UNDERSHIRT"}, //backmen:underclothing
{"socks", "SOCKS"}, //backmen:underclothing
};

[Dependency] private readonly IResourceCache _cache = default!;
Expand Down
36 changes: 1 addition & 35 deletions Content.Client/CombatMode/CombatModeSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using Content.Client.Hands.Systems;
using Content.Client.NPC.HTN;
using Content.Shared.CCVar;
Expand All @@ -7,12 +6,6 @@
using Robust.Client.Input;
using Robust.Client.Player;
using Robust.Shared.Configuration;
using Robust.Client.GameObjects;
using Content.Shared.StatusIcon.Components;
using Content.Client.Actions;
using System.Numerics;
using Robust.Shared.GameObjects;
using Robust.Shared.Utility;

namespace Content.Client.CombatMode;

Expand All @@ -28,17 +21,14 @@ public sealed class CombatModeSystem : SharedCombatModeSystem
/// Raised whenever combat mode changes.
/// </summary>
public event Action<bool>? LocalPlayerCombatModeUpdated;
private EntityQuery<SpriteComponent> _spriteQuery; // Ataraxia

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

SubscribeLocalEvent<CombatModeComponent, AfterAutoHandleStateEvent>(OnHandleState);
SubscribeLocalEvent<CombatModeComponent, GetStatusIconsEvent>(UpdateCombatModeIndicator); // Ataraxia
Subs.CVar(_cfg, CCVars.CombatModeIndicatorsPointShow, OnShowCombatIndicatorsChanged, true);

_spriteQuery = GetEntityQuery<SpriteComponent>(); // Ataraxia
Subs.CVar(_cfg, CCVars.CombatModeIndicatorsPointShow, OnShowCombatIndicatorsChanged, true);
}

private void OnHandleState(EntityUid uid, CombatModeComponent component, ref AfterAutoHandleStateEvent args)
Expand Down Expand Up @@ -100,29 +90,5 @@ private void OnShowCombatIndicatorsChanged(bool isShow)
{
_overlayManager.RemoveOverlay<CombatModeIndicatorsOverlay>();
}

}

// Ataraxia START
private void UpdateCombatModeIndicator(EntityUid uid, CombatModeComponent comp, ref GetStatusIconsEvent _)
{
if (!_spriteQuery.TryComp(uid, out var sprite))
return;

if (comp.IsInCombatMode)
{
if (!sprite.LayerMapTryGet("combat_mode_indicator", out var layer))
{
layer = sprite.AddLayer(new SpriteSpecifier.Rsi(new ResPath("Backmen/Effects/combat_mode.rsi"), "combat_mode"));
sprite.LayerMapSet("combat_mode_indicator", layer);
}
}
else
{
if (sprite.LayerMapTryGet("combat_mode_indicator", out var layerToRemove))
{
sprite.RemoveLayer(layerToRemove);
}
}
} // Ataraxia END
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ protected override void Open()
SendMessage(new CriminalRecordChangeStatus(status, null));
_window.OnDialogConfirmed += (status, reason) =>
SendMessage(new CriminalRecordChangeStatus(status, reason));
_window.OnStatusFilterPressed += (tab) =>
SendMessage(new CriminalRecordSetStatusFilter(tab));
_window.OnHistoryUpdated += UpdateHistory;
_window.OnHistoryClosed += () => _historyWindow?.Close();
_window.OnClose += Close;
Expand Down
Loading

0 comments on commit 93d47e7

Please sign in to comment.