forked from your-land-mirror/yl_speak_up
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			768 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			768 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| 
 | |
| function yl_speak_up.fashion(player, obj)
 | |
|     local luaentity = obj:get_luaentity()
 | |
|     local pname = player:get_player_name()
 | |
|     local npc_id = luaentity.yl_speak_up.id
 | |
|     local skins = luaentity.yl_speak_up.skins
 | |
|     local n_id = "n_" .. npc_id
 | |
|     local t = luaentity.textures
 | |
| 
 | |
|     yl_speak_up.speak_to[pname] = {}
 | |
|     yl_speak_up.speak_to[pname].n_id = n_id
 | |
|     yl_speak_up.speak_to[pname].obj = obj
 | |
|     yl_speak_up.speak_to[pname].textures = t
 | |
|     yl_speak_up.speak_to[pname].skins = textures2skin(t)
 | |
| 
 | |
|     local dialog = yl_speak_up.load_dialog(n_id, false)
 | |
|     if next(dialog) then
 | |
|         yl_speak_up.speak_to[pname].n_npc = dialog.n_npc
 | |
|     else
 | |
|         yl_speak_up.speak_to[pname].n_npc = "Unknown"
 | |
|     end
 | |
| 
 | |
|     yl_speak_up.show_fs(player, "fashion")
 | |
| end
 | |
| 
 |