INNER CODE UNIT · JavaScript
file
Thorium-Sim/thorium · server/classes/computerCore/index.js:170
const file = this.files.find(u => u.id === id);
this.history.unshift(`Removed File: ${file.name} (${file.level})`);
this.files = this.files.filter(f => f.id !== id);
}
restoreFile(id) {
this.files.find(f => f.id === id).restore();
}
uncorruptFile(id) {
const file = this.files.find(f => f.id === id);
this.history.unshift(`File Restored: ${file.name} (${file.level})`);
file.uncorrupt();
}
corruptFile(id) {
const file = this.files.find(f => f.id === id);
this.history.unshift(`File Corrupted: ${file.name} (${file.level})`);
file.corrupt();
}