Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Fence rep, hideout bonuses #171

Merged
merged 3 commits into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions resolvers/hideoutResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ module.exports = {
return context.util.getLocale(data, 'name', info);
}
},
HideoutStationBonus: {
name(data, args, context, info) {
return context.util.getLocale(data, 'name', info);
},
skillName(data, args, context, info) {
return context.util.getLocale(data, 'skillName', info);
},
slotItems(data, args, context, info) {
if (!data.slotItems || data.slotItems.length === 0) {
return [];
}
return context.data.item.getItemsByIDs(context.requestId, data.slotItems);
}
},
HideoutStationLevel: {
crafts(data, args, context, info) {
context.util.testDepthLimit(info, 2);
Expand Down
33 changes: 33 additions & 0 deletions schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,16 @@ type HideoutStation {
crafts: [Craft]!
}

type HideoutStationBonus {
type: String!
name: String!
value: Float
passive: Boolean
production: Boolean
slotItems: [Item]
skillName: String
}

type HideoutStationLevel {
id: ID!
#name: String!
Expand All @@ -188,6 +198,7 @@ type HideoutStationLevel {
tarkovDataId: Int
"crafts is only available via the hideoutStations query."
crafts: [Craft]!
bonuses: [HideoutStationBonus]
}

type historicalPricePoint {
Expand Down Expand Up @@ -488,6 +499,10 @@ type ItemPropertiesPreset {
default: Boolean
}

type ItemPropertiesResource {
units: Int
}

type ItemPropertiesScope {
ergonomics: Float
sightModes: [Int]
Expand Down Expand Up @@ -572,6 +587,7 @@ union ItemProperties =
ItemPropertiesNightVision |
ItemPropertiesPainkiller |
ItemPropertiesPreset |
ItemPropertiesResource |
ItemPropertiesScope |
ItemPropertiesSurgicalKit |
ItemPropertiesWeapon |
Expand Down Expand Up @@ -998,6 +1014,7 @@ type Trader {
currency: Item!
discount: Float!
levels: [TraderLevel!]!
reputationLevels: [TraderReputationLevel]!
"barters and cashOffers are only available via the traders query."
barters: [Barter]!
cashOffers: [TraderCashOffer]!
Expand Down Expand Up @@ -1054,6 +1071,22 @@ type TraderOffer implements Vendor {
taskUnlock: Task
}

union TraderReputationLevel = TraderReputationLevelFence

type TraderReputationLevelFence {
minimumReputation: Int!
scavCooldownModifier: Float
scavCaseTimeModifier: Float
extractPriceModifier: Float
scavFollowChance: Float
scavEquipmentSpawnChanceModifier: Float
priceModifier: Float
hostileBosses: Boolean
hostileScavs: Boolean
scavAttackSupport: Boolean
availableScavExtracts: Int
}

type TraderStanding {
trader: Trader!
standing: Float!
Expand Down