54 changes: 28 additions & 26 deletions data/mp/stats/research.ini
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ msgName = RES_W_RK_LTAT1
iconID = IMAGE_RES_WEAPONTECH
statID = Rocket-LtA-T
requiredResearch = R-Wpn-Rocket-Damage03,R-Wpn-Rocket-Accuracy01
resultComponents = CyborgRkt1Ground,Rocket-LtA-T,Rocket-VTOL-LtA-T
resultComponents = CyborgRocket,Rocket-LtA-T,Rocket-VTOL-LtA-T

[R-Wpn-Sunburst]
name = "Sunburst AA Rocket Array"
Expand Down Expand Up @@ -276,7 +276,7 @@ msgName = RES_CN1MK1
iconID = IMAGE_RES_WEAPONTECH
statID = Cannon1Mk1
requiredResearch = R-Wpn-MG-Damage01
resultComponents = Cannon1-VTOL,Cannon1Mk1,CyborgCannonGrd
resultComponents = Cannon1-VTOL,Cannon1Mk1,CyborgCannon

[R-Struc-Factory-Module]
name = "Factory Module"
Expand All @@ -297,7 +297,7 @@ keyTopic = 1
msgName = RES_MG1MK1
iconID = IMAGE_RES_WEAPONTECH
statID = MG1Mk1
resultComponents = CyborgChain1Ground,MG1-VTOL,MG1Mk1
resultComponents = CyborgChaingun,MG1-VTOL,MG1Mk1

[R-Wpn-MG2Mk1]
name = "Twin Machinegun"
Expand Down Expand Up @@ -351,7 +351,7 @@ msgName = RES_MORTA1
iconID = IMAGE_RES_WEAPONTECH
statID = Mortar1Mk1
requiredResearch = R-Wpn-Cannon-Damage01,R-Struc-Factory-Module
resultComponents = Cyb-Bod-Grenade,Mortar1Mk1
resultComponents = Cyb-Wpn-Grenade,Mortar1Mk1

[R-Wpn-Flamer01Mk1]
name = "Flamer"
Expand All @@ -362,7 +362,7 @@ msgName = RES_FLAME1
iconID = IMAGE_RES_WEAPONTECH
statID = Flame1Mk1
requiredResearch = R-Sys-Engineering01
resultComponents = CyborgFlamerGrd,Flame1Mk1
resultComponents = CyborgFlamer01,Flame1Mk1

[R-Wpn-Mortar02Hvy]
name = "Heavy Mortar - Bombard"
Expand Down Expand Up @@ -603,7 +603,7 @@ msgName = RES_ENGIN1
iconID = IMAGE_RES_SYSTEMTECH
imdName = trlcon.pie
subgroupIconID = IMAGE_RES_GRPUPG
resultComponents = Cyb-Bod-ComEng
resultComponents = CyborgSpade
results = "Construct:ConstructorPoints:10"

[R-Wpn-Cannon3Mk1]
Expand Down Expand Up @@ -647,6 +647,7 @@ msgName = RES_ST_FCY1
iconID = IMAGE_RES_STRUCTURETECH
statID = A0CyborgFactory
requiredResearch = R-Sys-Engineering01
resultComponents = CyborgLightBody,CyborgLegs
resultStructures = A0CyborgFactory

[R-Wpn-MG-Damage01]
Expand Down Expand Up @@ -971,7 +972,7 @@ msgName = RES_C_CT1
iconID = IMAGE_RES_COMPUTERTECH
statID = CommandBrain01
requiredResearch = R-Struc-CommandRelay
resultComponents = CommandBrain01
resultComponents = CommandBrain01,CommandTurret1

[R-Defense-TankTrap01]
name = "Tank Traps"
Expand Down Expand Up @@ -1042,7 +1043,7 @@ msgName = RES_REPTU1
iconID = IMAGE_RES_SYSTEMTECH
statID = LightRepair1
requiredResearch = R-Sys-Engineering01
resultComponents = Cyb-Bod-Mechanic,LightRepair1
resultComponents = CyborgRepair,LightRepair1

[R-Defense-WallUpgrade02]
name = "Improved Hardcrete Mk2"
Expand Down Expand Up @@ -1395,9 +1396,9 @@ msgName = RES_FLAME2
iconID = IMAGE_RES_WEAPONTECH
statID = Flame2
requiredResearch = R-Wpn-Flamer-Damage04,R-Wpn-Flamer01Mk1
redComponents = Flame1Mk1,CyborgFlamerGrd
resultComponents = Cyb-Bod-Thermite,Flame2
replacedComponents = CyborgFlamerGrd:Cyb-Bod-Thermite
redComponents = Flame1Mk1,CyborgFlamer01
resultComponents = Cyb-Wpn-Thermite,Flame2
replacedComponents = CyborgFlamer01:Cyb-Wpn-Thermite

[R-Wpn-Howitzer03-Rot]
name = "Rotary Howitzer - Hellstorm"
Expand All @@ -1420,8 +1421,8 @@ msgName = RES_W_MG4
iconID = IMAGE_RES_WEAPONTECH
statID = MG4ROTARYMk1
requiredResearch = R-Wpn-MG3Mk1,R-Wpn-MG-ROF03
redComponents = CyborgChain1Ground,MG1-VTOL,MG1Mk1,MG2-VTOL,MG2Mk1,MG3-VTOL,MG3Mk1
resultComponents = CybRotMgGrd,MG4ROTARY-VTOL,MG4ROTARYMk1
redComponents = CyborgChaingun,MG1-VTOL,MG1Mk1,MG2-VTOL,MG2Mk1,MG3-VTOL,MG3Mk1
resultComponents = CyborgRotMG,MG4ROTARY-VTOL,MG4ROTARYMk1

[R-Wpn-Mortar3]
name = "Rotary Mortar - Pepperpot"
Expand Down Expand Up @@ -1466,7 +1467,7 @@ msgName = RES_W_LAS1
iconID = IMAGE_RES_WEAPONTECH
statID = Laser3BEAMMk1
requiredResearch = R-Struc-Research-Upgrade08,R-Sys-Sensor-Upgrade03
resultComponents = Cyb-Bod-Las1,Laser3BEAM-VTOL,Laser3BEAMMk1
resultComponents = Cyb-Wpn-Laser,Laser3BEAM-VTOL,Laser3BEAMMk1

[R-Wpn-Laser02]
name = "Pulse Laser"
Expand All @@ -1489,8 +1490,8 @@ iconID = IMAGE_RES_WEAPONTECH
statID = Missile-A-T
requiredResearch = R-Wpn-Rocket07-Tank-Killer,R-Wpn-RocketSlow-Accuracy02,R-Struc-Research-Upgrade07
redComponents = Rocket-LtA-T,Rocket-VTOL-LtA-T
resultComponents = Cyb-Bod-Atmiss,Missile-A-T,Missile-VTOL-AT
replacedComponents = CyborgRkt1Ground:Cyb-Bod-Atmiss
resultComponents = Cyb-Wpn-Atmiss,Missile-A-T,Missile-VTOL-AT
replacedComponents = CyborgRocket:Cyb-Wpn-Atmiss

[R-Wpn-RailGun01]
name = "Needle Gun"
Expand All @@ -1501,7 +1502,7 @@ msgName = RES_W_RAIL1
iconID = IMAGE_RES_WEAPONTECH
statID = RailGun1Mk1
requiredResearch = R-Wpn-Cannon4AMk1,R-Struc-Research-Upgrade07,R-Wpn-Cannon-Damage07
resultComponents = Cyb-Bod-Rail1,RailGun1-VTOL,RailGun1Mk1
resultComponents = Cyb-Wpn-Rail1,RailGun1-VTOL,RailGun1Mk1

