Skip to content

Commit

Permalink
Fix Campaign specific slabset (dkfans#2958)
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterVdc authored Jan 16, 2024
1 parent 43b3a85 commit eb784a7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/config_slabsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,15 @@ TbBool load_slabset_config_file(const char *textname, const char *fname, unsigne
struct SlabObj* slabobj = &game.slabobjs[game.slabobjs_num];

int slabset_no = slab_kind * SLABSETS_PER_SLAB + slabstyle_no;

for (size_t col_no = 0; col_no < 9; col_no++)

VALUE *col_arr = value_dict_get(section, "Columns");
if (value_type(col_arr) == VALUE_ARRAY)
{
VALUE *col_arr = value_dict_get(section, "Columns");
ColumnIndex col_idx = value_int32(value_array_get(col_arr, col_no));
game.slabset[slabset_no].col_idx[col_no] = -col_idx;
for (size_t col_no = 0; col_no < 9; col_no++)
{
ColumnIndex col_idx = value_int32(value_array_get(col_arr, col_no));
game.slabset[slabset_no].col_idx[col_no] = -col_idx;
}
}

sprintf(key, "%s_objects", slab_styles_commands[slabstyle_no].name);
Expand Down

0 comments on commit eb784a7

Please sign in to comment.