Guest User

Untitled

a guest
Mar 13th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. --#textdomain wesnoth-NX-RPG
  2. _ = wesnoth.textdomain "wesnoth-NX-RPG"
  3.  
  4. function wesnoth.wlm_actions.inventory_item(cfg)
  5. local unit_id = wesnoth.get_variable("unit.id")
  6. local u_index = wesnoth.get_variable("inventory." .. unit_id .. ".length") + 1
  7. local merge_vars = unit_id .. u_index ..
  8.  
  9. --helper.get_child("inventory." .. merge_vars .. , "command")
  10.  
  11. wesnoth.set_variable("inventory." .. merge_vars .. ".name", cfg.name)
  12. wesnoth.set_variable("inventory." .. merge_vars .. ".id", cfg.id)
  13. wesnoth.set_variable("inventory." .. merge_vars .. ".image", cfg.image)
  14. wesnoth.set_variable("inventory." .. merge_vars .. ".status", cfg.status)
  15. end
Add Comment
Please, Sign In to add comment