- scriptified the remaining functions in a_artifacts.cpp.
- added some helpers to set scripted member variables through the native property parser. Unfortunately some classes, e.g. PowerMorph, MorphProjectile and the powerup contain some that cannot be handled through the 'property' definition on the script side so they need to be done from the native side.
This commit is contained in:
parent
14f2c39e58
commit
98f9219334
12 changed files with 128 additions and 140 deletions
|
|
@ -2022,13 +2022,14 @@ void ZCCCompiler::ProcessDefaultProperty(PClassActor *cls, ZCC_PropertyStmt *pro
|
|||
|
||||
if (property != nullptr && property->category != CAT_INFO)
|
||||
{
|
||||
if (cls->IsDescendantOf(*property->cls))
|
||||
auto pcls = PClass::FindActor(property->clsname);
|
||||
if (cls->IsDescendantOf(pcls))
|
||||
{
|
||||
DispatchProperty(property, prop, (AActor *)bag.Info->Defaults, bag);
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(prop, "'%s' requires an actor of type '%s'\n", propname.GetChars(), (*property->cls)->TypeName.GetChars());
|
||||
Error(prop, "'%s' requires an actor of type '%s'\n", propname.GetChars(), pcls->TypeName.GetChars());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue