Skip to content

Commit

Permalink
Merge pull request #337 from the-hideout/artillery
Browse files Browse the repository at this point in the history
Add artillery zones to maps
  • Loading branch information
Razzmatazzz authored Oct 10, 2024
2 parents 3af46ae + 09fd307 commit b5d9e03
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
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
13 changes: 13 additions & 0 deletions schema-static.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,22 @@ type Map {
hazards: [MapHazard]
lootContainers: [LootContainerPosition]
stationaryWeapons: [StationaryWeaponPosition]
artillery: MapArtillerySettings
#svg: MapSvg
}
type MapArtillerySettings {
zones: [MapArtilleryZone]
}
type MapArtilleryZone {
position: MapPosition
outline: [MapPosition]
top: Float
bottom: Float
radius: Float @deprecated(reason: "Use outline instead.")
}
type MapExtract {
id: ID!
name: String
Expand Down

0 comments on commit b5d9e03

Please sign in to comment.