Update of /cvsroot/wpdev/xmlscripts/scripts/skills
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24633/skills
Modified Files:
bowcraft.py
Log Message:
Fixed crafting of stackable bowcrafting items.
Index: bowcraft.py
===================================================================
RCS file: /cvsroot/wpdev/xmlscripts/scripts/skills/bowcraft.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** bowcraft.py 5 Sep 2004 20:02:03 -0000 1.15
--- bowcraft.py 20 Sep 2004 04:27:07 -0000 1.16
***************
*** 91,94 ****
--- 91,103 ----
chance = chance * .01
return chance
+
+ #
+ # Don't consume any material if the item is marked as stackable.
+ #
+ def consumematerial(self, player, arguments, half = 0):
+ if self.stackable:
+ return True
+ else:
+ return CraftItemAction.consumematerial(player, arguments, half)
#
***************
*** 101,105 ****
backpack = player.getbackpack()
count = -1
! for (materials, amount) in self.materials:
items = backpack.countitems(materials)
if count == -1:
--- 110,114 ----
backpack = player.getbackpack()
count = -1
! for (materials, amount, name) in self.materials:
items = backpack.countitems(materials)
if count == -1:
***************
*** 107,111 ****
else:
count = min(count, items / amount)
! for (materials, amount) in self.materials:
backpack.removeitems( materials, count )
if count != -1:
--- 116,120 ----
else:
count = min(count, items / amount)
! for (materials, amount, name) in self.materials:
backpack.removeitems( materials, count )
if count != -1:
|