Fixed machine array demos, by permitting machine IDs with hyphenated numeric suffixes to use a machine state file created with an unhyphenated machine ID, and added a demo of Windows 1.0 (the "Premiere Edition")
This commit is contained in:
parent
2f1ab7df40
commit
503cda40f7
27 changed files with 99 additions and 57 deletions
|
|
@ -645,15 +645,17 @@ class Computer extends Component {
|
|||
if (!data) {
|
||||
/*
|
||||
* This is a hack that makes it possible for a machine whose ID has been
|
||||
* supplemented with a suffix (a single letter or digit) to find object IDs
|
||||
* in states created from a machine without the suffix.
|
||||
* supplemented with a hyphenated numeric suffix to find object IDs in states
|
||||
* created from a machine without such a suffix.
|
||||
*
|
||||
* For example, if a state file was created from a machine with ID "ibm5160"
|
||||
* but the current machine is "ibm5160a", this attempts a second lookup with
|
||||
* but the current machine is "ibm5160-1", this attempts a second lookup with
|
||||
* "ibm5160", enabling us to find objects that match the original machine ID
|
||||
* (eg, "ibm5160.romEGA").
|
||||
*
|
||||
* See /devices/pcx86/machine/5160/ega/640kb/array/ for examples of this.
|
||||
*/
|
||||
data = stateComputer.get(component.id.replace(/[a-z0-9]\./i, '.'));
|
||||
data = stateComputer.get(component.id.replace(/-[0-9]+\./i, '.'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue