~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/immovable.cc

  • Committer: fios at foramnagaidhlig
  • Date: 2015-11-11 09:52:55 UTC
  • mto: This revision was merged to the branch mainline in revision 7621.
  • Revision ID: fios@foramnagaidhlig.net-20151111095255-i2zzpgjv5qw3yart
Renamed WareIndex to DescriptionIndex.

Show diffs side-by-side

added added

removed removed

Lines of Context:
693
693
                                if (packet_version < 7) {
694
694
                                        name = tribes_lookup_table.lookup_immovable(owner_type, name);
695
695
                                }
696
 
                                const WareIndex idx = egbase.tribes().immovable_index(name);
 
696
                                const DescriptionIndex idx = egbase.tribes().immovable_index(name);
697
697
                                if (idx != Widelands::INVALID_INDEX) {
698
698
                                        imm = new Immovable(*egbase.tribes().get_immovable_descr(idx));
699
699
                                } else {
703
703
                        } else { //  world immovable
704
704
                                const World & world = egbase.world();
705
705
                                name = world_lookup_table.lookup_immovable(name);
706
 
                                const WareIndex idx = world.get_immovable_index(name.c_str());
 
706
                                const DescriptionIndex idx = world.get_immovable_index(name.c_str());
707
707
                                if (idx == Widelands::INVALID_INDEX) {
708
708
                                        throw GameDataError
709
709
                                                ("world does not define immovable type \"%s\"", name.c_str());
1172
1172
 *
1173
1173
 * If the immovable is not currently in construction mode, return \c false.
1174
1174
 */
1175
 
bool Immovable::construct_ware(Game & game, WareIndex index)
 
1175
bool Immovable::construct_ware(Game & game, DescriptionIndex index)
1176
1176
{
1177
1177
        ActConstructionData * d = get_action_data<ActConstructionData>();
1178
1178
        if (!d)
1325
1325
 * We are the destination of the given ware's transfer, which is not associated
1326
1326
 * with any request.
1327
1327
 */
1328
 
void PlayerImmovable::receive_ware(Game &, WareIndex ware)
 
1328
void PlayerImmovable::receive_ware(Game &, DescriptionIndex ware)
1329
1329
{
1330
1330
        throw wexception
1331
1331
                ("MO(%u): Received a ware(%u), do not know what to do with it",