mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
* common/Dig.h, common/Mow.h, common/custom.cpp, common/operations.cpp: Add new Dig and Mow operations, for handling resource gathering. * rulesets/basic/world/objects/tools/Shovel.py, rulesets/basic/world/objects/tools/Scythe.py, data/basic.xml: Add new scythe and shovel for gathering resources from the terrain. * rulesets/basic/world/objects/tools/Pickaxe.py, common/Delve.h: Fix the comments. * rulesets/World.cpp, rulesets/World.h: Move code for determining terrain surface type into a method of its own. Implement handlers for Dig and Mow ops.
14 lines
544 B
Python
14 lines
544 B
Python
#This file is distributed under the terms of the GNU General Public license.
|
|
#Copyright (C) 1999 Aloril (See the file COPYING for details).
|
|
#Copyright (C) 2004 Al Riddoch (See the file COPYING for details).
|
|
|
|
from atlas import *
|
|
|
|
from world.objects.Thing import Thing
|
|
|
|
class Pickaxe(Thing):
|
|
"""This is a pickaxe for heavy digging and quarrying """
|
|
def cut_operation(self, op):
|
|
ent=Entity(self.id,status=self.status-0.01)
|
|
to_ = op[0].id
|
|
return Message(Operation("set",ent,to=self),Operation("delve",op[0],to=to_))
|