mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-03-09 18:02:00 +00:00
More or less standardised separator comments in the code
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
#===============================================================================
|
||||
# * Egg Hatch Animation - by FL (Credits will be apreciated)
|
||||
# Tweaked by Maruno
|
||||
#===============================================================================
|
||||
#-------------------------------------------------------------------------------
|
||||
# This script is for Pokémon Essentials. It's an egg hatch animation that
|
||||
# works even with special eggs like Manaphy egg.
|
||||
#===============================================================================
|
||||
#-------------------------------------------------------------------------------
|
||||
# To this script works, put it above Main and put a picture (a 5 frames
|
||||
# sprite sheet) with egg sprite height and 5 times the egg sprite width at
|
||||
# Graphics/Battlers/eggCracks.
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
#===============================================================================
|
||||
# * Hall of Fame - by FL (Credits will be apreciated)
|
||||
#===============================================================================
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
# This script is for Pokémon Essentials. It makes a recordable Hall of Fame
|
||||
# like the Gen 3 games.
|
||||
#
|
||||
#===============================================================================
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
# To this scripts works, put it above main, put a 512x384 picture in
|
||||
# hallfamebars and a 8x24 background picture in hallfamebg. To call this script,
|
||||
# use 'pbHallOfFameEntry'. After you recorder the first entry, you can access
|
||||
# the hall teams using a PC. You can also check the player Hall of Fame last
|
||||
# number using '$PokemonGlobal.hallOfFameLastNumber'.
|
||||
#
|
||||
#===============================================================================
|
||||
class HallOfFame_Scene
|
||||
# When true, all pokémon will be in one line.
|
||||
@@ -446,20 +442,6 @@ class HallOfFameScreen
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
MenuHandlers.add(:pc_menu, :hall_of_fame, {
|
||||
"name" => _INTL("Hall of Fame"),
|
||||
"order" => 40,
|
||||
"condition" => proc { next $PokemonGlobal.hallOfFameLastNumber > 0 },
|
||||
"effect" => proc { |menu|
|
||||
pbMessage("\\se[PC access]" + _INTL("Accessed the Hall of Fame."))
|
||||
pbHallOfFamePC
|
||||
next false
|
||||
}
|
||||
})
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -492,3 +474,14 @@ def pbHallOfFamePC
|
||||
screen = HallOfFameScreen.new(scene)
|
||||
screen.pbStartScreenPC
|
||||
end
|
||||
|
||||
MenuHandlers.add(:pc_menu, :hall_of_fame, {
|
||||
"name" => _INTL("Hall of Fame"),
|
||||
"order" => 40,
|
||||
"condition" => proc { next $PokemonGlobal.hallOfFameLastNumber > 0 },
|
||||
"effect" => proc { |menu|
|
||||
pbMessage("\\se[PC access]" + _INTL("Accessed the Hall of Fame."))
|
||||
pbHallOfFamePC
|
||||
next false
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#==============================================================================
|
||||
#===============================================================================
|
||||
# * Scene_Credits
|
||||
#------------------------------------------------------------------------------
|
||||
#-------------------------------------------------------------------------------
|
||||
# Scrolls the credits you make below. Original Author unknown.
|
||||
#
|
||||
## Edited by MiDas Mike so it doesn't play over the Title, but runs by calling
|
||||
@@ -32,7 +32,7 @@
|
||||
## New Edit 21/8/2020 by Marin.
|
||||
# Now automatically inserts the credits from the plugins that have been
|
||||
# registered through the PluginManager module.
|
||||
#==============================================================================
|
||||
#===============================================================================
|
||||
class Scene_Credits
|
||||
# Backgrounds to show in credits. Found in Graphics/Titles/ folder
|
||||
BACKGROUNDS_LIST = ["credits1", "credits2", "credits3", "credits4", "credits5"]
|
||||
@@ -108,22 +108,16 @@ class Scene_Credits
|
||||
|
||||
def main
|
||||
@quit = false
|
||||
#-------------------------------
|
||||
# Animated Background Setup
|
||||
#-------------------------------
|
||||
@timer_start = System.uptime # Time when the credits started
|
||||
# Animated Background Setup
|
||||
@bg_index = 0
|
||||
@bitmap_height = Graphics.height # For a single credits text bitmap
|
||||
@trim = Graphics.height / 10
|
||||
# Number of game frames per background frame
|
||||
@realOY = -(Graphics.height - @trim)
|
||||
#-------------------------------
|
||||
# Credits text Setup
|
||||
#-------------------------------
|
||||
credit_lines = get_text
|
||||
#-------------------------------
|
||||
# Make background and text sprites
|
||||
#-------------------------------
|
||||
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||
viewport.z = 99999
|
||||
text_viewport = Viewport.new(0, @trim, Graphics.width, Graphics.height - (@trim * 2))
|
||||
@@ -173,9 +167,7 @@ class Scene_Credits
|
||||
credit_sprite.oy = @realOY - (@bitmap_height * i)
|
||||
@credit_sprites[i] = credit_sprite
|
||||
end
|
||||
#-------------------------------
|
||||
# Setup
|
||||
#-------------------------------
|
||||
# Stops all audio but background music
|
||||
previousBGM = $game_system.getPlayingBGM
|
||||
pbMEStop
|
||||
|
||||
@@ -130,6 +130,7 @@ end
|
||||
#===============================================================================
|
||||
# Pause menu commands.
|
||||
#===============================================================================
|
||||
|
||||
MenuHandlers.add(:pause_menu, :pokedex, {
|
||||
"name" => _INTL("Pokédex"),
|
||||
"order" => 10,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
# Pokémon party buttons and menu
|
||||
# Pokémon party buttons and menu.
|
||||
#===============================================================================
|
||||
class PokemonPartyConfirmCancelSprite < Sprite
|
||||
attr_reader :selected
|
||||
@@ -131,7 +131,7 @@ class Window_CommandPokemonColor < Window_CommandPokemon
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Blank party panel
|
||||
# Blank party panel.
|
||||
#===============================================================================
|
||||
class PokemonPartyBlankPanel < Sprite
|
||||
attr_accessor :text
|
||||
@@ -160,7 +160,7 @@ class PokemonPartyBlankPanel < Sprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party panel
|
||||
# Pokémon party panel.
|
||||
#===============================================================================
|
||||
class PokemonPartyPanel < Sprite
|
||||
attr_reader :pokemon
|
||||
@@ -471,7 +471,7 @@ class PokemonPartyPanel < Sprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party visuals
|
||||
# Pokémon party visuals.
|
||||
#===============================================================================
|
||||
class PokemonParty_Scene
|
||||
def pbStartScene(party, starthelptext, annotations = nil, multiselect = false, can_access_storage = false)
|
||||
@@ -901,7 +901,7 @@ class PokemonParty_Scene
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon party mechanics
|
||||
# Pokémon party mechanics.
|
||||
#===============================================================================
|
||||
class PokemonPartyScreen
|
||||
attr_reader :scene
|
||||
@@ -1316,6 +1316,7 @@ end
|
||||
# inserted after the second command instead, which is usually "Debug". See
|
||||
# insert_index above if you need to change this.
|
||||
#===============================================================================
|
||||
|
||||
MenuHandlers.add(:party_menu, :summary, {
|
||||
"name" => _INTL("Summary"),
|
||||
"order" => 10,
|
||||
@@ -1483,7 +1484,7 @@ MenuHandlers.add(:party_menu_item, :move, {
|
||||
})
|
||||
|
||||
#===============================================================================
|
||||
# Open the party screen
|
||||
# Open the party screen.
|
||||
#===============================================================================
|
||||
def pbPokemonScreen
|
||||
pbFadeOutIn do
|
||||
@@ -1494,7 +1495,7 @@ def pbPokemonScreen
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Choose a Pokémon in the party
|
||||
# Choose a Pokémon in the party.
|
||||
#===============================================================================
|
||||
# Choose a Pokémon/egg from the party.
|
||||
# Stores result in variable _variableNumber_ and the chosen Pokémon's name in
|
||||
|
||||
@@ -127,7 +127,7 @@ class Window_PokemonBag < Window_DrawableCommand
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Bag visuals
|
||||
# Bag visuals.
|
||||
#===============================================================================
|
||||
class PokemonBag_Scene
|
||||
ITEMLISTBASECOLOR = Color.new(88, 88, 80)
|
||||
@@ -453,7 +453,7 @@ class PokemonBag_Scene
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Bag mechanics
|
||||
# Bag mechanics.
|
||||
#===============================================================================
|
||||
class PokemonBagScreen
|
||||
def initialize(scene, bag)
|
||||
|
||||
@@ -157,6 +157,7 @@ end
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
MenuHandlers.add(:pokegear_menu, :map, {
|
||||
"name" => _INTL("Map"),
|
||||
"icon_name" => "map",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
# Phone list of contacts
|
||||
# Phone list of contacts.
|
||||
#===============================================================================
|
||||
class Window_PhoneList < Window_CommandPokemon
|
||||
attr_accessor :switching
|
||||
|
||||
@@ -1,28 +1,3 @@
|
||||
def pbEmergencySave
|
||||
oldscene = $scene
|
||||
$scene = nil
|
||||
pbMessage(_INTL("The script is taking too long. The game will restart."))
|
||||
return if !$player
|
||||
if SaveData.exists?
|
||||
File.open(SaveData::FILE_PATH, "rb") do |r|
|
||||
File.open(SaveData::FILE_PATH + ".bak", "wb") do |w|
|
||||
loop do
|
||||
s = r.read(4096)
|
||||
break if !s
|
||||
w.write(s)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if Game.save
|
||||
pbMessage("\\se[]" + _INTL("The game was saved.") + "\\me[GUI save game]\\wtnp[20]")
|
||||
pbMessage("\\se[]" + _INTL("The previous save file has been backed up.") + "\\wtnp[20]")
|
||||
else
|
||||
pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]")
|
||||
end
|
||||
$scene = oldscene
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -137,3 +112,28 @@ def pbSaveScreen
|
||||
ret = screen.pbSaveScreen
|
||||
return ret
|
||||
end
|
||||
|
||||
def pbEmergencySave
|
||||
oldscene = $scene
|
||||
$scene = nil
|
||||
pbMessage(_INTL("The script is taking too long. The game will restart."))
|
||||
return if !$player
|
||||
if SaveData.exists?
|
||||
File.open(SaveData::FILE_PATH, "rb") do |r|
|
||||
File.open(SaveData::FILE_PATH + ".bak", "wb") do |w|
|
||||
loop do
|
||||
s = r.read(4096)
|
||||
break if !s
|
||||
w.write(s)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if Game.save
|
||||
pbMessage("\\se[]" + _INTL("The game was saved.") + "\\me[GUI save game]\\wtnp[20]")
|
||||
pbMessage("\\se[]" + _INTL("The previous save file has been backed up.") + "\\wtnp[20]")
|
||||
else
|
||||
pbMessage("\\se[]" + _INTL("Save failed.") + "\\wtnp[30]")
|
||||
end
|
||||
$scene = oldscene
|
||||
end
|
||||
|
||||
@@ -145,7 +145,7 @@ class SliderOption
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Main options list
|
||||
# Main options list.
|
||||
#===============================================================================
|
||||
class Window_PokemonOption < Window_DrawableCommand
|
||||
attr_reader :value_changed
|
||||
@@ -263,7 +263,7 @@ class Window_PokemonOption < Window_DrawableCommand
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Options main screen
|
||||
# Options main screen.
|
||||
#===============================================================================
|
||||
class PokemonOption_Scene
|
||||
attr_reader :sprites
|
||||
@@ -379,8 +379,9 @@ class PokemonOptionScreen
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Options Menu commands
|
||||
# Options Menu commands.
|
||||
#===============================================================================
|
||||
|
||||
MenuHandlers.add(:options_menu, :bgm_volume, {
|
||||
"name" => _INTL("Music Volume"),
|
||||
"order" => 10,
|
||||
|
||||
@@ -300,7 +300,7 @@ class PokemonReadyMenu
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Using a registered item
|
||||
# Using a registered item.
|
||||
#===============================================================================
|
||||
def pbUseKeyItem
|
||||
moves = [:CUT, :DEFOG, :DIG, :DIVE, :FLASH, :FLY, :HEADBUTT, :ROCKCLIMB,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
# Pokémon icons
|
||||
# Pokémon icons.
|
||||
#===============================================================================
|
||||
class PokemonBoxIcon < IconSprite
|
||||
def initialize(pokemon, viewport = nil)
|
||||
@@ -44,7 +44,7 @@ class PokemonBoxIcon < IconSprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon sprite
|
||||
# Pokémon sprite.
|
||||
#===============================================================================
|
||||
class MosaicPokemonSprite < PokemonSprite
|
||||
attr_reader :mosaic
|
||||
@@ -140,7 +140,7 @@ class AutoMosaicPokemonSprite < MosaicPokemonSprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Cursor
|
||||
# Cursor.
|
||||
#===============================================================================
|
||||
class PokemonBoxArrow < Sprite
|
||||
attr_accessor :quickswap
|
||||
@@ -306,7 +306,7 @@ class PokemonBoxArrow < Sprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Box
|
||||
# Box.
|
||||
#===============================================================================
|
||||
class PokemonBoxSprite < Sprite
|
||||
attr_accessor :refreshBox
|
||||
@@ -461,7 +461,7 @@ class PokemonBoxSprite < Sprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Party pop-up panel
|
||||
# Party pop-up panel.
|
||||
#===============================================================================
|
||||
class PokemonBoxPartySprite < Sprite
|
||||
def initialize(party, viewport = nil)
|
||||
@@ -578,7 +578,7 @@ class PokemonBoxPartySprite < Sprite
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon storage visuals
|
||||
# Pokémon storage visuals.
|
||||
#===============================================================================
|
||||
class PokemonStorageScene
|
||||
attr_reader :quickswap
|
||||
@@ -1485,7 +1485,7 @@ class PokemonStorageScene
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon storage mechanics
|
||||
# Pokémon storage mechanics.
|
||||
#===============================================================================
|
||||
class PokemonStorageScreen
|
||||
attr_reader :scene
|
||||
|
||||
@@ -196,8 +196,10 @@ end
|
||||
# The window _helpwindow_ will display the _helptext_.
|
||||
#===============================================================================
|
||||
module UIHelper
|
||||
module_function
|
||||
|
||||
# Letter by letter display of the message _msg_ by the window _helpwindow_.
|
||||
def self.pbDisplay(helpwindow, msg, brief)
|
||||
def pbDisplay(helpwindow, msg, brief)
|
||||
cw = helpwindow
|
||||
oldvisible = cw.visible
|
||||
cw.letterbyletter = true
|
||||
@@ -215,7 +217,7 @@ module UIHelper
|
||||
cw.visible = oldvisible
|
||||
end
|
||||
|
||||
def self.pbDisplayStatic(msgwindow, message)
|
||||
def pbDisplayStatic(msgwindow, message)
|
||||
oldvisible = msgwindow.visible
|
||||
msgwindow.visible = true
|
||||
msgwindow.letterbyletter = false
|
||||
@@ -237,7 +239,7 @@ module UIHelper
|
||||
|
||||
# Letter by letter display of the message _msg_ by the window _helpwindow_,
|
||||
# used to ask questions. Returns true if the user chose yes, false if no.
|
||||
def self.pbConfirm(helpwindow, msg)
|
||||
def pbConfirm(helpwindow, msg)
|
||||
dw = helpwindow
|
||||
oldvisible = dw.visible
|
||||
dw.letterbyletter = true
|
||||
@@ -273,7 +275,7 @@ module UIHelper
|
||||
return ret
|
||||
end
|
||||
|
||||
def self.pbChooseNumber(helpwindow, helptext, maximum, initnum = 1)
|
||||
def pbChooseNumber(helpwindow, helptext, maximum, initnum = 1)
|
||||
oldvisible = helpwindow.visible
|
||||
helpwindow.visible = true
|
||||
helpwindow.text = helptext
|
||||
@@ -338,7 +340,7 @@ module UIHelper
|
||||
return ret
|
||||
end
|
||||
|
||||
def self.pbShowCommands(helpwindow, helptext, commands, initcmd = 0)
|
||||
def pbShowCommands(helpwindow, helptext, commands, initcmd = 0)
|
||||
ret = -1
|
||||
oldvisible = helpwindow.visible
|
||||
helpwindow.visible = helptext ? true : false
|
||||
|
||||
@@ -160,6 +160,7 @@ end
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
MenuHandlers.add(:pc_menu, :pokemon_storage, {
|
||||
"name" => proc {
|
||||
next ($player.seen_storage_creator) ? _INTL("{1}'s PC", pbGetStorageCreator) : _INTL("Someone's PC")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
# Abstraction layer for Pokemon Essentials
|
||||
# Abstraction layer for Pokemon Essentials.
|
||||
#===============================================================================
|
||||
class PokemonMartAdapter
|
||||
def getMoney
|
||||
@@ -96,7 +96,7 @@ class PokemonMartAdapter
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Buy and Sell adapters
|
||||
# Buy and Sell adapters.
|
||||
#===============================================================================
|
||||
class BuyAdapter
|
||||
def initialize(adapter)
|
||||
@@ -174,7 +174,7 @@ class SellAdapter
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Pokémon Mart
|
||||
# Pokémon Mart.
|
||||
#===============================================================================
|
||||
class Window_PokemonMart < Window_DrawableCommand
|
||||
def initialize(stock, adapter, x, y, width, height, viewport = nil)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
# Abstraction layer for Pokemon Essentials
|
||||
# Abstraction layer for Pokemon Essentials.
|
||||
#===============================================================================
|
||||
class BattlePointShopAdapter
|
||||
def getBP
|
||||
@@ -89,7 +89,7 @@ class BattlePointShopAdapter
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Battle Point Shop
|
||||
# Battle Point Shop.
|
||||
#===============================================================================
|
||||
class Window_BattlePointShop < Window_DrawableCommand
|
||||
def initialize(stock, adapter, x, y, width, height, viewport = nil)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#===============================================================================
|
||||
# Scene class for handling appearance of the screen
|
||||
# Scene class for handling appearance of the screen.
|
||||
#===============================================================================
|
||||
class MoveRelearner_Scene
|
||||
VISIBLEMOVES = 4
|
||||
@@ -107,7 +107,7 @@ class MoveRelearner_Scene
|
||||
Color.new(64, 64, 64), Color.new(176, 176, 176))
|
||||
end
|
||||
|
||||
# Processes the scene
|
||||
# Processes the scene.
|
||||
def pbChooseMove
|
||||
oldcmd = -1
|
||||
pbActivateWindow(@sprites, "commands") do
|
||||
@@ -130,7 +130,7 @@ class MoveRelearner_Scene
|
||||
end
|
||||
end
|
||||
|
||||
# End the scene here
|
||||
# End the scene here.
|
||||
def pbEndScene
|
||||
pbFadeOutAndHide(@sprites) { pbUpdate }
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
@@ -140,7 +140,7 @@ class MoveRelearner_Scene
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# Screen class for handling game logic
|
||||
# Screen class for handling game logic.
|
||||
#===============================================================================
|
||||
class MoveRelearnerScreen
|
||||
def initialize(scene)
|
||||
|
||||
@@ -23,7 +23,7 @@ class PokemonGlobalMetadata
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
# General purpose utilities
|
||||
# General purpose utilities.
|
||||
#===============================================================================
|
||||
def pbDrawGauge(bitmap, rect, color, value, maxValue)
|
||||
return if !bitmap
|
||||
@@ -100,7 +100,7 @@ class PurifyChamberSet
|
||||
end
|
||||
|
||||
# Tempo refers to the type advantages of each Pokemon in a certain set in a
|
||||
# clockwise direction. Tempo also depends on the number of Pokemon in the set
|
||||
# clockwise direction. Tempo also depends on the number of Pokemon in the set.
|
||||
def tempo
|
||||
ret = 0
|
||||
@list.length.times do |i|
|
||||
@@ -1296,6 +1296,7 @@ end
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
MenuHandlers.add(:pc_menu, :purify_chamber, {
|
||||
"name" => _INTL("Purify Chamber"),
|
||||
"order" => 30,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#===============================================================================
|
||||
# Mystery Gift system
|
||||
# By Maruno
|
||||
#===============================================================================
|
||||
# Mystery Gift system.
|
||||
# By Maruno.
|
||||
#-------------------------------------------------------------------------------
|
||||
# This url is the location of an example Mystery Gift file.
|
||||
# You should change it to your file's url once you upload it.
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user