Added in a case for a todo with checklists
so the gp and exp for those are reversed correctly.
Added a couple test cases for checking then unchecking tasks.
The percent function is used for ui-bars. When returning numbers below zero the bar will show up with 100% width, 'cause css don't know negative width.
5cd0039 added regression where reset on new user would fail because user.items.gear.owned is undefined
This patch allows tests to get *much* further than before
This checks if the user actually owns the pet, mount or gear they are trying to equip. This also prevents users from setting things that do not exist. (before users could set the value for pets and mounts to any string. Not sure if this leaves possiblilities for xss attacks. but this fix also prevents that).
At @deilann's request, divide the drop chance bonus for contributor levels in half and add a +1/level contributor bonus (subject to the subscription multiplier once implemented in private code) to drop cap.
Currently, when you put on equipment, you see the messageBought notification. There was no messageEquipped notification in the code so I've added one.
I've updated ALL locale files IN ENGLISH, following the convention already in place for using English when there is no translation (e.g., locales/pl/messages.json, locales/sv/messages.json).
When a to-do is checked off, the rewards are increased by the number of checklist items that have been completed. However as reported in https://github.com/HabitRPG/habitrpg/issues/3474, if the to-do is later un-checked, then the rewards subtracted are not being similarly increased by the number of checklist items completed. This fix will change that - the number of checklist items completed will have an equal effect on checking and unchecking a to-do.
This of course won't fix the problem of, upon unchecking, not being able to calculate the exact value of the rewards that had been given upon checking, so there will still be a discrepancy between checking and unchecking, but it will be much smaller than it is currently.
Currently, when you feed a pet enough to turn it into a mount, you see the messageAlreadyMount notification ("You already have that mount. Try feeding another pet."). This fix changes it to the messageEvolve notification ("You have tamed <%= egg %>, let's go for a ride!").