- Sync scriptbranch with trunk.
SVN r2269 (scripting)
This commit is contained in:
commit
42ac75e894
127 changed files with 2532 additions and 958 deletions
|
|
@ -370,8 +370,7 @@ DEFINE_PROPERTY(painchance, ZI, Actor)
|
|||
if (!stricmp(str, "Normal")) painType = NAME_None;
|
||||
else painType=str;
|
||||
|
||||
if (info->PainChances == NULL) info->PainChances=new PainChanceList;
|
||||
(*info->PainChances)[painType] = (BYTE)id;
|
||||
info->SetPainChance(painType, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -568,6 +567,15 @@ DEFINE_PROPERTY(howlsound, S, Actor)
|
|||
static_cast<PClassActor *>(info)->HowlSound = str;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(crushpainsound, S, Actor)
|
||||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
defaults->CrushPainSound = str;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
@ -978,13 +986,11 @@ DEFINE_PROPERTY(damagefactor, ZF, Actor)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (info->DamageFactors == NULL) info->DamageFactors=new DmgFactors;
|
||||
|
||||
FName dmgType;
|
||||
if (!stricmp(str, "Normal")) dmgType = NAME_None;
|
||||
else dmgType=str;
|
||||
|
||||
(*info->DamageFactors)[dmgType]=id;
|
||||
info->SetDamageFactor(dmgType, id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1606,6 +1612,15 @@ DEFINE_CLASS_PROPERTY(slotpriority, F, Weapon)
|
|||
static_cast<PClassWeapon *>(info)->SlotPriority = i;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(preferredskin, S, Weapon)
|
||||
{
|
||||
PROP_STRING_PARM(str, 0);
|
||||
// NoOp - only for Skulltag compatibility
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
@ -1892,6 +1907,75 @@ DEFINE_CLASS_PROPERTY_PREFIX(player, colorrange, I_I, PlayerPawn)
|
|||
static_cast<PClassPlayerPawn *>(info)->ColorRangeEnd = end;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, colorset, ISIII, PlayerPawn)
|
||||
{
|
||||
PROP_INT_PARM(setnum, 0);
|
||||
PROP_STRING_PARM(setname, 1);
|
||||
PROP_INT_PARM(rangestart, 2);
|
||||
PROP_INT_PARM(rangeend, 3);
|
||||
PROP_INT_PARM(representative_color, 4);
|
||||
|
||||
FPlayerColorSet color;
|
||||
color.Name = setname;
|
||||
color.Lump = -1;
|
||||
color.FirstColor = rangestart;
|
||||
color.LastColor = rangeend;
|
||||
color.RepresentativeColor = representative_color;
|
||||
|
||||
if (setnum < 0)
|
||||
{
|
||||
bag.ScriptPosition.Message(MSG_WARNING, "Color set number must not be negative.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
info->SetColorSet(setnum, &color);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, colorsetfile, ISSI, PlayerPawn)
|
||||
{
|
||||
PROP_INT_PARM(setnum, 0);
|
||||
PROP_STRING_PARM(setname, 1);
|
||||
PROP_STRING_PARM(rangefile, 2);
|
||||
PROP_INT_PARM(representative_color, 3);
|
||||
|
||||
FPlayerColorSet color;
|
||||
color.Name = setname;
|
||||
color.Lump = Wads.CheckNumForName(rangefile);
|
||||
color.RepresentativeColor = representative_color;
|
||||
if (setnum < 0)
|
||||
{
|
||||
bag.ScriptPosition.Message(MSG_WARNING, "Color set number must not be negative.\n");
|
||||
}
|
||||
else if (color.Lump >= 0)
|
||||
{
|
||||
info->SetColorSet(setnum, &color);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY_PREFIX(player, clearcolorset, I, PlayerPawn)
|
||||
{
|
||||
PROP_INT_PARM(setnum, 0);
|
||||
|
||||
if (setnum < 0)
|
||||
{
|
||||
bag.ScriptPosition.Message(MSG_WARNING, "Color set number must not be negative.\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
info->SetColorSet(setnum, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue