<?php
#==============================================================================
# ■ Visuality System
# ● Core Functions
#==============================================================================
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# ● Alias Functions
#--------------------------------------------------------------------------
alias tayruu_vn_system_init initialize
#--------------------------------------------------------------------------
# ● Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :oldindex
attr_accessor :leavingmenu
#--------------------------------------------------------------------------
# ● Object Initialization
#--------------------------------------------------------------------------
def initialize
tayruu_vn_system_init
@oldindex = -1
@leavingmenu = false
end
end
#==============================================================================
# ■ Interpreter (part 1)
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# ● Alias Functions
#--------------------------------------------------------------------------
alias tayruu_vn_interpreter_update update
#--------------------------------------------------------------------------
# ● Frame Update
#--------------------------------------------------------------------------
def update
if $game_system.leavingmenu && @list != nil
@index = $game_system.oldindex
@index -= 1 unless @list[@index].code == 101
valid_commands = [101, 102, 402, 403, 103, 104, 105, 106, 111, 411, 112,
403, 113, 115, 116, 117, 118, 119, 121, 122, 123, 124, 125, 126, 127,
128, 129, 131, 132, 133, 134, 135, 136, 201, 202, 203, 204, 205, 206,
207, 208, 209, 210, 221, 222, 223, 224, 225, 231, 232, 233, 234, 235,
236, 241, 241, 242, 245, 246, 247, 248, 249, 250, 251, 301, 601, 602,
603, 302, 303, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321,
322, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 351, 352, 353,
354, 355, ]
if !valid_commands.include?(@list[@index].code)
@index -= 1
end
$game_system.leavingmenu = false
end
tayruu_vn_interpreter_update
$game_system.oldindex = @index - 1 unless @index == nil
end
end
#==============================================================================
# ■ Scene_Map
#==============================================================================
class Scene_Map < SDK::Scene_Base
#--------------------------------------------------------------------------
# ● Frame Update : Message Test
#--------------------------------------------------------------------------
def update_message?
return false
end
#--------------------------------------------------------------------------
# ● Frame Update : Menu Call
#--------------------------------------------------------------------------
def update_call_menu
# If B button was pressed
if Input.trigger?(Input::B)
# If event is running, or menu is not forbidden
unless $game_system.menu_disabled
# Set menu calling flag or beep flag
$game_temp.menu_calling = true
$game_temp.menu_beep = true
end
end
end
end
#==============================================================================
# ■ Scene_Menu
#==============================================================================
class Scene_Menu < SDK::Scene_Base
#--------------------------------------------------------------------------
# ● Alias Functions
#--------------------------------------------------------------------------
alias tayruu_vn_menu_init initialize
#--------------------------------------------------------------------------
# ● Object Initialization
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
tayruu_vn_menu_init(menu_index)
$game_system.leavingmenu = true
end
end