From 45d4f10828b2d81f42d56308be78c77e033ff70f Mon Sep 17 00:00:00 2001 From: Issac332 <119879937+Issac8658@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:28:17 +0300 Subject: [PATCH] glen and light update fix --- binding-mri/module_rpg1.rb | 2 +- scripts/Data_Settings.rb | 6 ++++++ scripts/Data_Settings_Classes.rb | 1 + scripts/Game_Picture.rb | 6 ++++++ scripts/Interpreter_7.rb | 12 ++++++++---- scripts/Main.rb | 8 +++++++- scripts/Particles.rb | 2 +- scripts/Scene_Map.rb | 1 - scripts/Sprite_Picture.rb | 3 +++ 9 files changed, 33 insertions(+), 8 deletions(-) diff --git a/binding-mri/module_rpg1.rb b/binding-mri/module_rpg1.rb index b948f15..88c6f74 100644 --- a/binding-mri/module_rpg1.rb +++ b/binding-mri/module_rpg1.rb @@ -118,7 +118,7 @@ module RPG end def self.clear @cache = {} - GC.start + __send__(:gc) if respond_to?(:gc, true) end end diff --git a/scripts/Data_Settings.rb b/scripts/Data_Settings.rb index 9f3d566..493908a 100644 --- a/scripts/Data_Settings.rb +++ b/scripts/Data_Settings.rb @@ -363,6 +363,12 @@ class Window_Settings :parameter => :controls_debug, :bind => Input::DEBUGACTION }, + { :type => :sep }, + { + :type => :action, + :name => tr("Clear image cache"), + :action => Proc.new { RPG::Cache.clear } + } ], } end diff --git a/scripts/Data_Settings_Classes.rb b/scripts/Data_Settings_Classes.rb index 6a4ff7c..820b8f4 100644 --- a/scripts/Data_Settings_Classes.rb +++ b/scripts/Data_Settings_Classes.rb @@ -760,6 +760,7 @@ class Window_Settings @func.call(@arg1, @arg2, @arg3, @arg4) end @settings_content.redraw_all + $game_system.se_play($data_system.buzzer_se) end end end \ No newline at end of file diff --git a/scripts/Game_Picture.rb b/scripts/Game_Picture.rb index e1231f1..aa74cab 100644 --- a/scripts/Game_Picture.rb +++ b/scripts/Game_Picture.rb @@ -20,6 +20,9 @@ class Game_Picture attr_reader :blend_type # blend method attr_reader :tone # color tone attr_reader :angle # rotation angle + + attr_accessor :width + attr_accessor :height #-------------------------------------------------------------------------- # * Object Initialization # number : picture number @@ -45,6 +48,9 @@ class Game_Picture @tone_duration = 0 @angle = 0 @rotate_speed = 0 + + @width = 0 + @height = 0 RPG::Mod.exec_hooks("hooks/Game_Picture/init", binding) end #-------------------------------------------------------------------------- diff --git a/scripts/Interpreter_7.rb b/scripts/Interpreter_7.rb index 50d8cb6..fe09663 100644 --- a/scripts/Interpreter_7.rb +++ b/scripts/Interpreter_7.rb @@ -273,12 +273,16 @@ class Interpreter formated_script << "%3d | %s\n" % [index, line.chomp] end end - result = "[EVENT] Failed to execute event script | " + event_info - result << "\n-----------------------------------------\n" + result = "\n[EVENT] Failed to execute event script | " + event_info + result << "\n------------------------------------------\n" result << formated_script - result << "-----------------------------------------\n" + result << "------------------------------------------\n" result << e.message - result << "\n-----------------------------------------\n" + result << "\n----------------Backtrace-----------------\n" + e.backtrace.each do |line| + result << "#{line}\n" + end + result << "------------------------------------------\n" STDERR.puts result end return true diff --git a/scripts/Main.rb b/scripts/Main.rb index 138548f..04df541 100644 --- a/scripts/Main.rb +++ b/scripts/Main.rb @@ -9,10 +9,16 @@ # save unless $game_switches[99] || ($game_system.map_interpreter.running? || !$scene.is_a?(Scene_Map)) #end +class Float + def to_f + return self + end +end + begin RPG::Mod.exec_hooks("hooks/Main/start", binding) $console = Graphics.fullscreen - Graphics.frame_rate = 60 + Graphics.frame_rate = 60 Font.default_size = 20 #debug shit Input.set_led(255, 150, 30) diff --git a/scripts/Particles.rb b/scripts/Particles.rb index e3c5fb1..a42a816 100644 --- a/scripts/Particles.rb +++ b/scripts/Particles.rb @@ -79,7 +79,7 @@ class Particle_Firefly < Particle @wavelength = rand(120..240) @vx = rand(0.2..1.5) * (rand(2) * 2 - 1) @vy = rand(0.2..1.5) * (rand(2) * 2 - 1) - @light_power = 0.5 + @light_power = 1.0 self.light_scale = 0.2 self.scale = rand(0.02..0.08) @sprite.blend_type = 1 diff --git a/scripts/Scene_Map.rb b/scripts/Scene_Map.rb index 316caee..7184140 100644 --- a/scripts/Scene_Map.rb +++ b/scripts/Scene_Map.rb @@ -259,7 +259,6 @@ class Scene_Map $game_temp.transition_processing = false # Execute transition if $game_temp.transition_name == "" - update Graphics.transition(20) elsif $game_temp.transition_name == "black" @blackfade.visible = true diff --git a/scripts/Sprite_Picture.rb b/scripts/Sprite_Picture.rb index 9c47041..85fc886 100644 --- a/scripts/Sprite_Picture.rb +++ b/scripts/Sprite_Picture.rb @@ -80,5 +80,8 @@ class Sprite_Picture < Sprite # Set rotation angle and color tone self.angle = @picture.angle self.tone = @picture.tone + + @picture.width = self.width * self.zoom_x + @picture.height = self.height * self.zoom_y end end