INNER CODE UNIT · JavaScript
ComputerCore
Thorium-Sim/thorium · server/classes/computerCore/index.js:78
export default class ComputerCore extends System {
constructor(params) {
super({name: "Main Computer", ...params});
this.id = params.id || uuid.v4();
this.class = "ComputerCore";
this.type = "ComputerCore";
this.wing = params.wing || "left";
this.simulatorId = params.simulatorId || null;
this.users = []; // Hackers create virii
this.virii = []; // Virii corrupt files
this.files = []; // Corrupted files shutdown terminals
this.terminals = []; // Who knows what terminals do?
this.history = [];
this.training = params.training || false;
// Start with defaults for all of the above
(params.users || defaults.users).forEach(u => this.users.push(new User(u)));
(params.files || defaults.files).forEach(f => this.files.push(new File(f)));