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

Simplify creation of arrival aircraft #27

Closed
n8rzz opened this issue Oct 10, 2016 · 2 comments
Closed

Simplify creation of arrival aircraft #27

n8rzz opened this issue Oct 10, 2016 · 2 comments

Comments

@n8rzz
Copy link
Owner

n8rzz commented Oct 10, 2016

current workflow could be simplified. the current process is:

ArrivalBase.preSpawn()

AircraftController.aircraft_new(options)
- airlineModel = window.airlineController.airline_get(options.airline);

AirlineModel.generateAircraft(options);

AirlineModel._generateAircraft(options);
- options.callsign = window.aircraftController.aircraft_callsign_new(options.airline);
- options.icao = this.chooseAircraft(options.fleet);
- aircraftModel = window.aircraftController.aircraft_model_get(options.icao.toLowerCase());

AircraftModel.generateAircraft(options);

AircraftModel._generateAircraft(options);
- options.model = this;
- const aircraft = new AircraftInstanceModel(options);
- prop.aircraft.list.push(aircraft);

There is a lot of back and forth here that could be simplified. This should all be accomplished from within the AircraftController.aircraft_new() method. Making all the various calls from within that single class instead of passing an options object around to 4 different class methods.

@n8rzz n8rzz added the feature label Oct 10, 2016
@n8rzz n8rzz added this to the v3.0.x milestone Oct 10, 2016
@n8rzz n8rzz added refactor and removed feature labels Oct 10, 2016
@n8rzz n8rzz changed the title Simplify creating of arrival aircraft Simplify creation of arrival aircraft Oct 10, 2016
@n8rzz n8rzz removed this from the v3.1.0 milestone Nov 11, 2016
@n8rzz n8rzz added this to the v3.3.0 milestone Dec 23, 2016
@n8rzz n8rzz self-assigned this Jan 13, 2017
@n8rzz
Copy link
Owner Author

n8rzz commented Jan 13, 2017

#243

@erikquinn
Copy link
Collaborator

This issue was moved to openscope/openscope#59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants