fun: tomato plant is a tile entity
This commit is contained in:
parent
2164a43bfd
commit
766e6b3e0c
|
@ -69,6 +69,7 @@ export function tomatoPlantJSON() {
|
|||
},
|
||||
positioned: {},
|
||||
roomed: {},
|
||||
'tile-entity': {},
|
||||
visible: {},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -2,6 +2,13 @@ import {buildInvoke, buildTraversal, buildCondition} from '@avocado/behavior';
|
|||
|
||||
// Tomato seeds.
|
||||
export function tomatoSeedsJSON() {
|
||||
const hasExistingTomato = buildInvoke(
|
||||
['wielder', 'layer', 'hasTileEntityWithUriAt'],
|
||||
[
|
||||
buildTraversal(['target']),
|
||||
'/tomato-plant.entity.json',
|
||||
],
|
||||
);
|
||||
return {
|
||||
traits: {
|
||||
existent: {},
|
||||
|
@ -30,14 +37,20 @@ export function tomatoSeedsJSON() {
|
|||
tool: {
|
||||
params: {
|
||||
// Has to be wet dirt.
|
||||
condition: buildCondition('is', [
|
||||
7,
|
||||
buildInvoke(
|
||||
['wielder', 'layer', 'tileAt'],
|
||||
[
|
||||
buildTraversal(['target']),
|
||||
],
|
||||
),
|
||||
condition: buildCondition('and', [
|
||||
buildCondition('is', [
|
||||
7,
|
||||
buildInvoke(
|
||||
['wielder', 'layer', 'tileAt'],
|
||||
[
|
||||
buildTraversal(['target']),
|
||||
],
|
||||
),
|
||||
]),
|
||||
buildCondition('is', [
|
||||
false,
|
||||
hasExistingTomato,
|
||||
]),
|
||||
]),
|
||||
actions: {
|
||||
type: 'actions',
|
||||
|
|
Loading…
Reference in New Issue
Block a user