mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Added new section-based format for ribbons.txt
This commit is contained in:
@@ -2,20 +2,26 @@ module GameData
|
||||
class Ribbon
|
||||
attr_reader :id
|
||||
attr_reader :real_name
|
||||
attr_reader :real_description
|
||||
attr_reader :icon_position # Where this ribbon's graphic is within ribbons.png
|
||||
attr_reader :real_description
|
||||
|
||||
DATA = {}
|
||||
DATA_FILENAME = "ribbons.dat"
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"IconPosition" => [:icon_position, "u"],
|
||||
"Description" => [:description, "q"]
|
||||
}
|
||||
|
||||
extend ClassMethodsSymbols
|
||||
include InstanceMethods
|
||||
|
||||
def initialize(hash)
|
||||
@id = hash[:id]
|
||||
@real_name = hash[:name] || "Unnamed"
|
||||
@icon_position = hash[:icon_position] || 0
|
||||
@real_description = hash[:description] || "???"
|
||||
@icon_position = hash[:icon_position] || -1
|
||||
end
|
||||
|
||||
# @return [String] the translated name of this ribbon
|
||||
|
||||
Reference in New Issue
Block a user