Class: Gamefic::Sdk::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Gamefic::Sdk::Server
- Defined in:
- lib/gamefic-sdk/server.rb
Instance Method Summary collapse
Instance Method Details
#reset_features ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/gamefic-sdk/server.rb', line 60 def reset_features @@old_features ||= $LOADED_FEATURES.clone @@old_constants ||= Object.constants(false) $LOADED_FEATURES.keep_if { |e| @@old_features.include?(e) } Object.constants(false).each do |const| Object.send(:remove_const, const) unless @@old_constants.include?(const) end Gamefic::Plot.blocks.clear end |
#start_plot ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/gamefic-sdk/server.rb', line 51 def start_plot reset_features load File.join(settings.source_dir, 'main.rb') @@plot = Gamefic::Plot.new @@character = @@plot.make_player_character @@plot.introduce @@character @@plot.ready end |