Incidencia #41730

Lua API: allow setting move side effects

Abrir Fecha: 2021-03-11 08:43 Última actualización: 2021-03-12 21:33

Informador:
Propietario:
Tipo:
Estado:
Cerrado
Componente:
Prioridad:
5 - Medium
Gravedad:
5 - Medium
Resolución:
Accepted
Fichero:
1

Details

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
  • Resolución Update from Ninguno to Accepted
2021-03-12 21:33 Updated by: kvilhaugsvik
  • Estado Update from Open to Cerrado

Editar

Please login to add comment to this ticket » Entrar