Add interaction tests (#15251)
This commit is contained in:
@@ -352,6 +352,10 @@ namespace Content.Server.Construction
|
||||
}
|
||||
}
|
||||
|
||||
var entChangeEv = new ConstructionChangeEntityEvent(newUid, uid);
|
||||
RaiseLocalEvent(uid, entChangeEv);
|
||||
RaiseLocalEvent(newUid, entChangeEv, broadcast: true);
|
||||
|
||||
QueueDel(uid);
|
||||
|
||||
return newUid;
|
||||
@@ -384,4 +388,20 @@ namespace Content.Server.Construction
|
||||
return ChangeNode(uid, userUid, nodeId, performActions, construction);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This event gets raised when an entity changes prototype / uid during construction. The event is raised
|
||||
/// directed both at the old and new entity.
|
||||
/// </summary>
|
||||
public sealed class ConstructionChangeEntityEvent : EntityEventArgs
|
||||
{
|
||||
public readonly EntityUid New;
|
||||
public readonly EntityUid Old;
|
||||
|
||||
public ConstructionChangeEntityEvent(EntityUid newUid, EntityUid oldUid)
|
||||
{
|
||||
New = newUid;
|
||||
Old = oldUid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user