more flexible view of deliverables

This commit is contained in:
Jottyfan
2025-11-01 01:46:55 +01:00
parent ba82281cad
commit 763a430d94
21 changed files with 104 additions and 107 deletions

View File

@@ -79,11 +79,8 @@ class CompanyGoal {
this.reward = this.reward.tointeger();
if (this.reward > 0) {
goal_text = GSText(GSText.STR_COMPANY_GOAL_REWARD, cargo.cid, this.wanted_amount, destination_string, this.reward);
goal_text = GSText(GSText.STR_COMPANY_GOAL_REWARD, this.reward, cargo.cid, this.wanted_amount, destination_string);
goal_news_text = GSText(GSText.STR_COMPANY_GOAL_REWARD_NEWS, cargo.cid, this.wanted_amount, destination_string_news, this.reward);
} else {
goal_text = GSText(GSText.STR_COMPANY_GOAL, cargo.cid, this.wanted_amount, destination_string);
goal_news_text = GSText(GSText.STR_COMPANY_GOAL_NEWS, cargo.cid, this.wanted_amount, destination_string_news);
}
this.goal_id = GSGoal.New(comp_id, goal_text, goal_type, destination);
this.PublishNews(goal_news_text, comp_id);
@@ -181,8 +178,8 @@ function CompanyGoal::UpdateDelivered(mon, comp_id)
}
local goal_won_news;
if (this.reward > 0) {
GSCompany.ChangeBankBalance(comp_id, this.reward, GSCompany.EXPENSES_OTHER);
// goal_won_news = GSText(GSText.STR_COMPANY_GOAL_REWARD_WON_NEWS, cargo.cid, this.wanted_amount, destination_string_news, this.reward);
GSCompany.ChangeBankBalance(comp_id, this.reward, GSCompany.EXPENSES_OTHER, GSMap.TILE_INVALID);
goal_won_news = GSText(GSText.STR_COMPANY_GOAL_REWARD_WON_NEWS, cargo.cid, this.wanted_amount, destination_string_news, this.reward);
} else {
goal_won_news = GSText(GSText.STR_COMPANY_GOAL_WON_NEWS, cargo.cid, this.wanted_amount, destination_string_news);
}