diff options
author | Lane Kolbly <lane@rscheme.org> | 2017-07-12 12:30:43 +0200 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2017-07-12 12:30:43 +0200 |
commit | b61898c30c1e1049e8767ca98fd38e7010a32e45 (patch) | |
tree | 51df04d644da1f344e0781bf70a7c426b45d91ae /src/Bindings/ManualBindings.cpp | |
parent | Changing pickup lifetime and combining semantics, making these adjustable in the lua api. (#3843) (diff) | |
download | cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.tar cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.tar.gz cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.tar.bz2 cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.tar.lz cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.tar.xz cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.tar.zst cuberite-b61898c30c1e1049e8767ca98fd38e7010a32e45.zip |
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index 565c636e3..e81a8ef05 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -3297,6 +3297,24 @@ static int tolua_cChunkDesc_GetBlockTypeMeta(lua_State * a_LuaState) +static int tolua_cColor_GetColor(lua_State * tolua_S) +{ + cLuaState L(tolua_S); + + cColor * self; + if (!L.CheckParamSelf("cColor") || !L.GetStackValue(1, self)) + { + return 0; + } + + L.Push(self->GetRed(), self->GetGreen(), self->GetBlue()); + return 3; +} + + + + + static int tolua_cCompositeChat_new(lua_State * a_LuaState) { /* Function signatures: @@ -3727,6 +3745,10 @@ void cManualBindings::Bind(lua_State * tolua_S) tolua_function(tolua_S, "SendPluginMessage", tolua_cClientHandle_SendPluginMessage); tolua_endmodule(tolua_S); + tolua_beginmodule(tolua_S, "cColor"); + tolua_function(tolua_S, "GetColor", tolua_cColor_GetColor); + tolua_endmodule(tolua_S); + tolua_beginmodule(tolua_S, "cCompositeChat"); tolua_function(tolua_S, "new", tolua_cCompositeChat_new); tolua_function(tolua_S, "new_local", tolua_cCompositeChat_new_local); |