From cab2152b6090f5edb383dc1fc3410487207e95d1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 15 Aug 2025 16:48:09 +0200 Subject: load assets from muhq.space when using a release build --- go/game/map.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'go/game/map.go') diff --git a/go/game/map.go b/go/game/map.go index 9a07e308..48ec8be3 100644 --- a/go/game/map.go +++ b/go/game/map.go @@ -13,12 +13,11 @@ import ( "golang.org/x/exp/slices" "gopkg.in/yaml.v3" + + "muhq.space/muhqs-game/go/assets" ) const ( - PROTOCOL string = "https://" - // BASE_URL string = "localhost:8000/" - BASE_URL string = "muhq.space/muhqs-game" MAP_URL_PART string = "html/build/maps" DEFAULT_RESOURCE_GAIN int = 5 @@ -195,9 +194,9 @@ func (m *Map) FindFortificationConnections(x int, y int) (connections int, left, // GetMap creates a new map from the definition retrieved for the map's name. func GetMap(name string) (*Map, error) { - url := path.Join(BASE_URL, MAP_URL_PART, name+".yml") + url := path.Join(assets.BASE_URL, MAP_URL_PART, name+".yml") log.Printf("loading map from %s\n", url) - resp, err := http.Get(PROTOCOL + url) + resp, err := http.Get(assets.PROTOCOL + url) if err != nil { log.Fatal(err) } -- cgit v1.2.3