static */
| 178 | } |
| 179 | |
| 180 | /* static */ Money ScriptGroup::GetProfitThisYear(GroupID group_id) |
| 181 | { |
| 182 | if (!IsValidGroup(group_id)) return -1; |
| 183 | |
| 184 | Money profit = 0; |
| 185 | |
| 186 | for (const Vehicle *v : Vehicle::Iterate()) { |
| 187 | if (v->group_id != group_id) continue; |
| 188 | if (!v->IsPrimaryVehicle()) continue; |
| 189 | |
| 190 | profit += v->GetDisplayProfitThisYear(); |
| 191 | } |
| 192 | |
| 193 | return profit; |
| 194 | } |
| 195 | |
| 196 | /* static */ Money ScriptGroup::GetProfitLastYear(GroupID group_id) |
| 197 | { |
nothing calls this directly
no test coverage detected