diff --git a/Client/origin-client/autoloads/ContentCache.gd b/Client/origin-client/autoloads/ContentCache.gd
index 4893b8d..bd52b44 100644
--- a/Client/origin-client/autoloads/ContentCache.gd
+++ b/Client/origin-client/autoloads/ContentCache.gd
@@ -20,7 +20,7 @@ extends Node
const CACHE_DIR := "user://content"
const CACHE_PATH := "user://content/defs.json"
const TILE_MODELS_PATH := "user://content/tile_models.json"
-const TILE_BOTTOMS_PATH := "user://content/tile_bottoms.json"
+const TILE_BOTTOMS_PATH := "user://content/tile_bottoms_v2.json"
const SKYBOXES_PATH := "user://content/skyboxes.json"
const PAGE_SIZE := 200
const REFRESH_INTERVAL_SECS := 300.0 # re-sync every 5 minutes during live play
@@ -40,8 +40,9 @@ var _tile_models: Dictionary = {}
## "Affinity_Shape" → CDN texture URL string (2D texture for placeholder tiles)
var _tile_textures: Dictionary = {}
-## Array of CDN URL strings for tile bottom (stalagmite) models.
-var _tile_bottom_urls: Array = []
+## CDN URL strings for tile bottom (stalagmite) models, split by tile shape.
+var _tile_bottom_urls_square: Array = []
+var _tile_bottom_urls_hex: Array = []
## Array of Dictionary (SkyboxDefinitionDto) for all active skyboxes.
var _skyboxes: Array = []
@@ -129,11 +130,13 @@ func get_tile_texture_url(affinity: String, shape: String) -> String:
return _tile_textures.get(affinity + "_" + shape, "")
-## Returns a random active tile bottom (stalagmite) CDN URL, or "" if none configured.
-func get_random_tile_bottom_url() -> String:
- if _tile_bottom_urls.is_empty():
+## Returns a random active tile bottom (stalagmite) CDN URL for the given shape,
+## or "" if none are configured. shape should be "Square" or "Hex".
+func get_random_tile_bottom_url(shape: String) -> String:
+ var pool := _tile_bottom_urls_hex if shape == "Hex" else _tile_bottom_urls_square
+ if pool.is_empty():
return ""
- return _tile_bottom_urls[randi() % _tile_bottom_urls.size()] as String
+ return pool[randi() % pool.size()] as String
## Fetch tile bottom model URLs from the server and update the local cache.
@@ -312,12 +315,15 @@ func _on_tile_models(payload: Variant) -> void:
func _on_tile_bottoms(payload: Variant) -> void:
- var p := payload as Dictionary
- var urls : Array = p.get("urls", [])
- _tile_bottom_urls.clear()
- for u in urls:
+ var p := payload as Dictionary
+ _tile_bottom_urls_square.clear()
+ _tile_bottom_urls_hex.clear()
+ for u in p.get("squareUrls", []):
if typeof(u) == TYPE_STRING and not (u as String).is_empty():
- _tile_bottom_urls.append(u as String)
+ _tile_bottom_urls_square.append(u as String)
+ for u in p.get("hexUrls", []):
+ if typeof(u) == TYPE_STRING and not (u as String).is_empty():
+ _tile_bottom_urls_hex.append(u as String)
_save_tile_bottoms_to_disk()
@@ -390,8 +396,12 @@ func _load_tile_bottoms_from_disk() -> void:
return
var parsed: Variant = JSON.parse_string(file.get_as_text())
file.close()
- if typeof(parsed) == TYPE_ARRAY:
- _tile_bottom_urls = parsed as Array
+ if typeof(parsed) == TYPE_DICTIONARY:
+ var d := parsed as Dictionary
+ if typeof(d.get("square")) == TYPE_ARRAY:
+ _tile_bottom_urls_square = d["square"] as Array
+ if typeof(d.get("hex")) == TYPE_ARRAY:
+ _tile_bottom_urls_hex = d["hex"] as Array
func _save_tile_bottoms_to_disk() -> void:
@@ -399,7 +409,7 @@ func _save_tile_bottoms_to_disk() -> void:
var file := FileAccess.open(TILE_BOTTOMS_PATH, FileAccess.WRITE)
if not file:
return
- file.store_string(JSON.stringify(_tile_bottom_urls))
+ file.store_string(JSON.stringify({ "square": _tile_bottom_urls_square, "hex": _tile_bottom_urls_hex }))
file.close()
diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd
index 2ebc17c..a5913cc 100644
--- a/Client/origin-client/scenes/game/game_screen.gd
+++ b/Client/origin-client/scenes/game/game_screen.gd
@@ -1272,14 +1272,19 @@ func _try_load_tile_model(body: StaticBody3D, affinity: String) -> void:
var model_url := ContentCache.get_tile_model_url(affinity, shape_key)
if model_url.is_empty():
if _board_grid_type == "Hexagon":
- # No hex model — keep the affinity-coloured cylinder placeholder as-is.
+ # No hex model — keep the affinity-coloured cylinder placeholder.
+ # Still attach a hex stalagmite below if one is available.
+ if want_bottom:
+ var bottom_url := ContentCache.get_random_tile_bottom_url("Hex")
+ if not bottom_url.is_empty():
+ _try_load_tile_bottom(weakref(body), bottom_url)
return
# Square: apply a 2D texture and attach a stalagmite bottom.
var tex_url := ContentCache.get_tile_texture_url(affinity, "Square")
if not tex_url.is_empty():
_apply_tile_texture(body, tex_url)
if want_bottom:
- var bottom_url := ContentCache.get_random_tile_bottom_url()
+ var bottom_url := ContentCache.get_random_tile_bottom_url("Square")
if not bottom_url.is_empty():
_try_load_tile_bottom(weakref(body), bottom_url)
return
@@ -1315,7 +1320,7 @@ func _try_load_tile_model(body: StaticBody3D, affinity: String) -> void:
# Attach a random stalagmite bottom model below the tile (if any are configured).
# PureVoid tiles are skipped — they float in empty space with no decoration below.
if want_bottom:
- var bottom_url : String = ContentCache.get_random_tile_bottom_url()
+ var bottom_url : String = ContentCache.get_random_tile_bottom_url(shape_key)
if not bottom_url.is_empty():
_try_load_tile_bottom(body_ref, bottom_url)
)
diff --git a/Server/src/SOR.Admin/Components/Pages/Content/TileModelManagerPage.razor b/Server/src/SOR.Admin/Components/Pages/Content/TileModelManagerPage.razor
index a6c535e..1808f2c 100644
--- a/Server/src/SOR.Admin/Components/Pages/Content/TileModelManagerPage.razor
+++ b/Server/src/SOR.Admin/Components/Pages/Content/TileModelManagerPage.razor
@@ -83,57 +83,64 @@ else
}
-