Couple things regarding the
modelIsAllowed
function (stationdockcontrol.js, starts on line 889):
First, checking the condition from shipdata to see if it uses the mission variable does not work correctly because
substring(0, 6)
returns first 6 characters (not 7, so it never will be equal to "mission"):
Code: Select all
if (cond[offset + 2].substring(0, 6) === "mission") {
if (missionVariables[cond[offset + 2].replace("mission_", "")]) {
checking = missionVariables[cond[offset + 2].replace("mission_", "")];
log(this.name, "field = " + cond[offset + 2] + ", value = " + checking);
} else {
log(this.name, "!!NOTE: Condition value mission variable not set: " + cond[offset + 2]);
}
}
Second, this function uses
this.name
, but is not called as a method, so
this
is
undefined
, which results in a TypeError if it tries to log something.