2015-11-17 20:35:51 +00:00
|
|
|
class Game_Oneshot
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
# * Public Instance Variables
|
|
|
|
#--------------------------------------------------------------------------
|
|
|
|
attr_accessor :player_name # map music (for battle memory)
|
2015-11-27 07:19:31 +00:00
|
|
|
attr_accessor :plight_timer # start of plight's plight
|
2015-11-17 20:35:51 +00:00
|
|
|
|
|
|
|
def initialize
|
|
|
|
user_name = Oneshot::USER_NAME.split(/\s+/)
|
|
|
|
if user_name[0].casecmp('the') == 0 || user_name[0].casecmp('a') == 0
|
|
|
|
@player_name = user_name.join(' ')
|
|
|
|
else
|
|
|
|
@player_name = user_name[0]
|
|
|
|
end
|
|
|
|
@lights = {}
|
|
|
|
self.lang = Oneshot::LANG
|
2015-11-27 07:19:31 +00:00
|
|
|
@plight_timer = nil
|
2015-11-17 20:35:51 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# lang
|
|
|
|
def lang
|
|
|
|
@lang
|
|
|
|
end
|
|
|
|
def lang=(val)
|
|
|
|
@lang = val
|
|
|
|
$tr = Translator.new(val)
|
|
|
|
$language = Language.get(val)
|
|
|
|
Font.default_name = $language.font
|
|
|
|
Oneshot.set_yes_no(tr('Yes'), tr('No'))
|
|
|
|
end
|
|
|
|
|
|
|
|
# MARSHAL
|
|
|
|
def marshal_dump
|
2015-11-27 07:19:31 +00:00
|
|
|
[@player_name, @lang, @plight_timer]
|
2015-11-17 20:35:51 +00:00
|
|
|
end
|
|
|
|
def marshal_load(array)
|
2015-11-27 07:19:31 +00:00
|
|
|
@player_name, self.lang, @plight_timer = array
|
2015-11-17 20:35:51 +00:00
|
|
|
end
|
|
|
|
end
|