Skip to content

Commit

Permalink
Merge pull request #524 from Elshad19/entity_type#510
Browse files Browse the repository at this point in the history
Updated entity_type from mobfactions_editor.gd
  • Loading branch information
snipercup authored Dec 4, 2024
2 parents 190a6e9 + 36307b9 commit edf7940
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 @@ -124,8 +124,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 edf7940

Please sign in to comment.