Some work on the mess that is this power code.

Jesus.

Tons of fixes, refactors and other things.
The powernet's code is still awful though.
This commit is contained in:
Pieter-Jan Briers
2018-05-27 16:44:50 +02:00
parent f1ec10e3e1
commit 147aad5064
24 changed files with 444 additions and 172 deletions

View File

@@ -65,7 +65,8 @@ namespace Content.Server.GameObjects.EntitySystems
/// </summary>
/// <param name="user"></param>
/// <param name="clicklocation"></param>
void Afterattack(IEntity user, LocalCoordinates clicklocation);
/// <param name="attacked">The entity that was clicked on out of range. May be null if no entity was clicked on.true</param>
void Afterattack(IEntity user, LocalCoordinates clicklocation, IEntity attacked);
}
/// <summary>
@@ -198,7 +199,7 @@ namespace Content.Server.GameObjects.EntitySystems
for (var i = 0; i < afterattacks.Count; i++)
{
afterattacks[i].Afterattack(user, clicklocation);
afterattacks[i].Afterattack(user, clicklocation, null);
}
}
@@ -229,7 +230,7 @@ namespace Content.Server.GameObjects.EntitySystems
for (var i = 0; i < afterattacks.Count; i++)
{
afterattacks[i].Afterattack(user, clicklocation);
afterattacks[i].Afterattack(user, clicklocation, attacked);
}
}
@@ -315,7 +316,7 @@ namespace Content.Server.GameObjects.EntitySystems
//See if we have a ranged attack interaction
for (var i = 0; i < afterattacks.Count; i++)
{
afterattacks[i].Afterattack(user, clicklocation);
afterattacks[i].Afterattack(user, clicklocation, attacked);
}
}
}