mirror of
				https://gitea.your-land.de/Sokomine/yl_speak_up.git
				synced 2025-10-31 04:23:03 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			54 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Lua
		
	
	
	
	
	
| -- YourLand specific file.
 | |
| -- Please link local_server_config.lua to this file IF running on the YourLand server!
 | |
| -- Else ignore this file.
 | |
| --
 | |
| -- taken from yl_speak_up from yl
 | |
| local function add_skins_and_capes(temp, races)
 | |
|     --[[ Let's see if the files are the ones we want. Format is
 | |
|     yl_npc_main_name.png <-- Those are the ones we want
 | |
|     yl_npc_cape_name.png
 | |
|     yl_npc_item_name.png
 | |
|     ]]--
 | |
| 
 | |
|     for _, race in ipairs(races) do
 | |
|        if(not(yl_speak_up.mob_skins["yl_speak_up:"..race])) then
 | |
|            yl_speak_up.mob_skins["yl_speak_up:"..race] = {}
 | |
|        end
 | |
|        if(not(yl_speak_up.mob_capes["yl_speak_up:"..race])) then
 | |
|            yl_speak_up.mob_capes["yl_speak_up:"..race] = {}
 | |
|        end
 | |
|     end
 | |
| 
 | |
|     for _, v in pairs(temp) do
 | |
|         local s = string.split(v, "_")
 | |
|         if s[1] == "yl" and s[2] == "npc" and s[3] == "main" then
 | |
| 	    for i, race in ipairs(races) do
 | |
|                 table.insert(yl_speak_up.mob_skins["yl_speak_up:"..race], v)
 | |
| 	    end
 | |
|         end
 | |
|         if s[1] == "yl" and s[2] == "npc" and s[3] == "cape" then
 | |
| 	    for i, race in ipairs(races) do
 | |
|                 table.insert(yl_speak_up.mob_capes["yl_speak_up:"..race], v)
 | |
| 	    end
 | |
|         end
 | |
|     end
 | |
| 
 | |
|     for _, race in ipairs(races) do
 | |
|        if(#yl_speak_up.mob_skins["yl_speak_up:"..race] < 1) then
 | |
|            yl_speak_up.mob_skins["yl_speak_up:"..race] = {"yl_speak_up_main_default.png"}
 | |
|        end
 | |
|        if(#yl_speak_up.mob_capes["yl_speak_up:"..race] < 1) then
 | |
|            yl_speak_up.mob_capes["yl_speak_up:"..race] = {"yl_npc_cape_default.png"}
 | |
|        end
 | |
|     end
 | |
| end
 | |
| 
 | |
| 
 | |
| -- do all the things that have to be done when yl_speak_up is initialized or reloaded
 | |
| add_skins_and_capes(yl_speak_up_addons.file_list, {"dwarf","elf","goblin","human","npc","orc"})
 | |
| 
 | |
| -- Tribe Miocene (Obsidian Flans)
 | |
| yl_speak_up.mesh_data["zmobs_lava_flan.x"] = { texture_index = 1, }
 | |
| yl_speak_up.mob_skins["yl_events:tribe_miocene"] = {"mobs_obsidian_flan.png"}
 | |
| yl_speak_up.emulate_orders_on_rightclick = {"yl_events:tribe_miocene"}
 |