Advertisement
DrDhoom

Khas Light Disable Switch

Jan 30th, 2015
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.86 KB | None | 0 0
  1. =begin
  2. Khas Awesome Light Effects - Disable Switch addon
  3. v1.0 - DrDhoom
  4. =end
  5.  
  6. module Dhoom
  7.   module KALE
  8.     SWITCH_DISABLE_LIGHT_EFFECTS = 10
  9.   end
  10. end
  11.  
  12. class Spriteset_Map
  13.   include Dhoom::KALE
  14.   def dispose_lights
  15.     $game_map.lantern.dispose
  16.     $game_map.light_sources.each { |source| source.dispose_light }
  17.     unless $game_map.light_surface.nil?
  18.       $game_map.light_surface.bitmap.dispose
  19.       $game_map.light_surface.dispose
  20.       $game_map.light_surface = nil
  21.     end
  22.   end
  23.  
  24.   alias dhoom_kale_sprsmap_update_lights update_lights
  25.   def update_lights
  26.     return if $game_switches[SWITCH_DISABLE_LIGHT_EFFECTS]
  27.     dhoom_kale_sprsmap_update_lights
  28.   end
  29.  
  30.   alias dhoom_kale_sprsmap_setup_lights  setup_lights
  31.   def setup_lights  
  32.     return if $game_switches[SWITCH_DISABLE_LIGHT_EFFECTS]
  33.     dhoom_kale_sprsmap_setup_lights
  34.   end
  35. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement