Skip to content

Commit 3bce383

Browse files
committed
Advfort now supports workshops and siege weapons >:)
1 parent d9a5eef commit 3bce383

5 files changed

Lines changed: 708 additions & 179 deletions

File tree

Readme.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2362,7 +2362,8 @@ keybinding. (e.g. keybinding set Ctrl-T gui/advfort). Possible arguments:
23622362

23632363
* -c or --cheat - relaxes item requirements for buildings (e.g. walls from bones).
23642364
implies -a
2365-
2365+
2366+
* job - selects that job (e.g. Dig or FellTree)
23662367

23672368

23682369
gui/gm-editor

library/lua/dfhack/buildings.lua

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,22 @@ local trap_inputs = {
334334
},
335335
[df.trap_type.TrackStop] = { { flags2={ building_material=true, non_economic=true } } }
336336
}
337-
337+
local siegeengine_input = {
338+
[df.siegeengine_type.Catapult] = {
339+
{
340+
item_type=df.item_type.CATAPULTPARTS,
341+
vector_id=df.job_item_vector_id.CATAPULTPARTS,
342+
quantity=3
343+
}
344+
},
345+
[df.siegeengine_type.Ballista] = {
346+
{
347+
item_type=df.item_type.BALLISTAPARTS,
348+
vector_id=df.job_item_vector_id.BALLISTAPARTS,
349+
quantity=3
350+
}
351+
},
352+
}
338353
--[[ Functions for lookup in tables. ]]
339354

340355
local function get_custom_inputs(custom)
@@ -359,6 +374,8 @@ local function get_inputs_by_type(type,subtype,custom)
359374
end
360375
elseif type == df.building_type.Trap then
361376
return trap_inputs[subtype]
377+
elseif type == df.building_type.SiegeEngine then
378+
return siegeengine_input[subtype]
362379
else
363380
return building_inputs[type]
364381
end

0 commit comments

Comments
 (0)