Class: PFM::Options

Inherits:
Object show all
Defined in:
docs/4_Systems_105_Options.rb

Overview

The options data

The options are stored in $options and PFM.game_state.options

Author:

  • Nuri Yuri

Constant Summary collapse

PLAYER_AUTO_RUN_BY_DEFAULT =

Default auto run value TODO: Make it configurable through Configs on Studio side

false

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(starting_language, game_state = PFM.game_state) ⇒ Options

Create a new Option object with a language

Parameters:

  • starting_language (String) —

    the lang id the game will start

  • game_state (PFM::GameState) (defaults to: PFM.game_state) —

    variable responsive of containing the whole game state for easier access



46
47
# File 'docs/4_Systems_105_Options.rb', line 46

def initialize(starting_language, game_state = PFM.game_state)
end

Instance Attribute Details

#auto_run ⇒ Boolean

If the player can run without pressing Back Input

Returns:

  • (Boolean)


36
37
38
# File 'docs/4_Systems_105_Options.rb', line 36

def auto_run
  @auto_run
end

#battle_mode ⇒ Boolean

If the battle ask to switch pokemon or not

Returns:

  • (Boolean)


18
19
20
# File 'docs/4_Systems_105_Options.rb', line 18

def battle_mode
  @battle_mode
end

#catch_rename ⇒ Boolean

If the battle ask to rename Pokémon at capture

Returns:

  • (Boolean)


24
25
26
# File 'docs/4_Systems_105_Options.rb', line 24

def catch_rename
  @catch_rename
end

#game_state ⇒ PFM::GameState

Get the game state responsive of the whole game state

Returns:



39
40
41
# File 'docs/4_Systems_105_Options.rb', line 39

def game_state
  @game_state
end

#language ⇒ String

The lang id of the Studio::Text loads

Returns:



27
28
29
# File 'docs/4_Systems_105_Options.rb', line 27

def language
  @language
end

#message_frame ⇒ String

The message frame

Returns:



30
31
32
# File 'docs/4_Systems_105_Options.rb', line 30

def message_frame
  @message_frame
end

#message_speed ⇒ Integer

The speed of the message display

Returns:

  • (Integer)


15
16
17
# File 'docs/4_Systems_105_Options.rb', line 15

def message_speed
  @message_speed
end

#music_volume ⇒ Integer Also known as: master_volume

The volume of the BGM and ME

Returns:

  • (Integer)


9
10
11
# File 'docs/4_Systems_105_Options.rb', line 9

def music_volume
  @music_volume
end

#screen_scale ⇒ Integer

The display resolution

Returns:

  • (Integer)


33
34
35
# File 'docs/4_Systems_105_Options.rb', line 33

def screen_scale
  @screen_scale
end

#sfx_volume ⇒ Integer

The volume of the BGS and SE

Returns:

  • (Integer)


12
13
14
# File 'docs/4_Systems_105_Options.rb', line 12

def sfx_volume
  @sfx_volume
end

#show_animation ⇒ Boolean

If the battle show move animations

Returns:

  • (Boolean)


21
22
23
# File 'docs/4_Systems_105_Options.rb', line 21

def show_animation
  @show_animation
end

Instance Method Details

#master_volume=(value)

Change both music & sfx volume at the same time

Parameters:

  • value (Integer) —

    the new volume



58
59
# File 'docs/4_Systems_105_Options.rb', line 58

def master_volume=(value)
end