Commit graph

40 commits

Author SHA1 Message Date
Tyler Renelle
04de115877 don't run drops on the client. they will be wiped on refresh anyway,
only run on the server (we still need a way to notify users when a drop
happened on the server)
2013-09-02 20:51:21 -04:00
Tyler Renelle
4174412b11 small tweaks to user._tmp, and fixing my own icon 2013-09-02 17:35:00 -04:00
Tyler Renelle
9af5d2d29b no more 'new' deafult lastCron, set it to +new Date() 2013-08-24 19:07:42 -04:00
Tyler Renelle
6aa9483a0b cron: add timezone calculation into the midst. Note: this requires user.preferences.timezoneOffset exist on the user, otherwise it will default to the script-runner timezone (which works fine if user or browser) 2013-08-20 21:40:39 -04:00
Tyler Renelle
fc3d863feb cast values to their appropriate types when running scoring functions 2013-08-15 00:00:12 -04:00
Tyler Renelle
8ae6e361b8 cleanup corrupt stats too 2013-08-14 22:58:20 -04:00
Tyler Renelle
c40ec44644 typo on corrupt task cleanup 2013-08-14 22:51:47 -04:00
Tyler Renelle
81f83be160 safeguard against NaN & null-value tasks 2013-08-13 20:27:42 -04:00
Tyler Renelle
c88fa701a5 add revive to algos.coffee, needed by apiv2 & mobile 2013-08-04 23:45:58 -04:00
Tyler Renelle
dab72e5865 cap items to maximum in their array, in case the user manually entered
a number larger than the max allowed item in the "restore" modal
2013-07-24 16:45:48 -04:00
Tyler Renelle
a5eb64f771 Merge branch 'master' of github.com:HabitRPG/habitrpg-shared 2013-07-12 16:56:47 -04:00
Tyler Renelle
2bb5ad43e0 require items, algos, helpers locally instead of via index.js 2013-07-12 16:32:28 -04:00
yangit
68e8819c21 Merge remote-tracking branch 'remotes/upstream/master' 2013-06-26 09:56:29 +07:00
yangit
014f2df5c7 remove buying rewards for health (you can buy for money only) 2013-06-26 09:52:40 +07:00
Tyler Renelle
7bb95795c7 Merge branch 'develop' 2013-06-20 20:39:13 -04:00
Tyler Renelle
6998fb70f3 export all scripts into top-level index.js, so that coffeeify includes
can import these properly. Hopefully this fixes the empty helpers bug.
@yangit I'll merge this into master once I'm sure it works
2013-06-18 18:21:27 -04:00
yangit
f6750ffc16 fix for confirmation window when buying rewards w\o money. 2013-06-14 15:07:18 +08:00
Tyler Renelle
06a2989d3b Revert "change to require('./index.js') as per 002d4f9541"
This reverts commit 6ca82b2443.
2013-06-04 12:51:33 -04:00
Tyler Renelle
6ca82b2443 change to require('./index.js') as per 002d4f9541 2013-06-04 12:41:50 -04:00
Shane Lister
de73086f56 Update algos.coffee
Increase egg drop percentage by 10 decrease potion percentage by 10.
2013-06-03 11:03:12 -06:00
Tyler Renelle
66290274b2 cron cleanup (removing shouldCron) 2013-05-27 14:37:31 +01:00
Tyler Renelle
002d4f9541 very strange bug here. If called form the API, require() statements
sometimes return blank objects, but only when required from within
habitrpg-shared - i can require the files directly from the API just
fine. Doesn't help however since habitrpg-shared has dependencies on
itself. @yangit any thoughts?
2013-05-25 19:34:45 +01:00
Tyler Renelle
51a80b6626 some bug-fixes on shouldDo() for today-check 2013-05-25 18:26:07 +01:00
Tyler Renelle
c4e18b5f04 tests: first pass at cron tests 2013-05-25 16:53:35 +01:00
Tyler Renelle
85eb6789ac update daily.value when checked off, not on cron. Better for
testability, and I'm not sure why I was doing it the other way before?
2013-05-25 15:22:04 +01:00
Tyler Renelle
f5b7968132 tests: all the simple scoring test, getting ready for the complex cron
stuff.
2013-05-25 15:03:03 +01:00
Tyler Renelle
6e4f1a40f8 fixes #1036 2013-05-24 18:54:39 +01:00
Tyler Renelle
d293f7415f always pass paths in options{} for consistency, and that way we can add extra uncommon params to the options{} param without needing to pass paths param 2013-05-24 16:12:25 +01:00
yangit
ef9ec0cc22 Coffeeify plugin for browserify to compile .coffee into browser.js. 2013-05-24 13:29:04 +08:00
Tyler Renelle
f0f68ce5d1 bug fix to todos v cron 2013-05-23 17:33:04 +01:00
Tyler Renelle
93b629c901 algos bug fixes 2013-05-22 11:03:32 +01:00
Tyler Renelle
abb1c7947b fix shouldCron bug 2013-05-22 00:36:43 +01:00
Tyler Renelle
9882e70026 add shouldCron so we can test before running cron 2013-05-20 10:56:55 +01:00
Tyler Renelle
7805a2ba26 fix bugs, add paths method to cron. Now mostly works with the website 2013-05-20 00:51:50 +01:00
Tyler Renelle
c0cf9780fe use the path-setting method to notify derby of things that model must change 2013-05-19 23:23:06 +01:00
Tyler Renelle
ad9c1940a9 re-jig all algos.coffee. add in changes I made in the recent past, put cron back in (why was this removed altogether??), fix some bugs 2013-05-19 23:22:37 +01:00
Tyler Renelle
d42ac5d53c helpers.coffee now working with the website 2013-05-19 18:52:13 +01:00
yangit
28aa7d2e4f Requred items.js from algos.coffee We do not need to pass items{} to scoring function anymore.
Alogos are still BROKEN. I'm deploying them here for testing.
2013-05-15 21:59:01 +08:00
yangit
ffdf279ee1 Require.js example expanded.
Helpers.js\moment.js included.
Alogos are still BROKEN. I'm deploying them here for testing.
2013-05-15 14:17:53 +08:00
yangit
ff8721b4a3 Require.js example.
Alogos are still BROKEN. I'm deploying them here for testing.
2013-05-15 13:27:17 +08:00
Renamed from algos.coffee (Browse further)