TheoAllen

Theo - Battleback Switcher

Aug 9th, 2013
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.84 KB | None | 0 0
  1. module THEO
  2.   module BattleBack
  3.    
  4.     Floor = {
  5.     # Switch OFF  => Switch ON
  6.       "Castle"    => "Clouds",
  7.     }
  8.    
  9.     Back = {
  10.     # Switch OFF  => Switch ON
  11.       "Brick"     => "Bridge"
  12.     }
  13.    
  14.     Switch_ID = 1 # Obviously
  15.    
  16.   end
  17. end
  18.  
  19. class << Cache
  20.  
  21.   alias theolized_battleback1 battleback1
  22.   alias theolized_battleback2 battleback2
  23.  
  24.   def battleback1(filename)
  25.     if $game_switches[THEO::BattleBack::Switch_ID]
  26.       hash = THEO::BattleBack::Floor
  27.       filename = hash[filename] if hash.include?(filename)
  28.     end
  29.     theolized_battleback1(filename)
  30.   end
  31.  
  32.   def battleback2(filename)
  33.     if $game_switches[THEO::BattleBack::Switch_ID]
  34.       hash = THEO::BattleBack::Back
  35.       filename = hash[filename] if hash.include?(filename)
  36.     end
  37.     theolized_battleback2(filename)
  38.   end
  39.  
  40. end
Advertisement
Add Comment
Please, Sign In to add comment