- scriptified BasicArmor and fixed a few errors in the conversion.
This commit is contained in:
parent
2dd6fb9595
commit
3148496f57
9 changed files with 298 additions and 336 deletions
|
|
@ -1723,79 +1723,6 @@ DEFINE_CLASS_PROPERTY(forbiddento, Ssssssssssssssssssss, Inventory)
|
|||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(saveamount, I, Armor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorPickup)) || info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorBonus)))
|
||||
{
|
||||
defaults->IntVar(NAME_SaveAmount)=i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.SaveAmount\" requires an actor of type \"Armor\"");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(savepercent, F, Armor)
|
||||
{
|
||||
PROP_DOUBLE_PARM(i, 0);
|
||||
|
||||
i = clamp(i, 0., 100.)/100.;
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorPickup)) || info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorBonus)))
|
||||
{
|
||||
defaults->FloatVar(NAME_SavePercent) = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.SavePercent\" requires an actor of type \"Armor\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(maxabsorb, I, Armor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorPickup)) || info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorBonus)))
|
||||
{
|
||||
defaults->IntVar(NAME_MaxAbsorb) = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.MaxAbsorb\" requires an actor of type \"Armor\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(maxfullabsorb, I, Armor)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
|
||||
// Special case here because this property has to work for 2 unrelated classes
|
||||
if (info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorPickup)) || info->IsDescendantOf(PClass::FindActor(NAME_BasicArmorBonus)))
|
||||
{
|
||||
defaults->IntVar(NAME_MaxFullAbsorb) = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
I_Error("\"Armor.MaxFullAbsorb\" requires an actor of type \"Armor\"\n");
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue