Update (nature, engine changes)

This commit is contained in:
Segey Lapin
2021-11-22 01:09:02 +03:00
parent 8bb1c26ecd
commit 8a3b4987e8
94 changed files with 6919 additions and 51 deletions

View File

@@ -16,20 +16,22 @@ onready var male = preload("res://characters/vroid1-man.tscn")
onready var face_ctrl = preload("res://scenes/face/head_comtrol.tscn")
onready var modules = {
# "physics": load("res://scripts/modules/character_physics.gd"),
"cmdq": load("res://scripts/modules/cmdq.gd"),
"marker": load("res://scripts/modules/npc_marker.gd"),
"sacrifice": load("res://scripts/modules/npc_sacrifice.gd"),
"nun": load("res://scripts/modules/npc_nun.gd"),
"player": load("res://scripts/modules/player_controls.gd"),
"player_clothes": load("res://scripts/modules/player_clothes.gd"),
"hurtboxes": load("res://scripts/modules/character_hurtboxes.gd"),
"student": load("res://scripts/modules/npc_student.gd")
"cmdq": preload("res://scripts/modules/cmdq.gd"),
"marker": preload("res://scripts/modules/npc_marker.gd"),
"sacrifice": preload("res://scripts/modules/npc_sacrifice.gd"),
"nun": preload("res://scripts/modules/npc_nun.gd"),
"player": preload("res://scripts/modules/player_controls.gd"),
"player_clothes": preload("res://scripts/modules/player_clothes.gd"),
"hurtboxes": preload("res://scripts/modules/character_hurtboxes.gd"),
"student": preload("res://scripts/modules/npc_student.gd")
}
var face_data_path = "res://scenes/face/"
var hair_data_path = "res://scenes/hair/"
var female_faces = []
var mesh_female_faces = {}
var male_faces = []
var mesh_male_faces = {}
var female_hairs = []
var male_hairs = []
var hair_materials = []
@@ -56,8 +58,11 @@ func _ready():
match g:
"female":
female_faces.push_back(fp)
mesh_female_faces[fp] = load(fp)
"male":
male_faces.push_back(fp)
mesh_male_faces[fp] = load(fp)
for id in range(10000):
var fp_m = face_data_path + "male-face" + str(id) + ".tscn"
var fp_f = face_data_path + "female-face" + str(id) + ".tscn"
@@ -66,8 +71,10 @@ func _ready():
var mat = hair_data_path + "hair" + str(id) + ".tres"
if data_fd.file_exists(fp_m):
male_faces.push_back(fp_m)
mesh_male_faces[fp_m] = load(fp_m)
if data_fd.file_exists(fp_f):
female_faces.push_back(fp_f)
mesh_female_faces[fp_f] = load(fp_f)
if data_fd.file_exists(hp_m):
male_hairs.push_back(hp_m)
if data_fd.file_exists(hp_f):
@@ -153,7 +160,7 @@ func compose_kinematic_character(g, enable_modules = [], face = -1, hair = -1, h
face = rnd.randi() % female_faces.size()
if hair == -1:
hair = rnd.randi() % female_hairs.size()
face_scene = load(female_faces[face])
face_scene = mesh_female_faces[female_faces[face]]
hair_scene = load(female_hairs[hair])
capsule.radius = 0.2
capsule.height = 1.1
@@ -172,7 +179,7 @@ func compose_kinematic_character(g, enable_modules = [], face = -1, hair = -1, h
face = rnd.randi() % male_faces.size()
if hair == -1:
hair = rnd.randi() % male_hairs.size()
face_scene = load(male_faces[face])
face_scene = mesh_male_faces[male_faces[face]]
hair_scene = load(male_hairs[hair])
capsule.radius = 0.3
capsule.height = 1.2