.isStackable
.isStackable
Would be a nice little addition if one could find out, if an item is stackable by just checking this r/o member.
Read tiles.cfg, find the graphic entry for the objtype, and read the UOFlags prop. Below is the flag byte for the item having stacking properties:
0x00000800 Generic/Stackable
Examples below of a tiles.cfg entry of stackable items:
Check the bit for stackable, to see if it is stackable or not, and there ya go 
0x00000800 Generic/Stackable
Examples below of a tiles.cfg entry of stackable items:
Code: Select all
tile 0xf86
{
Desc Mandrake Root%s%
UoFlags 0x00000801
Height 1
Weight 0
Stackable 1
Movable 1
}
tile 0xf87
{
Desc Eye%s% of Newt
UoFlags 0x00000801
Height 1
Weight 1
Stackable 1
Movable 1
}
tile 0xf88
{
Desc Nightshade
UoFlags 0x00000801
Layer 1
Height 1
Weight 0
Stackable 1
Movable 1
}
tile 0xf89
{
Desc Obsidian
UoFlags 0x00000801
Height 1
Weight 1
Stackable 1
Movable 1
}
Heh!!![01:37] <MuadDib> why do i feel like i messed up, telling someone to check the UOFlag bit for stackable, in tiles.cfg, to see if an item is stackable or not :/
Okay two methods.
You've read in ::tiles
var tiles_cfg := ReadConfigFile("::tiles");
You get the elem of the tile you want info for, using the graphic number.
var tile_elem := tiles_cfg[object.graphic];
You can do two things.
return tile_elem.Stackable;
or
return ( 0x800 & tile_elem.UoFlags );
*bites his tongue*
I was a bit overhasty on this. Please take my apologies.
I'm still working with 095 and was missing that possibilty there and thought I'd suggest it for a future release.
I won't suggest anything again before I looked deeper into 096/097, I swear. Sorry again
*crawls back into the coder dungeon*
I was a bit overhasty on this. Please take my apologies.
I'm still working with 095 and was missing that possibilty there and thought I'd suggest it for a future release.
I won't suggest anything again before I looked deeper into 096/097, I swear. Sorry again
*crawls back into the coder dungeon*