Fix: suppress stalagmite bottom models on PureVoid tiles
PureVoid tiles are meant to appear as empty floating platforms — attaching stalagmite decoration below them breaks the visual. The affinity is checked at the start of _try_load_tile_model and both attach points (placeholder path and 3D-model-loaded path) are skipped when affinity == "PureVoid". 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:
@@ -506,7 +506,9 @@ func _add_tile(x: int, y: int, affinity: String) -> void:
|
||||
## Load (or replace) the 3D model on a tile body for the given affinity.
|
||||
## Also attaches a random stalagmite bottom model below the tile when available.
|
||||
## Safe to call any time affinity changes — replaces existing mesh if present.
|
||||
## PureVoid tiles never receive a stalagmite bottom model.
|
||||
func _try_load_tile_model(body: StaticBody3D, affinity: String) -> void:
|
||||
var want_bottom : bool = affinity != "PureVoid"
|
||||
var model_url := ContentCache.get_tile_model_url(affinity, "Square")
|
||||
if model_url.is_empty():
|
||||
# No 3D model — apply a 2D texture to the placeholder box and attach
|
||||
@@ -514,9 +516,10 @@ func _try_load_tile_model(body: StaticBody3D, affinity: String) -> void:
|
||||
var tex_url := ContentCache.get_tile_texture_url(affinity, "Square")
|
||||
if not tex_url.is_empty():
|
||||
_apply_tile_texture(body, tex_url)
|
||||
var bottom_url := ContentCache.get_random_tile_bottom_url()
|
||||
if not bottom_url.is_empty():
|
||||
_try_load_tile_bottom(weakref(body), bottom_url)
|
||||
if want_bottom:
|
||||
var bottom_url := ContentCache.get_random_tile_bottom_url()
|
||||
if not bottom_url.is_empty():
|
||||
_try_load_tile_bottom(weakref(body), bottom_url)
|
||||
return
|
||||
|
||||
var body_ref : Variant = weakref(body)
|
||||
@@ -540,9 +543,11 @@ func _try_load_tile_model(body: StaticBody3D, affinity: String) -> void:
|
||||
_fit_model_to_tile(model_node, 0.98)
|
||||
|
||||
# Attach a random stalagmite bottom model below the tile (if any are configured).
|
||||
var bottom_url : String = ContentCache.get_random_tile_bottom_url()
|
||||
if not bottom_url.is_empty():
|
||||
_try_load_tile_bottom(body_ref, bottom_url)
|
||||
# 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()
|
||||
if not bottom_url.is_empty():
|
||||
_try_load_tile_bottom(body_ref, bottom_url)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user