Fuck it (похуй, переделываем)#493
Conversation
📝 WalkthroughПошаговый обзорДобавлена новая система администрирования для применения «меток позора» (smite signs) к сущностям игроков. Обновлены существующие ссылки на локализацию и иконки, добавлены локализационные файлы для английского и русского языков с названиями и описаниями девяти типов меток. Изменения
Оценка сложности проверки кода🎯 3 (Средняя) | ⏱️ ~25 минут Предлагаемые метки
Стихотворение
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan for PR comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs (1)
1-4:⚠️ Potential issue | 🟡 MinorДублирующиеся директивы using.
System.NumericsиSystem.Threadingимпортированы дважды. Это вызовет предупреждения компилятора.🔧 Предлагаемое исправление
using System.Numerics; using System.Threading; -using System.Numerics; -using System.Threading; using Content.Server.Administration.Logs;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs` around lines 1 - 4, The file contains duplicate using directives for System.Numerics and System.Threading; remove the redundant duplicate lines so each namespace is imported only once (keep a single using System.Numerics; and a single using System.Threading; at the top of AdminVerbSystem.Smites.cs) to eliminate the compiler warnings.
🧹 Nitpick comments (1)
Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs (1)
1-2: Пустые строки в начале файла.Рекомендуется удалить лишние пустые строки в начале файла для соблюдения стиля кодирования.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs` around lines 1 - 2, Remove the extra blank lines at the top of the file so the first non-whitespace token is the file header (using directives or namespace) — edit Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs to delete leading empty lines so the file begins immediately with the expected namespace or using statements and the AdminVerbSystem class declaration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs`:
- Around line 39-57: The sprite file name referenced for the custom sign is
wrong; update the SpriteSpecifier.Rsi path used in the AddSmiteSign call(s) (the
ones constructing new
SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), ...)) to use the
correct file name "_Lust/Objects/Misc/fuck_sign.rsi" (and search/replace any
other occurrences of "_Lust/Objects/Misc/fucksign.rsi"); keep the same subnames
("icon", "sign") and leave the AddSmiteSign parameters unchanged otherwise.
---
Outside diff comments:
In `@Content.Server/Administration/Systems/AdminVerbSystem.Smites.cs`:
- Around line 1-4: The file contains duplicate using directives for
System.Numerics and System.Threading; remove the redundant duplicate lines so
each namespace is imported only once (keep a single using System.Numerics; and a
single using System.Threading; at the top of AdminVerbSystem.Smites.cs) to
eliminate the compiler warnings.
---
Nitpick comments:
In `@Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs`:
- Around line 1-2: Remove the extra blank lines at the top of the file so the
first non-whitespace token is the file header (using directives or namespace) —
edit Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs to delete
leading empty lines so the file begins immediately with the expected namespace
or using statements and the AdminVerbSystem class declaration.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 561aaa34-b544-49a1-9858-966c6b916264
📒 Files selected for processing (4)
Content.Server/Administration/Systems/AdminVerbSystem.Smites.csContent.Server/_Lust/Administration/Systems/AdminVerbSystem.csResources/Locale/en-US/_strings/_lust/administration/smites.ftlResources/Locale/ru-RU/_strings/_lust/fucksign/fucksign.ftl
| AddSmiteSign( | ||
| "admin-smite-fuck-sign-name", | ||
| "admin-smite-fuck-sign-description", | ||
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "icon"), | ||
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "sign"), | ||
| args | ||
| ); | ||
|
|
||
| string[] defaultSmiteNames = ["bald", "cat", "dog", "furry", "nerd", "peak", "raider", "stinky"]; | ||
| foreach (var name in defaultSmiteNames) | ||
| { | ||
| AddSmiteSign( | ||
| $"admin-smite-{name}-sign-name", | ||
| $"admin-smite-{name}-sign-description", | ||
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | ||
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | ||
| args | ||
| ); | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify that the fucksign.rsi resource exists and check other SpriteSpecifier.Rsi usages in _Lust files
# Check if fucksign.rsi exists
echo "=== Checking fucksign.rsi location ==="
fd -t d "fucksign.rsi"
# Check how other _Lust files reference Rsi paths
echo "=== Checking SpriteSpecifier.Rsi path patterns in _Lust ==="
rg -n "SpriteSpecifier.Rsi" --glob "**/Content.Server/_Lust/**/*.cs" -A1Repository: space-sunrise/lust-station
Length of output: 959
🏁 Script executed:
#!/bin/bash
# Search for fucksign.rsi file anywhere in the repository
echo "=== Searching for fucksign.rsi with various patterns ==="
fd "fucksign" .
find . -name "*fucksign*" 2>/dev/null
# Check if it might be in Resources directory
echo "=== Checking Resources paths ==="
fd -t f ".*\.rsi" Resources/ | grep -i "fuck\|kill"
# Check SpriteSpecifier.Rsi usage patterns across the entire Content.Server
echo "=== SpriteSpecifier.Rsi patterns in Content.Server ==="
rg "SpriteSpecifier.Rsi.*\(" Content.Server/ -A1 | head -40Repository: space-sunrise/lust-station
Length of output: 4095
🏁 Script executed:
#!/bin/bash
# Check if killsign.rsi exists
echo "=== Searching for killsign.rsi ==="
fd "killsign" .
# Check for Resources directory structure
echo "=== Textures directory structure ==="
ls -la Resources/Textures/Objects/Misc/ 2>/dev/null | grep -i sign
# Look for how ResPath and resource loading works
echo "=== Check ResourcePath/ResPath usage patterns ==="
rg "new ResPath\(" Content.Server/_Lust/ -A1 | head -20
# Check if there's any resource loading logic that handles _Lust prefixes
echo "=== Check how _Lust paths are handled ==="
rg "_Lust" Resources/Prototypes/_Lust/ -l | head -5
fd -t f "*.yml" Resources/Prototypes/_Lust/ | head -5 | xargs -I {} grep -l "\.rsi" {}Repository: space-sunrise/lust-station
Length of output: 1089
🏁 Script executed:
#!/bin/bash
# Check YAML files for sprite paths with _Lust
echo "=== Checking YAML files for _Lust sprite references ==="
fd --glob "*.yml" Resources/Prototypes/_Lust/ | head -3 | xargs grep -h "\.rsi" | head -10
# Check how paths are resolved - look for SpriteSpecifier usage in _Lust
echo "=== Check C# code for _Lust sprite paths ==="
rg "SpriteSpecifier" Content.Server/_Lust/ -B2 -A2 | head -40
# Check if there's resource path resolution that adds /Textures/ prefix
echo "=== Look for resource path resolution logic ==="
rg "ResPath|/Textures/" Content.Shared/ -l | grep -i "resource\|path" | head -5
# Check the actual AdminVerbSystem.cs file context
echo "=== Check full AdminVerbSystem.cs for context ==="
head -70 Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs | tail -40Repository: space-sunrise/lust-station
Length of output: 4327
🏁 Script executed:
#!/bin/bash
# Final check: search for any fucksign references
echo "=== All fucksign references ==="
rg -i "fucksign" . --type cs --type yml
# Check what sprite resources actually exist in _Lust/Objects/Misc/
echo "=== What actually exists in Resources/Textures/_Lust/Objects/Misc/ ==="
find Resources/Textures/_Lust/Objects/Misc/ -type d 2>/dev/null
# Check if there's supposed to be a sprite for this
echo "=== Check if fucksign is only referenced in code ==="
rg "fucksign" Content.Server/_Lust/ -t cs
# Verify that _Lust/ paths work by checking resource resolution
echo "=== Check ResourcePath handling ==="
rg "class.*ResPath\|new ResPath" Content.Shared/ -A3 | head -20Repository: space-sunrise/lust-station
Length of output: 1077
🏁 Script executed:
#!/bin/bash
# Verify the exact filename
echo "=== Exact filename in Resources ==="
ls -la Resources/Textures/_Lust/Objects/Misc/ | grep -i "fuck\|sign"
# Double-check the code reference
echo "=== Code reference ==="
grep "fucksign" Content.Server/_Lust/Administration/Systems/AdminVerbSystem.csRepository: space-sunrise/lust-station
Length of output: 361
Исправьте имя файла спрайта: fucksign.rsi → fuck_sign.rsi
Код ссылается на _Lust/Objects/Misc/fucksign.rsi, но в репозитории файл называется fuck_sign.rsi (с подчёркиванием). Это приведёт к ошибке загрузки ресурса во время выполнения.
🔧 Исправление
AddSmiteSign(
"admin-smite-fuck-sign-name",
"admin-smite-fuck-sign-description",
- new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "icon"),
- new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "sign"),
+ new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "icon"),
+ new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "sign"),
args
);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| AddSmiteSign( | |
| "admin-smite-fuck-sign-name", | |
| "admin-smite-fuck-sign-description", | |
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "icon"), | |
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "sign"), | |
| args | |
| ); | |
| string[] defaultSmiteNames = ["bald", "cat", "dog", "furry", "nerd", "peak", "raider", "stinky"]; | |
| foreach (var name in defaultSmiteNames) | |
| { | |
| AddSmiteSign( | |
| $"admin-smite-{name}-sign-name", | |
| $"admin-smite-{name}-sign-description", | |
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | |
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | |
| args | |
| ); | |
| } | |
| AddSmiteSign( | |
| "admin-smite-fuck-sign-name", | |
| "admin-smite-fuck-sign-description", | |
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "icon"), | |
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "sign"), | |
| args | |
| ); | |
| string[] defaultSmiteNames = ["bald", "cat", "dog", "furry", "nerd", "peak", "raider", "stinky"]; | |
| foreach (var name in defaultSmiteNames) | |
| { | |
| AddSmiteSign( | |
| $"admin-smite-{name}-sign-name", | |
| $"admin-smite-{name}-sign-description", | |
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | |
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | |
| args | |
| ); | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs` around lines
39 - 57, The sprite file name referenced for the custom sign is wrong; update
the SpriteSpecifier.Rsi path used in the AddSmiteSign call(s) (the ones
constructing new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"),
...)) to use the correct file name "_Lust/Objects/Misc/fuck_sign.rsi" (and
search/replace any other occurrences of "_Lust/Objects/Misc/fucksign.rsi"); keep
the same subnames ("icon", "sign") and leave the AddSmiteSign parameters
unchanged otherwise.
There was a problem hiding this comment.
@coderabbitai Не-а тут все верно, я тестировал. Там папка называется именно fucksign.rsi
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
echo "=== Searching for fucksign or fuck_sign directories ==="
find Resources/Textures/_Lust/Objects/Misc/ -maxdepth 1 2>/dev/null | sort
echo "=== All RSI entries in Misc folder ==="
ls -la Resources/Textures/_Lust/Objects/Misc/ 2>/dev/null
Length of output: 1204
@crestoedge, я проверил файловую систему репозитория — директория называется именно fuck_sign.rsi (с подчёркиванием):
Resources/Textures/_Lust/Objects/Misc/fuck_sign.rsi
Файла fucksign.rsi (без подчёркивания) в репозитории нет. Если локально у вас это работало, возможно, операционная система игнорировала регистр/различие в именах, но на сервере Linux это вызовет ошибку загрузки ресурса.
Исправление остаётся актуальным:
- new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "icon"),
- new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "sign"),
+ new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "icon"),
+ new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "sign"),🧠 Learnings used
Learnt from: Orvex07
Repo: space-sunrise/lust-station PR: 442
File: Resources/Prototypes/_Lust/CP/Weapons/hl2_weapons.yml:56-105
Timestamp: 2025-12-31T16:02:40.555Z
Learning: В проекте space-sunrise/lust-station при анализе PR с контентом в директории _Lust/CP необходимо проверять существование прототипов не только в файлах PR, но и в upstream директории _Sunrise, так как _Lust может использовать прототипы оружия, магазинов и других предметов из _Sunrise (например, MagazineMP7 определён в Resources/Prototypes/_Sunrise/Entities/Objects/Weapons/Guns/Ammunition/Magazines/pistol.yml).
Learnt from: darneya
Repo: space-sunrise/lust-station PR: 297
File: Resources/Prototypes/_Lust/Entities/Clothing/Ears/headsets.yml:27-30
Timestamp: 2025-07-07T15:12:45.849Z
Learning: В проекте space-sunrise/lust-station в _Lust entities допустимо использование общих путей к спрайтам типа `Clothing/Ears/Headsets/command.rsi` наряду со специфичными `_Lust/Clothing/...` путями. Система корректно работает с обоими вариантами.
Learnt from: Esco-dev
Repo: space-sunrise/lust-station PR: 427
File: Resources/Prototypes/_Sunrise/Roles/Jobs/Command/nanotrasen_representative.yml:7-7
Timestamp: 2025-12-12T08:52:35.387Z
Learning: В проекте space-sunrise/lust-station используется комментарий "#Lust Edit" для маркировки изменений в файлах, специфичных для форка lust-station. Эти комментарии являются частью системы документирования изменений относительно upstream проекта sunrise-station и не должны удаляться.
Learnt from: Esco-dev
Repo: space-sunrise/lust-station PR: 427
File: Resources/Prototypes/_Sunrise/Roles/Jobs/Command/nanotrasen_representative.yml:7-7
Timestamp: 2025-12-12T08:52:50.213Z
Learning: В проекте space-sunrise/lust-station используется комментарий "# Lust Edit" для маркировки изменений в файлах относительно upstream проекта sunrise-station. Эти комментарии являются частью системы документирования fork-специфичных изменений и не должны удаляться.
Learnt from: CR
Repo: space-sunrise/lust-station PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-01T18:35:30.075Z
Learning: Write changelog messages in Russian for consistency with existing entries
Learnt from: Kendrick15
Repo: space-sunrise/lust-station PR: 301
File: Resources/Locale/ru-RU/_strings/_lust/flavors/flavor-profiles.ftl:1-1
Timestamp: 2025-07-08T21:33:23.476Z
Learning: Проект lust-station является взрослым контентом с ERP (Erotic Role Play) функциональностью, где активно используется ненормативная лексика в локализациях, включая акценты персонажей, комментарии разработчиков и игровой контент. Стиль локализации соответствует взрослой тематике проекта.
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "icon"), | ||
| new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fucksign.rsi"), "sign"), |
There was a problem hiding this comment.
Кролик прав. Был мини-рефактоинг. Обнови ветку
|
|
||
|
|
||
| using Content.Server.Administration.Managers; |
There was a problem hiding this comment.
убераем лишнее отступы..
| using Content.Server.Administration.Managers; | |
| using Content.Server.Administration.Managers; |
|
|
||
| namespace Content.Server._Lust.Administration.Systems; | ||
|
|
||
| public sealed partial class AdminVerbSystem : EntitySystem |
There was a problem hiding this comment.
почему тут partial? Это отдельная систеа которая не привязана к AdminVerbSystem. Лучше сделай LustAdminVerbSystem
| if (HasComp<MapComponent>(args.Target) || HasComp<MapGridComponent>(args.Target)) | ||
| return; |
There was a problem hiding this comment.
Слишком большой набор сущностей.
| string[] defaultSmiteNames = ["bald", "cat", "dog", "furry", "nerd", "peak", "raider", "stinky"]; | ||
| foreach (var name in defaultSmiteNames) | ||
| { | ||
| AddSmiteSign( | ||
| $"admin-smite-{name}-sign-name", | ||
| $"admin-smite-{name}-sign-description", | ||
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | ||
| new SpriteSpecifier.Rsi(new($"/Textures/Objects/Misc/killsign.rsi"), name), | ||
| args | ||
| ); | ||
| } |
There was a problem hiding this comment.
При каждом запросе создается новый массив , в цикле повторно создаются объект спрайтов. Лучше вынести постоянные данные в private static readonly поля...
Кратное описание
Фикс смайта с особой табличкой
Переделка #487
По какой причине
Адмемы
Медиа(Видео/Скриншоты)
Changelog
Summary by CodeRabbit
Примечания к выпуску
New Features
Bug Fixes