diff options
Diffstat (limited to 'src/newgrf_town.cpp')
-rw-r--r-- | src/newgrf_town.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index b144897ec..876e32870 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -91,32 +91,32 @@ uint32 TownGetVariable(byte variable, uint32 parameter, bool *available, Town *t case 0xB2: return t->statues; case 0xB6: return ClampToU16(t->num_houses); case 0xB9: return t->growth_rate; - case 0xBA: return ClampToU16(t->pass.new_max); - case 0xBB: return GB(ClampToU16(t->pass.new_max), 8, 8); - case 0xBC: return ClampToU16(t->mail.new_max); - case 0xBD: return GB(ClampToU16(t->mail.new_max), 8, 8); - case 0xBE: return ClampToU16(t->pass.new_act); - case 0xBF: return GB(ClampToU16(t->pass.new_act), 8, 8); - case 0xC0: return ClampToU16(t->mail.new_act); - case 0xC1: return GB(ClampToU16(t->mail.new_act), 8, 8); - case 0xC2: return ClampToU16(t->pass.old_max); - case 0xC3: return GB(ClampToU16(t->pass.old_max), 8, 8); - case 0xC4: return ClampToU16(t->mail.old_max); - case 0xC5: return GB(ClampToU16(t->mail.old_max), 8, 8); - case 0xC6: return ClampToU16(t->pass.old_act); - case 0xC7: return GB(ClampToU16(t->pass.old_act), 8, 8); - case 0xC8: return ClampToU16(t->mail.old_act); - case 0xC9: return GB(ClampToU16(t->mail.old_act), 8, 8); - case 0xCA: return t->GetPercentPassTransported(); - case 0xCB: return t->GetPercentMailTransported(); - case 0xCC: return t->food.new_act; - case 0xCD: return GB(t->food.new_act, 8, 8); - case 0xCE: return t->water.new_act; - case 0xCF: return GB(t->water.new_act, 8, 8); - case 0xD0: return t->food.old_act; - case 0xD1: return GB(t->food.old_act, 8, 8); - case 0xD2: return t->water.old_act; - case 0xD3: return GB(t->water.old_act, 8, 8); + case 0xBA: return ClampToU16(t->supplied[CT_PASSENGERS].new_max); + case 0xBB: return GB(ClampToU16(t->supplied[CT_PASSENGERS].new_max), 8, 8); + case 0xBC: return ClampToU16(t->supplied[CT_MAIL].new_max); + case 0xBD: return GB(ClampToU16(t->supplied[CT_MAIL].new_max), 8, 8); + case 0xBE: return ClampToU16(t->supplied[CT_PASSENGERS].new_act); + case 0xBF: return GB(ClampToU16(t->supplied[CT_PASSENGERS].new_act), 8, 8); + case 0xC0: return ClampToU16(t->supplied[CT_MAIL].new_act); + case 0xC1: return GB(ClampToU16(t->supplied[CT_MAIL].new_act), 8, 8); + case 0xC2: return ClampToU16(t->supplied[CT_PASSENGERS].old_max); + case 0xC3: return GB(ClampToU16(t->supplied[CT_PASSENGERS].old_max), 8, 8); + case 0xC4: return ClampToU16(t->supplied[CT_MAIL].old_max); + case 0xC5: return GB(ClampToU16(t->supplied[CT_MAIL].old_max), 8, 8); + case 0xC6: return ClampToU16(t->supplied[CT_PASSENGERS].old_act); + case 0xC7: return GB(ClampToU16(t->supplied[CT_PASSENGERS].old_act), 8, 8); + case 0xC8: return ClampToU16(t->supplied[CT_MAIL].old_act); + case 0xC9: return GB(ClampToU16(t->supplied[CT_MAIL].old_act), 8, 8); + case 0xCA: return t->GetPercentTransported(CT_PASSENGERS); + case 0xCB: return t->GetPercentTransported(CT_MAIL); + case 0xCC: return t->received[TE_FOOD].new_act; + case 0xCD: return GB(t->received[TE_FOOD].new_act, 8, 8); + case 0xCE: return t->received[TE_WATER].new_act; + case 0xCF: return GB(t->received[TE_WATER].new_act, 8, 8); + case 0xD0: return t->received[TE_FOOD].old_act; + case 0xD1: return GB(t->received[TE_FOOD].old_act, 8, 8); + case 0xD2: return t->received[TE_WATER].old_act; + case 0xD3: return GB(t->received[TE_WATER].old_act, 8, 8); case 0xD4: return t->road_build_months; case 0xD5: return t->fund_buildings_months; } |