Class: Gamefic::Chapter
Instance Attribute Summary collapse
- #config ⇒ Hash readonly
- #plot ⇒ Plot readonly
Attributes included from Scriptable::Scenes
#default_conclusion, #default_scene
Class Method Summary collapse
Instance Method Summary collapse
- #conclude ⇒ Object
- #concluding? ⇒ Boolean
-
#configure ⇒ void
Subclasses can override this method to handle additional configuration.
- #included_scripts ⇒ Object
-
#initialize(plot, **config) ⇒ Chapter
constructor
A new instance of Chapter.
- #players ⇒ Object
Methods inherited from Narrative
#cast, inherited, #introduce, restore, #save, #turn, #uncast
Methods included from Scriptable
Methods included from Scriptable::Syntaxes
Methods included from Scriptable::Seeds
#construct, #make, #seed, #seeds
Methods included from Scriptable::Scenes
#active_choice, #block, #conclusion, #introduction, #introductions, #multiple_choice, #named_scenes, #pause, #scene_classes, #scene_classes_map, #scenes, #select_default_conclusion, #select_default_scene, #yes_or_no
Methods included from Scriptable::Responses
#meta, #respond, #responses, #responses_for, #verbs
Methods included from Scriptable::Queries
#available, #children, #descendants, #extended, #global, #integer, #myself, #parent, #plaintext, #siblings
Methods included from Scriptable::Hooks
#after_command, #after_commands, #before_command, #before_commands, #conclude_blocks, #on_conclude, #on_player_conclude, #on_player_output, #on_player_ready, #on_player_update, #on_ready, #on_update, #player_conclude_blocks, #player_output_blocks, #ready_blocks, #update_blocks
Methods included from Scripting
Methods included from Scripting::Syntaxes
Methods included from Scripting::Scenes
#default_conclusion, #default_scene, #introductions, #named_scenes, #prepare, #scene_class, #scenes
Methods included from Scripting::Seeds
Methods included from Scripting::Responses
Methods included from Scripting::Hooks
#after_commands, #before_commands, #conclude_blocks, #player_conclude_blocks, #player_output_blocks, #ready_blocks, #update_blocks
Methods included from Scripting::Entities
#destroy, #entities, #find, #make, #pick, #pick!
Methods included from Scripting::Proxies
Constructor Details
#initialize(plot, **config) ⇒ Chapter
Returns a new instance of Chapter.
12 13 14 15 16 17 18 19 |
# File 'lib/gamefic/chapter.rb', line 12 def initialize(plot, **config) @plot = plot @concluding = false @config = config configure @config.freeze super() end |
Instance Attribute Details
#config ⇒ Hash (readonly)
9 10 11 |
# File 'lib/gamefic/chapter.rb', line 9 def config @config end |
Class Method Details
Instance Method Details
#conclude ⇒ Object
25 26 27 28 |
# File 'lib/gamefic/chapter.rb', line 25 def conclude # @todo Void entities? @concluding = true end |
#concluding? ⇒ Boolean
30 31 32 |
# File 'lib/gamefic/chapter.rb', line 30 def concluding? @concluding end |
#configure ⇒ void
This method returns an undefined value.
Subclasses can override this method to handle additional configuration.
48 |
# File 'lib/gamefic/chapter.rb', line 48 def configure; end |
#included_scripts ⇒ Object
41 42 43 |
# File 'lib/gamefic/chapter.rb', line 41 def included_scripts super - plot.included_scripts end |
#players ⇒ Object
21 22 23 |
# File 'lib/gamefic/chapter.rb', line 21 def players plot.players end |