extends AIScriptModule


# Declare member variables here. Examples:
# var a = 2
# var b = "text"


# Called when the node enters the scene tree for the first time.
var root
var skel
var hair_skel
var name

var garments_female_lingerie = ["female-panties1", "female-bra1"]
var garments_head_female = []
var garments_male_lingerie = ["male-panties1"]
var garments_head_male = []
var garments_female_main = ["female-shirt_skirt1", "female-skirt1"]
var garments_male_main = ["male-pants1", "male-shirt1", "male-shoes1"]
var basedir = "res://scenes/clothes/"
var material_female = preload("res://scenes/clothes/nun-clothes.material")
var material_male = preload("res://scenes/clothes/clothes-male.material")

func init(tick):
	name = "student_ai"
	root = get_character(tick)
	assert(root.has_meta("skeleton"))
	root.add_to_group("students")
	root.add_to_group("student")

	var character_data = root.get_meta("character_data")
	if character_data.sex == "female":
		var g = garments_female_lingerie
		var h = []
		g += garments_female_main
		h += garments_head_female
		characters.call_deferred("setup_garments", root, g, h, material_female)
	else:
		var g = garments_male_lingerie
		var h = []
		g += garments_male_main
		h += garments_head_male
		characters.call_deferred("setup_garments", root, g, h, material_male)
func update(tick, delta):
	return ERR_BUSY
func update_physics(tick, delta):
	return ERR_BUSY

