Fix: Sharing goals between companies is a bad idea. Closes #7367
This commit is contained in:
@@ -110,9 +110,10 @@ function CompanyGoal::FinalizeGoal()
|
|||||||
class CompanyData {
|
class CompanyData {
|
||||||
comp_id = null;
|
comp_id = null;
|
||||||
|
|
||||||
active_goals = {};
|
active_goals = null;
|
||||||
|
|
||||||
constructor(comp_id) {
|
constructor(comp_id) {
|
||||||
|
this.active_goals = {};
|
||||||
this.comp_id = comp_id;
|
this.comp_id = comp_id;
|
||||||
|
|
||||||
for (local num = 0; num < 5; num += 1) this.active_goals[num] <- null;
|
for (local num = 0; num < 5; num += 1) this.active_goals[num] <- null;
|
||||||
|
|||||||
1
main.nut
1
main.nut
@@ -231,6 +231,7 @@ function BusyBeeClass::Start()
|
|||||||
if (this.companies[cid] == null) {
|
if (this.companies[cid] == null) {
|
||||||
this.companies[cid] = CompanyData(cid);
|
this.companies[cid] = CompanyData(cid);
|
||||||
GSLog.Info("Created company " + cid);
|
GSLog.Info("Created company " + cid);
|
||||||
|
new_goal_timeout = 0; // Force creating of new goals.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user