Better and simpler way to represent preferences

This commit is contained in:
2026-01-31 09:12:50 +01:00
parent 3477b89145
commit 311095104b
23 changed files with 114 additions and 95 deletions

View File

@@ -3,6 +3,13 @@ extends Resource
class_name CharacterResource
enum Preference {
LOVE,
APPROVE,
DISAPPROVE,
HATE
}
@export var chara_sprite: Texture2D:
set(value):
chara_sprite = value
@@ -20,4 +27,4 @@ class_name CharacterResource
@export_category("Traits and preferences")
@export var traits: Array[Trait]
@export var preferences: Array[Preference]
@export var preferences: Dictionary[Trait.Tag, Preference]

View File

@@ -1,14 +0,0 @@
extends Resource
class_name Preference
enum Pref {
LOVE,
APPROVE,
DONT_CARE,
DISAPPROVE,
HATE
}
@export var name: String
@export var trait_name: String
@export var preference: Pref

View File

@@ -1 +0,0 @@
uid://djnkk7igqmtk

View File

@@ -1,11 +0,0 @@
extends Resource
class_name TagResource
enum Stimuli {
VISION,
SPEAKING,
HEARING
}
@export var name: String
@export var stimulis: Array[Stimuli]

View File

@@ -1 +0,0 @@
uid://837kteb5ihhm

View File

@@ -1,16 +1,35 @@
extends Resource
class_name Trait
enum Stimuli {
VISION,
SOUND,
SMELL
}
enum Category {
AGE,
GENDER,
SOCIAL_CLASS,
RACE,
ANIMALS,
SOCIABILITY,
OTHER
}
enum Tag {
YOUNG, MIDDLE_AGED, OLD,
MAN, WOMAN, ENBY,
ROYAL, NOBLE, PEASANT,
BLACK, WHITE, ALIEN,
CAT, DOG,
ALONE, NOT_ALONE
}
@export var name : String
@export var stimulis : Array[Stimuli]
@export var tags : Array[String]
@export var category : Category
@export var tag : Tag
# Called when the node enters the scene tree for the first time.