mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 22:11:43 +00:00
e620c9bd7d
- exported thinker iterator and drop item chain to scripting. Unlike its native counterpart the script-side iterator is wrapped into a DObject to allow proper handling for memory management. - fixed: The VMFunctionBuilder only distinguished between member and action functions but failed on static ones. - fixed: FxAssign did not add all needed type casts. Except for purely numeric types it will now wrap the expression in an FxTypeCast. Numeric handling remains unchanged for both performance reasons and not altering semantics for DECORATE. - exported all internal flags as variables to scripting. They still cannot be used in an actor definition. - make ATAG_STATE the same as ATAG_GENERIC. Since state pointers exist as actual variables they can take both values which on occasion can trigger some asserts. - gave PClass a bExported flag, so that scripts cannot see purely internal classes. Especially the types like PInt can cause problems. Todo: we need readonly references to safely expose the actor defaults. Right now some badly behaving code could overwrite them.
31 lines
600 B
Text
31 lines
600 B
Text
class Object native
|
|
{
|
|
/*virtual*/ native void Destroy();
|
|
}
|
|
|
|
class Thinker : Object native
|
|
{
|
|
}
|
|
|
|
class ThinkerIterator : Object native
|
|
{
|
|
enum EStatnums
|
|
{
|
|
MAX_STATNUM = 127
|
|
}
|
|
|
|
native static ThinkerIterator Create(class<Actor> type = "Actor", int statnum=MAX_STATNUM+1);
|
|
native Thinker Next();
|
|
native void Reinit();
|
|
}
|
|
|
|
class DropItem : Object native
|
|
{
|
|
/* native fields listed for reference only for now
|
|
native readonly DropItem Next;
|
|
native readonly name ItemName; // internally called 'name' which clashes with the type.
|
|
native readonly int Probability;
|
|
native readonly int Amount;
|
|
*/
|
|
}
|
|
|