mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-22 14:26:01 +00:00
Tidied up semicolon use, refactored random dungeon generation code, fixed visual bug in Day Care debug screen
This commit is contained in:
@@ -181,7 +181,7 @@ module SaveData
|
||||
# new_game_value { Bar.new }
|
||||
# end
|
||||
# @param id [Symbol] value id
|
||||
# @yieldself [Value]
|
||||
# @yield the block of code to be saved as a Value
|
||||
def self.register(id, &block)
|
||||
validate id => Symbol
|
||||
unless block_given?
|
||||
|
||||
@@ -152,7 +152,7 @@ module SaveData
|
||||
# save_data[:new_value] = Foo.new
|
||||
# end
|
||||
# end
|
||||
# @yield self [Conversion]
|
||||
# @yield the block of code to be saved as a Conversion
|
||||
def self.register_conversion(id, &block)
|
||||
validate id => Symbol
|
||||
unless block_given?
|
||||
|
||||
@@ -5,8 +5,8 @@ SaveData.register(:player) do
|
||||
save_value { $Trainer }
|
||||
load_value { |value| $Trainer = value }
|
||||
new_game_value {
|
||||
trainer_type = nil # Get the first defined trainer type as a placeholder
|
||||
GameData::TrainerType.each { |t| trainer_type = t.id; break }
|
||||
# Get the first defined trainer type as a placeholder
|
||||
trainer_type = GameData::TrainerType.keys.first
|
||||
Player.new("Unnamed", trainer_type)
|
||||
}
|
||||
from_old_format { |old_format| old_format[0] }
|
||||
|
||||
Reference in New Issue
Block a user