~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/logic/playercommand.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:
1124
1124
CmdSetWarePriority::CmdSetWarePriority
1125
1125
        (const int32_t _duetime, const PlayerNumber _sender,
1126
1126
         PlayerImmovable & imm,
1127
 
         const int32_t type, const WareIndex index, const int32_t priority)
 
1127
         const int32_t type, const DescriptionIndex index, const int32_t priority)
1128
1128
        :
1129
1129
        PlayerCommand(_duetime, _sender),
1130
1130
        m_serial     (imm.serial()),
1203
1203
CmdSetWareMaxFill::CmdSetWareMaxFill
1204
1204
        (const int32_t _duetime, const PlayerNumber _sender,
1205
1205
         PlayerImmovable & imm,
1206
 
         const WareIndex index, const uint32_t max_fill)
 
1206
         const DescriptionIndex index, const uint32_t max_fill)
1207
1207
        :
1208
1208
        PlayerCommand(_duetime, _sender),
1209
1209
        m_serial     (imm.serial()),
1275
1275
 
1276
1276
CmdChangeTargetQuantity::CmdChangeTargetQuantity
1277
1277
        (const int32_t _duetime, const PlayerNumber _sender,
1278
 
         const uint32_t _economy, const WareIndex _ware_type)
 
1278
         const uint32_t _economy, const DescriptionIndex _ware_type)
1279
1279
        :
1280
1280
        PlayerCommand(_duetime, _sender),
1281
1281
        m_economy (_economy), m_ware_type(_ware_type)
1321
1321
CmdSetWareTargetQuantity::CmdSetWareTargetQuantity
1322
1322
        (const int32_t _duetime, const PlayerNumber _sender,
1323
1323
         const uint32_t _economy,
1324
 
         const WareIndex _ware_type,
 
1324
         const DescriptionIndex _ware_type,
1325
1325
         const uint32_t _permanent)
1326
1326
        :
1327
1327
        CmdChangeTargetQuantity(_duetime, _sender, _economy, _ware_type),
1383
1383
CmdResetWareTargetQuantity::CmdResetWareTargetQuantity
1384
1384
        (const int32_t _duetime, const PlayerNumber _sender,
1385
1385
         const uint32_t _economy,
1386
 
         const WareIndex _ware_type)
 
1386
         const DescriptionIndex _ware_type)
1387
1387
        :
1388
1388
        CmdChangeTargetQuantity(_duetime, _sender, _economy, _ware_type)
1389
1389
{}
1439
1439
CmdSetWorkerTargetQuantity::CmdSetWorkerTargetQuantity
1440
1440
        (const int32_t _duetime, const PlayerNumber _sender,
1441
1441
         const uint32_t _economy,
1442
 
         const WareIndex _ware_type,
 
1442
         const DescriptionIndex _ware_type,
1443
1443
         const uint32_t _permanent)
1444
1444
        :
1445
1445
        CmdChangeTargetQuantity(_duetime, _sender, _economy, _ware_type),
1501
1501
CmdResetWorkerTargetQuantity::CmdResetWorkerTargetQuantity
1502
1502
        (const int32_t _duetime, const PlayerNumber _sender,
1503
1503
         const uint32_t _economy,
1504
 
         const WareIndex _ware_type)
 
1504
         const DescriptionIndex _ware_type)
1505
1505
        :
1506
1506
        CmdChangeTargetQuantity(_duetime, _sender, _economy, _ware_type)
1507
1507
{}
1895
1895
/*** struct Cmd_SetStockPolicy ***/
1896
1896
CmdSetStockPolicy::CmdSetStockPolicy
1897
1897
        (int32_t time, PlayerNumber p,
1898
 
         Warehouse & wh, bool isworker, WareIndex ware,
 
1898
         Warehouse & wh, bool isworker, DescriptionIndex ware,
1899
1899
         Warehouse::StockPolicy policy)
1900
1900
: PlayerCommand(time, p)
1901
1901
{
1967
1967
{
1968
1968
        m_warehouse = des.unsigned_32();
1969
1969
        m_isworker = des.unsigned_8();
1970
 
        m_ware = WareIndex(des.unsigned_8());
 
1970
        m_ware = DescriptionIndex(des.unsigned_8());
1971
1971
        m_policy = static_cast<Warehouse::StockPolicy>(des.unsigned_8());
1972
1972
}
1973
1973
 
1992
1992
                        PlayerCommand::read(fr, egbase, mol);
1993
1993
                        m_warehouse = fr.unsigned_32();
1994
1994
                        m_isworker = fr.unsigned_8();
1995
 
                        m_ware = WareIndex(fr.unsigned_8());
 
1995
                        m_ware = DescriptionIndex(fr.unsigned_8());
1996
1996
                        m_policy = static_cast<Warehouse::StockPolicy>(fr.unsigned_8());
1997
1997
                } else {
1998
1998
                        throw UnhandledVersionError("CmdSetStockPolicy",