Use shovels, land in water
This commit is contained in:
@@ -431,6 +431,7 @@ class Game:
|
||||
|
||||
if command == 'stop':
|
||||
self.g.job.state = self.g.job.stop
|
||||
self.g.path = []
|
||||
reply = 'ok'
|
||||
|
||||
if command == 'inv':
|
||||
@@ -514,7 +515,7 @@ class Game:
|
||||
|
||||
if command == 'sand_slice':
|
||||
try:
|
||||
_, result = self.g.world.find_sand_slice(utils.pint(self.g.pos), 50)
|
||||
result = self.g.world.find_sand_slice(utils.pint(self.g.pos), 50)
|
||||
reply = str(result)
|
||||
except:
|
||||
import traceback
|
||||
@@ -553,7 +554,7 @@ class Game:
|
||||
self.g.connection.write_packet(packet)
|
||||
|
||||
self.g.breaking = location
|
||||
self.g.break_time = time.time() + utils.break_time(bid)
|
||||
self.g.break_time = time.time() + utils.break_time(bid, self.g.holding)
|
||||
|
||||
def break_finish(self):
|
||||
packet = PlayerDiggingPacket()
|
||||
@@ -622,6 +623,7 @@ class Game:
|
||||
for slot, item in inv_items:
|
||||
if item.item_id in items:
|
||||
self.g.game.choose_slot(slot)
|
||||
self.g.holding = item.item_id
|
||||
return True
|
||||
else: #for
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user