feat:(slots UI): functional slots
This commit is contained in:
@@ -316,7 +316,7 @@ class VirtualMachine extends EventTarget {
|
||||
const device = this._devices.get(id);
|
||||
if (device) {
|
||||
try {
|
||||
device.setSlotField(slot, field, val, false);
|
||||
device.setSlotField(slot, field, val, force);
|
||||
this.updateDevice(device);
|
||||
return true;
|
||||
} catch (err) {
|
||||
@@ -411,6 +411,20 @@ class VirtualMachine extends EventTarget {
|
||||
return false;
|
||||
}
|
||||
|
||||
removeDeviceSlotOccupant(id: number, index: number): boolean {
|
||||
const device = this._devices.get(id);
|
||||
if (typeof device !== "undefined") {
|
||||
try {
|
||||
this.ic10vm.removeSlotOccupant(id, index);
|
||||
this.updateDevice(device);
|
||||
return true;
|
||||
} catch (err) {
|
||||
this.handleVmError(err);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
saveVMState(): FrozenVM {
|
||||
return this.ic10vm.saveVMState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user