khanat-client/ressources/scripts/datas/human.gd

58 lines
1.7 KiB
GDScript

class_name Human
extends Creature
#
#05. signals
#06. enums
#07. constants
#08. exported variables
#09. public variables
#10. private variables
#11. onready variables
#12. optional built-in virtual _init method
#13. built-in virtual _ready method
#14. remaining built-in virtual methods
#15. public methods
func _init( p_name = null ).( p_name ):
self.set_data( "first_name", null )
self.set_data( "last_name", null )
# Aspect.
self.set_data( "caucasian", 0.0 )
self.set_data( "african", 0.0 )
self.set_data( "asian", 0.0 )
self.set_data( "size", 1.0 )
self.set_data( "fat", 0.0 )
self.set_data( "muscles", 0.0 )
self.set_data( "proportion", 0.0 )
self.set_data( "breast", 0.0 )
self.set_data( "pregnancy", 0.0 )
self.set_data( "skin_tone", 0.0 )
self.set_data( "hair", 0 )
self.set_data( "hair_color", Color.white )
self.set_data( "cleft_chin", 0.0 )
self.set_data( "chin_angle", 0.0 )
self.set_data( "mouth_horiz", 0.0 )
self.set_data( "mouth_vert", 0.0 )
self.set_data( "nose_galbe", 0.0 )
self.set_data( "nose_grec", 0.0 )
self.set_data( "nose_horiz", 0.0 )
self.set_data( "nose_depth", 0.0 )
self.set_data( "eyes_vert", 0.0 )
self.set_data( "eyes_gap", 0.0 )
self.set_data( "earlobes", 0.0 )
self.set_data( "ears_wing", 0.0 )
self.set_data( "lips_up_shape", 0.0 )
self.set_data( "lips_up_shape_2", 0.0 )
func get_filename():
if not self.get_data( "first_name" ) and not self.get_data( "last_name" ):
return "unknow.creature"
elif not self.get_data( "last_name" ):
return self.get_data( "first_name" ) + ".creature"
elif not self.get_data( "first_name" ):
return self.get_data( "last_name" ) + ".creature"
return self.get_data( "first_name" ) + "_" + self.get_data( "last_name" ) + ".creature"
#16. private methods