Add new entity spawn test & fix misc bugs (#19953)
This commit is contained in:
@@ -35,6 +35,7 @@ public class IdentitySystem : SharedIdentitySystem
|
||||
SubscribeLocalEvent<IdentityComponent, DidEquipHandEvent>((uid, _, _) => QueueIdentityUpdate(uid));
|
||||
SubscribeLocalEvent<IdentityComponent, DidUnequipEvent>((uid, _, _) => QueueIdentityUpdate(uid));
|
||||
SubscribeLocalEvent<IdentityComponent, DidUnequipHandEvent>((uid, _, _) => QueueIdentityUpdate(uid));
|
||||
SubscribeLocalEvent<IdentityComponent, MapInitEvent>(OnMapInit);
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
@@ -53,10 +54,8 @@ public class IdentitySystem : SharedIdentitySystem
|
||||
}
|
||||
|
||||
// This is where the magic happens
|
||||
protected override void OnComponentInit(EntityUid uid, IdentityComponent component, ComponentInit args)
|
||||
private void OnMapInit(EntityUid uid, IdentityComponent component, MapInitEvent args)
|
||||
{
|
||||
base.OnComponentInit(uid, component, args);
|
||||
|
||||
var ident = Spawn(null, Transform(uid).Coordinates);
|
||||
|
||||
QueueIdentityUpdate(uid);
|
||||
|
||||
Reference in New Issue
Block a user