You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, just that I did find a clever hack, but it's complicated.
varstuff=function(){// Separate the definitions so you can't exit the functionvarbehaviorFn=function(me){// <edit>// </edit>// END// ***};map.defineObject('startDrone',{•••});// just some security in case you exit the behaviorFnvarcheck1=behaviorFn.toString().replace(/\n/g,' ');varcheck2=stuff.toString().replace(/\n/g,' ');if(!(/E(N)D(.*)\*\*\*/.test(check1))){throw"Function ends too early";}if(/(\*\*\*).*(E(N)D)/.test(check2)){throw"You can't trick my code into exiting early";}};stuff();
behaviorFn is the code I'm trying to protect. It is used in the definition of startDrone.
But since startLevel is protected, perhaps we level creators could have #START_OF_PROTECTED_FUNCTION# and #END_OF_PROTECTED_FUNCTION# in our levels?
Oh yeah, two AWESOME levels coming up when this is resolved. One is called droneRelay.jsx, you will have to pass the key through four drones before finishing.
The text was updated successfully, but these errors were encountered:
Oh, just that I did find a clever hack, but it's complicated.
behaviorFn
is the code I'm trying to protect. It is used in the definition ofstartDrone
.But since
startLevel
is protected, perhaps we level creators could have#START_OF_PROTECTED_FUNCTION#
and#END_OF_PROTECTED_FUNCTION#
in our levels?Oh yeah, two AWESOME levels coming up when this is resolved. One is called
droneRelay.jsx
, you will have to pass the key through four drones before finishing.The text was updated successfully, but these errors were encountered: