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