-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from lefnire/develop
Update my develop branch
- Loading branch information
Showing
181 changed files
with
1,509 additions
and
544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,115 @@ | ||
{ | ||
"Habit": "Habit", | ||
"Daily": "Daily", | ||
"Todo": "Todo", | ||
"Reward": "Reward", | ||
"_commenttut": "TUTORIAL", | ||
|
||
"_commenthead": "HEADER", | ||
"Health": "Health", | ||
"Experience": "Experience", | ||
"History": "History", | ||
"Settings": "Settings", | ||
"Party": "Party", | ||
"Logout": "Logout", | ||
|
||
"_commentuser": "USER", | ||
"Anonymous": "Anonymous", | ||
"Avatar": "Avatar", | ||
"Level": "Level", | ||
"GP": "GP", | ||
"Head": "Head", | ||
"ShowHelm": "Show Helm", | ||
"Hair": "Hair", | ||
"Skin": "Skin", | ||
"Profile": "Profile", | ||
"Edit": "Edit", | ||
"Save": "Save", | ||
"PhotoUrl": "Photo Url", | ||
"FullName": "Full Name", | ||
"Blurb": "Blurb", | ||
"Websites": "Add Website", | ||
"Achievements": "Achievements", | ||
"OriginalUser": "Original User!", | ||
"Inventory": "Inventory", | ||
"EggsTitle": "Eggs", | ||
"EggsContent": "You don't have any eggs yet.", | ||
"HatchingPotionsTitle": "Hatching Potions", | ||
"HatchingPotionsContent": "You don't have any hatching potions yet.", | ||
"Market": "Market", | ||
"MarketTitle": "Welcome to the market!", | ||
"MarketContent": "Dying to get that particular pet you're after, but don't want to wait for it to drop? Buy it here!", | ||
"Stable": "Stable", | ||
"Tokens": "Tokens", | ||
|
||
"_commentitems": "DROPS, ITEMS & REWARDS", | ||
"_comment": "PET EGGS", | ||
"WolfEgg": "Wolf Cub", | ||
"TigerEgg": "Tiger Cub", | ||
"PandaEgg": "Wolf Cub", | ||
"LionEgg": "Lion Cub", | ||
"FoxEgg": "Fox", | ||
"PigEgg": "Flying Pig", | ||
"DragonEgg": "Dragon", | ||
"CactusEgg": "Cactus", | ||
"BearEgg": "Bear Cub", | ||
"WolfEgg": "Wolf", | ||
"_comment": "HATCHING POTIONS", | ||
"BasePot": "Base", | ||
"WhitePot": "White", | ||
"DesertPot": "Desert", | ||
"RedPot": "Red", | ||
"ShadePot": "Shadepot", | ||
"SkeletonPot": "Skeleton", | ||
"ZombiePot": "Zombie", | ||
"CottonPinkPot": "Cotton Candy Pink", | ||
"CottonBluePot": "Cotton Candy Pot", | ||
"GoldenPot": "Golden", | ||
"_comment": "GOLD REWARDS", | ||
|
||
|
||
|
||
"_commentmain": "MAIN WINDOW", | ||
"Habits": "Habits", | ||
"Dailies": "Dailies", | ||
"NewHabit": "New Habit", | ||
"Edit": "Edit", | ||
"Text": "Text", | ||
"ExtraNotes": "Extra Notes", | ||
"Directions/Actions": "Directions/Actions", | ||
"AdvancedOptions": "Advanced Options", | ||
"Difficulty": "Difficulty", | ||
"DifficultyHelpTitle": "How difficult is this task?", | ||
"DifficultyHelpContent": "This multiplies its point value. Use sparingly, rely instead on our organic value-adjustment algorithms. But some tasks are grossly more valuable (Write Thesis vs Floss Teeth). Click for more info.", | ||
"Easy": "Easy", | ||
"Medium": "Medium", | ||
"Hard": "Hard", | ||
"Save&Close": "Save & Close", | ||
"Delete": "Delete", | ||
"Progress": "Progress", | ||
"Score": "Score", | ||
"Daily": "Dailys", | ||
"NewDaily": "New Daily", | ||
"Repeat": "Repeat", | ||
"Su": "Su", | ||
"M": "M", | ||
"T": "T", | ||
"We": "W", | ||
"Th": "Th", | ||
"F": "F", | ||
"S": "S", | ||
"Todos": "Todos", | ||
"Rewards": "Rewards" | ||
} | ||
"NewTodo": "New Todo", | ||
"DueDate": "Due Date", | ||
"Remaining": "Remaining", | ||
"Complete": "Complete", | ||
"Rewards": "Rewards", | ||
"Gold": "Gold", | ||
"Silver": "Silver", | ||
"NewReward": "New Reward", | ||
"Price": "Price", | ||
|
||
"_commentfooter": "FOOTER", | ||
|
||
"_commentmisc": "MISC", | ||
"RemoveAds": "Remove Ads", | ||
"WhyAds": "Why Ads?", | ||
"WhyAdsContent1": "Habit an open source project, and can use all the help it can get - consider this a donation to the contributors. You also get 20 tokens from the purchase, which you can use to buy special items.", | ||
"WhyAdsContent2": "'Hey, I backed the Kickstarter!' - follow ", | ||
"WhyAdsContent3": "these instructions." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** | ||
* Migrate old pets to new system | ||
*/ | ||
// mongo habitrpg ./node_modules/underscore/underscore.js ./migrations/20130326_migrate_pets.js | ||
|
||
var mapping = { | ||
bearcub: {name:'BearCub', modifier: 'Base'}, | ||
cactus: {name:'Cactus', modifier:'Base'}, | ||
dragon: {name:'Dragon', modifier:'Base'}, | ||
flyingpig: {name:'FlyingPig', modifier:'Base'}, | ||
fox: {name:'Fox', modifier:'Base'}, | ||
lioncub: {name:'LionCub', modifier:'Base'}, | ||
pandacub: {name:'PandaCub', modifier:'Base'}, | ||
tigercub: {name:'TigerCub', modifier:'Base'}, | ||
wolfBorder: {name:'Wolf', modifier:'Base'}, | ||
wolfDesert: {name:'Wolf', modifier:'Desert'}, | ||
wolfGolden: {name:'Wolf', modifier:'Golden'}, | ||
wolfRed: {name:'Wolf', modifier:'Red'}, | ||
wolfShade: {name:'Wolf', modifier:'Shade'}, | ||
wolfSkeleton: {name:'Wolf', modifier:'Skeleton'}, | ||
wolfVeteran: {name:'Wolf', modifier:'Veteran'}, | ||
wolfWhite: {name:'Wolf', modifier:'White'}, | ||
wolfZombie: {name:'Wolf', modifier:'Zombie'} | ||
} | ||
|
||
/** | ||
== Old Style == | ||
pet: Object | ||
icon: "Pet-Wolf-White.png" | ||
index: 14 | ||
name: "wolfWhite" | ||
text: "White Wolf" | ||
value: 3 | ||
pets: Object | ||
bearcub: true | ||
cactus: true | ||
== New Style == | ||
currentPet: Object | ||
modifier: "Red" | ||
name: "Wolf" | ||
notes: "Find some Hatching Powder to sprinkle on this egg, and one day it will hatch into a loyal pet." | ||
str: "Wolf-Red" | ||
text: "Wolf" | ||
value: 3 | ||
pets: Array | ||
0: "PandaCub-Base" | ||
1: "Wolf-Base" | ||
*/ | ||
|
||
|
||
db.users.find().forEach(function(user){ | ||
if (!user.items || (!user.items.pets && !user.items.pet)) return; | ||
|
||
// migrate items.pet to items.currentPet | ||
if (!!user.items.pet) { | ||
var mapped = mapping[user.items.pet.name]; | ||
delete user.items.pet; | ||
user.items.currentPet = { | ||
modifier: mapped.modifier, | ||
name: mapped.name, | ||
str: mapped.name + "-" + mapped.modifier, | ||
text: '' // FIXME? | ||
} | ||
} | ||
|
||
// migrate items.pets | ||
if (!!user.items.pets) { | ||
var newPets = []; | ||
_.each(user.items.pets, function(val, key){ | ||
if (_.isNumber(key)) { | ||
newPets.push(val) | ||
//FIXME why is this happening? seems the user gets migrated already... | ||
//throw "Error: User appears already migrated, this shouldn't be happening!" | ||
} else { | ||
newPets.push(mapping[key].name + "-" + mapping[key].modifier); | ||
} | ||
}); | ||
user.items.pets = newPets; | ||
} | ||
|
||
try { | ||
db.users.update( | ||
{_id:user._id}, | ||
{$set: | ||
{ 'items' : user.items } | ||
} | ||
); | ||
} catch(e) { | ||
print(e); | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
/** | ||
* Applies backer tokens & items (this file will be updated periodically | ||
*/ | ||
|
||
// mongo habitrpg ./node_modules/underscore/underscore.js migrations/20130327_apply_tokens.js | ||
|
||
var mapping = [ | ||
{ // $1 | ||
tokens: 0, | ||
users: [] | ||
}, | ||
{ // $5 | ||
tokens: 20, | ||
users: ['9'] | ||
}, | ||
{ // $10 | ||
tokens: 50, | ||
users: [] | ||
}, | ||
{ // $15 | ||
tokens: 100, | ||
users: [] | ||
}, | ||
{ // $30 | ||
tokens: 150, | ||
users: [] | ||
}, | ||
{ // $45 | ||
tokens: 170, | ||
users: [] | ||
}, | ||
{ // $60 | ||
tokens: 200, | ||
users: [] | ||
}, | ||
{ // $70 | ||
tokens: 240, | ||
users: [] | ||
}, | ||
{ // $80 | ||
tokens: 240, | ||
users: [] | ||
}, | ||
{ // $90 | ||
tokens: 280, | ||
users: [] | ||
}, | ||
{ // $300 | ||
tokens: 500, | ||
users: [] | ||
}, | ||
{ // $800 | ||
tokens: 500, | ||
users: [] | ||
} | ||
]; | ||
|
||
db.users.find().forEach(function(user){ | ||
|
||
_.each(mapping, function(tier){ | ||
if( | ||
(!user.backer || !user.backer.tokensApplied) && | ||
|
||
( | ||
_.contains(tier.users, user._id) || | ||
!!user.local && ( | ||
_.contains(tier.users, user.local.username) || | ||
_.contains(tier.users, user.local.email) | ||
) | ||
) | ||
) { | ||
try { | ||
db.users.update( | ||
{_id:user._id}, | ||
{ | ||
$set: { 'backer.tokensApplied': true, 'flags.ads': 'hide' }, | ||
$inc: { balance: (tier.tokens/4) } | ||
} | ||
); | ||
} catch(e) { | ||
print(e); | ||
} | ||
} | ||
}) | ||
|
||
}) | ||
|
||
// This doesn't work, but shows the idea we're after better than the above | ||
/* | ||
_.each(mapping, function(tier){ | ||
db.users.update( | ||
{ | ||
$or: [ | ||
{ _id: { $in: tier.users } }, | ||
{ 'auth.local.username': { $in: tier.users } }, | ||
{ 'auth.local.email': { $in: tier.users } } | ||
], | ||
'backer.tokensApplied': { $exists: false } | ||
}, | ||
{ | ||
$set: { 'backer.tokensApplied': true, 'flags.ads': 'hide' }, | ||
$inc: { balance: (tier.tokens/4) } | ||
}, | ||
{ multi: true} | ||
) | ||
}) | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
Mount_Head_Lion, Mount_Body_Lion, Mount_Head_PolarBear, Mount_Body_PolarBear, Mount_Head_Panda, Mount_Body_Panda, Mount_Head_Tiger, Mount_Body_Tiger, Mount_Head_Bear, Mount_Body_Bear {background: url(Mount-SpriteSheet.png) no-repeat} | ||
Mount_Head_Lion {background-position: 0 0; width: 105px; height: 123px} | ||
Mount_Body_Lion {background-position: -105 0; width: 105px; height: 123px} | ||
Mount_Head_PolarBear {background-position: -210 0; width: 105px; height: 123px} | ||
Mount_Body_PolarBear {background-position: -315 0; width: 105px; height: 123px} | ||
Mount_Head_Panda {background-position: -420 0; width: 105px; height: 123px} | ||
Mount_Body_Panda {background-position: -525 0; width: 105px; height: 123px} | ||
Mount_Head_Tiger {background-position: -630 0; width: 105px; height: 123px} | ||
Mount_Body_Tiger {background-position: -735 0; width: 105px; height: 123px} | ||
Mount_Head_Bear {background-position: -840 0; width: 105px; height: 123px} | ||
Mount_Body_Bear {background-position: -945 0; width: 105px; height: 123px} | ||
.Mount_Head_Lion, .Mount_Body_Lion, .Mount_Head_PolarBear, .Mount_Body_PolarBear, .Mount_Head_Panda, .Mount_Body_Panda, .Mount_Head_Tiger, .Mount_Body_Tiger, .Mount_Head_Bear, .Mount_Body_Bear, .Mount_Head_EtherealLion, .Mount_Body_EtherealLion {background: url(Mount-SpriteSheet.png) no-repeat} | ||
.Mount_Head_Lion {background-position: 0 0; width: 105px; height: 123px} | ||
.Mount_Body_Lion {background-position: -105 0; width: 105px; height: 123px} | ||
.Mount_Head_PolarBear {background-position: -210 0; width: 105px; height: 123px} | ||
.Mount_Body_PolarBear {background-position: -315 0; width: 105px; height: 123px} | ||
.Mount_Head_Panda {background-position: -420 0; width: 105px; height: 123px} | ||
.Mount_Body_Panda {background-position: -525 0; width: 105px; height: 123px} | ||
.Mount_Head_Tiger {background-position: -630 0; width: 105px; height: 123px} | ||
.Mount_Body_Tiger {background-position: -735 0; width: 105px; height: 123px} | ||
.Mount_Head_Bear {background-position: -840 0; width: 105px; height: 123px} | ||
.Mount_Body_Bear {background-position: -945 0; width: 105px; height: 123px} | ||
.Mount_Head_EtherealLion {background-position: -1050 0; width: 105px; height: 123px} | ||
.Mount_Body_EtherealLion {background-position: -1155 0; width: 105px; height: 123px} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Oops, something went wrong.