CountGround
Searches for items with type ObjType on the ground and returns the total quantity including stack contents (FindFullQuantity).
The search radius is limited by FindDistance (horizontal) and FindVertical.
The method saves and restores the current find fields internally, so it does not affect an in-progress search.
Ищет предметы с типом ObjType на земле и возвращает общее количество с учётом стеков (FindFullQuantity).
Радиус поиска ограничен FindDistance (по горизонтали) и FindVertical (по вертикали).
Метод сохраняет и восстанавливает текущие поля поиска.
function CountGround(ObjType: Word): Integer;
Parameters:
- ObjType — graphic (type) of the item to count on the ground.
def CountGround(obj_type: int) -> int: ...
const
ORE_TYPE = $19B9;
begin
if CountGround(ORE_TYPE) > 0 then
AddToSystemJournal('Ore on the ground: ' + IntToStr(CountGround(ORE_TYPE)));
end.
ORE_TYPE = 0x19B9
if CountGround(ORE_TYPE) > 0:
AddToSystemJournal(f'Ore on the ground: {CountGround(ORE_TYPE)}')