IceDragon200

[IEI]Variable Monitor + Bar Styling

Mar 30th, 2012
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.53 KB | None | 0 0
  1. # // Variable Monitor
  2. # // Created By IceDragon
  3. # // 03/30/2012
  4. # // 03/30/2012
  5. # // Icy Engine Iliks
  6. BAGS_BAR_VARIABLE = 15
  7. class Game_Variables
  8.   ALERT_PROCS = {
  9.     # // variable_id => proc
  10.     #14 => proc { |id, value| puts "Hello World: V#{id}, Val#{value}" },
  11.     BAGS_BAR_VARIABLE => proc { |id, value| $game_system.bar_style = value if($game_system) }
  12.   }
  13.   alias set_var :[]=
  14.   def []=(id,value)
  15.     ALERT_PROCS[id].call(id,value) if(ALERT_PROCS.has_key?(id)) if(@data[id]!=value)
  16.     set_var(id,value)
  17.   end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment