More or less standardised separator comments in the code

This commit is contained in:
Maruno17
2024-06-27 21:21:26 +01:00
parent 225549bfce
commit 509a414f37
198 changed files with 1907 additions and 1263 deletions

View File

@@ -1,5 +1,5 @@
#===============================================================================
# Wild encounters editor
# Wild encounters editor.
#===============================================================================
# Main editor method for editing wild encounters. Lists all defined encounter
# sets, and edits them.
@@ -340,7 +340,7 @@ def pbEncounterTypeEditor(enc_data, enc_type)
end
#===============================================================================
# Trainer type editor
# Trainer type editor.
#===============================================================================
def pbTrainerTypeEditor
properties = GameData::TrainerType.editor_properties
@@ -443,7 +443,7 @@ def pbTrainerTypeEditorNew(default_name)
end
#===============================================================================
# Individual trainer editor
# Individual trainer editor.
#===============================================================================
module TrainerBattleProperty
NUM_ITEMS = 8
@@ -599,7 +599,7 @@ def pbTrainerBattleEditor
end
#===============================================================================
# Trainer Pokémon editor
# Trainer Pokémon editor.
#===============================================================================
module TrainerPokemonProperty
def self.set(settingname, initsetting)
@@ -687,7 +687,7 @@ module TrainerPokemonProperty
end
#===============================================================================
# Metadata editor
# Metadata editor.
#===============================================================================
def pbMetadataScreen
sel_player = -1
@@ -774,7 +774,7 @@ def pbEditPlayerMetadata(player_id = 1)
end
#===============================================================================
# Map metadata editor
# Map metadata editor.
#===============================================================================
def pbMapMetadataScreen(map_id = 0)
loop do
@@ -817,7 +817,7 @@ def pbEditMapMetadata(map_id)
end
#===============================================================================
# Item editor
# Item editor.
#===============================================================================
def pbItemEditor
properties = GameData::Item.editor_properties
@@ -921,7 +921,7 @@ def pbItemEditorNew(default_name)
end
#===============================================================================
# Pokémon species editor
# Pokémon species editor.
#===============================================================================
def pbPokemonEditor
properties = GameData::Species.editor_properties
@@ -987,7 +987,7 @@ def pbPokemonEditor
end
#===============================================================================
# Regional Dexes editor
# Regional Dexes editor.
#===============================================================================
def pbRegionalDexEditor(dex)
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
@@ -1247,7 +1247,7 @@ def pbEvoFamiliesToStrings
end
#===============================================================================
# Battle animations rearranger
# Battle animations rearranger.
#===============================================================================
def pbAnimationsOrganiser
list = pbLoadBattleAnimations

View File

@@ -1,5 +1,5 @@
#===============================================================================
# Miniature game map drawing
# Miniature game map drawing.
#===============================================================================
class MapSprite
def initialize(map, viewport = nil)
@@ -134,7 +134,7 @@ class RegionMapSprite
end
#===============================================================================
# Visual Editor (map connections)
# Visual Editor (map connections).
#===============================================================================
class MapScreenScene
def getMapSprite(id)

View File

@@ -111,7 +111,7 @@ def pbMapTree
end
#===============================================================================
# List all members of a class
# List all members of a class.
#===============================================================================
def pbChooseFromGameDataList(game_data, default = nil)
if !GameData.const_defined?(game_data.to_sym)
@@ -242,7 +242,7 @@ def pbChooseBallList(defaultMoveID = nil)
end
#===============================================================================
# General list methods
# General list methods.
#===============================================================================
def pbCommands2(cmdwindow, commands, cmdIfCancel, defaultindex = -1, noresize = false)
cmdwindow.commands = commands

View File

@@ -1,8 +1,11 @@
#===============================================================================
#
#===============================================================================
module BattleAnimationEditor
module_function
#=============================================================================
# Controls
# Controls.
#=============================================================================
class Window_Menu < Window_CommandPokemon
def initialize(commands, x, y)
@@ -42,7 +45,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Clipboard
# Clipboard.
#=============================================================================
module Clipboard
@data = nil
@@ -95,7 +98,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Sprite sheet scrolling bar
# Sprite sheet scrolling bar.
#=============================================================================
class AnimationWindow < Sprite
attr_reader :animbitmap
@@ -247,7 +250,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Cel sprite
# Cel sprite.
#=============================================================================
class InvalidatableSprite < Sprite
def initialize(viewport = nil)
@@ -353,7 +356,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Canvas
# Canvas.
#=============================================================================
class AnimationCanvas < Sprite
attr_reader :viewport
@@ -575,7 +578,7 @@ module BattleAnimationEditor
end
end
# Clears all items in the frame except locked items
# Clears all items in the frame except locked items.
def clearFrame(frame)
if frame >= 0 && frame < @animation.length
PBAnimation::MAX_SPRITES.times do |i|
@@ -620,7 +623,7 @@ module BattleAnimationEditor
self.invalidate
end
# This frame becomes a copy of the previous frame
# This frame becomes a copy of the previous frame.
def pasteLast
copyFrame(@currentframe - 1, @currentframe) if @currentframe > 0
end
@@ -930,7 +933,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Window classes
# Window classes.
#=============================================================================
class BitmapDisplayWindow < SpriteWindow_Base
attr_reader :bitmapname

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module BattleAnimationEditor
#=============================================================================
#

View File

@@ -1,8 +1,11 @@
#===============================================================================
#
#===============================================================================
module BattleAnimationEditor
module_function
#=============================================================================
# Paths and interpolation
# Paths and interpolation.
#=============================================================================
class ControlPointSprite < Sprite
attr_accessor :dragging

View File

@@ -1,8 +1,11 @@
#===============================================================================
#
#===============================================================================
module BattleAnimationEditor
module_function
#=============================================================================
# Importing and exporting
# Importing and exporting.
#=============================================================================
def pbRgssChdir(dir)
RTP.eachPathFor(dir) { |path| Dir.chdir(path) { yield } }
@@ -84,7 +87,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Format conversion
# Format conversion.
#=============================================================================
def pbConvertAnimToNewFormat(textdata)
needconverting = false

View File

@@ -1,8 +1,11 @@
#===============================================================================
#
#===============================================================================
module BattleAnimationEditor
module_function
#=============================================================================
# Mini battle scene
# Mini battle scene.
#=============================================================================
class MiniBattler
attr_accessor :index
@@ -24,7 +27,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Pop-up menus for buttons in bottom menu
# Pop-up menus for buttons in bottom menu.
#=============================================================================
def pbSelectAnim(canvas, animwin)
animfiles = []
@@ -183,7 +186,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Pop-up menus for individual cels
# Pop-up menus for individual cels.
#=============================================================================
def pbChooseNum(cel)
ret = cel
@@ -371,7 +374,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Pop-up menus for buttons in right hand menu
# Pop-up menus for buttons in right hand menu.
#=============================================================================
def pbTimingList(canvas)
commands = []
@@ -946,7 +949,7 @@ module BattleAnimationEditor
end
#=============================================================================
# Main
# Main.
#=============================================================================
def animationEditorMain(animation)
viewport = Viewport.new(0, 0, Settings::SCREEN_WIDTH + 288, Settings::SCREEN_HEIGHT + 288)
@@ -1152,7 +1155,7 @@ module BattleAnimationEditor
end
#===============================================================================
# Start
# Start.
#===============================================================================
def pbAnimationEditor
pbBGMStop

View File

@@ -1,5 +1,5 @@
#===============================================================================
# Data type properties
# Data type properties.
#===============================================================================
module UndefinedProperty
def self.set(_settingname, oldsetting)
@@ -1619,7 +1619,7 @@ module EncounterSlotProperty
end
#===============================================================================
# Core property editor script
# Core property editor script.
#===============================================================================
def pbPropertyList(title, data, properties, saveprompt = false)
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)

View File

@@ -412,14 +412,23 @@ class PokemonPartyScreen
include PokemonDebugMixin
end
#===============================================================================
#
#===============================================================================
class PokemonStorageScreen
include PokemonDebugMixin
end
#===============================================================================
#
#===============================================================================
class PokemonDebugPartyScreen
include PokemonDebugMixin
end
#===============================================================================
#
#===============================================================================
class Battle
include Battle::DebugMixin
end

View File

@@ -1,6 +1,7 @@
#===============================================================================
# Field options
# Field options.
#===============================================================================
MenuHandlers.add(:debug_menu, :field_menu, {
"name" => _INTL("Field options..."),
"parent" => :main,
@@ -264,8 +265,9 @@ MenuHandlers.add(:debug_menu, :skip_credits, {
})
#===============================================================================
# Battle options
# Battle options.
#===============================================================================
MenuHandlers.add(:debug_menu, :battle_menu, {
"name" => _INTL("Battle options..."),
"parent" => :main,
@@ -543,8 +545,9 @@ MenuHandlers.add(:debug_menu, :toggle_logging, {
})
#===============================================================================
# Pokémon options
# Pokémon options.
#===============================================================================
MenuHandlers.add(:debug_menu, :pokemon_menu, {
"name" => _INTL("Pokémon options..."),
"parent" => :main,
@@ -716,8 +719,9 @@ MenuHandlers.add(:debug_menu, :open_storage, {
})
#===============================================================================
# Shadow Pokémon options
# Shadow Pokémon options.
#===============================================================================
MenuHandlers.add(:debug_menu, :shadow_pokemon_menu, {
"name" => _INTL("Shadow Pokémon options..."),
"parent" => :pokemon_menu,
@@ -766,8 +770,9 @@ MenuHandlers.add(:debug_menu, :relic_stone, {
})
#===============================================================================
# Item options
# Item options.
#===============================================================================
MenuHandlers.add(:debug_menu, :items_menu, {
"name" => _INTL("Item options..."),
"parent" => :main,
@@ -837,8 +842,9 @@ MenuHandlers.add(:debug_menu, :empty_bag, {
})
#===============================================================================
# Player options
# Player options.
#===============================================================================
MenuHandlers.add(:debug_menu, :player_menu, {
"name" => _INTL("Player options..."),
"parent" => :main,
@@ -1143,8 +1149,9 @@ MenuHandlers.add(:debug_menu, :random_id, {
})
#===============================================================================
# PBS file editors
# PBS file editors.
#===============================================================================
MenuHandlers.add(:debug_menu, :pbs_editors_menu, {
"name" => _INTL("PBS file editors..."),
"parent" => :main,
@@ -1261,8 +1268,9 @@ MenuHandlers.add(:debug_menu, :set_pokedex_lists, {
})
#===============================================================================
# Other editors
# Other editors.
#===============================================================================
MenuHandlers.add(:debug_menu, :editors_menu, {
"name" => _INTL("Other editors..."),
"parent" => :main,
@@ -1324,8 +1332,9 @@ MenuHandlers.add(:debug_menu, :fix_invalid_tiles, {
})
#===============================================================================
# Other options
# Other options.
#===============================================================================
MenuHandlers.add(:debug_menu, :files_menu, {
"name" => _INTL("Files options..."),
"parent" => :main,

View File

@@ -39,7 +39,7 @@ def pbWarpToMap
end
#===============================================================================
# Debug Variables screen
# Debug Variables screen.
#===============================================================================
class SpriteWindow_DebugVariables < Window_DrawableCommand
attr_reader :mode
@@ -227,7 +227,7 @@ def pbDebugVariables(mode)
end
#===============================================================================
# Debug Day Care screen
# Debug Day Care screen.
#===============================================================================
def pbDebugDayCare
day_care = $PokemonGlobal.day_care
@@ -376,7 +376,7 @@ def pbDebugDayCare
end
#===============================================================================
# Debug roaming Pokémon screen
# Debug roaming Pokémon screen.
#===============================================================================
class SpriteWindow_DebugRoamers < Window_DrawableCommand
def initialize(viewport)
@@ -548,7 +548,7 @@ def pbDebugRoamers
end
#===============================================================================
# Battle animations import/export
# Battle animations import/export.
#===============================================================================
def pbExportAllAnimations
begin
@@ -663,7 +663,7 @@ def pbImportAllAnimations
end
#===============================================================================
# Properly erases all non-existent tiles in maps (including event graphics)
# Properly erases all non-existent tiles in maps (including event graphics).
#===============================================================================
def pbDebugFixInvalidTiles
total_errors = 0
@@ -739,7 +739,7 @@ def pbCheckTileValidity(tile_id, map, tilesets, passages)
end
#===============================================================================
# Pseudo-party screen for editing Pokémon being set up for a wild battle
# Pseudo-party screen for editing Pokémon being set up for a wild battle.
#===============================================================================
class PokemonDebugPartyScreen
def initialize

View File

@@ -1,6 +1,7 @@
#===============================================================================
# Battler Options
# Battler options.
#===============================================================================
MenuHandlers.add(:battle_debug_menu, :battlers, {
"name" => _INTL("Battlers..."),
"parent" => :main,
@@ -71,8 +72,9 @@ MenuHandlers.add(:battle_debug_menu, :speed_order, {
})
#===============================================================================
# Pokémon
# Pokémon.
#===============================================================================
MenuHandlers.add(:battle_debug_menu, :pokemon_teams, {
"name" => _INTL("Pokémon teams"),
"parent" => :main,
@@ -130,8 +132,9 @@ MenuHandlers.add(:battle_debug_menu, :pokemon_teams, {
})
#===============================================================================
# Trainer Options
# Trainer options.
#===============================================================================
MenuHandlers.add(:battle_debug_menu, :trainers, {
"name" => _INTL("Trainer options..."),
"parent" => :main,
@@ -226,8 +229,9 @@ MenuHandlers.add(:battle_debug_menu, :mega_evolution, {
})
#===============================================================================
# Field Options
# Field options.
#===============================================================================
MenuHandlers.add(:battle_debug_menu, :field, {
"name" => _INTL("Field effects..."),
"parent" => :main,

View File

@@ -1,6 +1,7 @@
#===============================================================================
# HP/Status options
# HP/Status options.
#===============================================================================
MenuHandlers.add(:battle_pokemon_debug_menu, :hp_status_menu, {
"name" => _INTL("HP/status..."),
"parent" => :main,
@@ -129,8 +130,9 @@ MenuHandlers.add(:battle_pokemon_debug_menu, :full_heal, {
})
#===============================================================================
# Level/stats options
# Level/stats options.
#===============================================================================
MenuHandlers.add(:battle_pokemon_debug_menu, :level_stats, {
"name" => _INTL("Stats/level..."),
"parent" => :main,
@@ -408,8 +410,9 @@ MenuHandlers.add(:battle_pokemon_debug_menu, :set_happiness, {
})
#===============================================================================
# Types
# Types.
#===============================================================================
MenuHandlers.add(:battle_pokemon_debug_menu, :set_types, {
"name" => _INTL("Set types"),
"parent" => :main,
@@ -457,8 +460,9 @@ MenuHandlers.add(:battle_pokemon_debug_menu, :set_types, {
})
#===============================================================================
# Moves options
# Moves options.
#===============================================================================
MenuHandlers.add(:battle_pokemon_debug_menu, :moves, {
"name" => _INTL("Moves..."),
"parent" => :main,
@@ -600,8 +604,9 @@ MenuHandlers.add(:battle_pokemon_debug_menu, :reset_moves, {
})
#===============================================================================
# Other options
# Other options.
#===============================================================================
MenuHandlers.add(:battle_pokemon_debug_menu, :set_item, {
"name" => _INTL("Set item"),
"parent" => :main,

View File

@@ -1,6 +1,7 @@
#===============================================================================
# HP/Status options
# HP/Status options.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :hp_status_menu, {
"name" => _INTL("HP/status..."),
"parent" => :main
@@ -146,8 +147,9 @@ MenuHandlers.add(:pokemon_debug_menu, :set_pokerus, {
})
#===============================================================================
# Level/stats options
# Level/stats options.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :level_stats, {
"name" => _INTL("Level/stats..."),
"parent" => :main
@@ -450,8 +452,9 @@ MenuHandlers.add(:pokemon_debug_menu, :set_sheen, {
})
#===============================================================================
# Moves options
# Moves options.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :moves, {
"name" => _INTL("Moves..."),
"parent" => :main
@@ -571,8 +574,9 @@ MenuHandlers.add(:pokemon_debug_menu, :set_initial_moves, {
})
#===============================================================================
# Other options
# Other options.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :set_item, {
"name" => _INTL("Set item"),
"parent" => :main,
@@ -802,8 +806,9 @@ MenuHandlers.add(:pokemon_debug_menu, :species_and_form, {
})
#===============================================================================
# Cosmetic options
# Cosmetic options.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :cosmetic, {
"name" => _INTL("Cosmetic info..."),
"parent" => :main
@@ -973,8 +978,9 @@ MenuHandlers.add(:pokemon_debug_menu, :ownership, {
})
#===============================================================================
# Can store/release/trade
# Can store/release/trade.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :set_discardable, {
"name" => _INTL("Set discardable"),
"parent" => :main,
@@ -1002,8 +1008,9 @@ MenuHandlers.add(:pokemon_debug_menu, :set_discardable, {
})
#===============================================================================
# Other options
# Other options.
#===============================================================================
MenuHandlers.add(:pokemon_debug_menu, :set_egg, {
"name" => _INTL("Set egg"),
"parent" => :main,

View File

@@ -1,5 +1,5 @@
#===============================================================================
# Core lister script
# Core lister script.
#===============================================================================
def pbListWindow(cmds, width = Graphics.width / 2)
list = Window_CommandPokemon.newWithSize(cmds, 0, 0, width, Graphics.height)