待辦事項 #41730

Lua API: allow setting move side effects

啟用日期: 2021-03-11 08:43 最後更新: 2021-03-12 21:33

回報者:
負責人:
類型:
狀態:
關閉
元件:
里程碑:
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
Accepted
檔案:
1

細節

The Lua API allows moving a unit without considering what the move rules are via edit.unit_move() and edit.unit_teleport(). This can be used to create custom move actions, teleporting items on the map etc. They have side effects that used to be a part of regular moves but that now live in separate actions.

Add parameters to control what side effects not a part of enabler controlled moves the move should have. This allows the ability to specify a unit to embark to, to determine if a unit is allowed to unload from its current transport to perform the move, if any city at the target tile is conquered, if any extra at the target tile is conquered, if huts at the target tile are entered or frightened.

The old versions of edit.unit_move() and edit.unit_teleport() that infers side effects based on game rules and state can be deprecated as soon as enough of their old rules can be expressed in Lua.

Ticket History (3/4 Histories)

2021-03-11 08:43 Updated by: kvilhaugsvik
  • New Ticket "Lua API: allow setting move side effects" created
2021-03-11 08:45 Updated by: kvilhaugsvik
  • 處理結果 Update from to Accepted
2021-03-12 21:33 Updated by: kvilhaugsvik
  • 狀態 Update from 開啟 to 關閉

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入