Add bison model to default editor palette and object catalog
checkpoint / checkpoint (push) Successful in 6m10s
checkpoint / checkpoint (push) Successful in 6m10s
This commit is contained in:
@@ -48,11 +48,21 @@ func is_loaded() -> bool:
|
||||
func resolve(id: String) -> Dictionary:
|
||||
if not _loaded:
|
||||
return {}
|
||||
return _catalog.get(id, {})
|
||||
if _catalog.has(id):
|
||||
return _catalog[id]
|
||||
if (id.contains("bizon") or id.contains("bison")) and _catalog.has("bison"):
|
||||
return _catalog["bison"]
|
||||
return {}
|
||||
|
||||
|
||||
func has_object(id: String) -> bool:
|
||||
return _loaded and _catalog.has(id)
|
||||
if not _loaded:
|
||||
return false
|
||||
if _catalog.has(id):
|
||||
return true
|
||||
if (id.contains("bizon") or id.contains("bison")) and _catalog.has("bison"):
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func get_all_ids() -> Array[String]:
|
||||
|
||||
@@ -115,6 +115,8 @@ func _setup_import_ui() -> void:
|
||||
sample_option.set_item_metadata(4, {"path": "res://assets/props/buffalo_chip_coin.glb", "name": "Buffalo Chip Coin"})
|
||||
sample_option.add_item("Small Crate", 5)
|
||||
sample_option.set_item_metadata(5, {"path": "res://assets/props/crate_small.glb", "name": "Small Crate"})
|
||||
sample_option.add_item("Bison", 6)
|
||||
sample_option.set_item_metadata(6, {"path": "res://assets/props/bison.glb", "name": "Bison"})
|
||||
sample_option.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
sample_option.item_selected.connect(func(idx: int):
|
||||
if idx > 0:
|
||||
|
||||
Reference in New Issue
Block a user