Advertisement
Daemonion

rain function

Jun 7th, 2012
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; This function is designed to see if it is raining or not
  3. ;
  4. ; If it is raining, the actor (player) is assigned an infoportion "its_raining"
  5. ; If it isn't raining, the actor (player) loses the infoportion
  6. ;
  7. ; The infoportion has been defined in config\gameplay\info_l01_escape.xml
  8. ; <info_portion id="its_raining"></info_portion>
  9. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  10.  
  11. function weather_class(avail_types, npc)
  12. local type = "weather_good"
  13. if level.rain_factor() < 0.07 then
  14. type = "weather_good"
  15. db.actor:disable_info_portion("its_raining") -- added by Daemonion for LURK 1.2
  16. else
  17. type = "weather_bad"
  18. db.actor:give_info_portion("its_raining") -- added by Daemonion for LURK 1.2
  19. end
  20. return type
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement