dfhack/output/stones.py

13 lines
303 B
Python

2010-02-27 20:11:06 -07:00
# -*- coding: utf-8 -*-
import pydfhack
x = pydfhack.API("Memory.xml")
y = pydfhack.MatglossVector()
2010-02-26 14:23:43 -07:00
if x.Attach():
success,stones = x.ReadStoneMatgloss()
if success:
2010-02-26 14:23:43 -07:00
print "Dumping all stone"
for matgloss in stones:
2010-02-26 14:23:43 -07:00
print "ID %s, name %s" % (matgloss.id, matgloss.name)
2010-02-27 05:24:32 -07:00
x.Detach()