vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
How to change look distance for attribute description? Now i can read only from player pos + 1sqm, i want change it to 5sqm, but i don't see anything in srouces
I try change there from 1 to 5, but nothing happend and in events/default_onLook
this - local description = "You see " .. thing:getDescription(distance)
to - local description = "You see " .. thing:getDescription(5)
I try change there from 1 to 5, but nothing happend and in events/default_onLook
this - local description = "You see " .. thing:getDescription(distance)
to - local description = "You see " .. thing:getDescription(5)
Code:
if (lookDistance <= 5) {
if (item) {
const uint32_t weight = item->getWeight();
if (weight != 0 && it.pickupable) {
s << '\n' << getWeightDescription(it, weight, item->getItemCount());
}
} else if (it.weight != 0 && it.pickupable) {
s << '\n' << getWeightDescription(it, it.weight);
}
}
if (item) {
const std::string& specialDescription = item->getSpecialDescription();
if (!specialDescription.empty()) {
s << '\n' << specialDescription;
} else if (lookDistance <= 5 && !it.description.empty()) {
s << '\n' << it.description;
}
} else if (lookDistance <= 5 && !it.description.empty()) {
s << '\n' << it.description;
}
if (it.allowDistRead && it.id >= 7369 && it.id <= 7371) {
if (!text && item) {
text = &item->getText();
}
if (text && !text->empty()) {
s << '\n' << *text;
}
}
return s.str();
}