- added property definitions to the ZScript parser. This will allow defining custom properties for the default block in custom base classes. See 'Health' for an example.
- support transient object member variables for information that does not need to be put in a savegame. - fixed: special initialization of objects needs to pass the proper defaults along, otherwise the parent classes will use their own, inappropriate one.
This commit is contained in:
parent
0c3aab794f
commit
179b6e1a39
21 changed files with 313 additions and 109 deletions
|
|
@ -1969,18 +1969,6 @@ DEFINE_CLASS_PROPERTY(givequest, I, Inventory)
|
|||
static_cast<PClassInventory *>(info)->GiveQuest = i;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_CLASS_PROPERTY(lowmessage, IT, Health)
|
||||
{
|
||||
PROP_INT_PARM(i, 0);
|
||||
PROP_STRING_PARM(str, 1);
|
||||
assert(info->IsKindOf(RUNTIME_CLASS(PClassHealth)));
|
||||
static_cast<PClassHealth *>(info)->LowHealth = i;
|
||||
static_cast<PClassHealth *>(info)->LowHealthMessage = str;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue