Skip to content

Instantly share code, notes, and snippets.

@cesque
Created December 7, 2017 13:33
Show Gist options
  • Select an option

  • Save cesque/c83e82eee8a0085dd9e108f6853432ac to your computer and use it in GitHub Desktop.

Select an option

Save cesque/c83e82eee8a0085dd9e108f6853432ac to your computer and use it in GitHub Desktop.
class Airspace {
constructor() {
this.width = 1000
this.height = 1000
this.nodes = [
/*{
id: 'MNS5',
name: 'Mensae V',
position: {
x: 300,
y: 800,
},
possibleCargoes: {
has: [
'heptogen',
],
wants: [
'isotropicnylil'
]
},
cargo: {
has: [
{ id: 'heptogen', amount: 667.3 }
],
wants: [
{ id: 'isotropicnylil', scale: 1.1 }
]
}
}*/
]
this.edges = [
/*{
id: 1,
from: 'MNS5',
to: 'SOLA',
enabled: true,
}*/
]
this.companies = []
this.planes = []
this.landingRadius = 10
this.crashRadius = 10
this.cargoes = [
/*{
id: 'heptogen',
name: 'Heptogen',
basePrice: 700,
priceChange: (age) => {
return 700 - age
},
paths: {
minimum: 1,
maximum: 5,
}
}*/
]
this.weatherevents = [
/*{
id: 0,
type: 'bosonsignals'
}*/
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment