diff --git a/.github/workflows/map-diff.yml b/.github/workflows/map-diff.yml new file mode 100644 index 00000000000..a0f178eafc1 --- /dev/null +++ b/.github/workflows/map-diff.yml @@ -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 \ No newline at end of file diff --git a/Content.Benchmarks/MapLoadBenchmark.cs b/Content.Benchmarks/MapLoadBenchmark.cs index a3319e3067f..8c04d9a40dc 100644 --- a/Content.Benchmarks/MapLoadBenchmark.cs +++ b/Content.Benchmarks/MapLoadBenchmark.cs @@ -46,7 +46,7 @@ public async Task Cleanup() PoolManager.Shutdown(); } - public static readonly string[] MapsSource = { "Empty", "Box", "Bagel", "Dev", "CentComm", "Atlas", "Core", "TestTeg", "Saltern", "Packed", "Omega", "Cluster", "Reach", "Origin", "Meta", "Marathon", "Europa", "MeteorArena", "Fland", "Barratry", "Oasis" }; + public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog" }; [ParamsSource(nameof(MapsSource))] public string Map; diff --git a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs index 50add43dc91..050756fcd14 100644 --- a/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs +++ b/Content.Client/Access/UI/AgentIDCardBoundUserInterface.cs @@ -38,7 +38,7 @@ private void OnJobChanged(string newJob) SendMessage(new AgentIDCardJobChangedMessage(newJob)); } - public void OnJobIconChanged(ProtoId newJobIconId) + public void OnJobIconChanged(ProtoId newJobIconId) { SendMessage(new AgentIDCardJobIconChangedMessage(newJobIconId)); } @@ -55,7 +55,7 @@ protected override void UpdateState(BoundUserInterfaceState state) _window.SetCurrentName(cast.CurrentName); _window.SetCurrentJob(cast.CurrentJob); - _window.SetAllowedIcons(cast.Icons, cast.CurrentJobIconId); + _window.SetAllowedIcons(cast.CurrentJobIconId); } } } diff --git a/Content.Client/Access/UI/AgentIDCardWindow.xaml b/Content.Client/Access/UI/AgentIDCardWindow.xaml index 89de793714d..7d091e4e165 100644 --- a/Content.Client/Access/UI/AgentIDCardWindow.xaml +++ b/Content.Client/Access/UI/AgentIDCardWindow.xaml @@ -6,12 +6,9 @@