Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -633,20 +633,20 @@ private void AddSmiteVerbs(GetVerbsEvent<Verb> args)
};
args.Verbs.Add(nyanify);

var killSignName = Loc.GetString("admin-smite-fuck-sign-name").ToLowerInvariant(); // Lust-edit
var killSignName = Loc.GetString("admin-smite-kill-sign-name").ToLowerInvariant();
Verb killSign = new()
{
Text = killSignName,
Category = VerbCategory.Smite,
Icon = new SpriteSpecifier.Rsi(new("_Lust/Objects/Misc/fuck_sign.rsi"), "icon"), // Lust-edit
Icon = new SpriteSpecifier.Rsi(new("/Textures/Objects/Misc/killsign.rsi"), "icon"),
Act = () =>
{
EnsureComp<KillSignComponent>(args.Target, out var comp);
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(": ", killSignName, Loc.GetString("admin-smite-fuck-sign-description")) // Lust-edit
Message = string.Join(": ", killSignName, Loc.GetString("admin-smite-kill-sign-description"))
};
args.Verbs.Add(killSign);

Expand Down
81 changes: 81 additions & 0 deletions Content.Server/_Lust/Administration/Systems/AdminVerbSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@


using Content.Server.Administration.Managers;
Comment on lines +1 to +3
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убераем лишнее отступы..

Suggested change
using Content.Server.Administration.Managers;
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
Copy link
Collaborator

Choose a reason for hiding this comment

The 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
Copy link
Collaborator

Choose a reason for hiding this comment

The 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
Copy link
Collaborator

Choose a reason for hiding this comment

The 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
Copy link
Contributor

@coderabbitai coderabbitai bot Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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" -A1

Repository: 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 -40

Repository: 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 -40

Repository: 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 -20

Repository: 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.cs

Repository: space-sunrise/lust-station

Length of output: 361


Исправьте имя файла спрайта: fucksign.rsifuck_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.

Suggested change
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai Не-а тут все верно, я тестировал. Там папка называется именно fucksign.rsi

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 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) функциональностью, где активно используется ненормативная лексика в локализациях, включая акценты персонажей, комментарии разработчиков и игровой контент. Стиль локализации соответствует взрослой тематике проекта.

Comment on lines +47 to +57
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

При каждом запросе создается новый массив , в цикле повторно создаются объект спрайтов. Лучше вынести постоянные данные в private static readonly поля...

}

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);
}
}
26 changes: 26 additions & 0 deletions Resources/Locale/en-US/_strings/_lust/administration/smites.ftl
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.
24 changes: 24 additions & 0 deletions Resources/Locale/ru-RU/_strings/_lust/fucksign/fucksign.ftl
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 = Накладывает на игрока метку ВОНЮЧИЙ.
Loading