From 12491aca64296cfe16751b9de6bb3a3d79de2655 Mon Sep 17 00:00:00 2001 From: DepressedTWM Date: Sun, 24 May 2026 00:29:15 +0400 Subject: [PATCH] Codebase cleanup --- scripts/CMakeLists.txt | 2 - scripts/Window_Skill.rb | 83 ----------------------------------- scripts/Window_SkillStatus.rb | 28 ------------ scripts/_scripts.txt | 2 - 4 files changed, 115 deletions(-) delete mode 100644 scripts/Window_Skill.rb delete mode 100644 scripts/Window_SkillStatus.rb diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index b72f4a9..0eedb29 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -101,8 +101,6 @@ set(scripts Window_ShopNumber.rb Window_ShopSell.rb Window_ShopStatus.rb - Window_Skill.rb - Window_SkillStatus.rb Window_Status.rb Window_Steps.rb Window_Target.rb diff --git a/scripts/Window_Skill.rb b/scripts/Window_Skill.rb deleted file mode 100644 index 0deb3d1..0000000 --- a/scripts/Window_Skill.rb +++ /dev/null @@ -1,83 +0,0 @@ -#============================================================================== -# ** Window_Skill -#------------------------------------------------------------------------------ -# This window displays usable skills on the skill and battle screens. -#============================================================================== - -class Window_Skill < Window_Selectable - #-------------------------------------------------------------------------- - # * Object Initialization - # actor : actor - #-------------------------------------------------------------------------- - def initialize(actor) - super(0, 128, 640, 352) - @actor = actor - @column_max = 2 - refresh - self.index = 0 - # If in battle, move window to center of screen - # and make it semi-transparent - if $game_temp.in_battle - self.y = 64 - self.height = 256 - self.back_opacity = 160 - end - end - #-------------------------------------------------------------------------- - # * Acquiring Skill - #-------------------------------------------------------------------------- - def skill - return @data[self.index] - end - #-------------------------------------------------------------------------- - # * Refresh - #-------------------------------------------------------------------------- - def refresh - if self.contents != nil - self.contents.dispose - self.contents = nil - end - @data = [] - for i in 0...@actor.skills.size - skill = $data_skills[@actor.skills[i]] - if skill != nil - @data.push(skill) - end - end - # If item count is not 0, make a bit map and draw all items - @item_max = @data.size - if @item_max > 0 - self.contents = Bitmap.new(width - 32, row_max * 32) - for i in 0...@item_max - draw_item(i) - end - end - end - #-------------------------------------------------------------------------- - # * Draw Item - # index : item number - #-------------------------------------------------------------------------- - def draw_item(index) - skill = @data[index] - if @actor.skill_can_use?(skill.id) - self.contents.font.color = normal_color - else - self.contents.font.color = disabled_color - end - x = 4 + index % 2 * (288 + 32) - y = index / 2 * 32 - rect = Rect.new(x, y, self.width / @column_max - 32, 32) - self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) - bitmap = RPG::Cache.icon(skill.icon_name) - opacity = self.contents.font.color == normal_color ? 255 : 128 - self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity) - self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0) - self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2) - end - #-------------------------------------------------------------------------- - # * Help Text Update - #-------------------------------------------------------------------------- - def update_help - @help_window.set_text(self.skill == nil ? "" : self.skill.description) - end -end diff --git a/scripts/Window_SkillStatus.rb b/scripts/Window_SkillStatus.rb deleted file mode 100644 index 5545c12..0000000 --- a/scripts/Window_SkillStatus.rb +++ /dev/null @@ -1,28 +0,0 @@ -#============================================================================== -# ** Window_SkillStatus -#------------------------------------------------------------------------------ -# This window displays the skill user's status on the skill screen. -#============================================================================== - -class Window_SkillStatus < Window_Base - #-------------------------------------------------------------------------- - # * Object Initialization - # actor : actor - #-------------------------------------------------------------------------- - def initialize(actor) - super(0, 64, 640, 64) - self.contents = Bitmap.new(width - 32, height - 32) - @actor = actor - refresh - end - #-------------------------------------------------------------------------- - # * Refresh - #-------------------------------------------------------------------------- - def refresh - self.contents.clear - draw_actor_name(@actor, 4, 0) - draw_actor_state(@actor, 140, 0) - draw_actor_hp(@actor, 284, 0) - draw_actor_sp(@actor, 460, 0) - end -end diff --git a/scripts/_scripts.txt b/scripts/_scripts.txt index d534789..fba22c5 100644 --- a/scripts/_scripts.txt +++ b/scripts/_scripts.txt @@ -48,8 +48,6 @@ Window_PlayTime Window_Steps Window_MenuStatus Window_Item -Window_Skill -Window_SkillStatus Window_Target Window_EquipLeft Window_EquipRight