Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function add_dynasty_tree_listeners()
  2. out("#### Adding Dynasty Tree Listeners ####");
  3. core:add_listener(
  4. "DynastyTree_ResearchCompleted",
  5. "ResearchCompleted",
  6. true,
  7. function(context)
  8. DynastyTree_ResearchCompleted(context);
  9. end,
  10. true
  11. );
  12. end
  13.  
  14. function DynastyTree_ResearchCompleted(context)
  15. local faction = context:faction();
  16. local tech_key = context:technology();
  17.  
  18. if faction:is_human() == true and faction_name = "wh2_dlc09_tmb_tomb_kings" then
  19. -- SPAWN TOMB KINGS
  20. if tech_key:starts_with("tech_dlc09_tmb_tomb_king_") then
  21. local tomb_king = dynasty_tree_tomb_kings[tech_key];
  22.  
  23. if tomb_king ~= nil then
  24. create_tomb_king(faction:name(), tomb_king);
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement