Skip to content

Commit f818715

Browse files
committed
static_params: update.roads option moved to config
1 parent c1a6558 commit f818715

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

src/building/building.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,7 @@ void building_impl::static_params::load(archive arch) {
10821082
check_water_access = arch.r_bool("check_water_access");
10831083
info_title_id = arch.r_vec2i("info_title_id");
10841084
updates.canals = arch.r_bool("update_canals");
1085+
updates.roads = arch.r_bool("update_roads");
10851086

10861087
city_labor_set_category(type, labor_category);
10871088

src/building/building.h

+1
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ class building_impl {
539539
textid info_title_id;
540540
struct {
541541
bool canals;
542+
bool roads;
542543
} updates;
543544

544545
void load(archive arch);

src/city/city_buildings.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,11 @@ void building_update_state(void) {
176176
if (b->state == BUILDING_STATE_UNDO || b->state == BUILDING_STATE_DELETED_BY_PLAYER) {
177177
const auto &params = b->dcast()->params();
178178
canals_recalc |= params.updates.canals;
179+
//roads_recalc |= params.updates.roads;
179180

180181
if (b->type == BUILDING_MUD_TOWER || b->type == BUILDING_MUD_GATEHOUSE) {
181182
walls_recalc = true;
182-
roads_recalc = true;
183-
} else if (b->type == BUILDING_GRANARY) {
184-
roads_recalc = true;
183+
//roads_recalc = true;
185184
} else if (b->type == BUILDING_FERRY) {
186185
water_routes_recalc = true;
187186
}

src/scripts/buildings.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ building_farm_figs = {
517517
labor_category : LABOR_CATEGORY_FOOD_PRODUCTION,
518518
}
519519

520-
building_granary = {
520+
building building_granary = {
521521
animations : {
522522
preview : { pack:PACK_GENERAL, id:99 },
523523
base : { pack:PACK_GENERAL, id:99 },
@@ -530,6 +530,7 @@ building_granary = {
530530
info_text_id: 98,
531531
info_help_id: 3,
532532
building_size : 4,
533+
update_roads : true,
533534
}
534535

535536
building_shrine_osiris = {

src/scripts/common.js

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ var cart_offsets = []
1818
var sled_offsets = []
1919
var localization = []
2020
// buildings
21-
var building_granary = {}
2221
var building_academy = {}
2322
var building_firehouse = {}
2423
var building_police_station = {}

0 commit comments

Comments
 (0)