- added default obituaries for damage types.
Note that this is only implemented for the new official way of doing this in MAPINFO, but not in DECORATE!
This commit is contained in:
parent
f6dd99d3aa
commit
3d500f0495
3 changed files with 30 additions and 9 deletions
13
src/info.cpp
13
src/info.cpp
|
|
@ -767,6 +767,13 @@ DEFINE_ACTION_FUNCTION(_DamageTypeDefinition, IgnoreArmor)
|
|||
ACTION_RETURN_BOOL(DamageTypeDefinition::IgnoreArmor(type));
|
||||
}
|
||||
|
||||
FString DamageTypeDefinition::GetObituary(FName type)
|
||||
{
|
||||
DamageTypeDefinition *dtd = Get(type);
|
||||
if (dtd) return dtd->Obituary;
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
|
|
@ -859,6 +866,12 @@ void FMapInfoParser::ParseDamageDefinition()
|
|||
dtd.DefaultFactor = sc.Float;
|
||||
if (dtd.DefaultFactor == 0) dtd.ReplaceFactor = true;
|
||||
}
|
||||
if (sc.Compare("OBITUARY"))
|
||||
{
|
||||
sc.MustGetStringName("=");
|
||||
sc.MustGetString();
|
||||
dtd.Obituary = sc.String;
|
||||
}
|
||||
else if (sc.Compare("REPLACEFACTOR"))
|
||||
{
|
||||
dtd.ReplaceFactor = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue