Function chaining for actors and singletons.

This commit is contained in:
Kyzentun
2014-12-01 22:31:30 -07:00
parent 3b36858cf8
commit 4f95bf08ad
59 changed files with 475 additions and 423 deletions
+4 -4
View File
@@ -288,7 +288,7 @@ void StepsDisplay::SetInternal( const SetParams &params )
class LunaStepsDisplay: public Luna<StepsDisplay>
{
public:
static int Load( T* p, lua_State *L ) { p->Load( SArg(1), NULL ); return 0; }
static int Load( T* p, lua_State *L ) { p->Load( SArg(1), NULL ); COMMON_RETURN_SELF; }
static int SetFromSteps( T* p, lua_State *L )
{
if( lua_isnil(L,1) )
@@ -300,7 +300,7 @@ public:
Steps *pS = Luna<Steps>::check(L,1);
p->SetFromSteps( pS );
}
return 0;
COMMON_RETURN_SELF;
}
static int SetFromTrail( T* p, lua_State *L )
{
@@ -313,13 +313,13 @@ public:
Trail *pT = Luna<Trail>::check(L,1);
p->SetFromTrail( pT );
}
return 0;
COMMON_RETURN_SELF;
}
static int SetFromGameState( T* p, lua_State *L )
{
PlayerNumber pn = Enum::Check<PlayerNumber>(L, 1);
p->SetFromGameState( pn );
return 0;
COMMON_RETURN_SELF;
}
LunaStepsDisplay()