diff --git a/company.nut b/company.nut index d40356b..e1ae8ca 100644 --- a/company.nut +++ b/company.nut @@ -110,9 +110,10 @@ function CompanyGoal::FinalizeGoal() class CompanyData { comp_id = null; - active_goals = {}; + active_goals = null; constructor(comp_id) { + this.active_goals = {}; this.comp_id = comp_id; for (local num = 0; num < 5; num += 1) this.active_goals[num] <- null; diff --git a/main.nut b/main.nut index 2950487..515b0fc 100644 --- a/main.nut +++ b/main.nut @@ -231,6 +231,7 @@ function BusyBeeClass::Start() if (this.companies[cid] == null) { this.companies[cid] = CompanyData(cid); GSLog.Info("Created company " + cid); + new_goal_timeout = 0; // Force creating of new goals. } } }