mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
6.6 update
This commit is contained in:
42
Data/Scripts/050_Outfits/wrappers/001_Outfit.rb
Normal file
42
Data/Scripts/050_Outfits/wrappers/001_Outfit.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
class Outfit
|
||||
attr_accessor :id
|
||||
attr_accessor :name
|
||||
attr_accessor :description
|
||||
attr_accessor :tags
|
||||
attr_accessor :price
|
||||
|
||||
attr_accessor :is_in_regional_set
|
||||
attr_accessor :is_in_city_exclusive_set
|
||||
|
||||
|
||||
|
||||
|
||||
REGION_TAGS = ["kanto", "johto", "hoenn", "sinnoh", "unova", "kalos", "alola", "galar", "paldea"]
|
||||
def check_if_regional_set(tags)
|
||||
REGION_TAGS.any? { |region| tags.include?(region) }
|
||||
end
|
||||
|
||||
CITY_OUTFIT_TAGS= [
|
||||
"pewter","cerulean","vermillion","lavender","celadon","fuchsia","cinnabar",
|
||||
"crimson","goldenrod","azalea", "violet", "blackthorn", "mahogany", "ecruteak",
|
||||
"olivine","cianwood", "kin"
|
||||
]
|
||||
def check_if_city_set(tags)
|
||||
CITY_OUTFIT_TAGS.any? { |city| tags.include?(city) }
|
||||
end
|
||||
|
||||
def initialize(id, name, description = '',price=0, tags = [])
|
||||
@id = id
|
||||
@name = name
|
||||
@description = description
|
||||
@tags = tags
|
||||
@price = price
|
||||
|
||||
@is_in_regional_set = check_if_regional_set(tags)
|
||||
@is_in_city_exclusive_set = check_if_city_set(tags)
|
||||
end
|
||||
|
||||
def trainer_sprite_path()
|
||||
return nil
|
||||
end
|
||||
end
|
||||
11
Data/Scripts/050_Outfits/wrappers/Clothes.rb
Normal file
11
Data/Scripts/050_Outfits/wrappers/Clothes.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Clothes < Outfit
|
||||
attr_accessor :type
|
||||
def initialize(id, name, description = '',price=0, tags = [])
|
||||
super
|
||||
@type = :CLOTHES
|
||||
end
|
||||
|
||||
def trainer_sprite_path()
|
||||
return getTrainerSpriteOutfitFilename(self.id)
|
||||
end
|
||||
end
|
||||
12
Data/Scripts/050_Outfits/wrappers/Hairstyle.rb
Normal file
12
Data/Scripts/050_Outfits/wrappers/Hairstyle.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class Hairstyle < Outfit
|
||||
attr_accessor :type
|
||||
def initialize(id, name, description = '',price=0, tags = [])
|
||||
super
|
||||
@type = :HAIR
|
||||
end
|
||||
|
||||
def trainer_sprite_path()
|
||||
return getTrainerSpriteHairFilename(self.id)
|
||||
end
|
||||
|
||||
end
|
||||
11
Data/Scripts/050_Outfits/wrappers/Hat.rb
Normal file
11
Data/Scripts/050_Outfits/wrappers/Hat.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Hat < Outfit
|
||||
attr_accessor :type
|
||||
def initialize(id,name,description='',price=0,tags=[])
|
||||
super
|
||||
@type = :HAT
|
||||
end
|
||||
|
||||
def trainer_sprite_path()
|
||||
return getTrainerSpriteHatFilename(self.id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user