mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Making automash a settings option
This commit is contained in:
parent
7c580aa109
commit
3ee6bf7356
5 changed files with 36 additions and 10 deletions
|
|
@ -178,7 +178,7 @@ class Desktop_Message
|
||||||
end
|
end
|
||||||
|
|
||||||
if visible
|
if visible
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || Input.press?(Input::R)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || (Input.press?(Input::R) && $game_switches[253])
|
||||||
terminate_message
|
terminate_message
|
||||||
@fade_out = true
|
@fade_out = true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -233,7 +233,7 @@ class Doc_Message
|
||||||
end
|
end
|
||||||
|
|
||||||
if visible
|
if visible
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || Input.press?(Input::R)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || (Input.press?(Input::R) && $game_switches[253])
|
||||||
terminate_message
|
terminate_message
|
||||||
@fade_out = true
|
@fade_out = true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -181,7 +181,7 @@ class Ed_Message
|
||||||
end
|
end
|
||||||
|
|
||||||
if visible
|
if visible
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || Input.press?(Input::R)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || (Input.press?(Input::R) && $game_switches[253])
|
||||||
terminate_message
|
terminate_message
|
||||||
@fade_out_text = true
|
@fade_out_text = true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -398,7 +398,7 @@ class Window_Message < Window_Selectable
|
||||||
end
|
end
|
||||||
tick
|
tick
|
||||||
end
|
end
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || Input.press?(Input::R)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || (Input.press?(Input::R) && $game_switches[253])
|
||||||
@skip_text = true
|
@skip_text = true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
@ -434,7 +434,7 @@ class Window_Message < Window_Selectable
|
||||||
self.pause = true
|
self.pause = true
|
||||||
|
|
||||||
# Advance/Close message
|
# Advance/Close message
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || Input.press?(Input::R)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL) || (Input.press?(Input::R) && $game_switches[253])
|
||||||
if @text.length <= 0
|
if @text.length <= 0
|
||||||
terminate_message
|
terminate_message
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ class Window_Settings
|
||||||
file.puts('fullscreen=' + Graphics.fullscreen.to_s)
|
file.puts('fullscreen=' + Graphics.fullscreen.to_s)
|
||||||
file.puts('default_run=' + $game_switches[251].to_s)
|
file.puts('default_run=' + $game_switches[251].to_s)
|
||||||
file.puts('colorblind_mode=' + $game_switches[252].to_s)
|
file.puts('colorblind_mode=' + $game_switches[252].to_s)
|
||||||
|
file.puts('automash_enabled=' + $game_switches[253].to_s)
|
||||||
file.puts('frameskip=' + Graphics.frameskip.to_s)
|
file.puts('frameskip=' + Graphics.frameskip.to_s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -57,6 +58,12 @@ class Window_Settings
|
||||||
elsif vals[1] == "false"
|
elsif vals[1] == "false"
|
||||||
$game_switches[252] = false
|
$game_switches[252] = false
|
||||||
end
|
end
|
||||||
|
when "automash_enabled"
|
||||||
|
if vals[1] == "true"
|
||||||
|
$game_switches[253] = true
|
||||||
|
elsif vals[1] == "false"
|
||||||
|
$game_switches[253] = false
|
||||||
|
end
|
||||||
when "frameskip"
|
when "frameskip"
|
||||||
if vals[1] == "true"
|
if vals[1] == "true"
|
||||||
Graphics.frameskip = true
|
Graphics.frameskip = true
|
||||||
|
|
@ -119,6 +126,7 @@ class Window_Settings
|
||||||
tr('Fullscreen'),
|
tr('Fullscreen'),
|
||||||
tr('Default movement'),
|
tr('Default movement'),
|
||||||
tr('Colorblind mode'),
|
tr('Colorblind mode'),
|
||||||
|
tr('Skip Text (R)'),
|
||||||
tr('Frameskip'),
|
tr('Frameskip'),
|
||||||
tr('Language'),
|
tr('Language'),
|
||||||
tr('Configure Controls (Press F1)'),
|
tr('Configure Controls (Press F1)'),
|
||||||
|
|
@ -183,13 +191,19 @@ class Window_Settings
|
||||||
else
|
else
|
||||||
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
||||||
end
|
end
|
||||||
when 5 #frameskip
|
when 5 #automash
|
||||||
|
if($game_switches[253] == true)
|
||||||
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("ON"))
|
||||||
|
else
|
||||||
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
||||||
|
end
|
||||||
|
when 6 #frameskip
|
||||||
if(Graphics.frameskip == true)
|
if(Graphics.frameskip == true)
|
||||||
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("ON"))
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("ON"))
|
||||||
else
|
else
|
||||||
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr("OFF"))
|
||||||
end
|
end
|
||||||
when 6 # Language
|
when 7 # Language
|
||||||
l = Language::LANGUAGES[@lang_index] rescue Language::LANGUAGES[0]
|
l = Language::LANGUAGES[@lang_index] rescue Language::LANGUAGES[0]
|
||||||
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr(l))
|
spr.bitmap.draw_text(VALUE_MARGIN, 0, spr.bitmap.width, spr.bitmap.height, tr(l))
|
||||||
end
|
end
|
||||||
|
|
@ -386,7 +400,19 @@ class Window_Settings
|
||||||
redraw_setting_index(4)
|
redraw_setting_index(4)
|
||||||
end
|
end
|
||||||
|
|
||||||
when 5 #frameskip
|
when 5 #automash
|
||||||
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
|
||||||
|
|
||||||
|
$game_system.se_play($data_system.decision_se)
|
||||||
|
if $game_switches[253] == true
|
||||||
|
$game_switches[253] = false
|
||||||
|
else
|
||||||
|
$game_switches[253] = true
|
||||||
|
end
|
||||||
|
redraw_setting_index(5)
|
||||||
|
end
|
||||||
|
|
||||||
|
when 6 #frameskip
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::LEFT) || Input.trigger?(Input::RIGHT)
|
||||||
|
|
||||||
$game_system.se_play($data_system.decision_se)
|
$game_system.se_play($data_system.decision_se)
|
||||||
|
|
@ -395,10 +421,10 @@ class Window_Settings
|
||||||
else
|
else
|
||||||
Graphics.frameskip = true
|
Graphics.frameskip = true
|
||||||
end
|
end
|
||||||
redraw_setting_index(5)
|
redraw_setting_index(6)
|
||||||
end
|
end
|
||||||
|
|
||||||
when 6 #language
|
when 7 #language
|
||||||
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::RIGHT)
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::RIGHT)
|
||||||
@lang_index += 1
|
@lang_index += 1
|
||||||
if @lang_index >= Language::LANGUAGES.length
|
if @lang_index >= Language::LANGUAGES.length
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue