mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Lots of rubocop
This commit is contained in:
@@ -99,6 +99,8 @@ module SaveData
|
||||
return @old_format_get_proc.call(old_format)
|
||||
end
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
private
|
||||
|
||||
# Raises an {InvalidValueError} if the given value is invalid.
|
||||
|
||||
@@ -71,6 +71,8 @@ module SaveData
|
||||
@value_procs[key].call(object) if @value_procs[key].is_a?(Proc)
|
||||
end
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
private
|
||||
|
||||
# @!group Configuration
|
||||
|
||||
@@ -4,11 +4,7 @@ SaveData.register(:player) do
|
||||
ensure_class :Player
|
||||
save_value { $player }
|
||||
load_value { |value| $player = $Trainer = value }
|
||||
new_game_value {
|
||||
# Get the first defined trainer type as a placeholder
|
||||
trainer_type = GameData::TrainerType.keys.first
|
||||
Player.new("Unnamed", trainer_type)
|
||||
}
|
||||
new_game_value { Player.new("Unnamed", GameData::TrainerType.keys.first) }
|
||||
from_old_format { |old_format| old_format[0] }
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user