[R-Wpn-RailGun02]
name = "Rail Gun"
Expand Down Expand Up @@ -1683,6 +1684,7 @@ iconID = IMAGE_RES_CYBORGTECH
imdName = icmolql.pie
subgroupIconID = IMAGE_RES_GRPUPG
requiredResearch = R-Cyborg-Metals03,R-Struc-Research-Upgrade04
resultComponents = CyborgHeavyBody
results = "Cyborgs:Armour:35", "Cyborgs:HitPoints:35"

[R-Cyborg-Metals05]
Expand Down Expand Up @@ -3458,8 +3460,8 @@ msgName = RES_CYW_H_HPV
iconID = IMAGE_RES_CYBORGTECH
statID = Cannon4AUTOMk1
requiredResearch = R-Cyborg-Hvywpn-Mcannon,R-Wpn-Cannon4AMk1
resultComponents = Cyb-Hvybod-HPV
replacedComponents = Cyb-Hvybod-Mcannon:Cyb-Hvybod-HPV
resultComponents = Cyb-Hvywpn-HPV
replacedComponents = Cyb-Hvywpn-Mcannon:Cyb-Hvywpn-HPV

[R-Vehicle-Armor-Heat01]
name = "Thermal Armor"
Expand Down Expand Up @@ -3835,8 +3837,8 @@ researchPower = 125
msgName = RES_CYW_H_MC
iconID = IMAGE_RES_CYBORGTECH
statID = Cannon2A-TMk1
requiredResearch = R-Wpn-Cannon2Mk1,R-Cyborg-Metals04
resultComponents = Cyb-Hvybod-Mcannon
requiredResearch = R-Wpn-Cannon2Mk1
resultComponents = Cyb-Hvywpn-Mcannon

[R-Cyborg-Hvywpn-Acannon]
name = "Super Auto-Cannon Cyborg"
Expand All @@ -3846,7 +3848,7 @@ msgName = RES_CYW_H_AC
iconID = IMAGE_RES_CYBORGTECH
statID = Cannon5VulcanMk1
requiredResearch = R-Wpn-Cannon5,R-Cyborg-Hvywpn-HPV
resultComponents = Cyb-Hvybod-Acannon
resultComponents = Cyb-Hvywpn-Acannon

[R-Cyborg-Hvywpn-TK]
name = "Super Tank-Killer Cyborg"
Expand All @@ -3856,7 +3858,7 @@ msgName = RES_CYW_H_TK
iconID = IMAGE_RES_CYBORGTECH
statID = Rocket-VTOL-HvyA-T
requiredResearch = R-Cyborg-Metals04,R-Wpn-Rocket07-Tank-Killer
resultComponents = Cyb-Hvybod-TK
resultComponents = Cyb-Hvywpn-TK

[R-Sys-Autorepair-General]
name = "Auto-Repair"
Expand Down Expand Up @@ -3977,7 +3979,7 @@ msgName = RES_CYW_H_PLAS
iconID = IMAGE_RES_CYBORGTECH
statID = Laser2PULSEMk1
requiredResearch = R-Wpn-Laser02
resultComponents = Cyb-Hvybod-PulseLsr
resultComponents = Cyb-Hvywpn-PulseLsr

[R-Cyborg-Hvywpn-RailGunner]
name = "Super Rail-Gunner"
Expand All @@ -3987,7 +3989,7 @@ msgName = RES_CYW_H_RG
iconID = IMAGE_RES_CYBORGTECH
statID = RailGun2Mk1
requiredResearch = R-Wpn-RailGun02
resultComponents = Cyb-Hvybod-RailGunner
resultComponents = Cyb-Hvywpn-RailGunner

[R-Cyborg-Hvywpn-A-T]
name = "Super Scourge Cyborg"
Expand All @@ -3997,7 +3999,7 @@ msgName = RES_CYW_H_AT
iconID = IMAGE_RES_CYBORGTECH
statID = Missile-A-T
requiredResearch = R-Cyborg-Metals04,R-Wpn-Missile2A-T
resultComponents = Cyb-Hvybod-A-T
resultComponents = Cyb-Hvywpn-A-T

[R-Sys-SpyTower]
name = "Nexus Link Tower"
Expand Down
1 change: 0 additions & 1 deletion data/mp/stats/structure.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,6 @@ type = DEFENSE
sensorID = TowerSensor
resistance = 150
weapons = MG3Mk1
flags = "Connected"

[GuardTower2]
name = "Twin Machinegun Guard Tower"
Expand Down
62 changes: 28 additions & 34 deletions data/mp/stats/templates.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type = DROID
compSensor = SensorTurret1Mk1

[Cyb-Hvy-A-T]
compBody = Cyb-Hvybod-A-T
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
Expand Down Expand Up @@ -120,7 +120,7 @@ type = DROID
weapons = Missile-A-T

[MP-Cyb-Needle-GRD]
compBody = Cyb-Bod-Rail1
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = Cyb-Wpn-Rail1
Expand Down Expand Up @@ -198,7 +198,7 @@ type = DROID
weapons = Mortar3ROTARYMk1

[MP-Cyb-ATmiss-GRD]
compBody = Cyb-Bod-Atmiss
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = Cyb-Wpn-Atmiss
Expand All @@ -210,7 +210,7 @@ type = DROID
weapons = Bomb4-VTOL-HvyINC

[Cyb-Hvy-PulseLsr]
compBody = Cyb-Hvybod-PulseLsr
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
Expand Down Expand Up @@ -254,7 +254,7 @@ type = DROID
weapons = Cannon5VulcanMk1

[Cyb-Hvy-RailGunner]
compBody = Cyb-Hvybod-RailGunner
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
Expand Down Expand Up @@ -291,7 +291,7 @@ type = DROID
weapons = Bomb3-VTOL-LtINC

[Cyb-Cannon-GROUND]
compBody = CyborgCannonGrd
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand Down Expand Up @@ -347,7 +347,7 @@ type = DROID
weapons = Rocket-LtA-T

[Cyb-Hvy-Mcannon]
compBody = Cyb-Hvybod-Mcannon
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
Expand Down Expand Up @@ -378,7 +378,7 @@ type = DROID
weapons = MG3Mk1

[CyborgFlamer01Grd]
compBody = CyborgFlamerGrd
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = CyborgFlamer01
Expand All @@ -390,7 +390,7 @@ type = DROID
weapons = Laser2PULSEMk1

[CyborgRotMgGround]
compBody = CybRotMgGrd
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = CyborgRotMG
Expand Down Expand Up @@ -486,7 +486,7 @@ type = DROID
weapons = MG1Mk1

[Cyb-Rocket-GROUND]
compBody = CyborgRkt1Ground
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand All @@ -499,18 +499,12 @@ type = DROID
weapons = Rocket-VTOL-BB

[Cyb-ComEng]
compBody = Cyb-Bod-ComEng
compBody = CyborgLightBody
compConstruct = CyborgSpade
available = 1
compPropulsion = CyborgLegs
type = CYBORG_CONSTRUCT

[ATESTVEHICLE]
compBody = Body1REC
compPropulsion = tracked01
type = DROID
weapons = Cannon2A-TMk1

[A-Viper-Trk-HMG]
compBody = Body1REC
compPropulsion = tracked01
Expand Down Expand Up @@ -561,7 +555,7 @@ type = DROID
weapons = Rocket-LtA-T

[Cyb-Thermite]
compBody = Cyb-Bod-Thermite
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand All @@ -580,7 +574,7 @@ type = DROID
weapons = Cannon2A-TMk1

[Cyb-Rail1-GROUND]
compBody = Cyb-Bod-Rail1
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand All @@ -599,7 +593,7 @@ type = DROID
weapons = MG3Mk1

[CyborgCannon01Grd]
compBody = CyborgCannonGrd
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = CyborgCannon
Expand Down Expand Up @@ -648,7 +642,7 @@ type = DROID
weapons = CommandTurret1

[Cyb-Gren]
compBody = Cyb-Bod-Grenade
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand Down Expand Up @@ -697,7 +691,7 @@ type = DROID
weapons = Cannon1Mk1

[CyborgRkt01Ground]
compBody = CyborgRkt1Ground
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = CyborgRocket
Expand All @@ -721,7 +715,7 @@ type = DROID
weapons = Cannon1Mk1

[Cyb-RotMG-GROUND]
compBody = CybRotMgGrd
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand Down Expand Up @@ -765,7 +759,7 @@ type = DROID
weapons = Cannon375mmMk1

[Cyb-Hvy-Acannon]
compBody = Cyb-Hvybod-Acannon
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
Expand Down Expand Up @@ -820,7 +814,7 @@ type = DROID
weapons = Bomb1-VTOL-LtHE

[MP-Cyb-Laser1-GRD]
compBody = Cyb-Bod-Las1
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = Cyb-Wpn-Laser
Expand Down Expand Up @@ -958,7 +952,7 @@ type = DROID
weapons = MG3Mk1

[Cyb-Flamer-GROUND]
compBody = CyborgFlamerGrd
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand Down Expand Up @@ -1107,7 +1101,7 @@ type = DROID
weapons = Rocket-Pod

[ASPOTTER]
compBody = Cyb-Hvybod-HPV
compBody = CyborgHeavyBody
compPropulsion = CyborgLegs
type = CYBORG_SUPER
weapons = Cyb-Hvywpn-HPV
Expand Down Expand Up @@ -1251,7 +1245,7 @@ type = DROID
weapons = Cannon4AUTOMk1

[Cyb-Laser1-GROUND]
compBody = Cyb-Bod-Las1
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand Down Expand Up @@ -1306,14 +1300,14 @@ type = DROID
weapons = Cannon375mmMk1

[Cyb-Hvy-TK]
compBody = Cyb-Hvybod-TK
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
weapons = Cyb-Hvywpn-TK

[Cyb-Hvy-HPV]
compBody = Cyb-Hvybod-HPV
compBody = CyborgHeavyBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG_SUPER
Expand Down Expand Up @@ -1344,7 +1338,7 @@ type = DROID
weapons = Cannon375mmMk1

[Cyb-Chain-GROUND]
compBody = CyborgChain1Ground
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand All @@ -1363,7 +1357,7 @@ type = DROID
weapons = Cannon375mmMk1

[CyborgChain01Ground]
compBody = CyborgChain1Ground
compBody = CyborgLightBody
compPropulsion = CyborgLegs
type = CYBORG
weapons = CyborgChaingun
Expand All @@ -1375,7 +1369,7 @@ type = DROID
weapons = Missile-A-T

[Cyb-Mechanic]
compBody = Cyb-Bod-Mechanic
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
compRepair = CyborgRepair
Expand Down Expand Up @@ -1576,7 +1570,7 @@ type = DROID
weapons = RailGun3Mk1

[Cyb-Atmiss-GROUND]
compBody = Cyb-Bod-Atmiss
compBody = CyborgLightBody
available = 1
compPropulsion = CyborgLegs
type = CYBORG
Expand Down
2 changes: 1 addition & 1 deletion data/mp/stats/weapons.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2849,7 +2849,7 @@ LightWorld = 1
effectSize = 1
designable = 0
penetrate = 1
name = *Cybrog Thermite Weapon*
name = *Cyborg Thermite Weapon*

[Cyb-Wpn-Rail1]
buildPower = 160
Expand Down
2 changes: 1 addition & 1 deletion data/mp/stats/weaponsounds.ini
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ name = *Cyborg Grenade Weapon*
[Cyb-Wpn-Thermite]
szWeaponWav = flmthrow.ogg
szExplosionWav = -1
name = *Cybrog Thermite Weapon*
name = *Cyborg Thermite Weapon*

[Howitzer-Incenediary]
szWeaponWav = lrgcan.ogg
Expand Down
15 changes: 1 addition & 14 deletions src/mechanics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ bool allocComponentList(COMPONENT_TYPE type, SDWORD number)
}

apCompLists[inc][type] = (UBYTE *) malloc(sizeof(UBYTE) * number);
if (apCompLists[inc][type] == NULL)
{
debug(LOG_FATAL, "Out of memory assigning Player Component Lists");
abort();
return false;
}

//initialise the players' lists
for (comp = 0; comp < number; comp++)
Expand Down Expand Up @@ -141,14 +135,7 @@ bool allocStructLists(void)
{
if (numStructureStats)
{
apStructTypeLists[inc] = (UBYTE *) malloc(sizeof(UBYTE) *
numStructureStats);
if (apStructTypeLists[inc] == NULL)
{
debug(LOG_FATAL, "Out of memory assigning Player Structure Lists");
abort();
return false;
}
apStructTypeLists[inc] = (UBYTE *) malloc(sizeof(UBYTE) * numStructureStats);
for (stat = 0; stat < (SDWORD)numStructureStats; stat++)
{
apStructTypeLists[inc][stat] = UNAVAILABLE;
Expand Down
22 changes: 3 additions & 19 deletions src/template.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,28 +62,13 @@ static bool researchedPart(DROID_TEMPLATE *psCurr, int player, COMPONENT_TYPE pa

static bool researchedWeap(DROID_TEMPLATE *psCurr, int player, int weapIndex, bool allowRedundant)
{
return researchedItem(psCurr, player, COMP_WEAPON, psCurr->asWeaps[weapIndex], false, allowRedundant);
int availability = apCompLists[player][COMP_WEAPON][psCurr->asWeaps[weapIndex]];
return availability == AVAILABLE || (allowRedundant && availability == REDUNDANT);
}

bool researchedTemplate(DROID_TEMPLATE *psCurr, int player, bool allowRedundant, bool verbose)
{
ASSERT_OR_RETURN(false, psCurr, "Given a null template");
// super hack -- cyborgs and transports are special, only check their body
switch (psCurr->droidType)
{
case DROID_PERSON:
case DROID_CYBORG:
case DROID_CYBORG_SUPER:
case DROID_CYBORG_CONSTRUCT:
case DROID_CYBORG_REPAIR:
case DROID_TRANSPORTER:
case DROID_SUPERTRANSPORTER:
return researchedPart(psCurr, player, COMP_BODY, false, allowRedundant);
default:
break; // now proceed to normal droids...
}
// Note the ugly special case for commanders - their weapon is unavailable
// NOTE: This was one ugly & hard to debug if statement.
bool resBody = researchedPart(psCurr, player, COMP_BODY, false, allowRedundant);
bool resBrain = researchedPart(psCurr, player, COMP_BRAIN, true, allowRedundant);
bool resProp = researchedPart(psCurr, player, COMP_PROPULSION, false, allowRedundant);
Expand All @@ -97,8 +82,7 @@ bool researchedTemplate(DROID_TEMPLATE *psCurr, int player, bool allowRedundant,
debug(LOG_ERROR, "%s : not researched : body=%d brai=%d prop=%d sensor=%d ecm=%d rep=%d con=%d", getName(psCurr),
(int)resBody, (int)resBrain, (int)resProp, (int)resSensor, (int)resEcm, (int)resRepair, (int)resConstruct);
}
unsigned ignoreFirstWeapon = psCurr->asParts[COMP_BRAIN] != 0? 1 : 0;
for (unsigned weapIndex = ignoreFirstWeapon; weapIndex < psCurr->numWeaps && researchedEverything; ++weapIndex)
for (unsigned weapIndex = 0; weapIndex < psCurr->numWeaps && researchedEverything; ++weapIndex)
{
researchedEverything = researchedWeap(psCurr, player, weapIndex, allowRedundant);
if (!researchedEverything && verbose)
Expand Down