Hello, I have a problem – I can’t find any Lua code related to decorations. I mean things like curtains that can be hung on the walls inside a house.
The problem is that I can hang the curtain, but then I can’t remove it afterwards.
My question is: where should I look for a solution? I tried searching for Lua files but couldn’t find any, and I have this code written in C++.
TFS 1.2
The problem is that I can hang the curtain, but then I can’t remove it afterwards.
My question is: where should I look for a solution? I tried searching for Lua files but couldn’t find any, and I have this code written in C++.
C++:
if (player && tile->hasFlag(TILESTATE_SUPPORTS_HANGABLE)) {
//do extra checks here if the thing is accessable
if (thing && thing->getItem()) {
if (tile->hasProperty(CONST_PROP_ISVERTICAL)) {
if (player->getPosition().x + 1 == tile->getPosition().x) {
thing = nullptr;
}
} else { // horizontal
if (player->getPosition().y + 1 == tile->getPosition().y) {
thing = nullptr;
}
}
}
}
return thing;
}
TFS 1.2

