/* Generated by Opal 0.8.0 */ (function(Opal) { Opal.dynamic_require_severity = "error"; var self = Opal.top, $scope = Opal, nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass, $module = Opal.module; Opal.add_stubs(['$include', '$nil?', '$instance_eval', '$instance_exec', '$to_proc', '$alias_method', '$orig_const_missing', '$include?', '$constants', '$const_get', '$raise', '$new', '$static_plot']); self.$include($scope.get('Gamefic')); (function($base, $super) { function $WebPlot(){}; var self = $WebPlot = $klass($base, $super, 'WebPlot', $WebPlot); var def = self.$$proto, $scope = self.$$scope, TMP_1; return (def.$stage = TMP_1 = function(args) { var $a, $b, $c, self = this, $iter = TMP_1.$$p, block = $iter || nil; args = $slice.call(arguments, 0); TMP_1.$$p = null; if ((($a = block['$nil?']()) !== nil && (!$a.$$is_boolean || $a == true))) { return ($a = self).$instance_eval.apply($a, [].concat(args)) } else { return ($b = ($c = self).$instance_exec, $b.$$p = block.$to_proc(), $b).apply($c, [].concat(args)) }; }, nil) && 'stage' })(self, (($scope.get('Gamefic')).$$scope.get('Plot'))); (function($base, $super) { function $Module(){}; var self = $Module = $klass($base, $super, 'Module', $Module); var def = self.$$proto, $scope = self.$$scope; self.$alias_method("orig_const_missing", "const_missing"); return (def.$const_missing = function(sym) { var $a, self = this, e = nil; try { return self.$orig_const_missing(sym) } catch ($err) {if (Opal.rescue($err, [$scope.get('Exception')])) {e = $err; if ((($a = $scope.get('WebPlot').$constants(false)['$include?'](sym)) !== nil && (!$a.$$is_boolean || $a == true))) { return $scope.get('WebPlot').$const_get(sym, false) } else if ((($a = $scope.get('Gamefic').$constants(false)['$include?'](sym)) !== nil && (!$a.$$is_boolean || $a == true))) { return $scope.get('Gamefic').$const_get(sym, false)}; return self.$raise(e); }else { throw $err; } }; }, nil) && 'const_missing'; })(self, null); (function($base, $super) { function $WebUser(){}; var self = $WebUser = $klass($base, $super, 'WebUser', $WebUser); var def = self.$$proto, $scope = self.$$scope; def.$save = function(filename, data) { var self = this; Gamefic.Engine.save(filename, data); }; return (def.$restore = function(filename) { var self = this, data = nil; data = Gamefic.Engine.restore(filename);; return data; }, nil) && 'restore'; })(self, (($scope.get('Gamefic')).$$scope.get('User'))); return (function($base) { var self = $module($base, 'GameficOpal'); var def = self.$$proto, $scope = self.$$scope; Opal.defs(self, '$static_plot', function() { var $a, $b, self = this; return ((($a = (($b = Opal.cvars['@@static_plot']) == null ? nil : $b)) !== false && $a !== nil) ? $a : (Opal.cvars['@@static_plot'] = $scope.get('WebPlot').$new())); }); Opal.defs(self, '$static_player', function() { var $a, $b, self = this; return ((($a = (($b = Opal.cvars['@@static_player']) == null ? nil : $b)) !== false && $a !== nil) ? $a : (Opal.cvars['@@static_player'] = $scope.get('WebUser').$new($scope.get('GameficOpal').$static_plot()))); }); })(self); })(Opal);