mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 06:20:44 +00:00
805f0968b1
## Description: Relates to #3725 Adds a new **Impassable** terrain type that enables non-rectangular maps and creates impassable barriers on the map. Painted with pure black (`#000`) in the map editor's `image.png`. **Encoding:** Impassable terrain is encoded in the binary format as `isLand=1, magnitude=31` (previously unused). The Go map generator detects `#000` pixels and produces this encoding. The map generator's minimap downscaling gives impassable highest priority (Impassable > Water > Land). Thumbnails render impassable as transparent so the map picker background shows through. **Rendering:** Impassable tiles render as the map background colour (`rgb(60, 60, 60)`, matching `gl.clearColor` in `Renderer.ts`), making them visually indistinguishable from the area outside the map quad. This enables maps to appear non-rectangular. **Gameplay restrictions:** Impassable terrain cannot be: - Owned (`conquer()` throws) - Attacked (`AttackExecution` skips impassable tiles in both `tick()` and `addNeighbors()`) - Nuked (targeting rejected in `nukeSpawn()`, blast radius filtered in `tilesToDestroy()`) - Spawned on (nations, human players, and structures all reject impassable tiles) - Converted to water (guarded in `WaterManager` and `setWater()`) **Nuke trajectories:** Nuke trajectories cannot cross impassable terrain, matching the existing map-border enforcement. This is checked at launch time in `NukeExecution.tick()`. The client-side trajectory preview turns red with a red X where the arc crosses impassable terrain (reusing the existing SAM-intercept visual pipeline in `NukeTrajectory.ts`). The nuke ghost preview is completely hidden when hovering over impassable terrain (same as hovering outside the map). https://github.com/user-attachments/assets/ff131146-9749-41e0-892a-617e5cd16c54 Impassable terrain is transparent on the thumbnail: <img width="213" height="152" alt="Screenshot 2026-06-18 211640" src="https://github.com/user-attachments/assets/ede16f8c-9239-4ab1-be5d-0ba81cce5e9e" /> Tested with water nukes, made sure there is no water depth gradient near the impassable terrain, just like at the world border: <img width="774" height="771" alt="Screenshot 2026-06-18 212348" src="https://github.com/user-attachments/assets/4429069d-911b-48e8-91e3-7307d42c9397" /> Models used: GLM 5.2 and MiMo 2.5 Pro 😄 ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin
155 lines
3.0 KiB
JSON
155 lines
3.0 KiB
JSON
{
|
|
"categories": ["north_america"],
|
|
"id": "LosAngeles",
|
|
"map": {
|
|
"height": 2276,
|
|
"num_land_tiles": 2055581,
|
|
"width": 1800
|
|
},
|
|
"map16x": {
|
|
"height": 569,
|
|
"num_land_tiles": 122366,
|
|
"width": 450
|
|
},
|
|
"map4x": {
|
|
"height": 1138,
|
|
"num_land_tiles": 505680,
|
|
"width": 900
|
|
},
|
|
"multiplayer_frequency": 8,
|
|
"name": "Los Angeles",
|
|
"nations": [
|
|
{
|
|
"coordinates": [546, 16],
|
|
"flag": "California",
|
|
"name": "Santa Clarita"
|
|
},
|
|
{
|
|
"coordinates": [1100, 475],
|
|
"flag": "California",
|
|
"name": "Glendale"
|
|
},
|
|
{
|
|
"coordinates": [1310, 400],
|
|
"flag": "California",
|
|
"name": "Pasadena"
|
|
},
|
|
{
|
|
"coordinates": [1766, 1080],
|
|
"flag": "California",
|
|
"name": "Anaheim"
|
|
},
|
|
{
|
|
"coordinates": [1776, 710],
|
|
"flag": "California",
|
|
"name": "Walnut"
|
|
},
|
|
{
|
|
"coordinates": [1750, 1330],
|
|
"flag": "California",
|
|
"name": "Santa Ana"
|
|
},
|
|
{
|
|
"coordinates": [1670, 1500],
|
|
"flag": "California",
|
|
"name": "Huntington Beach"
|
|
},
|
|
{
|
|
"coordinates": [1250, 1325],
|
|
"flag": "California",
|
|
"name": "Long Beach"
|
|
},
|
|
{
|
|
"coordinates": [925, 1135],
|
|
"flag": "California",
|
|
"name": "Torrance"
|
|
},
|
|
{
|
|
"coordinates": [30, 475],
|
|
"flag": "California",
|
|
"name": "Thousand Oaks"
|
|
},
|
|
{
|
|
"coordinates": [730, 150],
|
|
"flag": "California",
|
|
"name": "San Fernando"
|
|
},
|
|
{
|
|
"coordinates": [1790, 500],
|
|
"flag": "California",
|
|
"name": "Covina"
|
|
},
|
|
{
|
|
"coordinates": [1400, 930],
|
|
"flag": "California",
|
|
"name": "Downey"
|
|
},
|
|
{
|
|
"coordinates": [760, 650],
|
|
"flag": "California",
|
|
"name": "Beverly Hills"
|
|
},
|
|
{
|
|
"coordinates": [875, 640],
|
|
"flag": "California",
|
|
"name": "Hollywood"
|
|
},
|
|
{
|
|
"coordinates": [1130, 670],
|
|
"flag": "California",
|
|
"name": "Skid Row"
|
|
},
|
|
{
|
|
"coordinates": [965, 865],
|
|
"flag": "California",
|
|
"name": "Inglewood"
|
|
},
|
|
{
|
|
"coordinates": [815, 945],
|
|
"flag": "California",
|
|
"name": "L.A.X."
|
|
},
|
|
{
|
|
"coordinates": [1180, 1010],
|
|
"flag": "California",
|
|
"name": "Compton"
|
|
},
|
|
{
|
|
"coordinates": [670, 765],
|
|
"flag": "California",
|
|
"name": "Santa Monica"
|
|
},
|
|
{
|
|
"coordinates": [270, 760],
|
|
"flag": "California",
|
|
"name": "Malibu"
|
|
},
|
|
{
|
|
"coordinates": [50, 25],
|
|
"flag": "California",
|
|
"name": "Bardsdale"
|
|
},
|
|
{
|
|
"coordinates": [750, 2100],
|
|
"flag": "California",
|
|
"name": "Santa Catalina"
|
|
},
|
|
{
|
|
"coordinates": [1350, 90],
|
|
"flag": "California",
|
|
"name": "Hidden Springs"
|
|
},
|
|
{
|
|
"coordinates": [1580, 40],
|
|
"flag": "California",
|
|
"name": "Palmdale"
|
|
},
|
|
{
|
|
"coordinates": [380, 490],
|
|
"flag": "California",
|
|
"name": "Encino"
|
|
}
|
|
],
|
|
"translation_key": "map.losangeles"
|
|
}
|