当前位置: 首页>>代码示例>>C++>>正文


C++ ConfigElem::remove_ulong方法代码示例

本文整理汇总了C++中clib::ConfigElem::remove_ulong方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigElem::remove_ulong方法的具体用法?C++ ConfigElem::remove_ulong怎么用?C++ ConfigElem::remove_ulong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在clib::ConfigElem的用法示例。


在下文中一共展示了ConfigElem::remove_ulong方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Region

/// Resource Management
ResourceRegion::ResourceRegion( Clib::ConfigElem& elem, RegionId id )
    : Region( elem, id ),
      tilecount_( 0 ),

      units_per_area_( elem.remove_ulong( "UnitsPerArea" ) ),
      seconds_per_regrow_( elem.remove_ulong( "SecondsPerRegrow" ) ),
      last_regen_( poltime() ),

      capacity_( elem.remove_ulong( "Capacity" ) ),
      units_( 0 )

{
}
开发者ID:polserver,项目名称:polserver,代码行数:14,代码来源:resource.cpp

示例2: read_config

void ResourceDef::read_config( Clib::ConfigElem& elem )
{
  initial_units_ = elem.remove_ulong( "InitialUnits" );

  // start current_units at initial_units in case there's no entry in
  // RESOURCE.DAT
  current_units_ = initial_units_;

  unsigned short tmp;
  while ( elem.remove_prop( "LandTile", &tmp ) )
  {
    landtiles_.insert( tmp );
  }
  while ( elem.remove_prop( "ObjType", &tmp ) )
  {
    tiles_.insert( tmp );
  }
}
开发者ID:polserver,项目名称:polserver,代码行数:18,代码来源:resource.cpp

示例3: read_combat_config

	void CombatConfig::read_combat_config()
	{
      Clib::ConfigFile cf;
      Clib::ConfigElem elem;
      if ( Clib::FileExists( "config/combat.cfg" ) )
	  {
		cf.open( "config/combat.cfg" );
		cf.readraw( elem );
	  }
	  else if ( Plib::systemstate.config.loglevel > 1 )
		INFO_PRINT << "File config/combat.cfg not found, skipping.\n";

	  settingsManager.combat_config.display_parry_success_messages = elem.remove_bool( "DisplayParrySuccessMessages", false );
	  settingsManager.combat_config.warmode_inhibits_regen = elem.remove_bool( "WarmodeInhibitsRegen", false );
	  settingsManager.combat_config.attack_self = elem.remove_bool( "SingleCombat", false );
	  settingsManager.combat_config.warmode_delay = elem.remove_ulong( "WarModeDelay", 1 );
	  settingsManager.combat_config.core_hit_sounds = elem.remove_bool( "CoreHitSounds", false );
	  settingsManager.combat_config.scripted_attack_checks = elem.remove_bool( "ScriptedAttackChecks", false );
	  settingsManager.combat_config.reset_swing_onturn = elem.remove_bool( "ResetSwingOnTurn", false );
	  settingsManager.combat_config.send_swing_packet = elem.remove_bool( "SendSwingPacket", true );
	  settingsManager.combat_config.send_damage_packet = elem.remove_bool( "SendDamagePacket", false );
	  settingsManager.combat_config.attack_while_frozen = elem.remove_bool( "AttackWhileFrozen", true );
	  settingsManager.combat_config.send_attack_msg = elem.remove_bool( "SendAttackMsg", true );
	}
开发者ID:byterj,项目名称:POL_099b,代码行数:24,代码来源:cmbtcfg.cpp

示例4: read_data

void ResourceRegion::read_data( Clib::ConfigElem& elem )
{
  units_ = elem.remove_ulong( "Units" );
}
开发者ID:polserver,项目名称:polserver,代码行数:4,代码来源:resource.cpp


注:本文中的clib::ConfigElem::remove_ulong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。