Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ['variables','switches','self_switches'].each_with_index {|d,i| eval "
- class #{defined?(Window_ActorCommand) ? 'Game_' : ''}Interpreter
- #--------------------------------------------------------------------------
- # * swap_variables(VAR_1,VAR_2)
- # * swap_switches(SWITCH_1,SWITCH_2)
- # * swap_self_switches(X,X) => X = 'A','B','C', or 'D'
- # * swap_self_switches(X,X) => X = [@map_id,@event_id,'A'/'B'/'C'/'D']
- #--------------------------------------------------------------------------
- def swap_#{d}(from, to)
- from = [@map_id,@event_id,from.to_s] if !from.is_a?(Array) && #{i} == 2
- to = [@map_id,@event_id, to.to_s] if !to.is_a?(Array) && #{i} == 2
- temp = [$game_#{d}[from], $game_#{d}[to]]
- $game_#{d}[to], $game_#{d}[from] = temp
- $game_map.need_refresh = true
- end
- end#"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement