This commit is contained in:
DepressedTWM 2026-06-24 14:56:36 +04:00
parent ce8aa399e8
commit 573c2ac14f
8 changed files with 110 additions and 61 deletions

View file

@ -32,7 +32,6 @@ class Credits_Message
# Animation flags
@fade_in = false
@fade_out = false
RPG::Mod.exec_hooks("hooks/Credits_Message/init", binding)
end
#--------------------------------------------------------------------------
# * Dispose

View file

@ -9,14 +9,21 @@ module Settings
# Video
:fullscreen => false,
:colorblind => false,
:graphics_lvl => 2,
# UI
:in_game_timer => false,
:language => 0,
:fasttravel_ui => 0,
:debug_text_scene_title => true,
# Gameplay
:movement => 0,
:skip_text => false,
:en_purple_messagebox => true,
:enforce_april_fools => false,
:true_memory_mode => false,
:pre_solstice_update_content => false,
# Advanced
:frameskip => false,
@ -24,6 +31,8 @@ module Settings
# Debug
:debug => false,
:debug_character => false,
:debug_text => false,
}
end
end
@ -59,6 +68,12 @@ class Window_Settings
:name => tr('Colorblind mode'),
:parameter => :colorblind
},
{
:type => :enum,
:name => tr('Graphics Level(WIP)'),
:parameter => :graphics_lvl,
:values => [tr("Low"), tr("Normal"), tr("High")]
},
],
tr("UI") => [
{
@ -72,6 +87,17 @@ class Window_Settings
:parameter => :language,
:values => Language::LANGUAGES
},
{
:type => :enum,
:name => tr('FastTravel UI'),
:parameter => :fasttravel_ui,
:values => [tr("Original"), tr("WME")]
},
{
:type => :bool,
:name => tr('Draw debug text in main menu(RR)'),
:parameter => :debug_text_scene_title
},
],
tr("Gameplay") => [
{
@ -85,6 +111,26 @@ class Window_Settings
:name => tr('Skip Text (R)'),
:parameter => :skip_text
},
{
:type => :bool,
:name => tr('Purple message box for Entity(WIP)'),
:parameter => :en_purple_messagebox
},
{
:type => :bool,
:name => tr('Enforce april fools(WIP)'),
:parameter => :enforce_april_fools
},
{
:type => :bool,
:name => tr('True Memory Mode(WIP)'),
:parameter => :true_memory_mode
},
{
:type => :bool,
:name => tr('Enable Pre-Solstice update content(WIP)'),
:parameter => :pre_solstice_update_content
},
],
tr("Controls") => [
{
@ -111,6 +157,16 @@ class Window_Settings
:name => tr('Debug mode(!)'),
:parameter => :debug
},
{
:type => :bool,
:name => tr('Show debug character'),
:parameter => :debug_character
},
{
:type => :bool,
:name => tr('Show debug text'),
:parameter => :debug_text
},
],
}
end
end

View file

@ -49,4 +49,4 @@ module Settings
end
end
end
end
end

View file

@ -5,11 +5,8 @@ class FastTravel
ITEM_SPACING = 28
ACTIVE_MARGIN = MARGIN * 2 + 20
attr_accessor :legacy_ui
def initialize
@legacy_ui = false
@scale_multiplier = Graphics.height > 600 ? 3.0 : 2.0
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@ -100,7 +97,7 @@ class FastTravel
#WME
def update_location_name_text
if ZONES[$game_fasttravel.zone].locations == nil || ZONES[$game_fasttravel.zone].maps[@selected_location] == nil || @legacy_ui
if ZONES[$game_fasttravel.zone].locations == nil || ZONES[$game_fasttravel.zone].maps[@selected_location] == nil || Settings[:fasttravel_ui] == "Original"
return
end
@location_name_text.bitmap.clear
@ -162,7 +159,7 @@ class FastTravel
self.opacity = 0
#WME
if !@legacy_ui
if !Settings[:fasttravel_ui] == "Original"
@niko_icon.opacity = @location_name_text.opacity =
@arrow_top.opacity = @arrow_bottom.opacity =
@arrow_left.opacity = @arrow_right.opacity = 0
@ -188,7 +185,7 @@ class FastTravel
# Create menu options
@data.each_with_index do |item, i|
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
#WME
spr = Sprite.new(@viewport)
spr.bitmap = RPG::Cache.load_bitmap("Graphics/Menus/Minimap/", "#{$game_fasttravel.zone}_#{item}")
@ -211,7 +208,7 @@ class FastTravel
end
end
if @legacy_ui
if Settings[:fasttravel_ui] == "Original"
return
end
@ -231,7 +228,7 @@ class FastTravel
def update
zone = ZONES[$game_fasttravel.zone]
zone = zone == nil ? Zone.new("", {}, {}) : zone
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
@arrows_timer += 1
if @arrows_timer >= 30
@arrows_timer = 0
@ -242,7 +239,7 @@ class FastTravel
if @fade_in
self.opacity += 20
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
#WME
@niko_icon.opacity += 20
@location_name_text.opacity += 20
@ -261,7 +258,7 @@ class FastTravel
active_spr = spr if !active_spr && spr.x < MARGIN * 2
end
#WME
if !@legacy_ui
if !Settings[:fasttravel_ui] == "Original"
@data_locations.each do |name, spr|
spr.opacity += 20
spr.opacity = 255 if spr.opacity > 255
@ -280,7 +277,7 @@ class FastTravel
if @fade_out
self.opacity -= 20
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
#WME
@niko_icon.opacity -= 20
@location_name_text.opacity -= 20
@ -297,7 +294,7 @@ class FastTravel
end
#WME
if !@legacy_ui
if !Settings[:fasttravel_ui] == "Original"
@data_locations.each do |name, spr|
spr.opacity -= 20
end
@ -312,7 +309,7 @@ class FastTravel
end
#WME
if !@legacy_ui
if !Settings[:fasttravel_ui] == "Original"
@data_locations.each do |name, spr|
spr.dispose
end
@ -340,7 +337,7 @@ class FastTravel
return if !self.visible
#WME noik
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
@niko_target_pos_x = (zone.locations[@selected_location].x.to_f + zone.locations[@selected_location].niko_x.to_f)
@niko_target_pos_y = (zone.locations[@selected_location].y.to_f + zone.locations[@selected_location].niko_y.to_f)
@ -362,7 +359,7 @@ class FastTravel
@arrow_bottom.opacity += @data.include?(location.next_bottom) ? 40 : -40
@arrow_left.opacity += @data.include?(location.next_left) ? 40 : -40
@arrow_right.opacity += @data.include?(location.next_right) ? 40 : -40
elsif !@legacy_ui
elsif !Settings[:fasttravel_ui] == "Original"
@niko_icon.opacity =
@arrow_top.opacity = @arrow_bottom.opacity =
@arrow_left.opacity = @arrow_right.opacity = 0
@ -386,7 +383,7 @@ class FastTravel
end
end
if !@legacy_ui
if !Settings[:fasttravel_ui] == "Original"
#WME
@data_locations.each do |name, spr|
set_color(name)
@ -394,7 +391,7 @@ class FastTravel
end
if Input.trigger?(Input::UP)
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
next_location = zone.locations[@selected_location].next_top
if @data_locations.has_key?(next_location)
@selected_location = next_location
@ -407,7 +404,7 @@ class FastTravel
end
end
if Input.trigger?(Input::DOWN)
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
next_location = zone.locations[@selected_location].next_bottom
if @data_locations.has_key?(next_location)
@selected_location = next_location
@ -421,7 +418,7 @@ class FastTravel
end
if Input.trigger?(Input::LEFT)
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
next_location = zone.locations[@selected_location].next_left
if @data_locations.has_key?(next_location)
@selected_location = next_location
@ -431,7 +428,7 @@ class FastTravel
end
end
if Input.trigger?(Input::RIGHT)
if zone.locations != nil && !@legacy_ui
if zone.locations != nil && !Settings[:fasttravel_ui] == "Original"
next_location = zone.locations[@selected_location].next_right
if @data_locations.has_key?(next_location)
@selected_location = next_location
@ -444,7 +441,7 @@ class FastTravel
if Input.trigger?(Input::ACTION)
$game_system.se_play($data_system.decision_se)
choice = $game_fasttravel.unlocked_maps[@selected_location]
if zone.locations == nil || @legacy_ui
if zone.locations == nil || Settings[:fasttravel_ui] == "Original"
choice = $game_fasttravel.unlocked_maps[@data[@index]]
end
if choice.id != $game_map.map_id

View file

@ -77,34 +77,34 @@ class Scene_Title
@menu.bitmap.draw_text(MENU_X, MENU_Y, 150, 24, tr("Start"))
@menu.bitmap.draw_text(MENU_X, MENU_Y + 25, 150, 24, tr("Settings"))
@menu.bitmap.draw_text(MENU_X, MENU_Y + 50, 150, 24, tr("Exit"))
#Debug info like in minecraft Forge :P
@debug = Sprite.new
@debug.z += @menu.z
@debug.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@debug.bitmap.draw_text(5, 5, 200, 20, tr("Ruby #{RUBY_VERSION}"))
@debug.bitmap.draw_text(5, 25, 200, 20, tr("SDL #{SDLVer}"))
@debug.bitmap.draw_text(5, 45, 200, 20, tr("Sunshine #{SunshineVer}"))
@debug.bitmap.draw_text(5, 65, 200, 20, tr("sec_#{Sunshine::SECURITYSTATE}"))
if defined?(RubyVM::YJIT)
if RubyVM::YJIT.enabled?
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: YJIT"))
end
elsif defined?(RubyVM::ZJIT)
if RubyVM::ZJIT.enabled?
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: ZJIT"))
end
elsif defined?(RubyVM::RJIT)
if RubyVM::RJIT.enabled?
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: RJIT"))
end
else
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: unsupported"))
end
if ModLoader::IS_ENABLED
@debug.bitmap.draw_text(5, 65, 200, 20, tr("Mods loaded: #{ModLoader::COUNT}"))
end
if Settings[:debug_text_scene_title]
@debug = Sprite.new
@debug.z += @menu.z
@debug.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@debug.bitmap.draw_text(5, 5, 200, 20, tr("Ruby #{RUBY_VERSION}"))
@debug.bitmap.draw_text(5, 25, 200, 20, tr("SDL #{SDLVer}"))
@debug.bitmap.draw_text(5, 45, 200, 20, tr("Sunshine #{SunshineVer}"))
@debug.bitmap.draw_text(5, 65, 200, 20, tr("sec_#{Sunshine::SECURITYSTATE}"))
if defined?(RubyVM::YJIT)
if RubyVM::YJIT.enabled?
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: YJIT"))
end
elsif defined?(RubyVM::ZJIT)
if RubyVM::ZJIT.enabled?
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: ZJIT"))
end
elsif defined?(RubyVM::RJIT)
if RubyVM::RJIT.enabled?
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: RJIT"))
end
else
@debug.bitmap.draw_text(5, 85, 200, 20, tr("JIT: unsupported"))
end
if ModLoader::IS_ENABLED
@debug.bitmap.draw_text(5, 65, 200, 20, tr("Mods loaded: #{ModLoader::COUNT}"))
end
end
if $game_switches[160] && $game_switches[152]
@menu.bitmap.draw_text(MENU_X, MENU_Y + 75, 150, 24, tr("..."))
end

View file

@ -153,12 +153,10 @@ module Script
end
def self.countdown_extend_over
equinox = 0 #Time.new(2017, 03, 27)
diff = equinox - 0 #Time.now
if(diff <= 0)
return true
if(Settings[:pre_solstice_update_content])
return false
end
return false
return true
end
def self.cdown_update(equinox)

View file

@ -73,7 +73,7 @@ class Sprite_Character
self.oy = 32
# If tile ID value is invalid
else
name = @character.character_name == "" && Settings[:debug] ? "debug" : @character.character_name
name = @character.character_name == "" && Settings[:debug_character] ? "debug" : @character.character_name
translation_name = "#{$persistent.langcode}/#{name}"
if File.exist?("Graphics/Characters/#{translation_name}.png")
@sprite.bitmap = RPG::Cache.character(translation_name,

View file

@ -395,7 +395,7 @@ class Window_Message < Window_Selectable
else
if @blip >= BLIP_TIME
#april fools
if $game_temp.message_face != nil && CTime.month == 4 && CTime.day == 1 && $game_temp.message_face.start_with?("niko")
if ($game_temp.message_face != nil && CTime.month == 4 && CTime.day == 1) or Settings[:enforce_april_fools] && $game_temp.message_face.start_with?("niko")
niko_sounds = [ "cat_2"]
@blipsound = niko_sounds[rand(niko_sounds.length)]
Audio.se_play("Audio/SE/#{@blipsound}.wav", 50, rand(100..125)) unless @text.empty?
@ -430,8 +430,7 @@ class Window_Message < Window_Selectable
# Confirm
if Input.trigger?(Input::ACTION)
$game_system.se_play($data_system.decision_se)
$game_variables[$game_temp.num_input_variable_id] =
@input_number_window.number
$game_variables[$game_temp.num_input_variable_id] = @input_number_window.number
$game_map.need_refresh = true
# Dispose of number input window
@input_number_window.dispose