it seems, at least for weapons, the fix is simple - add a isAbstract() check like so:
Code: Select all
if (giveall || name ~== "weapons")
{
let savedpending = player.PendingWeapon;
for (i = 0; i < AllActorClasses.Size(); ++i)
{
let type = (class<Weapon>)(AllActorClasses[i]);
if (type != null && type != "Weapon" && !type.isAbstract())
{
// Don't give replaced weapons unless the replacement was done by Dehacked.
let rep = GetReplacement(type);
if (rep == type || rep is "DehackedPickup")
{
// Give the weapon only if it is set in a weapon slot.
if (player.weapons.LocateWeapon(type))
{
readonly<Weapon> def = GetDefaultByType (type);
if (giveall == ALL_YESYES || !def.bCheatNotWeapon)
{
GiveInventory(type, 1, true);
}
}
}
}
}
player.PendingWeapon = savedpending;
if (!giveall)
return;
}