1

impl waypoint sync

This commit is contained in:
Evan Pratten 2023-10-23 10:43:53 -04:00
parent 17c846897e
commit de12b264ed
5 changed files with 211 additions and 0 deletions

View File

@ -0,0 +1,13 @@
//waypoints config options
usingMultiworldDetection:false
ignoreServerLevelId:false
defaultMultiworldId:mw-3,1,-4
teleportationEnabled:true
usingDefaultTeleportCommand:false
serverTeleportCommandFormat:^col^warp add {x},{y},{z}
serverTeleportCommandRotationFormat:^col^warp add {x},{y},{z}
sortType:NONE
sortReversed:false
//other config options
ignoreHeightmaps:false

View File

@ -0,0 +1,111 @@
sets:gui.xaero_default:Buildings:Subway Stations
#
#waypoint:name:initials:x:y:z:color:disabled:type:set:rotate_on_tp:tp_yaw:visibility_type:destination
#
waypoint:Iron Farm:I:-186:57:-217:8:false:0:Buildings:false:0:0:false
waypoint:Spawn Inn:S:-136:70:-233:8:false:0:Buildings:false:0:0:false
waypoint:Kenny Rogers Roaster:K:-156:70:-233:8:false:0:Buildings:false:0:0:false
waypoint:ITC:I:-159:70:-223:8:false:0:Buildings:false:0:0:false
waypoint:Dojo St Cafe:D:-239:67:-193:8:false:0:Buildings:false:0:0:false
waypoint:Jacob's Residence:J:-221:69:-220:8:false:0:Buildings:false:0:0:false
waypoint:Dojo St Subway Station:D:-235:69:-232:8:false:0:Buildings:false:0:0:false
waypoint:Schwa Corp HQ:S:-238:71:-254:8:false:0:Buildings:false:0:0:false
waypoint:Northern & Bee Station:S:-252:56:-433:8:false:0:Subway Stations:false:0:0:false
waypoint:Monument Place Station:S:-220:95:-186:12:false:0:Subway Stations:false:0:0:false
waypoint:[ZOG] Zombie Grinder Station:S:-236:3:-181:14:false:0:Subway Stations:false:0:0:false
waypoint:[PMI] Prismarine Inn Station:S:-204:63:578:5:false:0:Subway Stations:false:0:0:false
waypoint:[DSW] Dismal Swamp Station:S:-322:63:364:5:false:0:Subway Stations:false:0:0:false
waypoint:[APY] Apiary Station:S:-322:63:41:5:false:0:Subway Stations:false:0:0:false
waypoint:[APY] Apiary Station:S:-316:60:43:15:false:0:Subway Stations:false:0:0:false
waypoint:Southwest Blvd:S:-270:64:5:15:false:0:Subway Stations:false:0:0:false
waypoint:Southlands:S:-263:64:-45:15:false:0:Subway Stations:false:0:0:false
waypoint:Three Sisters:S:-263:64:-85:15:false:0:Subway Stations:false:0:0:false
waypoint:Small Hall Station:S:-268:65:-127:15:false:0:Subway Stations:false:0:0:false
waypoint:Monument Place Station:S:-256:65:-151:15:false:0:Subway Stations:false:0:0:false
waypoint:Zombie Grinder Station:S:-256:65:-180:15:false:0:Subway Stations:false:0:0:false
waypoint:DOJO St Station:S:-242:69:-227:15:false:0:Subway Stations:false:0:0:false
waypoint:New Cornick House Station:S:-202:66:-229:15:false:0:Subway Stations:false:0:0:false
waypoint:Wintergarden Station:S:-184:62:-243:15:false:0:Subway Stations:false:0:0:false
waypoint:[PRU] Pine Ruins Station:S:225:38:-293:15:false:0:Subway Stations:false:0:0:false
waypoint:[CSD] Canalside Station:S:143:38:-291:15:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Central Station:S:-213:42:-264:15:false:0:Subway Stations:false:0:0:false
waypoint:[SWL] Southwest Landing Station:S:-510:63:137:13:false:0:Subway Stations:false:0:0:false
waypoint:[APY] Apiary Station:S:-326:63:41:13:false:0:Subway Stations:false:0:0:false
waypoint:[ZOG] Zombie Grinder Station:S:-229:3:-181:13:false:0:Subway Stations:false:0:0:false
waypoint:[WCP] Whitecaps Station:S:-27:83:63:13:false:0:Subway Stations:false:0:0:false
waypoint:[MTV] Mountain Village Station:S:-27:38:7:13:false:0:Subway Stations:false:0:0:false
waypoint:[ESJ] Eastside Transfer:S:-31:38:-237:13:false:0:Subway Stations:false:0:0:false
waypoint:[SOU] Southlands Terminal:S:-245:42:-49:14:false:0:Subway Stations:false:0:0:false
waypoint:Monument Place Station:S:-218:43:-137:14:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Central Station:S:-213:42:-252:14:false:0:Subway Stations:false:0:0:false
waypoint:Mountain Station:S:-899:111:-607:12:false:0:Subway Stations:false:0:0:false
waypoint:Mensa Club Station:S:-900:111:-4187:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-900:109:-2320:12:false:0:Subway Stations:false:0:0:false
waypoint:Farmington Station:S:-1630:107:-2316:12:false:0:Subway Stations:false:0:0:false
waypoint:Village Layover Station:S:-2143:97:-2315:12:false:0:Subway Stations:false:0:0:false
waypoint:Twin Peaks Station:S:-2135:97:-1015:12:false:0:Subway Stations:false:0:0:false
waypoint:Witchy Swamp Station:S:-2143:97:-1523:12:false:0:Subway Stations:false:0:0:false
waypoint:Ocean Overlook Station:S:-2726:106:-186:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-2111:106:-186:8:false:0:Subway Stations:false:0:0:false
waypoint:End Portal Station:S:927:97:1223:12:false:0:Subway Stations:false:0:1:false
waypoint:Craniumslows Station:S:-1048:97:-94:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-1048:97:-186:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-1375:97:-188:12:false:0:Subway Stations:false:0:0:false
waypoint:Sheep Station:S:-1372:97:507:12:false:0:Subway Stations:false:0:0:false
waypoint:Cow Station:S:-1372:97:659:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-1033:98:1087:12:false:0:Subway Stations:false:0:0:false
waypoint:South Station:S:-1372:98:1088:12:false:0:Subway Stations:false:0:0:false
waypoint:1567 Station:S:-1568:97:909:12:false:0:Subway Stations:false:0:0:false
waypoint:Magenta Station:S:-1372:97:908:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-980:97:907:12:false:0:Subway Stations:false:0:0:false
waypoint:Un-Named Interchange:I:-891:95:-187:12:false:0:Subway Stations:false:0:0:false
waypoint:Dark Oak Station:S:-700:97:-185:12:false:0:Subway Stations:false:0:0:false
waypoint:Cat Ave Station:S:-536:96:-187:12:false:0:Subway Stations:false:0:0:false
waypoint:End of Line:S:-220:97:1176:12:false:0:Subway Stations:false:0:0:false
waypoint:Unknown Station:S:-220:97:6:12:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Glider Port Station:S:-219:97:-254:12:false:0:Subway Stations:false:0:0:false
waypoint:Bell Bridge / Changa Station:S:-219:97:-375:12:false:0:Subway Stations:false:0:0:false
waypoint:Eccentric Genius Station:S:-219:96:-481:12:false:0:Subway Stations:false:0:0:false
waypoint:Xiled Station:S:-219:97:-552:12:false:0:Subway Stations:false:0:0:false
waypoint:Nopantsistan Station:S:-219:98:-650:12:false:0:Subway Stations:false:0:0:false
waypoint:[HLV] Highland Village Station:S:-220:97:-1797:12:false:0:Subway Stations:false:0:0:false
waypoint:[MSW] Mid-Swamp Station:S:-187:41:-1254:14:false:0:Subway Stations:false:0:0:false
waypoint:[JOT] Jotaku Station:S:-187:42:-782:14:false:0:Subway Stations:false:0:0:false
waypoint:[NSX] Northside Transfer Station:S:-197:42:-719:5:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Central Station:S:-217:56:-275:6:false:0:Subway Stations:false:0:0:false
waypoint:[NRV] North River Station:S:-245:38:-366:5:false:0:Subway Stations:false:0:0:false
waypoint:[CMK] Central Market Station:S:-245:38:-258:5:false:0:Subway Stations:false:0:0:false
waypoint:Monument Place Station:S:-219:35:-137:13:false:0:Subway Stations:false:0:0:false
waypoint:Monument Place Station:S:-220:43:-137:10:false:0:Subway Stations:false:0:0:false
waypoint:Survey Hall Station:S:-120:59:-481:10:false:0:Subway Stations:false:0:0:false
waypoint:Inventory Station:S:-143:43:-304:10:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Square Station:S:-115:53:-256:10:false:0:Subway Stations:false:0:0:false
waypoint:Tek Square Station:S:63:65:-215:9:false:0:Subway Stations:false:0:0:false
waypoint:Manor Ave Station:S:-36:58:-225:9:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Square Station:S:-141:58:-225:9:false:0:Subway Stations:false:0:0:false
waypoint:DOJO St Station:S:-221:56:-226:9:false:0:Subway Stations:false:0:0:false
waypoint:Mob St Station:S:-389:64:-222:9:false:0:Subway Stations:false:0:0:false
waypoint:[CAT] Cat Ave Station:S:-491:64:-222:9:false:0:Subway Stations:false:0:0:false
waypoint:Garfield Station:S:-624:73:310:9:false:0:Subway Stations:false:0:0:false
waypoint:Castle Square Station:S:-616:61:-222:9:false:0:Subway Stations:false:0:0:false
waypoint:[CHA] Changa Station:S:-187:42:-373:14:false:0:Subway Stations:false:0:0:false
waypoint:[ECG] Eccentric Genius:S:-187:42:-477:14:false:0:Subway Stations:false:0:0:false
waypoint:[XIL] Xiled Station:S:-187:42:-575:14:false:0:Subway Stations:false:0:0:false
waypoint:[NOP] Nopantsistan Station:S:-187:42:-662:14:false:0:Subway Stations:false:0:0:false
waypoint:[NSX] Northside Transfer:S:-187:42:-720:14:false:0:Subway Stations:false:0:0:false
waypoint:[NPN] Nopantsistan Station:S:-245:38:-665:5:false:0:Subway Stations:false:0:0:false
waypoint:[LAY] Laydros Station:S:-245:38:-543:5:false:0:Subway Stations:false:0:0:false
waypoint:Red Station:S:-900:109:-1992:8:false:0:Subway Stations:false:0:0:false
waypoint:[NSC] North Shore City Terminal:S:-72:42:-1946:14:false:0:Subway Stations:false:0:0:false
waypoint:[NSJ] North Shore Junction:J:-183:39:-1949:8:false:0:Subway Stations:false:0:0:false
waypoint:[HLV] Highland Village Station:S:-187:41:-1736:14:false:0:Subway Stations:false:0:0:false
waypoint:[NDK] North Docks Station:S:-187:41:-1519:14:false:0:Subway Stations:false:0:0:false
waypoint:[BOH] Boathouse Station:S:-187:42:-839:14:false:0:Subway Stations:false:0:0:false
waypoint:[RST] Riverside Station:S:-189:42:-321:14:false:0:Subway Stations:false:0:0:false
waypoint:Spawn Central Station:S:-213:42:-258:13:false:0:Subway Stations:false:0:0:false
waypoint:New Base:N:-532:73:-2308:4:false:0:gui.xaero_default:false:0:1:false
waypoint:Percy Home:X:-131:66:-102:9:false:0:gui.xaero_default:false:0:1:false
waypoint:End Portal:E:921:23:1221:5:false:0:gui.xaero_default:false:0:0:false
waypoint:Miwu Home:M:-287:77:-432:9:false:0:gui.xaero_default:false:0:1:false
waypoint:Home:H:-198:69:-303:9:false:0:gui.xaero_default:false:0:1:false
waypoint:Spawn:*:-137:70:-256:0:false:0:gui.xaero_default:false:0:1:false

View File

@ -0,0 +1,50 @@
#! /usr/bin/env python
import argparse
import sys
import os
import shutil
from pathlib import Path
MINECRAFT_DIR = Path(os.environ["INST_MC_DIR"])
WAYPOINT_BASE_DIR = MINECRAFT_DIR / "XaeroWaypoints"
GLOBAL_WAYPOINT_DIR = (
Path(os.path.expanduser("~")) / ".config" / "minecraft" / "XaeroWaypoints"
)
def main() -> int:
# Handle program arguments
ap = argparse.ArgumentParser(description="Post-exit tasks for Minecraft")
args = ap.parse_args()
print("[EWCONFIG] Executing post-exit tasks for Minecraft")
print(f"[EWCONFIG] Minecraft directory: {MINECRAFT_DIR}")
# If the waypoint base dir doesn't exist, we don't need to do anything
if not WAYPOINT_BASE_DIR.exists():
print("[EWCONFIG] No waypoints to sync")
return 0
# Find all multiplayer waypoint dirs
multiplayer_waypoints = [
directory
for directory in WAYPOINT_BASE_DIR.iterdir()
if directory.is_dir() and directory.name.startswith("Multiplayer")
]
print(
f"[EWCONFIG] Found {len(multiplayer_waypoints)} multiplayer waypoint directories"
)
# Copy the contents of each multiplayer waypoint dir to the global storage
for waypoint_dir in multiplayer_waypoints:
dest_dir = GLOBAL_WAYPOINT_DIR / waypoint_dir.name
print(f"[EWCONFIG] Copying {waypoint_dir} to {dest_dir}")
# Use shutil to copy the directory
dest_dir.mkdir(parents=True, exist_ok=True)
shutil.copytree(waypoint_dir, dest_dir, dirs_exist_ok=True)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -0,0 +1,31 @@
#! /usr/bin/env python
import argparse
import sys
import os
import shutil
from pathlib import Path
MINECRAFT_DIR = Path(os.environ["INST_MC_DIR"])
WAYPOINT_BASE_DIR = MINECRAFT_DIR / "XaeroWaypoints"
GLOBAL_WAYPOINT_DIR = (
Path(os.path.expanduser("~")) / ".config" / "minecraft" / "XaeroWaypoints"
)
def main() -> int:
# Handle program arguments
ap = argparse.ArgumentParser(description="Pre-launch tasks for Minecraft")
args = ap.parse_args()
print("[EWCONFIG] Executing pre-launch tasks for Minecraft")
print(f"[EWCONFIG] Minecraft directory: {MINECRAFT_DIR}")
# Copy the global waypoint dir on top of the base waypoint dir
print(f"[EWCONFIG] Copying {GLOBAL_WAYPOINT_DIR} to {WAYPOINT_BASE_DIR}")
WAYPOINT_BASE_DIR.mkdir(parents=True, exist_ok=True)
shutil.copytree(GLOBAL_WAYPOINT_DIR, WAYPOINT_BASE_DIR, dirs_exist_ok=True)
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@ -103,6 +103,12 @@ ln -sf $EWCONFIG_ROOT/configs/user-tmpfiles.d/* ~/.config/user-tmpfiles.d/
# Logid config
ln -sf $EWCONFIG_ROOT/configs/logid/logid.cfg ~/.config/logid/logid.cfg
# Minecraft global configs
unlink ~/.config/minecraft || true; ln -sf $EWCONFIG_ROOT/configs/minecraft ~/.config/minecraft
if [ -d ~/.var/app/org.prismlauncher.PrismLauncher ]; then
flatpak override --user --filesystem=~/.config/minecraft org.prismlauncher.PrismLauncher
fi
# -- Optional Configs --
set +x