Game_Quest = Struct.new(:name, :j, :d1, :d2, :cc, :r, :s)
class Scene_Job
def initailize(*quests)
@quests = quests
@description_window = Window_Desc.new(@quests[0])
# etc, etc...
end
end
class Window_Desc < Window_Base
attr_reader :quest
def initialize(quest)
@quest = quest
# etc, etc...
end
def quest=(quest)
@quest = quest
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(120, 0, 300, 32, @quest.j )
self.contents.font.color = normal_color
self.contents.draw_text(0, 64, 320, 32, "Description: " + @quest.d1)
self.contents.draw_text(0, 96, 320, 32, @quest.d2)
self.contents.draw_text(0, 128, 300, 32, "Condition: " + @quest.cc)
self.contents.draw_text(0, 160, 300, 32, "Reward: " + @quest.r)
# This line is unneeded, it is simply setting it to itself, since the script call sets it this value to $stat, whatever that may be...
# $stat = $game_variables[0001].to_s()
case $game_variables[1]
when 0
self.contents.font.color = normal_color
@quest.s = " Available"
when 1
self.contents.font.color = Color.new(255,255,0)
@quest.s = " In-Progress"
else
self.contents.font.color = Color.new(0,255,0)
@quest.s = " Complete"
end
self.contents.draw_text(0, 192, 300, 32, "Status:" + @quest.s )
end
end