@@ -85,6 +85,7 @@ import CarrierApiService from '../../../../services/api/carrier'
85
85
import AudioService from ' ../../../../game/audio'
86
86
import OrbitalMechanicsETAWarningVue from ' ../shared/OrbitalMechanicsETAWarning.vue'
87
87
import {eventBusInjectionKey } from " ../../../../eventBus" ;
88
+ import MapEventBusEventNames from " @/eventBusEventNames/map" ;
88
89
89
90
export default {
90
91
components: {
@@ -127,10 +128,10 @@ export default {
127
128
GameContainer .setMode (' waypoints' , this .carrier )
128
129
129
130
this .waypointCreatedHandler = this .onWaypointCreated .bind (this );
130
- this .eventBus .on (' onWaypointCreated ' , this .waypointCreatedHandler );
131
+ this .eventBus .on (MapEventBusEventNames . MapOnWaypointCreated , this .waypointCreatedHandler );
131
132
132
133
this .waypointOutOfRangeHandler = this .onWaypointOutOfRange .bind (this );
133
- this .eventBus .on (' onWaypointOutOfRange ' , this .waypointOutOfRangeHandler );
134
+ this .eventBus .on (MapEventBusEventNames . MapOnWaypointOutOfRange , this .waypointOutOfRangeHandler );
134
135
135
136
this .oldWaypoints = this .carrier .waypoints .slice (0 );
136
137
this .oldWaypointsLooped = this .carrier .waypointsLooped ;
@@ -200,17 +201,17 @@ export default {
200
201
this .recalculateTotalEta ()
201
202
this .recalculateLooped ()
202
203
},
203
- onWaypointCreated (e ) {
204
+ onWaypointCreated ({ waypoint } ) {
204
205
// Overwrite the default action and default action ships
205
- e .action = this .$store .state .settings .carrier .defaultAction
206
- e .actionShips = this .$store .state .settings .carrier .defaultAmount
206
+ waypoint .action = this .$store .state .settings .carrier .defaultAction
207
+ waypoint .actionShips = this .$store .state .settings .carrier .defaultAmount
207
208
208
209
AudioService .type ()
209
210
210
211
this .recalculateTotalEta ()
211
212
this .recalculateLooped ()
212
213
},
213
- onWaypointOutOfRange (e ) {
214
+ onWaypointOutOfRange ({ waypoint } ) {
214
215
this .$toast .error (` This waypoint is out of hyperspace range.` )
215
216
},
216
217
recalculateTotalEta () {
0 commit comments