mirror of
https://port.numenaute.org/aleajactaest/khanat-client.git
synced 2024-12-23 18:08:46 +00:00
26 lines
1.2 KiB
GDScript
26 lines
1.2 KiB
GDScript
extends "res://ressources/scripts/entity.gd"
|
|
|
|
func _ready():
|
|
$model/ra/spring_arm/camera.make_current()
|
|
|
|
|
|
|
|
func load_creature( filename ):
|
|
var file = File.new()
|
|
if file.file_exists( "user://creatures/" + filename ):
|
|
file.open( "user://creatures/" + filename, File.READ )
|
|
var lines = ""
|
|
while not file.eof_reached():
|
|
var current_line = file.get_line()
|
|
lines += current_line
|
|
var json = JSON.parse( lines ).result
|
|
|
|
$model/ra/model/body.set( "blend_shapes/Boobs", str2var(json[ "female_boobs" ] ) )
|
|
$model/ra/model/body.set( "blend_shapes/Female_hip", str2var(json[ "female_hip" ] ) )
|
|
$model/ra/model/body.set( "blend_shapes/Male_Pack", str2var(json[ "male_pack" ] ) )
|
|
$model/ra/model/body.set( "blend_shapes/Male_Throat", str2var(json[ "male_throat" ] ) )
|
|
$model/ra/model/body.set( "blend_shapes/Pregnant", str2var(json[ "female_pregnant" ] ) )
|
|
$model/ra/model/body.set( "blend_shapes/Pregnant", str2var(json[ "female_pregnant" ] ) )
|
|
$model/ra/model/body.get_surface_material( 0 ).set_shader_param( "albedo", str2var( json[ "color" ] ) )
|
|
print( str2var( json[ "color" ] ) )
|
|
file.close()
|