mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
v3: move TAVERN_ID to common code
This commit is contained in:
@@ -2,3 +2,4 @@ export const MAX_HEALTH = 50;
|
|||||||
export const MAX_LEVEL = 100;
|
export const MAX_LEVEL = 100;
|
||||||
export const MAX_STAT_POINTS = MAX_LEVEL;
|
export const MAX_STAT_POINTS = MAX_LEVEL;
|
||||||
export const ATTRIBUTES = ['str', 'int', 'per', 'con'];
|
export const ATTRIBUTES = ['str', 'int', 'per', 'con'];
|
||||||
|
export const TAVERN_ID = '00000000-0000-4000-A000-000000000000';
|
||||||
|
|||||||
@@ -17,15 +17,17 @@ import { shouldDo, daysSince } from './cron';
|
|||||||
api.shouldDo = shouldDo;
|
api.shouldDo = shouldDo;
|
||||||
api.daysSince = daysSince;
|
api.daysSince = daysSince;
|
||||||
|
|
||||||
// TODO under api.constants?
|
// TODO under api.constants? and capitalize exported names too
|
||||||
import {
|
import {
|
||||||
MAX_HEALTH,
|
MAX_HEALTH,
|
||||||
MAX_LEVEL,
|
MAX_LEVEL,
|
||||||
MAX_STAT_POINTS,
|
MAX_STAT_POINTS,
|
||||||
|
TAVERN_ID,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
api.maxLevel = MAX_LEVEL;
|
api.maxLevel = MAX_LEVEL;
|
||||||
api.maxHealth = MAX_HEALTH;
|
api.maxHealth = MAX_HEALTH;
|
||||||
api.maxStatPoints = MAX_STAT_POINTS;
|
api.maxStatPoints = MAX_STAT_POINTS;
|
||||||
|
api.TAVERN_ID = TAVERN_ID;
|
||||||
|
|
||||||
// TODO under api.libs.statHelpers?
|
// TODO under api.libs.statHelpers?
|
||||||
import * as statHelpers from './statHelpers';
|
import * as statHelpers from './statHelpers';
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ window.habitrpg = angular.module('habitrpg',
|
|||||||
.constant("STORAGE_USER_ID", 'habitrpg-user')
|
.constant("STORAGE_USER_ID", 'habitrpg-user')
|
||||||
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
||||||
.constant("MOBILE_APP", false)
|
.constant("MOBILE_APP", false)
|
||||||
.constant("TAVERN_ID", '00000000-0000-4000-A000-000000000000')
|
.constant("TAVERN_ID", window.habitrpgShared.TAVERN_ID)
|
||||||
//.constant("STORAGE_GROUPS_ID", "") // if we decide to take groups offline
|
//.constant("STORAGE_GROUPS_ID", "") // if we decide to take groups offline
|
||||||
|
|
||||||
.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', 'STORAGE_SETTINGS_ID',
|
.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', 'STORAGE_SETTINGS_ID',
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const questScrolls = shared.content.quests;
|
|||||||
const Schema = mongoose.Schema;
|
const Schema = mongoose.Schema;
|
||||||
|
|
||||||
export const INVITES_LIMIT = 100;
|
export const INVITES_LIMIT = 100;
|
||||||
export const TAVERN_ID = '00000000-0000-4000-A000-000000000000';
|
export const TAVERN_ID = shared.TAVERN_ID;
|
||||||
|
|
||||||
// NOTE once Firebase is enabled any change to groups' members in MongoDB will have to be run through the API
|
// NOTE once Firebase is enabled any change to groups' members in MongoDB will have to be run through the API
|
||||||
// changes made directly to the db will cause Firebase to get out of sync
|
// changes made directly to the db will cause Firebase to get out of sync
|
||||||
|
|||||||
Reference in New Issue
Block a user