Class Tool
- All Implemented Interfaces:
Serializable, Commented, ComprehensiveIdentification, Identified<Identification>, Named, Positioned<Place>, Temporal<TimeCoordinate>, Property
- Direct Known Subclasses:
Machine
Represents a tool used to build or repair other objects.
Tools are distinct from final consumption goods (like food) but similar to machines.
- Since:
- 1.0
- Version:
- 1.1
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Field Summary
Fields inherited from class PotentialResource
id, traits -
Constructor Summary
ConstructorsConstructorDescriptionTool(String name, String description, Quantity<?> amount, Community producer, Place productionPlace, TimeCoordinate productionDate, Identification identification, Money value) Initializes a new tool. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidExecutes the specific action on a set of target objects.abstract StringgetActionName(int i) Returns the human-readable name for a specific action index.intvoidsetNumActions(int acts) voidsetPurpose(String purpose) voidsetTargets(Resource[] targets) Methods inherited from class MaterialResource
equals, getValue, hashCode, setValueMethods inherited from class Resource
addOwner, getOwners, getPosition, getProducer, getProductionDate, getProductionPlace, getTimestamp, getWhen, removeOwner, setId, setOwners, setPositionMethods inherited from class PotentialResource
getAmount, getDecayTime, getDescription, getId, getKind, getTraits, setDecaySeconds, setDecayTime, setDescription, setKind, setQuantity, toStringMethods inherited from interface Commented
getComments, getTrait, setCommentsMethods inherited from interface ComprehensiveIdentification
getName, getTrait, setName, setTrait
-
Constructor Details
-
Tool
public Tool(String name, String description, Quantity<?> amount, Community producer, Place productionPlace, TimeCoordinate productionDate, Identification identification, Money value) Initializes a new tool.
-
-
Method Details
-
getPurpose
-
setPurpose
-
getTargets
-
setTargets
-
getNumActions
public int getNumActions() -
setNumActions
public void setNumActions(int acts) -
getActionName
Returns the human-readable name for a specific action index. -
act
Executes the specific action on a set of target objects.
-