Class: Configs::Flavors

Inherits:
Object show all
Defined in:
scripts/00800 Studio/00000 Configs/00002 Flavors.rb

Overview

Configuration of flavors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFlavors

Returns a new instance of Flavors.



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 53

def initialize
  @spicy = 0
  @dry = 1
  @sweet = 2
  @bitter = 3
  @sour = 4
  self.nature_with_no_preferences = %i[bashful docile hardy quirky serious]
  self.nature_liking_flavor = {
    spicy: %i[adamant brave naughty lonely],
    dry: %i[modest quiet rash mild],
    sweet: %i[timid jolly naive hasty],
    bitter: %i[calm careful sassy gentle],
    sour: %i[bold impish relaxed lax]
  }
  self.nature_disliking_flavor = {
    spicy: %i[modest timid calm bold],
    dry: %i[adamant jolly careful impish],
    sweet: %i[brave quiet sassy relaxed],
    bitter: %i[naughty rash naive lax],
    sour: %i[lonely mild hasty gentle]
  }
end

Instance Attribute Details

#bitterInteger

Get the ID of bitter flavor

Returns:



18
19
20
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 18

def bitter
  @bitter
end

#dryInteger

Get the ID of dry flavor

Returns:



10
11
12
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 10

def dry
  @dry
end

#nature_disliking_flavorHash<Symbol => Array<Integer>>

List of nature disliking flavor by flavor

Returns:



34
35
36
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 34

def nature_disliking_flavor
  @nature_disliking_flavor
end

#nature_liking_flavorHash<Symbol => Array<Integer>>

List of nature liking flavor by flavor

Returns:



30
31
32
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 30

def nature_liking_flavor
  @nature_liking_flavor
end

#nature_with_no_preferencesArray<Integer>

List of nature with no preferences

Returns:



26
27
28
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 26

def nature_with_no_preferences
  @nature_with_no_preferences
end

#sourInteger

Get the ID of sour flavor

Returns:



22
23
24
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 22

def sour
  @sour
end

#spicyInteger

Get the ID of spicy flavor

Returns:



6
7
8
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 6

def spicy
  @spicy
end

#sweetInteger

Get the ID of sweet flavor

Returns:



14
15
16
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 14

def sweet
  @sweet
end

Instance Method Details

#to_json



76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 76

def to_json(*)
  {
    klass: self.class.to_s,
    spicy: @spicy,
    dry: @dry,
    sweet: @sweet,
    bitter: @bitter,
    sour: @sour,
    nature_with_no_preferences: @nature_with_no_preferences,
    nature_liking_flavor: @nature_liking_flavor,
    nature_disliking_flavor: @nature_disliking_flavor
  }.to_json
end