Skip to content

Commit

Permalink
[Upd]
Browse files Browse the repository at this point in the history
  • Loading branch information
NameLunar committed Jan 7, 2025
1 parent 53117a4 commit bc4969a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Content.Server/ADT/Abilities/XenoQueen/XenoQueenSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ private void OnCreateTurret(EntityUid uid, XenoQueenComponent component, SpawnWa

if (_container.IsEntityOrParentInContainer(uid))
return;
if (component.BloobCount >= 25) // В будущем заменю на переменную, а сейчас пусть катсыль
if (component.BloobCount >= args.Cost)
{
component.BloobCount -= args.Cost.Value;
var xform = Transform(uid);
// Get the tile in front of the Queen
var offsetValue = xform.LocalRotation.ToWorldVec();
Expand All @@ -130,7 +131,7 @@ private void OnCreateTurret(EntityUid uid, XenoQueenComponent component, SpawnWa
}
else
{
_popupSystem.PopupEntity(Loc.GetString("queen-no-bloob-count", ("CountBloob", 20 - component.BloobCount)), uid); // Заменю в будущем
_popupSystem.PopupEntity(Loc.GetString("queen-no-bloob-count", ("CountBloob", args.Cost.GetValueOrDefault() - component.BloobCount)), uid); // Заменю в будущем
}
UpdateAlertShow(uid, component);
}
Expand Down
2 changes: 2 additions & 0 deletions Content.Shared/ADT/Actions/SpawnWallActionEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ namespace Content.Shared.ADT.Events;

public sealed partial class SpawnWallActionEvent : InstantActionEvent
{
[DataField]
public int? Cost { get; private set; }
}
2 changes: 2 additions & 0 deletions Resources/Prototypes/ADT/Actions/XenoQueen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
sprite: Objects/Weapons/Guns/Turrets/xenoturret.rsi
state: icon
event: !type:SpawnWallActionEvent
prototypes:
cost: 25
# Я не смог сделать отдельный ивент для спавнта турели. Он не видел прототип ивента.

- type: entity
Expand Down

0 comments on commit bc4969a

Please sign in to comment.