Skip to content

Commit

Permalink
First version for update 54
Browse files Browse the repository at this point in the history
  • Loading branch information
attrib committed Oct 20, 2023
1 parent 6f6dcba commit 9b5c6fe
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 31 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Please create a Ticket in GitHub. Or of any the discord where you maybe heard ab
* Facilities not displayed in some strange context
* The Attachment point (the blue dot thingy) isn't on the line itself. Very hard to move the line this way (by [FMAT] Quini98)

* admin save error
* edit not working?
* html entities in text

## Todos

* Require text for custom area (by [11eFL] mashed)
Expand Down Expand Up @@ -67,7 +71,7 @@ cd public
mkdir map
cd map
wget https://cdn.discordapp.com/attachments/1003485765273145424/1039646692095574046/entiremap.png
docker run --rm -v `pwd`:/tmp/files osgeo/gdal gdal2tiles.py -p raster -w openlayers --tiledriver=WEBP --webp-lossless /tmp/files/ResolvedMap2.png /tmp/files/
docker run --rm -v `pwd`:/tmp/files osgeo/gdal gdal2tiles.py -p raster -w openlayers --tiledriver=WEBP --webp-lossless /tmp/files/entiremap.png /tmp/files/
```

If you are using Windows Powershell and Docker on Windows
Expand Down
2 changes: 1 addition & 1 deletion frontend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const map = new Map({
source: new TileImage({
attributions: '<a href="https://rustard.itch.io/improved-map-mod" target="_blank">Rust Improved Map Mod</a> - <a href="https://www.foxholegame.com/" target="_blank">Siege Camp</a>',
tileGrid: new TileGrid({
extent: [0,-12432,11293,0],
extent: [0,-12432,14368,0],
origin: [0,-12432],
resolutions: [64,32,16,8,4,2,1],
tileSize: [256, 256]
Expand Down
30 changes: 25 additions & 5 deletions lib/warapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,6 @@ class WarApi {
icon: 'MapIconSafehouse',
notes: 'Safehouse',
},
37: {
type: 'town',
icon: 'MapIconRocketSite',
notes: 'Rocket Site',
},
45: {
type: 'town',
icon: 'MapIconRelicBase',
Expand Down Expand Up @@ -304,6 +299,26 @@ class WarApi {
conquer: true,
},

37: {
type: 'stormCannon',
icon: 'MapIconRocketSite',
notes: 'Rocket Site',
},
70: {
type: 'stormCannon',
icon: 'MapIconRocketTarget',
notes: 'Rocket Target',
},
71: {
type: 'stormCannon',
icon: 'MapIconRocketGroundZero',
notes: 'Rocket Ground Zero',
},
72: {
type: 'stormCannon',
icon: 'MapIconRocketSiteWithRocket',
notes: 'Rocket Site With Rocket',
},
59: {
type: 'stormCannon',
icon: 'MapIconStormCannon',
Expand Down Expand Up @@ -355,6 +370,11 @@ class WarApi {
icon: 'MapIconOilFieldColor',
notes: 'Oil Field',
},
75: {
type: 'field',
icon: 'MapIconFacilityMineOilRig',
notes: 'Facility Mine Oil Rig',
},
}


Expand Down
Binary file added public/images/field/MapIconFacilityMineOilRig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/town/MapIconRocketGroundZero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/town/MapIconRocketSite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/town/MapIconRocketTarget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/static.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions tools/deadland.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
"coordinates": [
[
[
5125,
-5325
6668,
-5328
],
[
6155,
-5325
7698,
-5328
],
[
6665,
8208,
-6217.5
],
[
6155,
-7100
7698,
-7105
],
[
5125,
-7100
6668,
-7105
],
[
4615,
6158,
-6217.5
]
]
Expand Down
2 changes: 2 additions & 0 deletions tools/eventlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ users = users.sort((a, b) => {

const days = Math.round((war.conquestEndTime - war.conquestStartTime) / 1000 / 60 / 60 / 24)

console.log(users.slice(0, 3))

console.log(`
**World Conquest ${war.warNumber} WE Stats**
Expand Down
17 changes: 17 additions & 0 deletions tools/moveDefaultFeatures.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const fs = require("fs");

const defaultFeature = JSON.parse(fs.readFileSync(`../data/defaultFeatures.json`, 'utf8'))

for (const feature of defaultFeature.features) {
feature.geometry.coordinates[0] = feature.geometry.coordinates[0].map((coords) => {
coords[0] = coords[0] + 1543
return coords
})
}

console.log(defaultFeature.features.length)
fs.writeFile('../data/defaultFeatures.json', JSON.stringify(defaultFeature), err => {
if (err) {
console.error(err);
}
});
24 changes: 12 additions & 12 deletions tools/regionGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ region.features[0].properties.box = [coordsDeadland[5][0], coordsDeadland[0][1]]

