|
1 | 1 | local dialogs = require('gui.dialogs')
|
2 | 2 | local utils = require('utils')
|
3 | 3 |
|
4 |
| -function addCivToEmbarkList(info) |
5 |
| - local viewscreen = dfhack.gui.getDFViewscreen(true) |
| 4 | +function embarkAnyone() |
6 | 5 |
|
7 |
| - viewscreen.start_civ:insert ('#', info.civ) |
8 |
| - viewscreen.start_civ_nem_num:insert ('#', info.nemeses) |
9 |
| - viewscreen.start_civ_entpop_num:insert ('#', info.pops) |
10 |
| - viewscreen.start_civ_site_num:insert ('#', info.sites) |
11 |
| -end |
| 6 | + function addCivToEmbarkList(info) |
| 7 | + local viewscreen = dfhack.gui.getDFViewscreen(true) |
| 8 | + |
| 9 | + viewscreen.start_civ:insert ('#', info.civ) |
| 10 | + viewscreen.start_civ_nem_num:insert ('#', info.nemeses) |
| 11 | + viewscreen.start_civ_entpop_num:insert ('#', info.pops) |
| 12 | + viewscreen.start_civ_site_num:insert ('#', info.sites) |
| 13 | + end |
12 | 14 |
|
13 |
| -function embarkAnyone() |
14 | 15 | local viewscreen = dfhack.gui.getDFViewscreen(true)
|
| 16 | + if viewscreen._type ~= df.viewscreen_choose_start_sitest then |
| 17 | + qerror("This script can only be used on the embark screen!") |
| 18 | + end |
| 19 | + |
15 | 20 | local choices, existing_civs = {}, {}
|
16 | 21 |
|
17 | 22 | for _,existing_civ in ipairs(viewscreen.start_civ) do
|
18 | 23 | existing_civs[existing_civ.id] = true
|
19 | 24 | end
|
20 | 25 |
|
21 |
| - if viewscreen._type ~= df.viewscreen_choose_start_sitest then |
22 |
| - qerror("This script can only be used on the embark screen!") |
23 |
| - end |
24 |
| - |
25 | 26 | for i, civ in ipairs (df.global.world.entities.all) do
|
26 | 27 | -- Test if entity is a civ
|
27 | 28 | if civ.type ~= df.historical_entity_type.Civilization then goto continue end
|
|
0 commit comments