Add hex stalagmite support for tile bottom models
- TileBottomModel gains a Shape column (Square/Hex, default Square) so admins can manage separate stalagmite pools per tile grid type - EF migration 20260407153312_AddTileBottomModelShape adds the column with a default of 'Square' to preserve existing data - Admin UI splits the Tile Bottom Models section into Square and Hex cards, each with their own Add/toggle/delete controls - content.tile_bottoms response now returns squareUrls and hexUrls separately; handler queries each shape independently - ContentCache splits into _tile_bottom_urls_square / _hex and get_random_tile_bottom_url() now takes a shape parameter - game_screen: hex tiles with no 3D model now receive a hex stalagmite instead of silently skipping; 3D-model path passes shape_key through Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user