Skip to content

Commit

Permalink
Things are very broken, and I don't know why.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderson1993 committed Nov 21, 2023
1 parent fafebc1 commit 1fd7ec7
Show file tree
Hide file tree
Showing 19 changed files with 4,727 additions and 1,041 deletions.
5 changes: 1 addition & 4 deletions client/src/data/flight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export const flight = t.router({
flightName || randomWords(3).join("-"),
flightData.map(f => f.name)
);

ctx.flight = new FlightDataModel(
{
name: flightName,
Expand All @@ -145,7 +144,6 @@ export const flight = t.router({

const activePlugins = ctx.server.plugins.filter(p => p.active);
ctx.flight.pluginIds = activePlugins.map(p => p.id);

await ctx.flight.initEcs(ctx.server);
await ctx.flight.initPhysics();
// This will spawn all of the systems and planets bundled with the plugins
Expand Down Expand Up @@ -270,7 +268,7 @@ export const flight = t.router({
icon: stationComplement?.assets[`${s.name}-${c.name}-icon`],
};
}),
widgets: s.widgets.map(w => {
widgets: s.widgets?.map(w => {
return {
...w,
icon: stationComplement?.assets[`${s.name}-${w.name}-icon`],
Expand All @@ -281,7 +279,6 @@ export const flight = t.router({

ctx.flight.ecs.addEntity(shipEntity);
}

// Add the mission if it exists
if (missionId) {
triggerSend("timeline.activate", {
Expand Down
Loading

0 comments on commit 1fd7ec7

Please sign in to comment.