Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 10 additions & 5 deletions resolvers/traderResolver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ export default {
return context.data.worker.item.getItem(context, info, data.currencyItem);
},
taskUnlock(data, args, context, info) {
if (data.vendor.taskUnlock) return context.data.worker.task.get(context, info, data.vendor.taskUnlock);
return null;
if (!data.vendor.taskUnlock) {
return null;
}
return context.data.worker.task.get(context, info, data.vendor.taskUnlock);
},
buyLimit(data) {
return data.vendor.buyLimit;
Expand All @@ -60,14 +62,17 @@ export default {
return context.data.worker.trader.getLocale(trader.name, context, info);
},
async normalizedName(data, args, context, info) {
return (await context.data.worker.trader.get(context, info, data.trader_id)).normalizedName;
const trader = await context.data.worker.trader.get(context, info, data.trader_id);
return trader.normalizedName;
},
trader(data, args, context, info) {
return context.data.worker.trader.get(context, info, data.trader_id);
},
taskUnlock(data, args, context, info) {
if (data.taskUnlock) return context.data.worker.task.get(context, info, data.taskUnlock);
return null;
if (!data.taskUnlock) {
return null;
}
return context.data.worker.task.get(context, info, data.taskUnlock);
},
},
TraderPrice: {
Expand Down
10 changes: 10 additions & 0 deletions schema-static.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,19 @@ type Map {
hazards: [MapHazard]
lootContainers: [LootContainerPosition]
stationaryWeapons: [StationaryWeaponPosition]
artillery: MapArtillerySettings
#svg: MapSvg
}

type MapArtillerySettings {
zones: [MapArtilleryZone]
}

type MapArtilleryZone {
position: MapPosition
radius: Float
}

type MapExtract {
id: ID!
name: String
Expand Down