Editing Mod Hooks
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 48: | Line 48: | ||
# [[Mod API Reference:GameOrder|GameOrder]]: The order being processed. (read-only) | # [[Mod API Reference:GameOrder|GameOrder]]: The order being processed. (read-only) | ||
# [[Mod API Reference:GameOrderResult|GameOrderResult]]: The result of the order being processed. This is writable, so mods can change the result. Currently, only [[Mod API Reference:GameOrderAttackTransferResult|GameOrderAttackTransferResult]] has writable fields. | # [[Mod API Reference:GameOrderResult|GameOrderResult]]: The result of the order being processed. This is writable, so mods can change the result. Currently, only [[Mod API Reference:GameOrderAttackTransferResult|GameOrderAttackTransferResult]] has writable fields. | ||
− | # skipThisOrder: A function that you can call to indicate that this order should be skipped. This should be called with one of three values, listed below. | + | # skipThisOrder: A function that you can call to indicate that this order should be skipped. This should be called with one of three values, listed below. Only the last call to this function defines the result, if you call it once you can call it again with a new value to change your mind. |
## WL.ModOrderControl.Keep: Indicates this order should be processed normally. This is the default value, and all orders will default to Keep if skipThisOrder is not called. | ## WL.ModOrderControl.Keep: Indicates this order should be processed normally. This is the default value, and all orders will default to Keep if skipThisOrder is not called. | ||
## WL.ModOrderControl.Skip: Indicates this order should be skipped. It won't appear in the orders list at all and it will be as if the order never existed. A [[Mod API Reference:GameOrderEvent|GameOrderEvent]] will be written into the orders list to tell the player who entered this order that their order was skipped. | ## WL.ModOrderControl.Skip: Indicates this order should be skipped. It won't appear in the orders list at all and it will be as if the order never existed. A [[Mod API Reference:GameOrderEvent|GameOrderEvent]] will be written into the orders list to tell the player who entered this order that their order was skipped. |