Add collectable fuel cans

This commit is contained in:
asraelite 2018-03-07 02:19:06 +00:00
parent 4f8fd6e1af
commit b27bd7bba2
9 changed files with 141 additions and 27 deletions

View file

@ -7,8 +7,6 @@ export default class Module {
type = 'block',
id = 'unknown',
mass = 1,
// Fuel
filled = false,
fuelCapacity = 0,
...properties
}) {
@ -21,10 +19,8 @@ export default class Module {
this.id = id;
this.images = assets.modules[this.type][this.id];
this.data = modules[this.type][this.id];
// Fuel
if (this.type == 'fuel') {
this.fuel = filled ? fuelCapacity : 0;
} else if (this.type == 'thruster') {
if (this.type == 'thruster') {
this.power = 0;
}
}