dfhack/output/stones.py

12 lines
277 B
Python

2010-02-27 20:11:06 -07:00
# -*- coding: utf-8 -*-
import pydfhack
DF = pydfhack.API("Memory.xml")
2010-02-26 14:23:43 -07:00
if DF.Attach():
success,stones = DF.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)
DF.Detach()