From d0d8c9a081a05fd718443648742beb6c74fcbe10 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 21 Jan 2014 22:12:50 +0100 Subject: [PATCH] Bind adjustments, some fixes --- src/client/luafunctions.cpp | 5 ++--- src/client/luavaluecasts.cpp | 1 - src/client/thingtype.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/client/luafunctions.cpp b/src/client/luafunctions.cpp index aa05db09..8e9f1be8 100644 --- a/src/client/luafunctions.cpp +++ b/src/client/luafunctions.cpp @@ -463,7 +463,6 @@ void Client::registerLuaFunctions() g_lua.registerClass(); g_lua.bindClassStaticFunction("create", []{ return ThingTypePtr(new ThingType); }); g_lua.bindClassMemberFunction("getId", &ThingType::getId); - g_lua.bindClassMemberFunction("getMarketData", &ThingType::getMarketData); g_lua.bindClassMemberFunction("getClothSlot", &ThingType::getClothSlot); g_lua.bindClassMemberFunction("getCategory", &ThingType::getCategory); g_lua.bindClassMemberFunction("getSize", &ThingType::getSize); @@ -473,6 +472,7 @@ void Client::registerLuaFunctions() g_lua.bindClassMemberFunction("getDisplacementX", &ThingType::getDisplacementX); g_lua.bindClassMemberFunction("getDisplacementY", &ThingType::getDisplacementY); g_lua.bindClassMemberFunction("getExactSize", &ThingType::getExactSize); + g_lua.bindClassMemberFunction("getRealSize", &ThingType::getRealSize); g_lua.bindClassMemberFunction("getLayers", &ThingType::getLayers); g_lua.bindClassMemberFunction("getNumPatternX", &ThingType::getNumPatternX); g_lua.bindClassMemberFunction("getNumPatternY", &ThingType::getNumPatternY); @@ -480,8 +480,7 @@ void Client::registerLuaFunctions() g_lua.bindClassMemberFunction("getAnimationPhases", &ThingType::getAnimationPhases); g_lua.bindClassMemberFunction("getGroundSpeed", &ThingType::getGroundSpeed); g_lua.bindClassMemberFunction("getMaxTextLength", &ThingType::getMaxTextLength); - g_lua.bindClassMemberFunction("getLightIntensity", &ThingType::getLightIntensity); - g_lua.bindClassMemberFunction("getLightColor", &ThingType::getLightColor); + g_lua.bindClassMemberFunction("getLight", &ThingType::getLight); g_lua.bindClassMemberFunction("getMinimapColor", &ThingType::getMinimapColor); g_lua.bindClassMemberFunction("getLensHelp", &ThingType::getLensHelp); g_lua.bindClassMemberFunction("getClothSlot", &ThingType::getClothSlot); diff --git a/src/client/luavaluecasts.cpp b/src/client/luavaluecasts.cpp index a98087e1..7403b5f1 100644 --- a/src/client/luavaluecasts.cpp +++ b/src/client/luavaluecasts.cpp @@ -154,7 +154,6 @@ int push_luavalue(const Light& light) return 1; } - bool luavalue_cast(int index, Light& light) { if(g_lua.isTable(index)) { diff --git a/src/client/thingtype.h b/src/client/thingtype.h index 689eb88e..94bae6ba 100644 --- a/src/client/thingtype.h +++ b/src/client/thingtype.h @@ -131,6 +131,7 @@ public: int getWidth() { return m_size.width(); } int getHeight() { return m_size.height(); } int getExactSize(int layer = 0, int xPattern = 0, int yPattern = 0, int zPattern = 0, int animationPhase = 0); + int getRealSize() { return m_realSize; } int getLayers() { return m_layers; } int getNumPatternX() { return m_numPatternX; } int getNumPatternY() { return m_numPatternY; } @@ -144,8 +145,6 @@ public: int getGroundSpeed() { return m_attribs.get(ThingAttrGround); } int getMaxTextLength() { return m_attribs.has(ThingAttrWritableOnce) ? m_attribs.get(ThingAttrWritableOnce) : m_attribs.get(ThingAttrWritable); } Light getLight() { return m_attribs.get(ThingAttrLight); } - int getLightIntensity() { return getLight().intensity; } - int getLightColor() { return getLight().color; } int getMinimapColor() { return m_attribs.get(ThingAttrMinimapColor); } int getLensHelp() { return m_attribs.get(ThingAttrLensHelp); } int getClothSlot() { return m_attribs.get(ThingAttrCloth); }