-
Notifications
You must be signed in to change notification settings - Fork 154
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
mini update #979
mini update #979
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,7 @@ | ||
namespace Content.Server.Backmen.Xeno.Components; | ||
|
||
[RegisterComponent] | ||
public sealed partial class XenoAgentComponent : Component | ||
{ | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Content.Shared.Roles; | ||
|
||
namespace Content.Server.Backmen.Blob.Roles; | ||
|
||
[RegisterComponent] | ||
public sealed partial class XenoAgentRoleComponent : BaseMindRoleComponent | ||
{ | ||
|
||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Content.Server.Backmen.Language; | ||
using Content.Server.Backmen.Language.Events; | ||
using Content.Server.Backmen.Xeno.Components; | ||
using Content.Shared.Backmen.Language; | ||
|
||
namespace Content.Server.Backmen.Xeno; | ||
|
||
public sealed class XenoAgentSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly LanguageSystem _language = default!; | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<XenoAgentComponent, MapInitEvent>(OnInit); | ||
SubscribeLocalEvent<XenoAgentComponent, DetermineEntityLanguagesEvent>(OnApplyLanguages); | ||
} | ||
|
||
[ValidatePrototypeId<LanguagePrototype>] | ||
private const string XenoLanguage = "Xeno"; | ||
Comment on lines
+19
to
+20
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. 🛠️ Refactor suggestion Добавьте проверку существования прототипа языка Хотя атрибут [ValidatePrototypeId<LanguagePrototype>]
private const string XenoLanguage = "Xeno";
+private void EnsureLanguageExists()
+{
+ if (!_prototypeManager.HasIndex<LanguagePrototype>(XenoLanguage))
+ throw new InvalidOperationException($"Language prototype {XenoLanguage} not found");
+}
|
||
|
||
private void OnApplyLanguages(Entity<XenoAgentComponent> ent, ref DetermineEntityLanguagesEvent args) | ||
{ | ||
args.SpokenLanguages.Add(XenoLanguage); | ||
args.UnderstoodLanguages.Add(XenoLanguage); | ||
} | ||
|
||
private void OnInit(Entity<XenoAgentComponent> ent, ref MapInitEvent args) | ||
{ | ||
_language.UpdateEntityLanguages(ent.Owner); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using Robust.Shared.Serialization; | ||
|
||
namespace Content.Shared.Backmen.FootPrint; | ||
|
||
[Serializable, NetSerializable] | ||
public sealed class FootPrintState(NetEntity netEntity) : ComponentState | ||
{ | ||
public NetEntity PrintOwner { get; private set; } = netEntity; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,12 @@ | |
snap: | ||
- Wall | ||
components: | ||
- type: MobThresholds | ||
thresholds: | ||
0: Alive | ||
currentThresholdState: Alive | ||
showOverlays: false | ||
- type: MobState | ||
Comment on lines
+10
to
+15
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. 💡 Codebase verification Требуется добавить состояние Dead в blob_base.yml Анализ показывает несоответствия в реализации:
Рекомендации:
🔗 Analysis chainПроверьте баланс и согласованность с другими мобами Добавление компонентов
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Поиск других реализаций MobThresholds для сравнения
rg -l "type: MobThresholds" "Resources/Prototypes"
Length of output: 2501 Script: #!/bin/bash
# Проверяем содержимое нескольких файлов с MobThresholds для сравнения реализаций
rg "type: MobThresholds" -A 5 "Resources/Prototypes/Entities/Mobs/NPCs/animals.yml" "Resources/Prototypes/Entities/Mobs/base.yml" "Resources/Prototypes/_Backmen/Entities/Mobs/NPCs/base.yml"
Length of output: 6218 Script: #!/bin/bash
# Проверяем реализацию blob_base.yml и связанных файлов блоба
rg "type: MobThresholds" -A 5 "Resources/Prototypes/_Backmen/Entities/Mobs/NPCs/blob/blob_base.yml" "Resources/Prototypes/_Backmen/Entities/Mobs/NPCs/blob/blob_mobs.yml"
Length of output: 1813 |
||
- type: ZombieImmune | ||
- type: StatusEffects | ||
allowed: | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -66,6 +66,8 @@ | |||||||||||||
max: 2 | ||||||||||||||
playerRatio: 40 #players = 2 blobs | ||||||||||||||
allowNonHumans: true | ||||||||||||||
components: | ||||||||||||||
- type: BlobCarrier | ||||||||||||||
blacklist: | ||||||||||||||
components: | ||||||||||||||
- AntagImmune | ||||||||||||||
|
@@ -291,3 +293,34 @@ | |||||||||||||
components: | ||||||||||||||
- type: GameRule | ||||||||||||||
- type: BabelTowerRule | ||||||||||||||
|
||||||||||||||
#xeno | ||||||||||||||
- type: entity | ||||||||||||||
id: XenoAgentGameMode | ||||||||||||||
parent: BaseGameRule | ||||||||||||||
categories: [ HideSpawnMenu ] | ||||||||||||||
components: | ||||||||||||||
- type: GameRule | ||||||||||||||
minPlayers: 15 | ||||||||||||||
#delay: # 7-10 minutes | ||||||||||||||
# min: 420 | ||||||||||||||
# max: 600 | ||||||||||||||
Comment on lines
+305
to
+307
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. Раскомментируйте настройки задержки Закомментированные настройки задержки важны для баланса игрового режима. Без них режим может начаться слишком рано. Предлагаемые изменения: - #delay: # 7-10 minutes
- # min: 420
- # max: 600
+ delay: # 7-10 minutes
+ min: 420
+ max: 600 📝 Committable suggestion
Suggested change
|
||||||||||||||
- type: AntagSelection | ||||||||||||||
definitions: | ||||||||||||||
- prefRoles: [ XenoAgent ] | ||||||||||||||
min: 1 | ||||||||||||||
max: 2 | ||||||||||||||
playerRatio: 40 #players = 2 blobs | ||||||||||||||
allowNonHumans: true | ||||||||||||||
components: | ||||||||||||||
- type: XenoAgent | ||||||||||||||
- type: NpcFactionMember | ||||||||||||||
factions: | ||||||||||||||
- Xeno | ||||||||||||||
- NanoTrasen | ||||||||||||||
- type: XenoAcidSpiller | ||||||||||||||
blacklist: | ||||||||||||||
components: | ||||||||||||||
- AntagImmune | ||||||||||||||
mindRoles: | ||||||||||||||
- MindRoleXenoAgent |
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.
Компонент требует реализации
Компонент зарегистрирован корректно, но не содержит никакой логики. Необходимо добавить специфичное поведение для роли Ксено Агента.
Хотите, чтобы я предложил базовую реализацию компонента с основными свойствами и методами?