Remove ILand (#4582)
* Remove ILand * Make land not handleable * Rename ILand
This commit is contained in:
@@ -124,25 +124,8 @@ namespace Content.Shared.Throwing
|
||||
var user = thrownItem.Thrower;
|
||||
var coordinates = landing.Transform.Coordinates;
|
||||
|
||||
// LandInteraction
|
||||
// TODO: Refactor these to system messages
|
||||
var landMsg = new LandEvent(user, landing, coordinates);
|
||||
RaiseLocalEvent(landing.Uid, landMsg);
|
||||
if (landMsg.Handled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var comps = landing.GetAllComponents<ILand>().ToArray();
|
||||
var landArgs = new LandEventArgs(user, coordinates);
|
||||
|
||||
// Call Land on all components that implement the interface
|
||||
foreach (var comp in comps)
|
||||
{
|
||||
if (landing.Deleted) break;
|
||||
comp.Land(landArgs);
|
||||
}
|
||||
|
||||
ComponentManager.RemoveComponent(landing.Uid, thrownItem);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user