PrefabFiles = {
	"mayoi","saribackpack"
}

Assets = {
    
    Asset( "IMAGE", "images/saveslot_portraits/mayoi.tex" ),
    Asset( "ATLAS", "images/saveslot_portraits/mayoi.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/mayoi.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/mayoi.xml" ),

    Asset( "IMAGE", "images/selectscreen_portraits/mayoi_silho.tex" ),
    Asset( "ATLAS", "images/selectscreen_portraits/mayoi_silho.xml" ),

    Asset( "IMAGE", "bigportraits/mayoi.tex" ),
    Asset( "ATLAS", "bigportraits/mayoi.xml" ),
       
Asset( "IMAGE", "images/inventoryimages/saribackpack.tex" ),
    Asset( "ATLAS", "images/inventoryimages/saribackpack.xml" ),
	
	
	Asset( "IMAGE", "images/map_icons/mayoi.tex" ),
	Asset( "ATLAS", "images/map_icons/mayoi.xml" ),	
Asset( "IMAGE", "images/map_icons/saribackpack.tex" ),
	Asset( "ATLAS", "images/map_icons/saribackpack.xml" ),	

Asset("SOUNDPACKAGE", "sound/mayoi.fev"),
    Asset("SOUND", "sound/mayoi.fsb"),

       
}

local Recipe = GLOBAL.Recipe
local Ingredient = GLOBAL.Ingredient
local RECIPETABS = GLOBAL.RECIPETABS
local STRINGS = GLOBAL.STRINGS
local TECH = GLOBAL.TECH
local require = GLOBAL.require


GLOBAL.STRINGS.NAMES.SARIBACKPACK = "八九寺的书包"
GLOBAL.STRINGS.RECIPE_DESC.SARIBACKPACK = "八九寺的书包"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.SARIBACKPACK = "这有点沉"
GLOBAL.STRINGS.CHARACTER_TITLES.mayoi = "八九寺真宵"
GLOBAL.STRINGS.CHARACTER_NAMES.mayoi = "mayoi" 
GLOBAL.STRINGS.CHARACTER_DESCRIPTIONS.mayoi = "*她只是一个小女孩\n* 特长是迷路\n* 书包很大"
GLOBAL.STRINGS.CHARACTER_QUOTES.mayoi = "\"我好像又迷路了。。。\""
GLOBAL.STRINGS.CHARACTERS.MAYOI = require "speech_mayoi"

