Refactor stacks to not use method events (#4177)
This commit is contained in:
committed by
GitHub
parent
ca4e665296
commit
0093a961bc
@@ -33,7 +33,8 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
|
||||
if (EntityPrototypeHelpers.HasComponent<StackComponent>(entityId))
|
||||
{
|
||||
var spawned = owner.EntityManager.SpawnEntity(entityId, owner.Transform.MapPosition);
|
||||
owner.EntityManager.EventBus.RaiseLocalEvent(spawned.Uid, new StackChangeCountEvent(count), false);
|
||||
var stack = spawned.GetComponent<StackComponent>();
|
||||
EntitySystem.Get<StackSystem>().SetCount(spawned.Uid, stack, count);
|
||||
spawned.RandomOffset(0.5f);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user