Skip to content

Commit

Permalink
Updated entity_type from mobfactions_editor.gd
Browse files Browse the repository at this point in the history
Fixes Khaligufzel#510

The terminal no longer complains when I hit save button within the content editor.
  • Loading branch information
Elshad19 committed Dec 4, 2024
1 parent 76dd061 commit 36307b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Mods/Core/Mobfaction/Mobfactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"relations": [
{
"mobgroup": "basic_zombies",
"relation_type": "core"
"type": "core"
},
{
"mobgroup": "security_robots",
"relation_type": "hostile"
"type": "hostile"
}
]
},
Expand All @@ -41,4 +41,4 @@
}
]
}
]
]
2 changes: 2 additions & 0 deletions Scenes/ContentManager/Custom_Editors/mobfactions_editor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ func add_relation_type(relation: Dictionary) -> HBoxContainer:
hbox.add_child(label_instance)

# Add the dropable text edit for the mob or mobgroup ID
var entity_type: String = "mob" if relation.has("mob") else "mobgroup" if relation.has("mobgroup") else ""
var dropable_textedit_instance: HBoxContainer = dropabletextedit.instantiate()
dropable_textedit_instance.set_text(relation.get("mob", relation.get("mobgroup", "")))
dropable_textedit_instance.set_meta("entity_type", entity_type)
dropable_textedit_instance.set_meta("relation_type", relation.get("relation_type"))
dropable_textedit_instance.myplaceholdertext = "Drop a mob or mobgroup from the left menu"
set_drop_functions(dropable_textedit_instance)
Expand Down

0 comments on commit 36307b9

Please sign in to comment.