IceDragon200

[IEI]VariableMonitor

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