// 3xUP
let lastCoords = JSON.parse(JSON.stringify(coordsDeadland))
let names = [{notes: 'Callahans Passage', id: 'CallahansPassageHex'}, {notes: 'Reaching Trail', id: 'ReachingTrailHex'}, {notes: 'Basin Sionnach', id: 'BasinSionnachHex'}];
let names = [{notes: 'Callahan\'s Passage', id: 'CallahansPassageHex'}, {notes: 'Reaching Trail', id: 'ReachingTrailHex'}, {notes: 'Basin Sionnach', id: 'BasinSionnachHex'}];
const diffY = lastCoords[0][1] - lastCoords[3][1]
const diffX = lastCoords[0][0] - lastCoords[1][0]
const diffX2 = lastCoords[1][0] - lastCoords[2][0]
Expand Down Expand Up @@ -75,32 +75,32 @@ names = [{notes: 'Speaking Woods', id: 'SpeakingWoodsHex'}, {notes: 'The Moors',
goDown(names, lastCoords)

lastCoords = leftUp(region.features[7].geometry.coordinates[0])
names = [{notes: 'Callums Cape', id: 'CallumsCapeHex'}, {notes: 'Stonecradle', id: 'StonecradleHex'}, {notes: 'King\'s Cage', id: 'KingsCageHex'}, {notes: 'Sableport', id: 'SableportHex'}, {notes: 'Ash Fields', id: 'AshFieldsHex'}];
names = [{notes: 'Callum\'s Cape', id: 'CallumsCapeHex'}, {notes: 'Stonecradle', id: 'StonecradleHex'}, {notes: 'King\'s Cage', id: 'KingsCageHex'}, {notes: 'Sableport', id: 'SableportHex'}, {notes: 'Ash Fields', id: 'AshFieldsHex'}];
goDown(names, lastCoords)

lastCoords = leftUp(region.features[13].geometry.coordinates[0])
names = [{notes: 'Nevish Line', id: 'NevishLineHex'}, {notes: 'Farranac Coast', id: 'FarranacCoastHex'}, {notes: 'Westgate', id: 'WestgateHex'}, {notes: 'Origin', id: 'OriginHex'}];
goDown(names, lastCoords)

// lastCoords = leftUp(region.features[17].geometry.coordinates[0])
// names = [{notes: 'The Oarbreaker Isles', id: 'OarbreakerHex'}, {notes: 'Fishermans Row', id: 'FishermansRowHex'}, {notes: '', id: ''}];
// goDown(names, lastCoords)
lastCoords = leftUp(region.features[18].geometry.coordinates[0])
names = [{notes: 'The Oarbreaker Isles', id: 'OarbreakerHex'}, {notes: 'Fisherman\'s Row', id: 'FishermansRowHex'}, {notes: 'Stema Landing', id: 'StemaLandingHex'}];
goDown(names, lastCoords)

lastCoords = rightUp(region.features[3].geometry.coordinates[0])
names = [{notes: 'Howl County', id: 'HowlCountyHex'}, {notes: 'Viper Pit', id: 'ViperPitHex'}, {notes: 'Marban Hollow', id: 'MarbanHollow'}, {notes: 'The Drowned Vale', id: 'DrownedValeHex'}, {notes: 'Shackled Chasm', id: 'ShackledChasmHex'}, {notes: 'Arcithia', id: 'AcrithiaHex'}];
goDown(names, lastCoords)

lastCoords = rightUp(region.features[22].geometry.coordinates[0])
names = [{notes: 'Clanshead Valley', id: 'ClansheadValleyHex'}, {notes: 'Weathered Expanse', id: 'WeatheredExpanseHex'}, {notes: 'Endless Shore', id: 'EndlessShoreHex'}, {notes: 'Allod\'s Bight', id: 'AllodsBightHex'}, {notes: 'Terminus', id: 'TerminusHex'}];
lastCoords = rightUp(region.features[25].geometry.coordinates[0])
names = [{notes: 'Clanshead Valley', id: 'ClansheadValleyHex'}, {notes: 'Weathered Expanse', id: 'WeatheredExpanseHex'}, {notes: 'The Clahstra', id: 'ClahstraHex'}, {notes: 'Allod\'s Bight', id: 'AllodsBightHex'}, {notes: 'Terminus', id: 'TerminusHex'}];
goDown(names, lastCoords)

lastCoords = rightUp(region.features[28].geometry.coordinates[0])
names = [{notes: 'Morgens Crossing', id: 'MorgensCrossingHex'}, {notes: 'Godcrofts', id: 'GodcroftsHex'}, {notes: 'Tempest Island', id: 'TempestIslandHex'}, {notes: 'The Fingers', id: 'TheFingersHex'}];
lastCoords = rightUp(region.features[31].geometry.coordinates[0])
names = [{notes: 'Morgen\'s Crossing', id: 'MorgensCrossingHex'}, {notes: 'Stlican Shelf', id: 'StlicanShelfHex'}, {notes: 'Endless Shore', id: 'EndlessShoreHex'}, {notes: 'Reaver\'s Pass', id: 'ReaversPassHex'}];
goDown(names, lastCoords)

// lastCoords = leftUp(region.features[32].geometry.coordinates[0])
// names = [{notes: '', id: ''}, {notes: '', id: ''}, {notes: '', id: ''}];
// goDown(names, lastCoords)
lastCoords = rightUp(region.features[36].geometry.coordinates[0])
names = [{notes: 'Godcrofts', id: 'GodcroftsHex'}, {notes: 'Tempest Island', id: 'TempestIslandHex'}, {notes: 'The Fingers', id: 'TheFingersHex'}];
goDown(names, lastCoords)


const extend = [diffX + 2*diffX2, diffY]
Expand Down
2 changes: 1 addition & 1 deletion views/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Foxhole {{ config.shard }} {{ config.basic.title }}">
<meta name="description" content="Foxhole {{ config.shard.name }} {{ config.basic.title }}">
<meta name="author" content="attrib, Bazlow">
<!-- Facebook/Discord Meta Tags -->
<meta property="og:url" content="{{ config.basic.url }}">
Expand Down

0 comments on commit 9b5c6fe

Please sign in to comment.