paperlined.org
games > flash > swarmsim
document updated 9 years ago, on Mar 11, 2015
app/views/debug.html

    <div ng-cloak ng-if="!env.isDebugEnabled">
      <p title="No cheats for you. Nice exploring, though!">You found the debug page! Too bad it only works in the development build.</p>
    </div>
    <div ng-cloak ng-if="env.isDebugEnabled">
      <p title="If you edited the html to see this: shame on you, you filthy cheater.">You found the debug page! Looks like this is a dev build, too. Have fun.</p>
      <div>


Gruntfile.js

    ngconstant: {
      ...
      test: {
        constants: {
          env: {
            name: 'test',
            isDebugEnabled: true,
            isDebugLogged: false,
            ...
          }
        }
      },
      prod: {
        constants: {
          env: {
            name: 'prod',
            isDebugEnabled: false,
            isDebugLogged: false,
            ...
          }
        }
      },
    },
    

install.sh

    grunt test
    # `grunt serve` to run on port 9000.





a problem with your system clock

{return f.enforceNetTime().then(function(b){return i.debug("net time check successful",b),a.netTimeInvalid=b,b?(i.debug("cheater",b),$(".viewwrap").before('<div><p class="cheater">There is a problem with your system clock.</p><p>If you don\'t know why you\'re seeing this, <a target="_blank" href="http://www.reddit.com/r/swarmsim">ask about it here</a>.</p></div>'),$(".viewwrap").css({display:"none"}),$(".footer").css({display:"none"}),h.cancel(k)):void 0},function(){return i.warn("failed to check net time")})}


e.prototype.enforceNetTime=function(){return this.isNetTimeInvalid().then(function(){return function(b){return b&&a.$emit("timecheckFailed"),b}}(this))}