Shortened the default inspect message for everything, corrected the extension of GameData::Encounter

This commit is contained in:
Maruno17
2021-05-09 01:52:55 +01:00
parent 218225cc91
commit 326e2e7929
8 changed files with 19 additions and 18 deletions

View File

@@ -3,6 +3,10 @@
#=============================================================================== #===============================================================================
class Object class Object
alias full_inspect inspect alias full_inspect inspect
def inspect
return "#<#{self.class}>"
end
end end
#=============================================================================== #===============================================================================

View File

@@ -21,8 +21,8 @@ class Interpreter
end end
def inspect def inspect
str = self.to_s.chop str = super.chop
str << format(' event ID: %d>', @event_id) str << format(' @event_id: %d>', @event_id)
return str return str
end end

View File

@@ -74,10 +74,6 @@ class Window
attr_reader :openness attr_reader :openness
attr_reader :stretch attr_reader :stretch
def inspect
return self.to_s.chop + ">"
end
def windowskin def windowskin
@_windowskin @_windowskin
end end

View File

@@ -9,7 +9,7 @@ module GameData
DATA = {} DATA = {}
DATA_FILENAME = "encounters.dat" DATA_FILENAME = "encounters.dat"
extend ClassMethods extend ClassMethodsSymbols
include InstanceMethods include InstanceMethods
# @param map_id [Integer] # @param map_id [Integer]

View File

@@ -93,7 +93,7 @@ class Pokemon
MAX_MOVES = 4 MAX_MOVES = 4
def inspect def inspect
str = self.to_s.chop str = super.chop
str << format(' %s Lv.%s>', @species, @level.to_s || '???') str << format(' %s Lv.%s>', @species, @level.to_s || '???')
return str return str
end end

View File

@@ -9,7 +9,7 @@ class Trainer
attr_accessor :party attr_accessor :party
def inspect def inspect
str = self.to_s.chop str = super.chop
party_str = @party.map { |p| p.species_data.species }.inspect party_str = @party.map { |p| p.species_data.species }.inspect
str << format(' %s @party=%s>', self.full_name, party_str) str << format(' %s @party=%s>', self.full_name, party_str)
return str return str

View File

@@ -6,7 +6,7 @@ class Player < Trainer
attr_reader :accessible_dexes attr_reader :accessible_dexes
def inspect def inspect
str = self.to_s.chop str = super.chop
str << format(' seen: %d, owned: %d>', self.seen_count, self.owned_count) str << format(' seen: %d, owned: %d>', self.seen_count, self.owned_count)
return str return str
end end

View File

@@ -20,6 +20,7 @@
// //
// "rgssVersion": 1, // "rgssVersion": 1,
// Create a debug context and log // Create a debug context and log
// OpenGL debug information to the console // OpenGL debug information to the console
// (default: disabled) // (default: disabled)
@@ -180,11 +181,11 @@
"bindingNames": {"c": "Use", "bindingNames": {"c": "Use",
"b": "Back", "b": "Back",
"a": "Action", "a": "Action",
"x": "JumpUp", "x": "JumpUp",
"y": "JumpDown", "y": "JumpDown",
"z": "Special", "z": "Special",
"l": "(unused)", "l": "(unused)",
"r": "(unused)"}, "r": "(unused)"},
// Allow symlinks for game assets to be followed // Allow symlinks for game assets to be followed
@@ -304,20 +305,20 @@
// (default: false) // (default: false)
// //
// "JITEnable": false, // "JITEnable": false,
// Determines what level of verbosity to use when // Determines what level of verbosity to use when
// logging JIT events. Starts at 0, which is next // logging JIT events. Starts at 0, which is next
// to nothing. Set it higher to see more. // to nothing. Set it higher to see more.
// (default: 0) // (default: 0)
// //
// "JITVerboseLevel": 0, // "JITVerboseLevel": 0,
// Determines how many compiled methods that Ruby // Determines how many compiled methods that Ruby
// will keep in its cache. // will keep in its cache.
// (default: 100) // (default: 100)
// //
// "JITMaxCache": 100, // "JITMaxCache": 100,
// Determines how many times a function has to be // Determines how many times a function has to be
// called before it is compiled. // called before it is compiled.
// (default: 10000) // (default: 10000)