diff --git a/Client/origin-client/scenes/free_play/components/rules_editor_dialog.gd b/Client/origin-client/scenes/free_play/components/rules_editor_dialog.gd index ca173c5..f79c65a 100644 --- a/Client/origin-client/scenes/free_play/components/rules_editor_dialog.gd +++ b/Client/origin-client/scenes/free_play/components/rules_editor_dialog.gd @@ -116,7 +116,8 @@ func _build_fields(r: Dictionary) -> void: add_int.call("Board Width", "boardWidth", 3, 12, 6, "") add_int.call("Board Height", "boardHeight", 3, 12, 6, "") add_int.call("Starting Tile Affinity %","startingRandomTilePct",0, 100, 0, "% of tiles with a random basic affinity") - add_option.call("Board Shape", "boardShape", ["Default", "Rectangle", "Cross", "Triangular", "RadialStar", "HexRing"], "Default") + add_option.call("Board Shape", "boardShape", ["Default", "Rectangle", "Cross", "Triangular", "RadialStar", "HexRing", "Hexagon"], "Default") + add_int.call("Hex Sides", "hexSides", 3, 10, 5, "Hexagon board only: number of tiles per side (3–10)") # Board template picker — populate from BoardTemplateCache (GUID values, not labels). var tmpl_key := "boardTemplateIdOverride" diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index 6f51109..d658e94 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -1200,7 +1200,9 @@ func _add_tile(x: int, y: int, affinity: String) -> void: # Every tile gets a seeded RNG for deterministic variety. # First roll: height (0.8-1.0 for model tiles, fixed 0.5 for placeholders). # Second roll: vertical stagger (±0.15) so the board isn't completely flat. - var has_model : bool = not ContentCache.get_tile_model_url(affinity, "Square").is_empty() + var _shape_key_chk := "Hex" if _board_grid_type == "Hexagon" else "Square" + var has_model : bool = not ContentCache.get_tile_model_url(affinity, _shape_key_chk).is_empty() \ + or (_board_grid_type == "Hexagon" and not ContentCache.get_tile_model_url(affinity, "Square").is_empty()) var rng := RandomNumberGenerator.new() rng.seed = hash("%d_%d" % [x, y]) var h : float = rng.randf_range(0.8, 1.0) if has_model else 0.5 @@ -1263,7 +1265,9 @@ func _try_load_tile_model(body: StaticBody3D, affinity: String) -> void: if model_url.is_empty(): # No 3D model — apply a 2D texture to the placeholder box and attach # a stalagmite bottom so undecorated tiles still look coherent. - var tex_url := ContentCache.get_tile_texture_url(affinity, "Square") + var tex_url := ContentCache.get_tile_texture_url(affinity, shape_key) + if tex_url.is_empty() and _board_grid_type == "Hexagon": + tex_url = ContentCache.get_tile_texture_url(affinity, "Square") if not tex_url.is_empty(): _apply_tile_texture(body, tex_url) if want_bottom: