Home › Operations › Player operations › MOVE_GREAT_WORK

Available out of the box. Usable from Lua in the unmodified game.

MOVE_GREAT_WORK

Lua constant PlayerOperations.MOVE_GREAT_WORK
Hash 0x291d387e
Kind Player operations
Status verified
Handled in case of Player::Operations::Manager::Process (symbol 0x30d4dd, current 0x30e6ed)

Moves a great work the player owns from one building slot to another building slot, in the same or another city of that player.

-- as used by the game's own Great Works screen (Base/Assets/UI/GreatWorksOverview.lua)
local tParameters = {}
tParameters[PlayerOperations.PARAM_PLAYER_ONE]       = Game.GetLocalPlayer()
tParameters[PlayerOperations.PARAM_CITY_SRC]         = srcCityId
tParameters[PlayerOperations.PARAM_CITY_DEST]        = destCityId
tParameters[PlayerOperations.PARAM_BUILDING_SRC]     = srcBuildingId
tParameters[PlayerOperations.PARAM_BUILDING_DEST]    = destBuildingId
tParameters[PlayerOperations.PARAM_GREAT_WORK_INDEX] = greatWorkIndex
tParameters[PlayerOperations.PARAM_SLOT]             = destSlotIndex
UI.RequestPlayerOperation(Game.GetLocalPlayer(), PlayerOperations.MOVE_GREAT_WORK, tParameters)

See also: player-operation.CHOOSE_ARTIFACT_PLAYER, CityBuildings.GetGreatWorkInSlot, Game.GetGreatWorkPlayer

Parameters

Pass these as the keys of the parameter table (for example tParameters[PlayerOperations.PARAM_BUILDING_DEST] = value). Meanings come from the parameter reference.

Events sent

GREAT_WORK_MOVED

Functions called (names from the symbol build)

Globals::EditPlayer, Districts::Find, Buildings::GetGreatWorkInSlot, Instance>::edit, Buildings::RemoveGreatWork, Culture::Get, CollectorDefault<void>_>::Dispatch, Buildings::AddGreatWorkToSlot, Event::Send

Evidence: static-analysis — hash comparison in the Process decision tree