mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 19:47:03 +00:00
added mountmaster support
pets: added language support - needs to be commuted to other languages' content.coffee - added api.mounts and api.questmounts index.coffee - revised api.countMounts to remove quest mounts from the list
This commit is contained in:
parent
5e594b3197
commit
77d92b84dc
3 changed files with 19 additions and 4 deletions
|
|
@ -30,6 +30,10 @@
|
|||
"beastMastName": "Beast Master",
|
||||
"beastMastText": "Has found all 90 pets (insanely difficult, congratulate this user!)",
|
||||
"beastMastText2": " and has released their pets a total of <%= count %> times",
|
||||
"mountAchievement": "You have earned the \"Mount Master\" achievement for taming all the mounts!",
|
||||
"mountMastName": "Mount Master",
|
||||
"mountMastText": "Has tamed all 90 mounts (even more difficult, congratulate this user!)",
|
||||
"mountMastText2": " and has released their mounts a total of <%= count %> times",
|
||||
"dropsEnabled": "Drops Enabled!",
|
||||
"itemDrop": "An item has dropped!",
|
||||
"firstDrop": "You've unlocked the Drop System! Now when you complete tasks, you have a small chance of finding an item. You just found a <strong><%= eggText %> Egg</strong>! <%= eggNotes %>",
|
||||
|
|
|
|||
|
|
@ -730,6 +730,15 @@ api.questPets = _.transform api.questEggs, (m, egg) ->
|
|||
_.defaults m, _.transform api.hatchingPotions, (m2, pot) ->
|
||||
m2[egg.key + "-" + pot.key] = true
|
||||
|
||||
## added for mountmaster -- yes, the transforms are correct, since the same strings are used for both pets and mounts
|
||||
api.mounts = _.transform api.dropEggs, (m, egg) ->
|
||||
_.defaults m, _.transform api.hatchingPotions, (m2, pot) ->
|
||||
m2[egg.key + "-" + pot.key] = true
|
||||
|
||||
api.questMounts = _.transform api.questEggs, (m, egg) ->
|
||||
_.defaults m, _.transform api.hatchingPotions, (m2, pot) ->
|
||||
m2[egg.key + "-" + pot.key] = true
|
||||
|
||||
#TODO after the fall event, set Base set to canBuy:true (or remove, since it's default) and set Fall set to canBuy:false
|
||||
api.food =
|
||||
# Base
|
||||
|
|
|
|||
|
|
@ -318,11 +318,13 @@ api.countPets = (originalCount, pets) ->
|
|||
count-- if pets[pet]
|
||||
count
|
||||
|
||||
api.countMounts= (originalCount, mounts) ->
|
||||
count = if originalCount? then originalCount else _.size(mounts)
|
||||
api.countMounts = (originalCount, mounts) ->
|
||||
count2 = if originalCount? then originalCount else _.size(mounts)
|
||||
for mount of content.questPets
|
||||
count2-- if mounts[mount]
|
||||
for mount of content.specialMounts
|
||||
count-- if mounts[mount]
|
||||
count
|
||||
count2-- if mounts[mount]
|
||||
count2
|
||||
|
||||
###
|
||||
------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue