# quest system di holy
module QuestSettings
QUESTS = [
{
name: 'Il ritorno del Re',
description: 'Il re è tornato, accoglilo',
location: 'Città del Re',
npc: 'Consigliere del Re',
rewards: %w(200xp 1000g item5x2 weapon1x1),
tasks: [
{name: 'Vai al castello'},
{name: 'Raccogli 5 pozioni', type: :item, id: 1, required: 5},
{name: 'Saluta il re'}
],
variable_id: 5
},
{
name: 'Vendica gli Avengers',
description: 'Il sequel dei film Marvel',
location: 'Cinema',
npc: 'Ciccio',
rewards: ['500xp', '1500g', 'Riconoscenza di Cap. America'],
variable_id: 6,
tasks: [
{name: 'Carica il carburante per Plutone', tasks: [
{name: 'Carica 6 litri di Uranio', type: :variable, required: 10, id: 7},
{name: 'Carica 5kg di Elio3', type: :variable, required: 5, id: 8},
{name: 'Carica 2kg di Deuterio', type: :variable, required: 2, id: 9}
]},
{name: 'Restaci, già è finito'}
]
}
]
CURRENT_TARGET = 'Obiettivo attuale'
REWARDS = 'Ricompense:'
EXP = 'P.E.'
QUESTS_VOCAB = 'Missioni'
LOCATION_VOCAB = 'Luogo:'
NPC_VOCAB = 'Da:'
COMPLETED_VOCAB = 'MISSIONE COMPLETATA'
UPDATED_VOCAB = 'Missione aggiornata!'
QUEST_ICON = 16
COMPLETED_ICON = 110
CURRENT_TASK_ICON = 125
POPUP_WIDTH = 250
POPUP_LINES = 2
POPUP_LIFE = 300
POPUP_SOUND = 'Hammer'
end
module Sound
def self.play_quest_updated
RPG::SE.new(QuestSettings::POPUP_SOUND).play
end
end
module Vocab
# ricompense della missione
def self.quest_rewards
QuestSettings::REWARDS
end
# Abbreviazione di punti esperienza
# @return [String]
def self.exp_a
QuestSettings::EXP
end
# Comando "Missioni"
# @return [String]
def self.quests
QuestSettings::QUESTS_VOCAB
end
# Messaggio di Luogo:
# @return [String]
def self.quest_location
QuestSettings::LOCATION_VOCAB
end
# @return [String]
def self.quest_npc
QuestSettings::NPC_VOCAB
end
# Messaggio di missione completata
# @return [String]
def self.completed_quest
QuestSettings::COMPLETED_VOCAB
end
# Messaggio di obiettivo corrente
# @return [String]
def self.quest_current_target
QuestSettings::CURRENT_TARGET
end
# Messaggio di missione aggiornata
# @return [String]
def self.quest_updated
QuestSettings::UPDATED_VOCAB
end
end
# Classe Quest
# Definisce l'entità Quest
class Quest
include Comparable
# @return [String] il nome della quest
attr_reader :name
# @return [String] descrizione
attr_reader :description
# @return [String] luogo di inizio quest
attr_reader :location
# @return [Array<Quest_Task>] task
attr_reader :tasks
# @return [Array<Reward>]
attr_reader :rewards
# il personaggio da cui hai cominciato la quest
# @return [String]
attr_reader :npc
# ID della variabile
attr_reader :variable_id
# flag che forza l'aggiornamento del popup
attr_accessor :force_update_popup
# @param [Hash] quest_data
def initialize(quest_data)
@name = quest_data[:name]
@description = quest_data[:description]
@location = quest_data[:location]
@rewards = quest_data[:rewards].collect { |reward| Reward.new(reward) }
@tasks = quest_data[:tasks].collect { |task| Quest_Task.new(task, self) }
@variable_id = quest_data[:variable_id]
@npc = quest_data[:npc]
@force_update_popup = false
end
# definisce a che punto è la quest
# @return [Integer]
def stage
$game_variables[@variable_id]
end
def id
@variable_id
end
def notify_map
@force_update_popup = true
$game_map.add_popup_stack(self.id)
end
def advance
$game_variables[@variable_id] += 1
notify_map
end
# @return [Array<Quest_Task>]
#noinspection RubyYardReturnMatch
def unlocked_tasks
@tasks.first(stage)
end
# determina se la quest è completata
def completed?
stage > @tasks.size
end
# determina se la missione è visibile e sbloccata
def unlocked?
stage > 0
end
# determina se la quest è attiva
def active?
unlocked? and !completed?
end
# @return [Quest_Task]
def current_task
@tasks[stage - 1]
end
# @param [Quest] other
def <=>(other)
return -1 if other.completed? and active?
return 1 if other.active? and completed?
self.name <=> other.name
end
def to_s
sprintf('%s: Var %d, Stato: %d', @name, @variable_id, stage)
end
# @return [Reward, nil]
def exp_reward
@rewards.select { |r| r.exp? }.first
end
# @return [Reward, nil]
def gold_reward
@rewards.select { |r| r.gold? }.first
end
end
class Reward
# @return [Integer]
attr_reader :quantity
# @return [String]
attr_reader :text
def initialize(reward_str)
@type = nil
@text = ''
@quantity = 0
process_string reward_str
end
def process_string(reward_str)
case reward_str
when /^(\d+)g$/
@type = :gold
@quantity = $1.to_i
when /^(item|weapon|armor)(\d+)x(\d+)$/
@type = $1.to_sym # :weapon :item :armor
@item_id = $2.to_i
@quantity = $3.to_i
when /^(\d+)xp$/
@type = :exp
@quantity = $1.to_i
else
@type = :string
@text = reward_str
end
end
# restituisce l'oggetto della ricompensa
# @return [RPG::Item, RPG::Armor, RPG::Weapon, nil]
def item
return nil unless [:item, :weapon, :armor].include? @type
case @type
when :item
$data_items[@item_id]
when :armor
$data_armors[@item_id]
when :weapon
$data_weapons[@item_id]
else
nil
end
end
def exp?
@type == :exp
end
def gold?
@type == :gold
end
def item?
[:item, :weapon, :armor].include? @type
end
def generic?
@type == :string
end
end
# rappresenta l'obiettivo della missione corrente
class Quest_Task
# @return [String] il nome della task
attr_reader :name
attr_reader :type
attr_reader :required_number
attr_reader :object_id
# @return [Array<Quest_Task>] sottotask della quest
attr_reader :sub_tasks
# @param [Hash] task_data
# @param [Quest,Quest_Task] parent
def initialize(task_data, parent)
@name = task_data[:name]
@type = task_data[:type] || :normal
@object_id = task_data[:id]
@required_number = task_data[:required] || 0
@sub_tasks = (task_data[:tasks] || []).collect { |task| Quest_Task.new(task, self) }
@parent = parent
end
def variable?
@type == :variable
end
def item?
@type == :item
end
def cumulable?
variable? or item?
end
# @return [RPG::Item]
def item
return nil unless item?
$data_items[@object_id]
end
def value
case @type
when :variable
val = $game_variables[@object_id]
when :item
val = $game_party.item_number(item)
else
val = 0
end
[[0, val].max, @required_number].min
end
# @return [Float]
def rate
value.to_f / @required_number.to_f
end
def condition_met?
return subtasks_completed? if has_sub_tasks?
return false unless cumulable?
value >= @required_number
end
def subtasks_completed?
@sub_tasks.all? { |task| task.condition_met? }
end
def check_completed
@parent.advance if condition_met?
@parent.notify_map
end
def has_sub_tasks?
!@sub_tasks.empty?
end
# @param [Symbol] type (:item, :variable)
# @param [Integer] id
def handle_condition?(type, id)
return @sub_tasks.any? { |task| task.handle_condition?(type, id)} if has_sub_tasks?
@type == type and @object_id == id
end
def depth
return 0 unless has_sub_tasks?
1 + @sub_tasks.map{|t| t.depth}.max
end
end
module DataManager
class << self
alias load_normal_database_qs load_normal_database
end
def self.load_normal_database
load_normal_database_qs
$data_quests = QuestSettings::QUESTS.collect { |quest_data| Quest.new(quest_data) }
end
end
class Window_MenuCommand < Window_Command
alias add_other_commands add_original_commands
def add_original_commands
add_other_commands
add_command(Vocab.quests, :quest, true)
end
end
class Scene_Menu < Scene_MenuBase
alias create_old_command_window create_command_window
def create_command_window
create_old_command_window
@command_window.set_handler(:quest, method(:command_quest))
end
def command_quest
SceneManager.call(Scene_Quest)
end
end
# finestra della lista delle missioni sbloccate
# può mostrare quest completate o in corso
class Window_QuestList < Window_Selectable
# inizializzazione
def initialize(x, y, width, height)
super(x, y, width, height)
@rewards_window = nil
@quest_window = nil
refresh
end
# crea la lista da mostrare
def make_item_list
@data = $data_quests.select { |quest| quest.unlocked? }
end
def refresh
contents.clear
make_item_list
self.index = 0
draw_all_items
end
# @return [Quest]
def current_quest
@data[@index]
end
def item_max
@data ? @data.size : 0
end
def draw_item(index)
rect = item_rect(index)
quest = @data[index]
change_color normal_color, quest.active?
icon_index = quest.active? ? QuestSettings::QUEST_ICON : QuestSettings::COMPLETED_ICON
draw_icon(icon_index, rect.x, rect.y, quest.active?)
rect.x += 24
rect.width -= 24
draw_text(rect, quest.name)
end
# seleziona la modalità della finestra
# @param [Symbol] new_mode :active per quest attive, :completed per completate
def set_mode(new_mode)
return if @mode == new_mode
@mode = new_mode
refresh
end
def call_update_help
return unless active
return if current_quest.nil?
super
@quest_window.set_quest(current_quest) if @quest_window
@rewards_window.set_quest(current_quest) if @rewards_window
@starting_window.set_quest(current_quest) if @starting_window
end
def update_help
super
@help_window.set_text(current_quest.description)
end
def quest_window=(quest_window)
@quest_window = quest_window
call_update_help
end
def rewards_window=(rewards_window)
@rewards_window = rewards_window
call_update_help
end
def starting_window=(starting_window)
@starting_window = starting_window
call_update_help
end
end
# mostra le informazioni sulla quest
class Window_Quest < Window_Base
def initialize(x, y, width)
super(x, y, width, fitting_height(5))
end
def set_quest(new_quest)
return if @quest == new_quest
@quest = new_quest
refresh
end
# @return [Quest]
def current_quest
@quest
end
def draw_quest_name(x, y)
change_color crisis_color
draw_text(x, y, contents_width, line_height, current_quest.name, 1)
end
# @param [Integer] x
# @param [Integer] y
# @param [Quest_Task] quest_task
def draw_quest_task(x, y, quest_task, is_subtask = false)
if is_subtask
if quest_task.condition_met?
draw_icon(QuestSettings::COMPLETED_ICON, x, y, false)
change_color(normal_color, false)
else
change_color(normal_color)
end
else
if current_quest.current_task == quest_task
change_color power_up_color
draw_icon(QuestSettings::CURRENT_TASK_ICON, x, y)
else
change_color normal_color, false
end
end
width = contents_width - 24
draw_text(x + 24, y, width, line_height, quest_task.name)
if quest_task.type != :normal and !is_subtask
draw_gauge(x, y + line_height, contents_width - x, quest_task.rate, hp_gauge_color1, hp_gauge_color2)
change_color normal_color
text = sprintf('%d/%d', quest_task.value, quest_task.required_number)
draw_text(x, y + line_height, contents_width - x, line_height, text, 1)
end
quest_task.sub_tasks.each_with_index { |task, i| draw_quest_task(x + 24, y + line_height * (i + 1), task, true) }
end
def draw_quest_completed(x, y)
change_color power_up_color
draw_text(x, y, contents_width, line_height, Vocab::completed_quest, 1)
end
def refresh
contents.clear
return if current_quest.nil?
draw_quest_name(0, 0)
if current_quest.completed?
draw_quest_completed(0, line_height * 2)
else
draw_quest_task(0, line_height, current_quest.current_task)
end
end
end
class Window_QuestStart < Window_Base
def initialize(x, y, width)
super(x, y, width, fitting_height(2))
@quest = nil
refresh
end
def refresh
contents.clear
return if quest.nil?
draw_initial_location(0)
draw_initial_npc(line_height)
end
def draw_initial_location(y)
change_color system_color
draw_text(0, y, contents_width, line_height, Vocab::quest_location)
change_color normal_color
x = text_size(Vocab::quest_location + ' ').width
draw_text(x, y, contents_width - x, line_height, quest.location)
end
def draw_initial_npc(y)
change_color system_color
draw_text(0, y, contents_width, line_height, Vocab::quest_npc)
change_color normal_color
x = text_size(Vocab::quest_npc + ' ').width
draw_text(x, y, contents_width - x, line_height, quest.npc)
end
def set_quest(new_quest)
return if @quest == new_quest
@quest = new_quest
refresh
end
# @return [Quest]
def quest
return @quest
end
end
class Window_Reward < Window_Base
def initialize(x, y, width, height)
super(x, y, width, height)
@quest = nil
end
# @param [Quest] new_quest
def set_quest(new_quest)
return if @quest == new_quest
@quest = new_quest
refresh
end
def refresh
contents.clear
change_color system_color
draw_text(0, 0, contents_width, line_height, Vocab.quest_rewards)
change_color normal_color
draw_rewards(0, line_height)
end
# @return [Quest]
def quest
@quest
end
def draw_rewards(x, y)
return if @quest.nil?
w = draw_exp_reward(x, y, quest.exp_reward)
draw_gold_reward(x + w + 10, y, quest.gold_reward)
rewards = quest.rewards.select { |r| !r.exp? and !r.gold? }
rewards.each_with_index { |reward, i| draw_reward(x, y + (line_height * (i+1)), reward) }
end
# @param [Integer] x
# @param [Integer] y
# @param [Reward, nil] reward
def draw_exp_reward(x, y, reward)
return 0 if reward.nil?
draw_reward_exp(x, y, reward.quantity)
end
# @param [Integer] x
# @param [Integer] y
# @param [Reward, nil] reward
def draw_gold_reward(x, y, reward)
return 0 if reward.nil?
draw_reward_gold(x, y, reward.quantity)
end
# @param [Integer] x
# @param [Integer] y
# @param [Reward] reward
def draw_reward(x, y, reward)
return draw_reward_exp(x, y, reward.quantity) if reward.exp?
return draw_reward_gold(x, y, reward.quantity) if reward.gold?
return draw_reward_item(x, y, reward.item, reward.quantity) if reward.item?
draw_text(x, y, contents_width, line_height, reward.text)
end
def draw_reward_exp(x, y, value)
text = sprintf('%d %s', value, Vocab.exp_a)
draw_text(x, y, contents_width, line_height, text)
text_size(text).width
end
def draw_reward_gold(x, y, value)
text = sprintf('%d%s', value, Vocab.currency_unit)
draw_text(x, y, contents_width, line_height, text)
text_size(text).width
end
# @param [Integer] x
# @param [Integer] y
# @param [RPG::Item, RPG::Armor, RPG::Weapon] item
def draw_reward_item(x, y, item, quantity)
draw_item_name(item, x, y, true, contents_width)
text = sprintf('x%d', quantity)
draw_text(x, y, contents_width, line_height, text, 2)
end
end
class Window_QuestTasks < Window_Selectable
def initialize(x, y, width, height)
super(x, y, width, height)
@quest = nil
refresh
end
def set_quest(new_quest)
return if @quest == new_quest
@quest = new_quest
refresh
end
# @return [Quest]
def current_quest
@quest
end
def refresh
contents.clear
return if @quest.nil?
draw_quest_name
draw_tasks
end
def draw_quest_name
change_color crisis_color
draw_text(0, 0, contents_width, line_height, current_quest.name, 1)
end
def draw_tasks
y = line_height
current_quest.unlocked_tasks.each do |task|
y += draw_task(0, y, task)
end
end
# @param [Integer] y
# @param [Quest_Task] task
def draw_task(x, y, task, is_sub_task = false, sub_task_completed = false)
if is_sub_task
draw_sub_task_name(x, y, task, sub_task_completed)
else
draw_task_name(x, y, task)
end
bar_x = contents_width - 150
draw_task_state(bar_x, y, contents_width - bar_x, task)
final_y = line_height
task.sub_tasks.each { |sub_task| final_y += draw_task(x + 24, y + final_y, sub_task, true, current_quest.current_task != task) }
final_y
end
def draw_task_name(x, y, task)
if current_quest.current_task == task
change_color normal_color
draw_icon(QuestSettings::CURRENT_TASK_ICON, x, y)
else
change_color power_up_color, false
end
draw_text(24 + x, y, contents_width - 24 - x, line_height, task.name)
end
# @param [Integer] x
# @param [Integer] y
# @param [Quest_Task] task
# @param [Boolean] completed
def draw_sub_task_name(x, y, task, completed)
if task.condition_met? || completed
draw_icon(QuestSettings::COMPLETED_ICON, x, y)
change_color power_up_color, false
else
change_color normal_color
end
draw_text(24 + x, y, contents_width - 24 - x, line_height, task.name)
end
# @param [Integer] x
# @param [Integer] y
# @param [Quest_Task] task
def draw_task_state(x, y, width, task)
return if task.type == :normal # se non ha cose da raccogliere non far nulla
draw_gauge(x, y, width, task.rate, power_up_color, power_down_color)
text = sprintf('%d/%d', task.value, task.required_number)
draw_text(x, y, width, line_height, text, 2)
end
end
class Scene_Quest < Scene_MenuBase
def first_column_width
Graphics.width / 2
end
def create_quest_list_window
width = first_column_width
y = @help_window.height
@quest_list_window = Window_QuestList.new(0, y, width, Graphics.height - y)
@quest_list_window.set_handler(:cancel, method(:return_scene))
@quest_list_window.set_handler(:ok, method(:show_tasks))
@quest_list_window.help_window = @help_window
@quest_list_window.activate
end
def create_quest_info_window
x = first_column_width
y = @help_window.height
width = Graphics.width - x
@quest_info_window = Window_Quest.new(x, y, width)
@quest_list_window.quest_window = @quest_info_window
end
def create_quest_reward_window
x = first_column_width
y = @start_window.y + @start_window.height
width = Graphics.width - x
height = Graphics.height - y
@quest_rewards_window = Window_Reward.new(x, y, width, height)
@quest_list_window.rewards_window = @quest_rewards_window
end
def create_quest_start_window
x = first_column_width
y = @quest_info_window.y + @quest_info_window.height
width = Graphics.width - x
@start_window = Window_QuestStart.new(x, y, width)
@quest_list_window.starting_window = @start_window
end
def show_tasks
@quest_list_window.visible = false
@quest_info_window.visible = false
@quest_rewards_window.visible = false
@start_window.visible = false
@quest_tasks_window.visible = true
@quest_tasks_window.set_quest @quest_list_window.current_quest
@quest_tasks_window.activate
end
def show_quests
@quest_list_window.visible = true
@quest_info_window.visible = true
@quest_rewards_window.visible = true
@start_window.visible = true
@quest_tasks_window.visible = false
@quest_list_window.activate
end
def create_quest_tasks_window
y = @help_window.height
height = Graphics.height - y
width = Graphics.width
@quest_tasks_window = Window_QuestTasks.new(0, y, width, height)
@quest_tasks_window.visible = false
@quest_tasks_window.set_handler(:cancel, method(:show_quests))
end
def start
super
create_help_window
create_quest_list_window
create_quest_info_window
create_quest_start_window
create_quest_reward_window
create_quest_tasks_window
end
end
class Game_System
# ottiene l'elenco delle missioni attive
# @return [Array<Quest>]
def active_quests
$data_quests.select { |quest| quest.active? }
end
def active_quest_variables
active_quests.map { |quest| quest.variable_id }
end
# @param [Integer] quest_id
# @return [Quest]
def quest_from_id(quest_id)
$data_quests.select{ |quest| quest.id == quest_id }.first
end
def handle_quest_update(variable_id)
quest = quest_from_id(variable_id)
return unless quest.active?
#quest.current_task.check_completed
$game_map.add_popup_stack variable_id
end
def handle_task_update(type, id)
active_quests.
map { |quest| quest.current_task }.
select { |task| task.handle_condition?(type, id) }.
each { |task| task.check_completed }
end
end
class Game_Party
alias gain_normal_item gain_item unless $@
# @param [RPG::BaseItem] item
# @param [Integer] amount
# @param [FalseClass,TrueClass] include_equip
def gain_item(item, amount, include_equip = false)
gain_normal_item(item, amount, include_equip)
return if item.nil?
$game_system.handle_task_update(:item, item.id)
end
end
class Game_Variables
alias old_variable_change []= unless $@
def []=(variable_id, value)
old_value = self[variable_id]
old_variable_change(variable_id, value)
return if old_value == value
$game_system.handle_task_update :variable, variable_id
return unless $game_system.active_quest_variables.include?(variable_id)
$game_system.handle_quest_update variable_id
end
end
class Game_Interpreter
def call_quest
SceneManager.call(Scene_Quest)
end
end
class Window_QuestPopup < Window_Base
def initialize(x, y)
super(x, y, window_width, window_height)
refresh
end
# @return [Quest]
def current_quest
@quest
end
def window_height
return 0 if current_quest.nil?
fitting_height(2 + current_quest.current_task.sub_tasks.size)
end
def window_width
return 0 if current_quest.nil?
spacing = 24 * current_quest.current_task.depth + padding * 2
all_text.map { |text| text_size(text).width }.max + spacing
end
# @return [Array<String>]
def all_text
text = []
return text if current_quest.nil?
text.push current_quest.name
text.push current_quest.current_task
text += current_quest.current_task.sub_tasks.map { |task| task.name }
text
end
# @param [Quest, nil] new_quest
def set_quest(new_quest)
return if @quest == new_quest
@quest = new_quest
@current_task = new_quest.nil? ? nil : new_quest.current_task
refresh
end
def hide
smooth_move(Graphics.width, self.height)
end
def show
smooth_move(Graphics.width - self.width, self.height)
end
def refresh
if current_quest.nil?
hide
return
else
self.width = window_width
self.height = window_height
create_contents
show
end
current_quest.force_update_popup = false
@current_task = current_quest.current_task
contents.fill_rect(0, line_height, contents_width, 1, normal_color)
draw_quest_title 0
draw_quest_task current_quest.current_task, 1
end
def update
super
return if current_quest.nil?
#return refresh if current_quest.current_task != @current_task
refresh if current_quest.force_update_popup
end
def draw_quest_title(line)
y = line_height * line
change_color system_color
draw_text 0, y, width, line_height, current_quest.name
end
# @param [Integer] x
# @param [Integer] line
# @param [Integer] width
# @param [Quest_Task] task
def draw_quest_task(task, line, x = 0, width = contents_width)
y = line_height * line
change_color normal_color
if task.cumulable?
draw_gauge(x, y, width, task.rate, hp_gauge_color1, hp_gauge_color2)
end
draw_text x, y, width, line_height, task.name
task.sub_tasks.each_with_index{|t, i| draw_quest_task(t, line + i + 1, x + 24, width - 24)}
end
def draw_quest_updated(line)
y = line_height * line
change_color power_up_color
draw_icon 189, 0, y
draw_text 24, y, width, line_height, Vocab.quest_updated
end
end
class Game_Map
# @return [Array]
def quest_popup_stack
@quest_popup_stack ||= []
end
def quest_popup
@quest_popup ||= nil
end
def add_popup_stack(quest_id)
return if handle_popup_mission_update quest_id
return if @quest_popup_stack.select { |x| x[:id] == quest_id}.any?
@quest_popup_stack.push({id: quest_id, life: QuestSettings::POPUP_LIFE})
end
def handle_popup_mission_update(quest_id)
return if @quest_popup.nil?
return if @quest_popup[:id] != quest_id
@quest_popup[:life] = QuestSettings::POPUP_LIFE
true
end
# aggiorna i dati dei popup. Viene chiamato ad
# ogni frame da Scene_Map.
def update_quest_popup_system
update_quest_popup
update_quest_stack
end
def update_quest_popup
return if @quest_popup.nil?
@quest_popup[:life] -= 1
return if @quest_popup[:life] > 0
@quest_popup = nil
end
def update_quest_stack
return if @quest_popup != nil
return if quest_popup_stack.empty?
@quest_popup = quest_popup_stack.shift
Sound.play_quest_updated
end
end
class Scene_Map < Scene_Base
alias start_without_quest_popups start unless $@
alias update_without_quest_popups update unless $@
alias terminate_without_quest_popups terminate unless $@
def create_quest_popup_window
@quest_popup_window = Window_QuestPopup.new(0, 0)
@quest_popup_window.x = Graphics.width
@quest_popup_window.y = Graphics.height / 2
end
def update_quest_popup_window
$game_map.update_quest_popup_system
map_data = $game_map.quest_popup
if map_data.nil?
@quest_popup_window.set_quest nil
else
quest = $game_system.quest_from_id map_data[:id]
@quest_popup_window.set_quest quest
end
@quest_popup_window.update
end
def dispose_quest_popup_window
@quest_popup_window.dispose
end
def start
start_without_quest_popups
create_quest_popup_window
end
def update
update_without_quest_popups
update_quest_popup_window
end
def terminate
terminate_without_quest_popups
dispose_quest_popup_window
end
end