Home › Operations › Player operations › CHOOSE_ARTIFACT_PLAYER
Available out of the box. Usable from Lua in the unmodified game.
CHOOSE_ARTIFACT_PLAYER
|
|
| Lua constant |
PlayerOperations.CHOOSE_ARTIFACT_PLAYER |
| Hash |
0x07247e03 |
| Kind |
Player operations |
| Status |
verified |
| Handled in |
case of Player::Operations::Manager::Process (symbol 0x30cff9, current 0x30e209) |
Finishes an archaeologist artifact excavation: the chosen player receives the artifact as a great work.
- This case calls Game::Culture::SetGreatWorkPlayer and AddArtifactToBuilding, looks up the target city, asks Buildings::GetFreeSlot, sends UNIT_ARTIFACT_CHANGED and UNIT_VISIBILITY_CHANGED, and destroys the archaeologist unit.
[verified; evidence: static-analysis — call list of the case body in both builds]
- The current build adds a null check on the city lookup before the city's Buildings object is used. The symbol build used the result unchecked.
[verified; evidence: static-analysis — instruction-aligned diff of Process]
See also: player-operation.MOVE_GREAT_WORK, Game.GetGreatWorkPlayer
Parameters
Pass these as the keys of the parameter table (for example tParameters[PlayerOperations.PARAM_PLAYER_ONE] = value). Meanings come from the parameter reference.
Events sent
UNIT_ARTIFACT_CHANGED, UNIT_VISIBILITY_CHANGED
Functions called (names from the symbol build)
Units::GetNextExtractingArchaeologistID, Districts::Find, Culture::Get, Culture::SetGreatWorkPlayer, Instance>::edit, Culture::AddArtifactToBuilding, Event::Send, Buildings::GetFreeSlot, Units::DelayedDestroy
Evidence: static-analysis — hash comparison in the Process decision tree