Skip to content

Commit

Permalink
add map transits
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzmatazzz committed Aug 23, 2024
1 parent 0c5dd8b commit 022bda5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
17 changes: 17 additions & 0 deletions resolvers/mapResolver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,23 @@ export default {
return 'MapExtract';
},
},
MapTransit: {
conditions(data, args, context, info) {
if (!data.conditions) {
return null;
}
return context.data.worker.map.getLocale(data.conditions, context, info);
},
description(data, args, context, info) {
if (!data.description) {
return null;
}
return context.data.worker.map.getLocale(data.description, context, info);
},
map(data, args, context, info) {
return context.data.worker.map.get(context, info, data.map);
},
},
MobInfo: {
name(data, args, context, info) {
return context.data.worker.map.getLocale(data.name, context, info);
Expand Down
12 changes: 12 additions & 0 deletions schema-static.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,7 @@ type Map {
maxPlayerLevel: Int
spawns: [MapSpawn]
extracts: [MapExtract]
transits: [MapTransit]
locks: [Lock]
switches: [MapSwitch]
hazards: [MapHazard]
Expand Down Expand Up @@ -842,6 +843,17 @@ type MapSwitchOperation {
union MapSwitchTarget = MapSwitch | MapExtract
type MapTransit {
id: ID!
description: String
conditions: String
map: Map
position: MapPosition
outline: [MapPosition]
top: Float
bottom: Float
}
type Mastering {
id: ID!
weapons: [Item]!
Expand Down

0 comments on commit 022bda5

Please sign in to comment.