equal
deleted
inserted
replaced
846 tp.b = tile2; |
846 tp.b = tile2; |
847 |
847 |
848 return tp; |
848 return tp; |
849 } |
849 } |
850 |
850 |
|
851 void DeleteSubsidyWithTown(TownID index) |
|
852 { |
|
853 Subsidy *s; |
|
854 |
|
855 for (s = _subsidies; s != endof(_subsidies); s++) { |
|
856 if (s->cargo_type != CT_INVALID && s->age < 12 && |
|
857 (((s->cargo_type == CT_PASSENGERS || s->cargo_type == CT_MAIL) && (index == s->from || index == s->to)) || |
|
858 ((s->cargo_type == CT_GOODS || s->cargo_type == CT_FOOD) && index == s->to))) { |
|
859 s->cargo_type = CT_INVALID; |
|
860 } |
|
861 } |
|
862 } |
|
863 |
851 void DeleteSubsidyWithIndustry(IndustryID index) |
864 void DeleteSubsidyWithIndustry(IndustryID index) |
852 { |
865 { |
853 Subsidy *s; |
866 Subsidy *s; |
854 |
867 |
855 for (s = _subsidies; s != endof(_subsidies); s++) { |
868 for (s = _subsidies; s != endof(_subsidies); s++) { |
856 if (s->cargo_type != CT_INVALID && s->age < 12 && |
869 if (s->cargo_type != CT_INVALID && s->age < 12 && |
857 s->cargo_type != CT_PASSENGERS && s->cargo_type != CT_MAIL && |
870 s->cargo_type != CT_PASSENGERS && s->cargo_type != CT_MAIL && |
858 (index == s->from || (s->cargo_type!=CT_GOODS && s->cargo_type!=CT_FOOD && index==s->to))) { |
871 (index == s->from || (s->cargo_type != CT_GOODS && s->cargo_type != CT_FOOD && index == s->to))) { |
859 s->cargo_type = CT_INVALID; |
872 s->cargo_type = CT_INVALID; |
860 } |
873 } |
861 } |
874 } |
862 } |
875 } |
863 |
876 |