Advertisement
Scinaya

AutoWeather (Aero GP's Toolbox)

Apr 28th, 2011
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.43 KB | None | 0 0
  1. # ** ExMap_AutoWeather (MACKIE)
  2. #------------------------------------------------------------------------------
  3. #  This script allows you to set up maps to have weather effects by default.
  4. #==============================================================================
  5.  
  6. # Weather map table.
  7. # Format is [Map ID, Type (0: none; 1: rain; 2: storm; 3: snow), Power (1~9),
  8. # Time (0~600 frames per 1/6 sec), Wait until completion (0: no; 1: yes)]
  9. # Make sure you place the array elements in the correct order.
  10. # (Example) Map 10, moderate rain, 1 second, no wait => [10, 1, 5, 60, 0]
  11. EXMAP_ATWTR_MAPS = [
  12. ]
  13.  
  14. #------------------------------------------------------------------------------
  15.  
  16. class Game_Map
  17.   alias _exmawtr_setup setup unless $@
  18.   #--------------------------------------------------------------------------
  19.   # * Setup (Definition added)
  20.   #     map_id : map ID
  21.   #--------------------------------------------------------------------------
  22.   def setup(map_id)
  23.     _exmawtr_setup(map_id)
  24.     setup_weather
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # * Setup Weather
  28.   #--------------------------------------------------------------------------
  29.   def setup_weather
  30.     @screen.weather(0, 0, 0)
  31.     for data in EXMAP_ATWTR_MAPS
  32.       if data[0] == map_id
  33.         @screen.weather(data[1], data[2], data[3])
  34.         @wait_count = data[3] if data[4] == 1
  35.       end
  36.     end
  37.   end
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement