Lots of rubocop

This commit is contained in:
Maruno17
2023-01-28 15:21:12 +00:00
parent 2d056052ce
commit 13aab8d911
159 changed files with 1679 additions and 1931 deletions

View File

@@ -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.

View File

@@ -71,6 +71,8 @@ module SaveData
@value_procs[key].call(object) if @value_procs[key].is_a?(Proc)
end
#---------------------------------------------------------------------------
private
# @!group Configuration

View File

@@ -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