local function MayoiMaxwellIntro(inst)
    if GLOBAL.GetPlayer().prefab == "mayoi" then
        inst.components.maxwelltalker.speeches.SANDBOX_1 =
        {
		delay = 0,
            appearsound = "dontstarve/maxwell/appear_adventure",
	    voice = "dontstarve/maxwell/talk_LP",
		appearanim = "appear",
		idleanim= "idle",
		dialogpreanim = "dialog_pre",
		dialoganim="dial_loop",
		dialogpostanim = "dialog_pst",
		disappearanim = "disappear",
            disableplayer = true,
            skippable = false,
            {
                string = "欧~小学生！！！",
                wait = 3,
                anim = nil,
                sound = nil,
            },
            {
                string = "欢迎来到我的世界，小鬼",
                wait = 3,
                anim = nil,
                sound = nil,
            },
            {
                string = "这不是放假玩的好地方",
                wait = 3,
                anim = nil,
                sound = nil,
            },
            {
                string = "你最好在天黑前回家",
                wait = 3,
                anim = nil,
		sound = "dontstarve/HUD/collect_resource", 
            },
            {
                string = "那才是一个好孩子",
                wait = 3,
                anim = nil,
                sound = nil,
            },
	}

        inst.components.maxwelltalker.speeches.ADVENTURE_1 =
        {
		delay = 2,
            appearsound = "dontstarve/maxwell/appear_adventure",
	    voice = "dontstarve/maxwell/talk_LP_world2",
		appearanim = "appear2",
		idleanim= "idle2_loop",
		dialogpreanim = "dialog2_pre",
		dialoganim="dialog2_loop",
		dialogpostanim = "dialog2_pst",
		disappearanim = "disappear2",
            disableplayer = true,
            skippable = false,
            {
			string = "你怎么到这儿的？小鬼",
			wait = 2,
			anim = nil,
			sound = nil,
		},
		{
			string = "这里很危险的", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "你妈妈会难过的", 
			wait = 3, 
			anim = nil, 
			sound = nil, 
		},
		{
			string = "你最好马上回家", 
			wait = 2, 
			anim = nil, 
			sound = nil, 
		},
		{
			string = "真是个顽固的女孩", 
			wait = 2, 
			anim = nil, 
			sound = "dontstarve/HUD/collect_resource", 
		},
		{
			string = "那么请自便", 
			wait = 2, 
			anim = nil, 
			sound = nil, 
		},
	}

        inst.components.maxwelltalker.speeches.ADVENTURE_2 =
	{		
		delay = 2,
	    voice = "dontstarve/maxwell/talk_LP_world3",
		appearanim = "appear3",
		idleanim= "idle3_loop",
		dialogpreanim = "dialog3_pre",
		dialoganim="dialog3_loop",
		dialogpostanim = "dialog3_pst",
		disappearanim = "disappear3",
		disableplayer = true,
		skippable = true,
		{
			string = "你这么还在？",
			wait = 2,
			anim = nil,
			sound = nil,
		},
		{
			string = "它们找到你，你就完蛋了", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "小鬼，听叔叔我一句", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
	}

        inst.components.maxwelltalker.speeches.ADVENTURE_TWOLANDS =
	{		
		delay = 2,
	    voice = "dontstarve/maxwell/talk_LP_world4",
		appearanim = "appear4",
		idleanim= "idle4_loop",
		dialogpreanim = "dialog4_pre",
		dialoganim="dialog4_loop",
		dialogpostanim = "dialog4_pst",
		disappearanim = "disappear4",
		disableplayer = true,
		skippable = true,
		{
			string = "不要前进了",
			wait = 1,
			anim = nil,
			sound = nil,
		},
		{
			string = "这一点都不好玩", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "你一直无视叔叔我对吗？", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "你会得到教训的", 
			wait = 3, 
			anim = nil, 
			sound = nil,
		},
	}

        inst.components.maxwelltalker.speeches.ADVENTURE_4 =
	{		
		delay = 2,
	    voice = "dontstarve/maxwell/talk_LP_world4",
		appearanim = "appear4",
		idleanim= "idle4_loop",
		dialogpreanim = "dialog4_pre",
		dialoganim="dialog4_loop",
		dialogpostanim = "dialog4_pst",
		disappearanim = "disappear4",
		disableplayer = true,
		skippable = true,
		{
			string = "我小看你了",
			wait = 1,
			anim = nil,
			sound = nil,
		},
		{
			string = "太淘气了", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "你又无视叔叔我", 
			wait = 2, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "现在叔叔我不喜欢你了", 
			wait = 3, 
			anim = nil, 
			sound = nil,
		},
	}

        inst.components.maxwelltalker.speeches.ADVENTURE_5 =
	{		
		delay = 2,
	    voice = "dontstarve/maxwell/talk_LP_world5",
		appearanim = "appear5",
		idleanim= "idle5_loop",
		dialogpreanim = "dialog5_pre",
		dialoganim="dialog5_loop",
		dialogpostanim = "dialog5_pst",
		disappearanim = "disappear5",
		disableplayer = true,
		skippable = true,
		{
			string = "你必须回家了",
			wait = 2,
			anim = nil,
			sound = nil,
		},
		{
			string = "认真听叔叔说话", 
			wait = 2.5, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "这只是浪费时间", 
			wait = 3, 
			anim = nil, 
			sound = nil,
		},
		{
			string = "你不会成功的，小鬼", 
			wait = 2.5, 
			anim = nil, 
			sound = nil,
		},
	}

    end
end

local require = GLOBAL.require
 
AddPrefabPostInit("maxwellintro", MayoiMaxwellIntro)



local function makePostInit(custom_inv)
	return function (inst)
		setStarterInventory(inst, custom_inv)
	end
end



function AddMap(inst)
	local minimap = inst.entity:AddMiniMapEntity()
	minimap:SetIcon( inst.prefab .. ".tex" )
end      



AddMinimapAtlas("images/inventoryimages/saribackpack.xml")
AddMinimapAtlas("images/map_icons/mayoi.xml")
AddModCharacter("mayoi")

RemapSoundEvent( "dontstarve/characters/mayoi/death_voice", "mayoi/characters/mayoi/death_voice" )
RemapSoundEvent( "dontstarve/characters/mayoi/hurt", "mayoi/characters/mayoi/hurt" )
RemapSoundEvent( "dontstarve/characters/mayoi/talk_LP", "mayoi/characters/mayoi/talk_LP" )