Skip to content

Commit

Permalink
Merge pull request #106 from influenceth/add-categories
Browse files Browse the repository at this point in the history
Add categories + fix rationing bonus
  • Loading branch information
clexmond authored Nov 18, 2024
2 parents e6b0551 + 95ee156 commit 9431084
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@influenceth/sdk",
"version": "2.3.3",
"version": "2.3.4",
"description": "Influence SDK",
"type": "module",
"module": "./build/index.js",
Expand Down
31 changes: 31 additions & 0 deletions src/lib/building.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,36 @@ const TYPES = {
}
};

const CATEGORY_TYPES = {
[CATEGORIES.STORAGE]: {
name: 'Storage',
},
[CATEGORIES.EXTRACTION]: {
name: 'Extraction',
},
[CATEGORIES.REFINING]: {
name: 'Refining',
},
[CATEGORIES.AGRICULTURE]: {
name: 'Agriculture',
},
[CATEGORIES.MANUFACTURING]: {
name: 'Manufacturing',
},
[CATEGORIES.SHIPBUILDING]: {
name: 'Shipbuilding',
},
[CATEGORIES.TRANSPORT]: {
name: 'Transport',
},
[CATEGORIES.TRADE]: {
name: 'Trade',
},
[CATEGORIES.HOUSING]: {
name: 'Housing',
},
}

// NOTE: constructionTime is in-game seconds
const CONSTRUCTION_TYPES = {
[IDS.WAREHOUSE]: {
Expand Down Expand Up @@ -255,6 +285,7 @@ const getConstructionTime = (buildingType, totalBonus = 1) => {
export default {
TYPES,
CATEGORIES,
CATEGORY_TYPES,
CONSTRUCTION_TYPES,
CONSTRUCTION_STATUSES,
CONSTRUCTION_STATUS_LABELS,
Expand Down
5 changes: 2 additions & 3 deletions src/lib/crewmate.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,8 @@ const ABILITY_TYPES = {
[ABILITY_IDS.FOOD_RATIONING_PENALTY]: {
i: ABILITY_IDS.FOOD_RATIONING_PENALTY,
name: 'Food Rationing Penalty',
departments: {
[DEPARTMENT_IDS.MEDICINE]: 0.0083
}
departments: { [DEPARTMENT_IDS.MEDICINE]: 0.0083 },
notFurtherModified: true
},
[ABILITY_IDS.MARKETPLACE_FEE_ENFORCEMENT]: {
i: ABILITY_IDS.MARKETPLACE_FEE_ENFORCEMENT,
Expand Down

0 comments on commit 9431084

Please sign in to comment.