diff options
-rw-r--r-- | data.js | 2 | ||||
-rw-r--r-- | rules.js | 2 | ||||
-rw-r--r-- | rules.ts | 2 | ||||
-rw-r--r-- | tools/gendata.js | 2 |
4 files changed, 5 insertions, 3 deletions
@@ -78,7 +78,7 @@ locales:[ {"name":"Burgundy","type":"exile_box","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[],"not_paths":[],"box":{"x":993,"y":684,"w":113,"h":132}}, {"name":"France","type":"exile_box","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[],"not_paths":[],"box":{"x":888,"y":1428,"w":113,"h":132}}, {"name":"Ireland","type":"exile_box","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[],"not_paths":[],"box":{"x":48,"y":950,"w":113,"h":132}}, -{"name":"Scotland","type":"exile_box","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[41,42],"not_paths":[],"box":{"x":449,"y":277,"w":113,"h":132}}, +{"name":"Scotland","type":"exile_box","region":null,"adjacent":[41,42],"highways":[],"roads":[],"paths":[41,42],"not_paths":[],"box":{"x":449,"y":277,"w":113,"h":132}}, {"name":"English Channel","type":"sea","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[],"not_paths":[],"box":{"x":550,"y":1450,"w":246,"h":82}}, {"name":"Irish Sea","type":"sea","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[],"not_paths":[],"box":{"x":224,"y":664,"w":135,"h":56}}, {"name":"North Sea","type":"sea","region":null,"adjacent":[],"highways":[],"roads":[],"paths":[],"not_paths":[],"box":{"x":1019,"y":824,"w":150,"h":65}}, @@ -3339,7 +3339,7 @@ function search_supply_by_way(result, start, carts, ships) { let dist = search_dist[here]; let next_dist = dist + 8; if (can_supply_at(here, ships)) { - if (result) + if (Array.isArray(result)) map_set(result, here, dist); else return true; @@ -4070,7 +4070,7 @@ function search_supply_by_way(result, start: Locale, carts: number, ships: numbe let next_dist = dist + 8 if (can_supply_at(here, ships)) { - if (result) + if (Array.isArray(result)) map_set(result, here, dist) else return true diff --git a/tools/gendata.js b/tools/gendata.js index 2f4d90d..9e7cdf2 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -347,10 +347,12 @@ road("Ravenspur", "Lincoln") // one-way road from Scotland to Bamburgh locales[locmap.Scotland].paths.push(locmap.Bamburgh) +locales[locmap.Scotland].adjacent.push(locmap.Bamburgh) map_set(ways[locmap.Scotland], locmap.Bamburgh, "path") // one-way road from Scotland to Carlisle locales[locmap.Scotland].paths.push(locmap.Carlisle) +locales[locmap.Scotland].adjacent.push(locmap.Carlisle) map_set(ways[locmap.Scotland], locmap.Carlisle, "path") let sea_1 = locmap["North Sea"] |