feat: author world events and social effects
This commit is contained in:
@@ -16,6 +16,8 @@ extends Resource
|
||||
@export var situations: Array[SituationDefinition] = []
|
||||
@export var dialogue_intents: Array[ConversationIntentDefinition] = []
|
||||
@export var dialogue_template_catalogs: Array[ConversationTemplateCatalog] = []
|
||||
@export var event_types: Array[EventTypeDefinition] = []
|
||||
@export var social_consequences: Array[SocialConsequenceDefinition] = []
|
||||
|
||||
|
||||
func validate() -> Array[String]:
|
||||
@@ -39,6 +41,8 @@ func validate() -> Array[String]:
|
||||
_validate_situations(errors)
|
||||
_validate_dialogue_intents(errors)
|
||||
_validate_dialogue_template_catalogs(errors)
|
||||
_validate_event_types(errors)
|
||||
_validate_social_consequences(errors)
|
||||
return errors
|
||||
|
||||
|
||||
@@ -140,6 +144,24 @@ func _validate_dialogue_template_catalogs(errors: Array[String]) -> void:
|
||||
errors.append("ConversationTemplateCatalog: catalog_id is empty")
|
||||
|
||||
|
||||
func _validate_event_types(errors: Array[String]) -> void:
|
||||
for definition in event_types:
|
||||
if definition == null:
|
||||
errors.append("event_types contains a null definition")
|
||||
continue
|
||||
for error in definition.validate():
|
||||
errors.append("EventTypeDefinition: " + error)
|
||||
|
||||
|
||||
func _validate_social_consequences(errors: Array[String]) -> void:
|
||||
for definition in social_consequences:
|
||||
if definition == null:
|
||||
errors.append("social_consequences contains a null definition")
|
||||
continue
|
||||
for error in definition.validate():
|
||||
errors.append("SocialConsequenceDefinition: " + error)
|
||||
|
||||
|
||||
static func _validate_dependency_ids(
|
||||
ids: Array[StringName], label: String, errors: Array[String]
|
||||
) -> void:
|
||||
|
||||
Reference in New Issue
Block a user