Bind adjustments, some fixes

master
Sam 10 years ago
parent f3b5adbf40
commit d0d8c9a081

@ -463,7 +463,6 @@ void Client::registerLuaFunctions()
g_lua.registerClass<ThingType>();
g_lua.bindClassStaticFunction<ThingType>("create", []{ return ThingTypePtr(new ThingType); });
g_lua.bindClassMemberFunction<ThingType>("getId", &ThingType::getId);
g_lua.bindClassMemberFunction<ThingType>("getMarketData", &ThingType::getMarketData);
g_lua.bindClassMemberFunction<ThingType>("getClothSlot", &ThingType::getClothSlot);
g_lua.bindClassMemberFunction<ThingType>("getCategory", &ThingType::getCategory);
g_lua.bindClassMemberFunction<ThingType>("getSize", &ThingType::getSize);
@ -473,6 +472,7 @@ void Client::registerLuaFunctions()
g_lua.bindClassMemberFunction<ThingType>("getDisplacementX", &ThingType::getDisplacementX);
g_lua.bindClassMemberFunction<ThingType>("getDisplacementY", &ThingType::getDisplacementY);
g_lua.bindClassMemberFunction<ThingType>("getExactSize", &ThingType::getExactSize);
g_lua.bindClassMemberFunction<ThingType>("getRealSize", &ThingType::getRealSize);
g_lua.bindClassMemberFunction<ThingType>("getLayers", &ThingType::getLayers);
g_lua.bindClassMemberFunction<ThingType>("getNumPatternX", &ThingType::getNumPatternX);
g_lua.bindClassMemberFunction<ThingType>("getNumPatternY", &ThingType::getNumPatternY);
@ -480,8 +480,7 @@ void Client::registerLuaFunctions()
g_lua.bindClassMemberFunction<ThingType>("getAnimationPhases", &ThingType::getAnimationPhases);
g_lua.bindClassMemberFunction<ThingType>("getGroundSpeed", &ThingType::getGroundSpeed);
g_lua.bindClassMemberFunction<ThingType>("getMaxTextLength", &ThingType::getMaxTextLength);
g_lua.bindClassMemberFunction<ThingType>("getLightIntensity", &ThingType::getLightIntensity);
g_lua.bindClassMemberFunction<ThingType>("getLightColor", &ThingType::getLightColor);
g_lua.bindClassMemberFunction<ThingType>("getLight", &ThingType::getLight);
g_lua.bindClassMemberFunction<ThingType>("getMinimapColor", &ThingType::getMinimapColor);
g_lua.bindClassMemberFunction<ThingType>("getLensHelp", &ThingType::getLensHelp);
g_lua.bindClassMemberFunction<ThingType>("getClothSlot", &ThingType::getClothSlot);

@ -154,7 +154,6 @@ int push_luavalue(const Light& light)
return 1;
}
bool luavalue_cast(int index, Light& light)
{
if(g_lua.isTable(index)) {

@ -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<uint16>(ThingAttrGround); }
int getMaxTextLength() { return m_attribs.has(ThingAttrWritableOnce) ? m_attribs.get<uint16>(ThingAttrWritableOnce) : m_attribs.get<uint16>(ThingAttrWritable); }
Light getLight() { return m_attribs.get<Light>(ThingAttrLight); }
int getLightIntensity() { return getLight().intensity; }
int getLightColor() { return getLight().color; }
int getMinimapColor() { return m_attribs.get<uint16>(ThingAttrMinimapColor); }
int getLensHelp() { return m_attribs.get<uint16>(ThingAttrLensHelp); }
int getClothSlot() { return m_attribs.get<uint16>(ThingAttrCloth); }

Loading…
Cancel
Save