Add Catenary DC electrification layer, CommunityMapLocation fixes, and CI/CD
Deploy & Release / build-and-deploy (push) Successful in 1m3s
Deploy & Release / build-and-deploy (push) Successful in 1m3s
This commit is contained in:
11 files changed
+660
-20
No files matched your search
@@ -1,8 +1,51 @@
|
||||
# [Unofficial Community Map for Derail Valley](https://pyronicampt.github.io/DV-Community-Map/)
|
||||
A map to let you see the valley in more detail than the in-game map, featuring speed signage, grade indication, curve radius, etc.
|
||||
# Derail Valley Community Map with Catenary DC Layer
|
||||
|
||||
## Current Plans
|
||||
- [ ] Generally improve the look and UX of the map
|
||||
Interactive vector web map of Derail Valley railway network with DC electrification infrastructure overlay (Catenary-DC / WE6SIM mod).
|
||||
|
||||
## Contribution Notes
|
||||
Please avoid using AI to generate code for pull requests. It makes it much more difficult to maintain and slows maintainence of features to a crawl. This project was built by hand with a specific architecture, AI may make functional code, but not sensible code.
|
||||
## Architecture & Stack
|
||||
- **Frontend**: Vanilla ES6 modules, HTML5 Canvas 2D (double-buffered with dynamic overlay).
|
||||
- **Coordinate System**: Game engine coordinates (meters), origin at bottom-left, mapped via `Matrix` and `View` transforms.
|
||||
- **Datasets**:
|
||||
- `catenary_dv.json`: 164 chained polylines (optimized from 3,751 segments), 9 traction substations, 5 neutral sections, 34 interruption clusters, 129 warning signs.
|
||||
- `trackdata_dv.json`: Rail tracks (cubic Bézier curves) and junction points.
|
||||
- `poi_dv.json`: Stations, offices, service tracks, turntables, landmarks.
|
||||
- `shop_items.json`: Shop inventories and prices.
|
||||
|
||||
## Catenary Layer Features
|
||||
- **Wire Suspension Rendering**:
|
||||
- `Single` (6.0m, 1500V/750V): standard solid vector line.
|
||||
- `Dual` (6.0m, 1500V): high-capacity twin catenary stroke.
|
||||
- `Quad` (6.0m, 1500V): heavy 4-wire mountain pass stroke with dark border.
|
||||
- `Trolley` (6.0m, 750V): fine yard wire.
|
||||
- `Side Rail` (4.5m, 1000V): dashed 3rd contact rail at IME and SM mine tracks.
|
||||
- `Neutral Sections` (0V): contrasting red-and-white dashed lines with `0V` danger badges.
|
||||
- **Color Modes**:
|
||||
- `Voltage`: 1500V DC (`#00d2ff`), 1000V DC (`#ff9f1c`), 750V DC (`#2ec4b6`), 0V Neutral (`#e63946`).
|
||||
- `Substation`: Distinct color per feeding substation (CME/IME1500, CP750, FF1500, HB1500, IME1000, IMW1500, OR750, SM1500, SM1000).
|
||||
- `Wire Type`: Color-coded by physical suspension category.
|
||||
- **Markers & Tooltips**:
|
||||
- Traction Substations: `⚡` badge with nominal voltage, supply voltage, max load (kW), and regenerative inverter presence.
|
||||
- Neutral Sections: `⛔` badge with section ID, length, connecting substations, and disconnect traction warning.
|
||||
- Interruption Signs: `⤓` diamond badge for pantograph drop/raise warnings.
|
||||
- Contact Wires: Nearest-point hovering displaying voltage, substation feed, category, and segment length.
|
||||
|
||||
## CommunityMapLocation Mod Integration
|
||||
|
||||
### Bug Fixes
|
||||
1. **Rotation Desync**: `LocationResponse` accepts `rotationTransform` from locomotive transform or camera heading (fixing player orientation desync).
|
||||
2. **URL Formatting**: Fixed string immutability bug in `address.replaceAll` inside `connectPlayerLocation`.
|
||||
|
||||
### CORS Configuration
|
||||
In `<GameDirectory>/Mods/CommunityMapLocation/Settings.xml`:
|
||||
```xml
|
||||
<Settings>
|
||||
<Port>9090</Port>
|
||||
<RequestSourceType>Any</RequestSourceType>
|
||||
<RequestSource>http://localhost:8080</RequestSource>
|
||||
</Settings>
|
||||
```
|
||||
*Note: If `RequestSourceType` is `Any`, the game mod allows cross-origin requests from any web host (localhost, GitHub Pages, Gitea).*
|
||||
|
||||
## CI/CD Workflows
|
||||
- **Gitea Actions** (`.gitea/workflows/deploy.yaml`): JSON dataset validation, JS syntax verification, artifact packaging with `actions/upload-artifact@v3`, releases with `akkuman/gitea-release-action@v1`.
|
||||
- **GitHub Pages** (`.github/workflows/deploy-pages.yml`): Automated GitHub Pages deployment on push to `main`.
|
||||
Reference in new issue
Block a user