class Gamefic::Sdk::Server
Public Instance Methods
Source
# 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
Source
# 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