mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
35 lines
855 B
Ruby
35 lines
855 B
Ruby
module GameData
|
|
class Ability
|
|
attr_reader :id
|
|
attr_reader :real_name
|
|
attr_reader :real_description
|
|
|
|
DATA = {}
|
|
DATA_FILENAME = "abilities.dat"
|
|
|
|
extend ClassMethodsSymbols
|
|
include InstanceMethods
|
|
|
|
SCHEMA = {
|
|
"Name" => [:name, "s"],
|
|
"Description" => [:description, "q"]
|
|
}
|
|
|
|
def initialize(hash)
|
|
@id = hash[:id]
|
|
@real_name = hash[:name] || "Unnamed"
|
|
@real_description = hash[:description] || "???"
|
|
end
|
|
|
|
# @return [String] the translated name of this ability
|
|
def name
|
|
return pbGetMessageFromHash(MessageTypes::Abilities, @real_name)
|
|
end
|
|
|
|
# @return [String] the translated description of this ability
|
|
def description
|
|
return pbGetMessageFromHash(MessageTypes::AbilityDescs, @real_description)
|
|
end
|
|
end
|
|
end
|