43 lines
1.2 KiB
GDScript3
43 lines
1.2 KiB
GDScript3
|
class_name CharacterProfile extends Resource
|
||
|
|
||
|
const ALL: Array[StringName] = [&'stick', &'lorna', &'blujai', &'gibbo']
|
||
|
|
||
|
enum StatRating {LOW, MEDIUM, HIGH, STELLAR}
|
||
|
|
||
|
@export var runner: PackedScene
|
||
|
|
||
|
@export var id: StringName
|
||
|
@export var nickname: String
|
||
|
@export var full_name: String
|
||
|
@export var pronouns: String
|
||
|
@export var speed_rating := StatRating.MEDIUM
|
||
|
@export var traction_rating := StatRating.MEDIUM
|
||
|
@export var air_rating := StatRating.MEDIUM
|
||
|
@export var combat_rating := StatRating.MEDIUM
|
||
|
@export var ability: String
|
||
|
@export_multiline var playstyle: String
|
||
|
@export_multiline var story: String
|
||
|
|
||
|
@export var talk_color: Color
|
||
|
@export var talk_blip: AudioStream
|
||
|
@export var face_normal: Texture2D
|
||
|
|
||
|
func say(message: Variant, options: Dictionary = {}) -> Variant:
|
||
|
if not options.has(&'color'):
|
||
|
options[&'color'] = talk_color
|
||
|
if not options.has(&'blip'):
|
||
|
options[&'blip'] = talk_blip
|
||
|
var face = options.get(&'face', &'normal')
|
||
|
if face is StringName:
|
||
|
match face:
|
||
|
&'normal': options[&'face'] = face_normal
|
||
|
_:
|
||
|
push_warning(
|
||
|
"CharacterProfile does not support " +
|
||
|
"the requested face name: %s" % face
|
||
|
)
|
||
|
options[&'face'] = face_normal
|
||
|
if not options.has(&'name'):
|
||
|
options[&'name'] = nickname
|
||
|
return await UI.say(message, options)
|