Browse Source

Minor error checking

pull/10/head prototype-4cc4d7c09a
Ryan Reed 1 month ago
parent
commit
4cc4d7c09a
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      scenes/blocks/block.gd

+ 4
- 1
scenes/blocks/block.gd View File

@ -47,7 +47,10 @@ func _apply_material() -> void:
func _load_resource_data() -> void:
if not id:
printerr("Block ID was expected but was not received")
printerr("Could not load resource data. Block ID was empty.")
return
if not id in DBItems.data:
printerr("Could not load resource data. Unknown Block ID: ", id)
return
resource = DBItems.data[id]

Loading…
Cancel
Save