equal
deleted
inserted
replaced
671 case 11: { /* {INDUSTRY} */ |
671 case 11: { /* {INDUSTRY} */ |
672 const Industry* i = GetIndustry(GetInt32(&argv)); |
672 const Industry* i = GetIndustry(GetInt32(&argv)); |
673 int32 args[2]; |
673 int32 args[2]; |
674 |
674 |
675 // industry not valid anymore? |
675 // industry not valid anymore? |
676 if (i->xy == 0) break; |
676 if (!IsValidIndustry(i)) break; |
677 |
677 |
678 // First print the town name and the industry type name |
678 // First print the town name and the industry type name |
679 // The string STR_INDUSTRY_PATTERN controls the formatting |
679 // The string STR_INDUSTRY_PATTERN controls the formatting |
680 args[0] = i->town->index; |
680 args[0] = i->town->index; |
681 args[1] = i->type + STR_4802_COAL_MINE; |
681 args[1] = i->type + STR_4802_COAL_MINE; |
827 |
827 |
828 case 0x9A: { // {STATION} |
828 case 0x9A: { // {STATION} |
829 const Station* st = GetStation(GetInt32(&argv)); |
829 const Station* st = GetStation(GetInt32(&argv)); |
830 int32 temp[2]; |
830 int32 temp[2]; |
831 |
831 |
832 if (st->xy == 0) { // station doesn't exist anymore |
832 if (!IsValidStation(st)) { // station doesn't exist anymore |
833 buff = GetStringWithArgs(buff, STR_UNKNOWN_DESTINATION, NULL); |
833 buff = GetStringWithArgs(buff, STR_UNKNOWN_DESTINATION, NULL); |
834 break; |
834 break; |
835 } |
835 } |
836 temp[0] = st->town->townnametype; |
836 temp[0] = st->town->townnametype; |
837 temp[1] = st->town->townnameparts; |
837 temp[1] = st->town->townnameparts; |
840 } |
840 } |
841 case 0x9B: { // {TOWN} |
841 case 0x9B: { // {TOWN} |
842 const Town* t = GetTown(GetInt32(&argv)); |
842 const Town* t = GetTown(GetInt32(&argv)); |
843 int32 temp[1]; |
843 int32 temp[1]; |
844 |
844 |
845 assert(t->xy != 0); |
845 assert(IsValidTown(t)); |
846 |
846 |
847 temp[0] = t->townnameparts; |
847 temp[0] = t->townnameparts; |
848 buff = GetStringWithArgs(buff, t->townnametype, temp); |
848 buff = GetStringWithArgs(buff, t->townnametype, temp); |
849 break; |
849 break; |
850 } |
850 } |