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 stim effects to item props #57

Merged
merged 4 commits into from
Jun 21, 2022
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
8 changes: 8 additions & 0 deletions resolvers/itemResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,14 @@ module.exports = {
return data.count;
}
},
StimEffect: {
type(data, args, context, info) {
return context.util.getLocale(data, 'type', info);
},
skillName(data, args, context, info) {
return context.util.getLocale(data, 'skillName', info);
}
},
Vendor: {
__resolveType(data, args, context) {
if (data.trader) return 'TraderOffer';
Expand Down
19 changes: 18 additions & 1 deletion schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ type ItemPropertiesScope {
zoomLevels: [[Float]]
}

type ItemPropertiesStim {
useTime: Int
cures: [String]
stimEffects: [StimEffect]!
}

type ItemPropertiesSurgicalKit {
uses: Int
useTime: Int
Expand Down Expand Up @@ -390,7 +396,8 @@ union ItemProperties =
ItemPropertiesScope |
ItemPropertiesSurgicalKit |
ItemPropertiesWeapon |
ItemPropertiesWeaponMod
ItemPropertiesWeaponMod |
ItemPropertiesStim

enum ItemSourceName {
prapor
Expand Down Expand Up @@ -562,6 +569,16 @@ type StatusMessage {
statusCode: String!
}

type StimEffect {
type: String!
chance: Float!
delay: Int!
duration: Int!
value: Float!
percent: Boolean!
skillName: String
}

type Task {
id: ID
tarkovDataId: Int
Expand Down