X-12 / andromeda

0 stars 0 forks source link

Create config.js for constants used by systems #53

Closed jextrevor closed 7 years ago

jextrevor commented 7 years ago

Here's an idea - we create a file named config.js that stores things like initial power, initial health, required power, required health, etc.

Basically, it'd be a container for configuration data, and systems would import it and refer to it as needed.

config.js

module.exports = {
"PowerInitialAvailablePower":500,
"LifeSupportRequiredPower":50,
etc...
}

lifesupport.js

config = require('./config.js')
...
setStatus(value){
if(value == true){
if(Power.LifeSupport > config.LifeSupportRequiredPower){
...
DakotaHarward commented 7 years ago

I really love this idea. I can go ahead and just include this in issue #23 if you guys want.

jextrevor commented 7 years ago

I would separate it into different branches so we can work on the issues separately, and then make a new issue, e.g. "Refer to config values in Power system". Feel free to take charge of this issue though

caydenlund commented 7 years ago

'Kay. Looks good.

jextrevor commented 7 years ago

@DakotaHarward, when do you think you will have this done?

DakotaHarward commented 7 years ago

'tis done. (#76)