Guest User

Untitled

a guest
May 16th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. module FM_World
  2. FM_VIEW_SWITCH = 15
  3. end
  4.  
  5. class Game_Event
  6. attr_accessor :fm_event
  7.  
  8. alias :init_public_members_fm_world_sigma :init_public_members
  9. def init_public_members
  10. init_public_members_fm_world_sigma
  11. @fm_event = false
  12. end
  13.  
  14. alias :init_private_members_fm_world_sigma :init_private_members
  15. def init_private_members
  16. init_private_members_fm_world_sigma
  17. @through_original = @through
  18. @transparent_original = @transparent
  19. end
  20.  
  21. alias :update_fm_world_sigma :update
  22. def update
  23. refresh_fm_state
  24. update_fm_world_sigma
  25. end
  26.  
  27. def refresh_fm_state
  28. if @fm_event
  29. @through = !$game_variables[FM_World::FM_VIEW_SWITCH]
  30. @transparent = !$game_variables[FM_World::FM_VIEW_SWITCH]
  31. else
  32. @through = @through_original
  33. @transparent = @transparent_original
  34. end
  35. end
  36. end
  37.  
  38. class Game_Interpreter
  39. alias :comment_call_fm_world_sigma :comment_call
  40. def comment_call
  41. call_fm_event
  42. comment_call_fm_world_sigma
  43. end
  44.  
  45. def call_fm_event
  46. note.scan(/<fm>/i) do
  47. $game_map.events[event_id].fm_event = true
  48. end
  49. end
  50. end
Advertisement
Add Comment
Please, Sign In to add comment