StrangeLoopGames / EcoIssues

131 stars 21 forks source link

ModKit: Add Game Action Hooks for ModKit use #21772

Open thetestgame opened 3 years ago

thetestgame commented 3 years ago

This is something several members of the modding community have requested and implemented in their own ways. Usually through 3rd party modding apis for Eco. Having a native interface for sending/receiving game actions on the server with an optional deny option for blocking actions outright would be the ideal way of going about this

Community Comments/PRs for similar changes. https://github.com/StrangeLoopGames/EcoSuggestions/issues/1450 https://github.com/StrangeLoopGames/Eco/pull/8443

redwyre commented 3 years ago

A straight forward implementation would be to add callbacks to GameActionManager before and after processing inside TryPerformActions (eg PrePerformActions, PostPerformActions)

Also note it looks like there is something similar with ActionUtil that uses IGameActionAware though that is only a notification and happens after everything in the game action pack has been processed.