This commit is contained in:
BIGZi0348
2025-01-05 18:37:53 +03:00
parent 4caee99228
commit ce9b8af560
13 changed files with 57 additions and 78 deletions

View File

@@ -14,6 +14,7 @@ public sealed class RandomItemAspect : AspectSystem<RandomItemAspectComponent>
{
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly RandomGiftSystem _giftSystem = default!;
[Dependency] private readonly ChatHelper _chatHelper = default!;
public override void Initialize()
{
@@ -30,7 +31,6 @@ public sealed class RandomItemAspect : AspectSystem<RandomItemAspectComponent>
while (query.MoveNext(out var ent, out _))
{
GiveItem(ent, component);
ChatHelper.SendAspectDescription(ent, Loc.GetString("random-item-aspect-desc"));
}
}
@@ -49,7 +49,7 @@ public sealed class RandomItemAspect : AspectSystem<RandomItemAspectComponent>
var mob = ev.Mob;
GiveItem(mob, component);
ChatHelper.SendAspectDescription(mob, Loc.GetString("random-item-aspect-desc"));
_chatHelper.SendAspectDescription(mob, Loc.GetString("random-item-aspect-desc"));
}
}
@@ -64,10 +64,10 @@ public sealed class RandomItemAspect : AspectSystem<RandomItemAspectComponent>
var transform = CompOrNull<TransformComponent>(player);
if(transform == null)
if (transform == null)
return;
if(!HasComp<HandsComponent>(player))
if (!HasComp<HandsComponent>(player))
return;
var weaponEntity = EntityManager.SpawnEntity(component.Item, transform.Coordinates);