Skip to content

Commit 1fe88a2

Browse files
committed
update to great reorg structures
1 parent 194bde0 commit 1fe88a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+235
-229
lines changed

library/LuaApi.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ distribution.
9999
#include "df/report_zoom_type.h"
100100
#include "df/specific_ref.h"
101101
#include "df/specific_ref_type.h"
102+
#include "df/squad_use_flags.h"
102103
#include "df/squad.h"
103104
#include "df/unit.h"
104105
#include "df/unit_misc_trait.h"
@@ -2442,7 +2443,7 @@ static int items_moveToBuilding(lua_State *state)
24422443
static int items_moveToInventory(lua_State *state) {
24432444
auto item = Lua::CheckDFObject<df::item>(state, 1);
24442445
auto unit = Lua::CheckDFObject<df::unit>(state, 2);
2445-
auto use_mode = (df::unit_inventory_item::T_mode)luaL_optint(state, 3, 0);
2446+
auto use_mode = (df::inv_item_role_type)luaL_optint(state, 3, 0);
24462447
int body_part = luaL_optint(state, 4, -1);
24472448
lua_pushboolean(state, Items::moveToInventory(item, unit, use_mode, body_part));
24482449
return 1;
@@ -2815,7 +2816,7 @@ int buildings_setSize(lua_State *state)
28152816
lua_pushinteger(state, size.x);
28162817
lua_pushinteger(state, size.y);
28172818
lua_pushinteger(state, area);
2818-
lua_pushinteger(state, Buildings::countExtentTiles(&bld->room, area));
2819+
lua_pushinteger(state, Buildings::countExtentTiles(bld, area));
28192820
return 5;
28202821
}
28212822
else

library/RemoteTools.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static command_result ListEnums(color_ostream &stream,
458458
BITFIELD(cie_add_tag_mask1);
459459
BITFIELD(cie_add_tag_mask2);
460460

461-
describe_bitfield<df::incident::T_flags>(out->mutable_death_info_flags());
461+
describe_bitfield<df::incident_flag>(out->mutable_death_info_flags());
462462

463463
ENUM(profession);
464464

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
friend struct world_raws;
1+
friend struct world;

library/include/modules/Buildings.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ namespace df {
4444
struct building;
4545
struct building_cagest;
4646
struct building_civzonest;
47-
struct building_extents;
4847
struct building_stockpilest;
4948
struct item;
5049
struct job_item;
@@ -112,7 +111,7 @@ DFHACK_EXPORT bool getCorrectSize(df::coord2d &size, df::coord2d &center,
112111
* Checks if the tiles are free to be built upon.
113112
*/
114113
DFHACK_EXPORT bool checkFreeTiles(df::coord pos, df::coord2d size,
115-
df::building_extents *ext = NULL,
114+
df::building *bld,
116115
bool create_ext = false,
117116
bool allow_occupied = false,
118117
bool allow_wall = false,
@@ -121,7 +120,7 @@ DFHACK_EXPORT bool checkFreeTiles(df::coord pos, df::coord2d size,
121120
/**
122121
* Returns the number of tiles included by the extent, or defval.
123122
*/
124-
DFHACK_EXPORT int countExtentTiles(df::building_extents *ext, int defval = -1);
123+
DFHACK_EXPORT int countExtentTiles(df::building *bld, int defval = -1);
125124

126125
/**
127126
* Checks if the building contains the specified tile. If the building has

library/include/modules/Items.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ DFHACK_EXPORT bool moveToContainer(df::item *item, df::item *container);
157157
DFHACK_EXPORT bool moveToBuilding(df::item *item, df::building_actual *building,
158158
df::building_item_role_type use_mode = df::building_item_role_type::TEMP, bool force_in_building = false);
159159
DFHACK_EXPORT bool moveToInventory(df::item *item, df::unit *unit,
160-
df::unit_inventory_item::T_mode mode = df::unit_inventory_item::Hauled, int body_part = -1);
160+
df::inv_item_role_type mode = df::inv_item_role_type::Hauled, int body_part = -1);
161161

162162
/// Remove item from jobs and inventories, hide and forbid.
163163
/// Unless no_uncat, item is marked for garbage collection.

library/include/modules/Job.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ namespace DFHack
105105
DFHACK_EXPORT bool listNewlyCreated(std::vector<df::job*> *pvec, int *id_var);
106106

107107
DFHACK_EXPORT bool attachJobItem(df::job *job, df::item *item,
108-
df::job_item_ref::T_role role,
108+
df::job_role_type role,
109109
int filter_idx = -1, int insert_idx = -1);
110110

111111
DFHACK_EXPORT bool isSuitableItem(const df::job_item *item, df::item_type itype, int isubtype);

library/include/modules/MapCache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class BlockInfo
8484
};
8585
static GroundType getGroundType(int material);
8686

87-
typedef df::block_square_event_mineralst::T_flags DFVeinFlags;
87+
typedef df::mineral_event_flag DFVeinFlags;
8888

8989
t_veintype veintype;
9090
t_blockmaterials veinmats;

0 commit comments

Comments
 (0)