Class: PFM::Message::Properties

Inherits:
Object
  • Object
show all
Defined in:
scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb

Overview

Class holding all the properties for the currently showing message

Defined Under Namespace

Classes: Face

Constant Summary collapse

PROPERTIES =

All the properties that can be set in :[]: with the function to call to compute the property parameters

Returns:

{
  'name' => :parse_speaker_name,
  'face' => :parse_speaker_face,
  'city' => :parse_city_filename,
  'can_skip' => :parse_can_skip,
  'windowskin' => :parse_window_skin,
  'lookto' => :look_to_event,
  'align' => :parse_message_align
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parsed_text) ⇒ Properties

Create a new Properties object

Parameters:



49
50
51
52
53
54
55
56
57
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 49

def initialize(parsed_text)
  @parsed_text = parsed_text
  @show_gold_window = false
  @can_skip_message = false
  @name = nil
  @faces = []
  @align = :left
  preparse_properties
end

Instance Attribute Details

#alignSymbol (readonly)

Get the message alignment

Returns:

  • (Symbol)

    :left, :right, :center



45
46
47
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 45

def align
  @align
end

#can_skip_messageBoolean (readonly)

Tell if user can skip the message using directional keys

Returns:

  • (Boolean)


36
37
38
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 36

def can_skip_message
  @can_skip_message
end

#city_filenameString? (readonly)

Get the city image to show

Returns:



33
34
35
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 33

def city_filename
  @city_filename
end

#facesArray<Face> (readonly)

Get all the faces to show

Returns:



30
31
32
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 30

def faces
  @faces
end

#look_toInteger (readonly)

Get the ID of the event to look to

Returns:



42
43
44
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 42

def look_to
  @look_to
end

#nameString? (readonly)

Get the name to show

Returns:



27
28
29
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 27

def name
  @name
end

#parsed_textString (readonly)

Parsed text of the message

Returns:



21
22
23
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 21

def parsed_text
  @parsed_text
end

#show_gold_windowBoolean

Tell that the message should show the gold window

Returns:

  • (Boolean)


24
25
26
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 24

def show_gold_window
  @show_gold_window
end

#windowskin_overwriteString (readonly)

Get the windowsking overwrite of the current message

Returns:



39
40
41
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 39

def windowskin_overwrite
  @windowskin_overwrite
end

Instance Method Details

#process_look_to

Process the lookto operation



60
61
62
63
64
# File 'scripts/01450 Systems/00004 Message/00001 Logic/00002 Properties.rb', line 60

def process_look_to
  return if @look_to == 0 || ! @look_to

  $game_player.look_to(@look_to)
end