+ # using a bucket means emptying it
+ elif isinstance (obj, gameobjects.Bucket) is True:
+ if obj.liquid is not None:
+ self.status_message = "You emptied the bucket of %s" % obj.liquid
+ obj.use (self.butaba)
+ else:
+ self.status_message = "Bucket is already empty."
+ # using a well
+ elif isinstance (obj, gameobjects.Well) is True:
+ # if the well is not dry, i.e. it has some liquid
+ if obj.liquid is not None:
+ # search butaba inventory for an empty bucket
+ for invobj in self.butaba.objects:
+ # bucket found, now check if it is empty
+ if isinstance (invobj, gameobjects.Bucket) is True:
+ # if empty fill it
+ if invobj.liquid is None:
+ obj.use (invobj)
+ self.status_message = "You successfully filled the %s with %s" % (invobj.text, obj.liquid)
+ if self.butaba.strength < constants.STRENGTHMAX_DRAW_WELL_WATER:
+ self.butaba.strength += 2
+ self.status_message += " and gained strength!"
+ return
+ self.status_message = "You have no empty bucket to draw %s with!" % obj.liquid
+ else:
+ self.status_message = "%s appears to be dry!" % obj.text