int Map_Example::run (void) { ACE_TRACE ("Map_Example::run"); // Corresponding KeyType objects are created on the fly. for (int i = 0; i < 100; i++) { map_.bind (i, DataElement (i)); } ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Map has\n"))); for (int j = 0; j < 100; j++) { DataElement d; int result = map_.find (j,d); if (result == 0) { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%d:"), d.getData ())); } } ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("\n"))); // Iterate in the forward direction. this->iterate_forward (); // Iterate in the other direction. this->iterate_reverse (); // Remove all elements from the map. this->remove_all (); // Iterate in the forward direction. this->iterate_forward (); return 0; }
static bool InitParamMap() { paramMap["next"] = DataElement(READONLY_TYPE); paramMap["pairs"] = DataElement(READONLY_TYPE); // dummy UnitDef for address lookups const UnitDef& ud = *unitDefHandler->unitDefs[0]; const char* start = ADDRESS(ud); /* ADD_FLOAT("maxRange", maxRange); // CUSTOM ADD_BOOL("hasShield", hasShield); // CUSTOM ADD_BOOL("canParalyze", canParalyze); // CUSTOM ADD_BOOL("canStockpile", canStockpile); // CUSTOM ADD_BOOL("canAttackWater", canAttackWater); // CUSTOM */ // ADD_INT("buildOptionsCount", ud.buildOptions.size(")); // CUSTOM ADD_FUNCTION("builder", ud, ReturnFalse); // DEPRECATED ADD_FUNCTION("floater", ud, ReturnFalse); // DEPRECATED ADD_FUNCTION("canDGun", ud, ReturnFalse); // DEPRECATED ADD_FUNCTION("canCrash", ud, ReturnFalse); // DEPRECATED ADD_FUNCTION("isCommander", ud, ReturnFalse); // DEPRECATED ADD_FUNCTION("moveData", ud.pathType, ReturnNil); // DEPRECATED ADD_FUNCTION("type", ud, ReturnEmptyString); // DEPRECATED ADD_FUNCTION("maxSlope", ud, ReturnMinusOne); // DEPRECATED ADD_FUNCTION("totalEnergyOut", ud, TotalEnergyOut); ADD_FUNCTION("modCategories", ud.categoryString, CategorySetFromString); ADD_FUNCTION("springCategories", ud.category, CategorySetFromBits); ADD_FUNCTION("noChaseCategories", ud.noChaseCategory, CategorySetFromBits); ADD_FUNCTION("customParams", ud.customParams, CustomParamsTable); ADD_FUNCTION("buildOptions", ud.buildOptions, BuildOptions); ADD_FUNCTION("decoyDef", ud.decoyDef, UnitDefToID); ADD_FUNCTION("weapons", ud.weapons, WeaponsTable); ADD_FUNCTION("sounds", ud.sounds, SoundsTable); ADD_FUNCTION("model", ud, ModelTable); ADD_FUNCTION("moveDef", ud.pathType, MoveDefTable); ADD_FUNCTION("shieldWeaponDef", ud.shieldWeaponDef, WeaponDefToID); ADD_FUNCTION("stockpileWeaponDef", ud.stockpileWeaponDef, WeaponDefToID); ADD_FUNCTION("iconType", ud.iconType, SafeIconType); ADD_FUNCTION("isTransport", ud, IsTransportUnit); ADD_FUNCTION("isImmobile", ud, IsImmobileUnit); ADD_FUNCTION("isBuilding", ud, IsBuildingUnit); ADD_FUNCTION("isBuilder", ud, IsBuilderUnit); ADD_FUNCTION("isMobileBuilder", ud, IsMobileBuilderUnit); ADD_FUNCTION("isStaticBuilder", ud, IsStaticBuilderUnit); ADD_FUNCTION("isFactory", ud, IsFactoryUnit); ADD_FUNCTION("isExtractor", ud, IsExtractorUnit); ADD_FUNCTION("isGroundUnit", ud, IsGroundUnit); ADD_FUNCTION("isAirUnit", ud, IsAirUnit); ADD_FUNCTION("isStrafingAirUnit", ud, IsStrafingAirUnit); ADD_FUNCTION("isHoveringAirUnit", ud, IsHoveringAirUnit); ADD_FUNCTION("isFighterAirUnit", ud, IsFighterAirUnit); ADD_FUNCTION("isBomberAirUnit", ud, IsBomberAirUnit); ADD_FUNCTION("height", ud, ModelHeight); ADD_FUNCTION("radius", ud, ModelRadius); ADD_FUNCTION("minx", ud, ModelMinx); ADD_FUNCTION("midx", ud, ModelMidx); ADD_FUNCTION("maxx", ud, ModelMaxx); ADD_FUNCTION("miny", ud, ModelMiny); ADD_FUNCTION("midy", ud, ModelMidy); ADD_FUNCTION("maxy", ud, ModelMaxy); ADD_FUNCTION("minz", ud, ModelMinz); ADD_FUNCTION("midz", ud, ModelMidz); ADD_FUNCTION("maxz", ud, ModelMaxz); ADD_INT("id", ud.id); ADD_INT("cobID", ud.cobID); ADD_STRING("name", ud.name); ADD_STRING("humanName", ud.humanName); ADD_STRING("tooltip", ud.tooltip); ADD_STRING("wreckName", ud.wreckName); ADD_FUNCTION("deathExplosion", ud.deathExpWeaponDef, WeaponDefToName); ADD_FUNCTION("selfDExplosion", ud.selfdExpWeaponDef, WeaponDefToName); ADD_STRING("buildpicname", ud.buildPicName); ADD_INT("techLevel", ud.techLevel); ADD_INT("maxThisUnit", ud.maxThisUnit); ADD_FLOAT("metalUpkeep", ud.metalUpkeep); ADD_FLOAT("energyUpkeep", ud.energyUpkeep); ADD_FLOAT("metalMake", ud.metalMake); ADD_FLOAT("makesMetal", ud.makesMetal); ADD_FLOAT("energyMake", ud.energyMake); ADD_FLOAT("metalCost", ud.metal); ADD_FLOAT("energyCost", ud.energy); ADD_FLOAT("buildTime", ud.buildTime); ADD_FLOAT("extractsMetal", ud.extractsMetal); ADD_FLOAT("extractRange", ud.extractRange); ADD_FLOAT("windGenerator", ud.windGenerator); ADD_FLOAT("tidalGenerator", ud.tidalGenerator); ADD_FLOAT("metalStorage", ud.metalStorage); ADD_FLOAT("energyStorage", ud.energyStorage); ADD_DEPRECATED_LUADEF_KEY("extractSquare"); ADD_FLOAT("power", ud.power); ADD_FLOAT("health", ud.health); ADD_FLOAT("autoHeal", ud.autoHeal); ADD_FLOAT("idleAutoHeal", ud.idleAutoHeal); ADD_INT("idleTime", ud.idleTime); ADD_BOOL("canSelfD", ud.canSelfD); ADD_INT("selfDCountdown", ud.selfDCountdown); ADD_FLOAT("speed", ud.speed); ADD_FLOAT("turnRate", ud.turnRate); ADD_BOOL("turnInPlace", ud.turnInPlace); ADD_FLOAT("turnInPlaceSpeedLimit", ud.turnInPlaceSpeedLimit); ADD_BOOL("upright", ud.upright); ADD_BOOL("collide", ud.collide); ADD_FLOAT("losHeight", ud.losHeight); ADD_FLOAT("losRadius", ud.losRadius); ADD_FLOAT("airLosRadius", ud.airLosRadius); ADD_INT("radarRadius", ud.radarRadius); ADD_INT("sonarRadius", ud.sonarRadius); ADD_INT("jammerRadius", ud.jammerRadius); ADD_INT("sonarJamRadius", ud.sonarJamRadius); ADD_INT("seismicRadius", ud.seismicRadius); ADD_FLOAT("seismicSignature", ud.seismicSignature); ADD_BOOL("stealth", ud.stealth); ADD_BOOL("sonarStealth", ud.sonarStealth); ADD_FLOAT("mass", ud.mass); ADD_FLOAT("maxHeightDif", ud.maxHeightDif); ADD_FLOAT("minWaterDepth", ud.minWaterDepth); ADD_FLOAT("maxWaterDepth", ud.maxWaterDepth); ADD_FLOAT("waterline", ud.waterline); ADD_INT("flankingBonusMode", ud.flankingBonusMode); ADD_FLOAT("flankingBonusMax", ud.flankingBonusMax); ADD_FLOAT("flankingBonusMin", ud.flankingBonusMin); ADD_FLOAT("flankingBonusDirX", ud.flankingBonusDir.x); ADD_FLOAT("flankingBonusDirY", ud.flankingBonusDir.y); ADD_FLOAT("flankingBonusDirZ", ud.flankingBonusDir.z); ADD_FLOAT("flankingBonusMobilityAdd", ud.flankingBonusMobilityAdd); ADD_INT("armorType", ud.armorType); ADD_FLOAT("armoredMultiple", ud.armoredMultiple); ADD_FLOAT("minCollisionSpeed", ud.minCollisionSpeed); ADD_FLOAT("slideTolerance", ud.slideTolerance); ADD_FLOAT("maxWeaponRange", ud.maxWeaponRange); ADD_FLOAT("maxCoverage", ud.maxCoverage); ADD_BOOL( "buildRange3D", ud.buildRange3D); ADD_FLOAT("buildDistance", ud.buildDistance); ADD_FLOAT("buildSpeed", ud.buildSpeed); ADD_FLOAT("repairSpeed", ud.repairSpeed); ADD_FLOAT("maxRepairSpeed", ud.repairSpeed); ADD_FLOAT("reclaimSpeed", ud.reclaimSpeed); ADD_FLOAT("resurrectSpeed", ud.resurrectSpeed); ADD_FLOAT("captureSpeed", ud.captureSpeed); ADD_FLOAT("terraformSpeed", ud.terraformSpeed); ADD_BOOL("canSubmerge", ud.canSubmerge); ADD_BOOL("floatOnWater", ud.floatOnWater); ADD_BOOL("canFly", ud.canfly); ADD_BOOL("canMove", ud.canmove); ADD_BOOL("onOffable", ud.onoffable); ADD_BOOL("activateWhenBuilt", ud.activateWhenBuilt); ADD_DEPRECATED_LUADEF_KEY("canHover"); ADD_BOOL("reclaimable", ud.reclaimable); ADD_BOOL("capturable", ud.capturable); ADD_BOOL("repairable", ud.repairable); ADD_BOOL("canManualFire", ud.canManualFire); ADD_BOOL("canCloak", ud.canCloak); ADD_BOOL("canRestore", ud.canRestore); ADD_BOOL("canRepair", ud.canRepair); ADD_BOOL("canSelfRepair", ud.canSelfRepair); ADD_BOOL("canReclaim", ud.canReclaim); ADD_BOOL("canAttack", ud.canAttack); ADD_BOOL("canPatrol", ud.canPatrol); ADD_BOOL("canFight", ud.canFight); ADD_BOOL("canGuard", ud.canGuard); ADD_BOOL("canAssist", ud.canAssist); ADD_BOOL("canBeAssisted", ud.canBeAssisted); ADD_BOOL("canRepeat", ud.canRepeat); ADD_BOOL("canCapture", ud.canCapture); ADD_BOOL("canResurrect", ud.canResurrect); ADD_BOOL("canLoopbackAttack", ud.canLoopbackAttack); ADD_BOOL("canFireControl", ud.canFireControl); ADD_INT( "fireState", ud.fireState); ADD_INT( "moveState", ud.moveState); ADD_BOOL("fullHealthFactory", ud.fullHealthFactory); ADD_BOOL("factoryHeadingTakeoff", ud.factoryHeadingTakeoff); //aircraft stuff ADD_DEPRECATED_LUADEF_KEY("drag"); ADD_FLOAT("wingDrag", ud.wingDrag); ADD_FLOAT("wingAngle", ud.wingAngle); ADD_FLOAT("crashDrag", ud.crashDrag); ADD_FLOAT("frontToSpeed", ud.frontToSpeed); ADD_FLOAT("speedToFront", ud.speedToFront); ADD_FLOAT("myGravity", ud.myGravity); ADD_FLOAT("verticalSpeed",ud.verticalSpeed); ADD_FLOAT("maxBank", ud.maxBank); ADD_FLOAT("maxPitch", ud.maxPitch); ADD_FLOAT("turnRadius", ud.turnRadius); ADD_FLOAT("wantedHeight", ud.wantedHeight); ADD_BOOL("hoverAttack", ud.hoverAttack); ADD_BOOL("airStrafe", ud.airStrafe); ADD_BOOL("bankingAllowed",ud.bankingAllowed); ADD_BOOL("useSmoothMesh", ud.useSmoothMesh); // < 0 means it can land, // >= 0 indicates how much the unit will move during hovering on the spot ADD_FLOAT("dlHoverFactor", ud.dlHoverFactor); // bool DontLand (") { return dlHoverFactor >= 0.0f; } ADD_FLOAT("maxAcc", ud.maxAcc); ADD_FLOAT("maxDec", ud.maxDec); ADD_FLOAT("maxAileron", ud.maxAileron); ADD_FLOAT("maxElevator", ud.maxElevator); ADD_FLOAT("maxRudder", ud.maxRudder); ADD_FLOAT("maxFuel", ud.maxFuel); ADD_FLOAT("refuelTime", ud.refuelTime); ADD_FLOAT("minAirBasePower", ud.minAirBasePower); // unsigned char* yardmapLevels[6]; // unsigned char* yardmaps[4]; //Iterations of the Ymap for building rotation ADD_INT("xsize", ud.xsize); ADD_INT("zsize", ud.zsize); // transport stuff ADD_INT( "transportCapacity", ud.transportCapacity); ADD_INT( "transportSize", ud.transportSize); ADD_FLOAT("transportMass", ud.transportMass); ADD_FLOAT("loadingRadius", ud.loadingRadius); ADD_BOOL( "isAirBase", ud.isAirBase); ADD_BOOL( "isFirePlatform", ud.isFirePlatform); ADD_BOOL( "holdSteady", ud.holdSteady); ADD_BOOL( "releaseHeld", ud.releaseHeld); ADD_BOOL( "cantBeTransported", ud.cantBeTransported); ADD_BOOL( "transportByEnemy", ud.transportByEnemy); ADD_INT( "transportUnloadMethod", ud.transportUnloadMethod); ADD_FLOAT("fallSpeed", ud.fallSpeed); ADD_FLOAT("unitFallSpeed", ud.unitFallSpeed); ADD_BOOL( "startCloaked", ud.startCloaked); ADD_FLOAT("cloakCost", ud.cloakCost); ADD_FLOAT("cloakCostMoving", ud.cloakCostMoving); ADD_FLOAT("decloakDistance", ud.decloakDistance); ADD_BOOL( "decloakSpherical", ud.decloakSpherical); ADD_BOOL( "decloakOnFire", ud.decloakOnFire); ADD_INT( "cloakTimeout", ud.cloakTimeout); ADD_BOOL( "canKamikaze", ud.canKamikaze); ADD_FLOAT("kamikazeDist", ud.kamikazeDist); ADD_BOOL( "kamikazeUseLOS", ud.kamikazeUseLOS); ADD_BOOL("targfac", ud.targfac); ADD_BOOL("needGeo", ud.needGeo); ADD_BOOL("isFeature", ud.isFeature); ADD_BOOL("hideDamage", ud.hideDamage); ADD_BOOL("showPlayerName", ud.showPlayerName); ADD_INT("highTrajectoryType", ud.highTrajectoryType); ADD_BOOL( "leaveTracks", ud.decalDef.leaveTrackDecals); ADD_INT( "trackType", ud.decalDef.trackDecalType); ADD_FLOAT("trackWidth", ud.decalDef.trackDecalWidth); ADD_FLOAT("trackOffset", ud.decalDef.trackDecalOffset); ADD_FLOAT("trackStrength", ud.decalDef.trackDecalStrength); ADD_FLOAT("trackStretch", ud.decalDef.trackDecalStretch); ADD_BOOL( "canDropFlare", ud.canDropFlare); ADD_FLOAT("flareReloadTime", ud.flareReloadTime); ADD_FLOAT("flareEfficiency", ud.flareEfficiency); ADD_FLOAT("flareDelay", ud.flareDelay); ADD_FLOAT("flareDropVectorX", ud.flareDropVector.x); ADD_FLOAT("flareDropVectorY", ud.flareDropVector.y); ADD_FLOAT("flareDropVectorZ", ud.flareDropVector.z); ADD_INT( "flareTime", ud.flareTime); ADD_INT( "flareSalvoSize", ud.flareSalvoSize); ADD_INT( "flareSalvoDelay", ud.flareSalvoDelay); ADD_BOOL("levelGround", ud.levelGround); ADD_BOOL("strafeToAttack", ud.strafeToAttack); ADD_BOOL( "useBuildingGroundDecal", ud.decalDef.useGroundDecal); ADD_INT( "buildingDecalType", ud.decalDef.groundDecalType); ADD_INT( "buildingDecalSizeX", ud.decalDef.groundDecalSizeX); ADD_INT( "buildingDecalSizeY", ud.decalDef.groundDecalSizeY); ADD_FLOAT("buildingDecalDecaySpeed", ud.decalDef.groundDecalDecaySpeed); ADD_BOOL("showNanoFrame", ud.showNanoFrame); ADD_BOOL("showNanoSpray", ud.showNanoSpray); ADD_FLOAT("nanoColorR", ud.nanoColor.x); ADD_FLOAT("nanoColorG", ud.nanoColor.y); ADD_FLOAT("nanoColorB", ud.nanoColor.z); ADD_STRING("scriptName", ud.scriptName); ADD_STRING("scriptPath", ud.scriptName); //FIXME // backward compability return true; }
static bool InitParamMap() { paramMap["next"] = DataElement(READONLY_TYPE); paramMap["pairs"] = DataElement(READONLY_TYPE); // dummy WeaponDef for offset generation const WeaponDef wd; const char* start = ADDRESS(wd); ADD_FUNCTION("damages", wd.damages, DamagesArray); ADD_FUNCTION("visuals", wd.visuals, VisualsTable); ADD_FUNCTION("hitSound", wd.soundhit, GuiSoundSetTable); ADD_FUNCTION("fireSound", wd.firesound, GuiSoundSetTable); ADD_FUNCTION("customParams", wd.customParams, CustomParamsTable); ADD_FUNCTION("noEnemyCollide", wd.collisionFlags, NoEnemyCollide); ADD_FUNCTION("noFriendlyCollide", wd.collisionFlags, NoFriendlyCollide); ADD_FUNCTION("noFeatureCollide", wd.collisionFlags, NoFeatureCollide); ADD_FUNCTION("noNeutralCollide", wd.collisionFlags, NoNeutralCollide); ADD_FUNCTION("noGroundCollide", wd.collisionFlags, NoGroundCollide); ADD_DEPRECATED_LUADEF_KEY("areaOfEffect"); ADD_DEPRECATED_LUADEF_KEY("maxVelocity"); ADD_DEPRECATED_LUADEF_KEY("onlyTargetCategories"); ADD_INT("id", wd.id); ADD_INT("tdfId", wd.tdfId); ADD_STRING("name", wd.name); ADD_STRING("description", wd.description); ADD_STRING("cegTag", wd.cegTag); ADD_STRING("type", wd.type); ADD_FLOAT("range", wd.range); ADD_FLOAT("heightMod", wd.heightmod); ADD_FLOAT("accuracy", wd.accuracy); ADD_FLOAT("sprayAngle", wd.sprayAngle); ADD_FLOAT("movingAccuracy", wd.movingAccuracy); ADD_FLOAT("targetMoveError", wd.targetMoveError); ADD_FLOAT("leadLimit", wd.leadLimit); ADD_FLOAT("leadBonus", wd.leadBonus); ADD_FLOAT("predictBoost", wd.predictBoost); ADD_INT("highTrajectory", wd.highTrajectory); ADD_BOOL("noSelfDamage", wd.noSelfDamage); ADD_BOOL("impactOnly", wd.impactOnly); ADD_FLOAT("craterAreaOfEffect", wd.craterAreaOfEffect); ADD_FLOAT("damageAreaOfEffect", wd.damageAreaOfEffect); ADD_FLOAT("edgeEffectiveness", wd.edgeEffectiveness); ADD_FLOAT("fireStarter", wd.fireStarter); ADD_FLOAT("size", wd.size); ADD_FLOAT("sizeGrowth", wd.sizeGrowth); ADD_FLOAT("collisionSize", wd.collisionSize); ADD_INT("salvoSize", wd.salvosize); ADD_INT("projectiles", wd.projectilespershot); ADD_FLOAT("salvoDelay", wd.salvodelay); ADD_FLOAT("reload", wd.reload); ADD_FLOAT("beamtime", wd.beamtime); ADD_BOOL("beamburst", wd.beamburst); ADD_BOOL("waterbounce", wd.waterBounce); ADD_BOOL("groundbounce", wd.groundBounce); ADD_FLOAT("groundslip", wd.bounceSlip); ADD_FLOAT("bouncerebound", wd.bounceRebound); ADD_INT("numbounce", wd.numBounce); ADD_FLOAT("maxAngle", wd.maxAngle); ADD_FLOAT("restTime", wd.restTime); ADD_FLOAT("uptime", wd.uptime); ADD_FLOAT("metalCost", wd.metalcost); ADD_FLOAT("energyCost", wd.energycost); ADD_BOOL("turret", wd.turret); ADD_BOOL("onlyForward", wd.onlyForward); ADD_BOOL("waterWeapon", wd.waterweapon); ADD_BOOL("tracks", wd.tracks); ADD_BOOL("paralyzer", wd.paralyzer); ADD_BOOL("noAutoTarget", wd.noAutoTarget); ADD_BOOL("manualFire", wd.manualfire); ADD_INT("targetable", wd.targetable); ADD_BOOL("stockpile", wd.stockpile); ADD_INT("interceptor", wd.interceptor); ADD_FLOAT("coverageRange", wd.coverageRange); ADD_FLOAT("stockpileTime", wd.stockpileTime); ADD_FLOAT("intensity", wd.intensity); ADD_FLOAT("duration", wd.duration); ADD_INT("beamTTL", wd.beamLaserTTL); ADD_BOOL("soundTrigger", wd.soundTrigger); ADD_BOOL("selfExplode", wd.selfExplode); ADD_BOOL("gravityAffected", wd.gravityAffected); ADD_FLOAT("myGravity", wd.myGravity); ADD_BOOL("noExplode", wd.noExplode); ADD_FLOAT("startvelocity", wd.startvelocity); ADD_FLOAT("weaponAcceleration", wd.weaponacceleration); ADD_FLOAT("turnRate", wd.turnrate); ADD_FLOAT("projectilespeed", wd.projectilespeed); ADD_FLOAT("explosionSpeed", wd.explosionSpeed); ADD_FLOAT("wobble", wd.wobble); ADD_FLOAT("dance", wd.dance); ADD_FLOAT("trajectoryHeight", wd.trajectoryHeight); ADD_BOOL("largeBeamLaser", wd.largeBeamLaser); ADD_BOOL("laserHardStop", wd.laserHardStop); ADD_BOOL("isShield", wd.isShield); ADD_BOOL("shieldRepulser", wd.shieldRepulser); ADD_BOOL("smartShield", wd.smartShield); ADD_BOOL("exteriorShield", wd.exteriorShield); ADD_BOOL("visibleShield", wd.visibleShield); ADD_BOOL("visibleShieldRepulse", wd.visibleShieldRepulse); ADD_INT( "visibleShieldHitFrames", wd.visibleShieldHitFrames); ADD_FLOAT("shieldEnergyUse", wd.shieldEnergyUse); ADD_FLOAT("shieldRadius", wd.shieldRadius); ADD_FLOAT("shieldForce", wd.shieldForce); ADD_FLOAT("shieldMaxSpeed", wd.shieldMaxSpeed); ADD_FLOAT("shieldPower", wd.shieldPower); ADD_FLOAT("shieldPowerRegen", wd.shieldPowerRegen); ADD_FLOAT("shieldPowerRegenEnergy", wd.shieldPowerRegenEnergy); ADD_INT( "shieldRechargeDelay", wd.shieldRechargeDelay); ADD_FLOAT("shieldGoodColorR", wd.shieldGoodColor.x); ADD_FLOAT("shieldGoodColorG", wd.shieldGoodColor.y); ADD_FLOAT("shieldGoodColorB", wd.shieldGoodColor.z); ADD_FLOAT("shieldBadColorR", wd.shieldBadColor.x); ADD_FLOAT("shieldBadColorG", wd.shieldBadColor.y); ADD_FLOAT("shieldBadColorB", wd.shieldBadColor.z); ADD_FLOAT("shieldAlpha", wd.shieldAlpha); ADD_INT("shieldInterceptType", wd.shieldInterceptType); ADD_INT("interceptedByShieldType", wd.interceptedByShieldType); ADD_BOOL("avoidFriendly", wd.avoidFriendly); ADD_BOOL("avoidFeature", wd.avoidFeature); ADD_BOOL("avoidNeutral", wd.avoidNeutral); ADD_FLOAT("targetBorder", wd.targetBorder); ADD_FLOAT("cylinderTargetting", wd.cylinderTargetting); ADD_FLOAT("minIntensity", wd.minIntensity); ADD_FLOAT("heightBoostFactor", wd.heightBoostFactor); ADD_FLOAT("proximityPriority", wd.proximityPriority); ADD_BOOL("sweepFire", wd.sweepFire); ADD_BOOL("canAttackGround", wd.canAttackGround); return true; }
static bool InitParamMap() { paramMap.clear(); paramMap["next"] = DataElement(READONLY_TYPE); paramMap["pairs"] = DataElement(READONLY_TYPE); // dummy FeatureDef for address lookups const FeatureDef fd; const char* start = ADDRESS(fd); ADD_FUNCTION("model", fd, ModelTable); ADD_FUNCTION("collisionVolume", fd.collisionVolume, ColVolTable); ADD_FUNCTION("modelname", fd, ModelName); ADD_FUNCTION("height", fd, ModelHeight); ADD_FUNCTION("radius", fd, ModelRadius); ADD_FUNCTION("drawTypeString", fd, ModelDrawType); ADD_FUNCTION("customParams", fd.customParams, CustomParamsTable); ADD_INT("id", fd.id); ADD_INT("deathFeatureID", fd.deathFeatureDefID); ADD_STRING("name", fd.name); ADD_STRING("tooltip", fd.description); ADD_FLOAT("metal", fd.metal); ADD_FLOAT("energy", fd.energy); ADD_FLOAT("maxHealth", fd.health); ADD_FLOAT("reclaimTime", fd.reclaimTime); ADD_FLOAT("mass", fd.mass); ADD_INT("xsize", fd.xsize); ADD_INT("zsize", fd.zsize); ADD_INT("drawType", fd.drawType); ADD_BOOL("upright", fd.upright); ADD_BOOL("destructable", fd.destructable); ADD_BOOL("reclaimable", fd.reclaimable); ADD_BOOL("autoreclaim", fd.autoreclaim); ADD_BOOL("blocking", fd.collidable); ADD_BOOL("burnable", fd.burnable); ADD_BOOL("floating", fd.floating); ADD_BOOL("geoThermal", fd.geoThermal); ADD_BOOL("noSelect", fd.selectable); ADD_INT("resurrectable", fd.resurrectable); ADD_INT("smokeTime", fd.smokeTime); ADD_DEPRECATED_LUADEF_KEY("minx"); ADD_DEPRECATED_LUADEF_KEY("miny"); ADD_DEPRECATED_LUADEF_KEY("minz"); ADD_DEPRECATED_LUADEF_KEY("midx"); ADD_DEPRECATED_LUADEF_KEY("midy"); ADD_DEPRECATED_LUADEF_KEY("midz"); ADD_DEPRECATED_LUADEF_KEY("maxx"); ADD_DEPRECATED_LUADEF_KEY("maxy"); ADD_DEPRECATED_LUADEF_KEY("maxz"); ADD_DEPRECATED_LUADEF_KEY("deathFeature"); return true; }