Remove hasLimits/setLimits
Changes in GUI have made these obsolete
This commit is contained in:
2 files changed
-30
No files matched your search
@@ -2342,28 +2342,6 @@ class Runtime extends EventEmitter {
|
||||
this.emit(Runtime.INTERPOLATION_CHANGED, interpolationEnabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* tw: Enable or disable limits. Uses setRuntimeOptions internally.
|
||||
* @param {boolean} limits True if limits should be enabled.
|
||||
*/
|
||||
setLimits (limits) {
|
||||
this.setRuntimeOptions({
|
||||
maxClones: limits ? Runtime.MAX_CLONES : Infinity,
|
||||
effectLimits: limits,
|
||||
fencing: limits
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* tw: Determine if limits are enabled or disabled.
|
||||
* @returns {boolean} True if some limits are enabled.
|
||||
*/
|
||||
hasLimits () {
|
||||
return this.runtimeOptions.maxClones !== Infinity ||
|
||||
this.runtimeOptions.effectLimits ||
|
||||
this.runtimeOptions.fencing;
|
||||
}
|
||||
|
||||
/**
|
||||
* tw: Update runtime options
|
||||
* @param {*} runtimeOptions New options
|
||||
|
||||
@@ -244,14 +244,6 @@ class VirtualMachine extends EventEmitter {
|
||||
this.runtime.setInterpolation(interpolationEnabled);
|
||||
}
|
||||
|
||||
setLimits (limits) {
|
||||
this.runtime.setLimits(limits);
|
||||
}
|
||||
|
||||
hasLimits () {
|
||||
return this.runtime.hasLimits();
|
||||
}
|
||||
|
||||
setRuntimeOptions (runtimeOptions) {
|
||||
this.runtime.setRuntimeOptions(runtimeOptions);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user