-
-
Notifications
You must be signed in to change notification settings - Fork 227
Fuck it (похуй, переделываем) #493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,81 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Content.Server.Administration.Managers; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Content.Shared.Administration; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Content.Shared.Administration.Components; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Content.Shared.Database; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Content.Shared.Verbs; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Robust.Shared.Map.Components; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Robust.Shared.Player; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| using Robust.Shared.Utility; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| namespace Content.Server._Lust.Administration.Systems; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public sealed partial class AdminVerbSystem : EntitySystem | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. почему тут partial? Это отдельная систеа которая не привязана к AdminVerbSystem. Лучше сделай LustAdminVerbSystem |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| [Dependency] private readonly IAdminManager _adminManager = default!; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| public override void Initialize() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| base.Initialize(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SubscribeLocalEvent<GetVerbsEvent<Verb>>(GetSmiteVerbs); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private void GetSmiteVerbs(GetVerbsEvent<Verb> args) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!TryComp(args.User, out ActorComponent? actor)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var player = actor.PlayerSession; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (!_adminManager.HasAdminFlag(player, AdminFlags.Fun)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // 1984. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (HasComp<MapComponent>(args.Target) || HasComp<MapGridComponent>(args.Target)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| return; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+36
to
+37
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Слишком большой набор сущностей. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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"), | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+42
to
+43
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Кролик прав. Был мини-рефактоинг. Обнови ветку |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+57
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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 Исправьте имя файла спрайта: Код ссылается на 🔧 Исправление 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
Suggested change
🤖 Prompt for AI Agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @coderabbitai Не-а тут все верно, я тестировал. Там папка называется именно
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: Length of output: 1204
Файла Исправление остаётся актуальным: - 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
Comment on lines
+47
to
+57
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. При каждом запросе создается новый массив , в цикле повторно создаются объект спрайтов. Лучше вынести постоянные данные в |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| private void AddSmiteSign(string nameLoc, string descLoc, SpriteSpecifier icon, SpriteSpecifier sign, GetVerbsEvent<Verb> args) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var name = Loc.GetString(nameLoc).ToLowerInvariant(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| var description = Loc.GetString(descLoc); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Verb signVerb = new() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Text = name, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Category = VerbCategory.Smite, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Icon = icon, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Act = () => | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EnsureComp<KillSignComponent>(args.Target, out var comp); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| comp.Sprite = sign; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| comp.HideFromOwner = false; // We set it to false anyway, in case the hidden smite was used beforehand. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Dirty(args.Target, comp); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Impact = LogImpact.Extreme, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Message = string.Join(": ", name, description) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| args.Verbs.Add(signVerb); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| admin-smite-fuck-sign-name = FUCK IT | ||
| admin-smite-fuck-sign-description = Marks a player with the FUCK IT sign, visible to everyone. | ||
|
|
||
| admin-smite-bald-sign-name = BALD | ||
| admin-smite-bald-sign-description = Marks a player with the BALD sign, visible to everyone. | ||
|
|
||
| admin-smite-cat-sign-name = CAT | ||
| admin-smite-cat-sign-description = Marks a player with the CAT sign, visible to everyone. | ||
|
|
||
| admin-smite-dog-sign-name = DOG | ||
| admin-smite-dog-sign-description = Marks a player with the DOG sign, visible to everyone. | ||
|
|
||
| admin-smite-furry-sign-name = FURRY | ||
| admin-smite-furry-sign-description = Marks a player with the FURRY sign, visible to everyone. | ||
|
|
||
| admin-smite-nerd-sign-name = NERD | ||
| admin-smite-nerd-sign-description = Marks a player with the NERD sign, visible to everyone. | ||
|
|
||
| admin-smite-peak-sign-name = PEAK | ||
| admin-smite-peak-sign-description = Marks a player with the PEAK sign, visible to everyone. | ||
|
|
||
| admin-smite-raider-sign-name = RAIDER | ||
| admin-smite-raider-sign-description = Marks a player with the RAIDER sign, visible to everyone. | ||
|
|
||
| admin-smite-stinky-sign-name = STINKY | ||
| admin-smite-stinky-sign-description = Marks a player with the STINKY sign, visible to everyone. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,26 @@ | ||
| admin-smite-fuck-sign-name = Грехопадение | ||
| admin-smite-fuck-sign-description = Накладывает на игрока метку ТРАХНИ ЭТО. | ||
|
|
||
| admin-smite-bald-sign-name = Лысый | ||
| admin-smite-bald-sign-description = Накладывает на игрока метку ЛЫСЫЙ. | ||
|
|
||
| admin-smite-cat-sign-name = Кот | ||
| admin-smite-cat-sign-description = Накладывает на игрока метку КОТ. | ||
|
|
||
| admin-smite-dog-sign-name = Собака | ||
| admin-smite-dog-sign-description = Накладывает на игрока метку СОБАКА. | ||
|
|
||
| admin-smite-furry-sign-name = Фурри | ||
| admin-smite-furry-sign-description = Накладывает на игрока метку ФУРРИ. | ||
|
|
||
| admin-smite-nerd-sign-name = Задрот | ||
| admin-smite-nerd-sign-description = Накладывает на игрока метку ЗАДРОТ. | ||
|
|
||
| admin-smite-peak-sign-name = ПИК | ||
| admin-smite-peak-sign-description = Накладывает на игрока метку ПИК. | ||
|
|
||
| admin-smite-raider-sign-name = Рейдер | ||
| admin-smite-raider-sign-description = Накладывает на игрока метку РЕЙДЕР. | ||
|
|
||
| admin-smite-stinky-sign-name = Вонючий | ||
| admin-smite-stinky-sign-description = Накладывает на игрока метку ВОНЮЧИЙ. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
убераем лишнее отступы..