You can now pry multiple tiles at once (#29231)

* You can now pry multiple tiles at once

* More advanced do after duplicate checking.

Instead of just saying "lol tile prying can raise duplicates", we now have a system so tile prying can properly distinguish events on 2 different tiles. This is achieved with a virtual function on DoAfterEvent.
This commit is contained in:
Pieter-Jan Briers
2024-06-20 16:05:40 +02:00
committed by GitHub
parent d15eafe133
commit cf374ac905
5 changed files with 33 additions and 11 deletions

View File

@@ -271,6 +271,11 @@ public abstract partial class SharedToolSystem : EntitySystem
return new ToolDoAfterEvent(Fuel, evClone, OriginalTarget);
}
public override bool IsDuplicate(DoAfterEvent other)
{
return other is ToolDoAfterEvent toolDoAfter && WrappedEvent.IsDuplicate(toolDoAfter.WrappedEvent);
}
}
[Serializable, NetSerializable]