fix: twisted behavior item json logic

This commit is contained in:
cha0s 2019-04-19 15:40:14 -05:00
parent 81dd1c4562
commit 6e0c8809db

View File

@ -141,84 +141,91 @@ function kittyJSON(position) {
behaved: {
params: {
routines: {
initial: {
actions: [
{
type: 'action',
hash: 2,
steps: [
type: 'routines',
routines: {
initial: {
type: 'routine',
routine: {
type: 'actions',
traversals: [
{
type: 'key',
key: 'entity',
type: 'action',
hash: 2,
steps: [
{
type: 'key',
key: 'entity',
},
{
type: 'key',
key: 'moveFor',
},
{
type: 'invoke',
args: [
buildRandom(0.25, 1, false),
],
},
],
},
{
type: 'key',
key: 'moveFor',
type: 'action',
hash: 3,
steps: [
{
type: 'key',
key: 'global',
},
{
type: 'key',
key: 'wait',
},
{
type: 'invoke',
args: [
buildRandom(1, 4),
],
},
],
},
{
type: 'invoke',
args: [
buildRandom(0.25, 1, false),
type: 'action',
hash: 4,
steps: [
{
type: 'key',
key: 'entity',
},
{
type: 'key',
key: 'direction',
},
],
value: buildRandom(0, 3),
},
{
type: 'action',
hash: 5,
steps: [
{
type: 'key',
key: 'global',
},
{
type: 'key',
key: 'wait',
},
{
type: 'invoke',
args: [
buildRandom(0.5, 3),
],
},
],
},
],
},
{
type: 'action',
hash: 3,
steps: [
{
type: 'key',
key: 'global',
},
{
type: 'key',
key: 'wait',
},
{
type: 'invoke',
args: [
buildRandom(1, 4),
],
},
],
},
{
type: 'action',
hash: 4,
steps: [
{
type: 'key',
key: 'entity',
},
{
type: 'key',
key: 'direction',
},
],
value: buildRandom(0, 3),
},
{
type: 'action',
hash: 5,
steps: [
{
type: 'key',
key: 'global',
},
{
type: 'key',
key: 'wait',
},
{
type: 'invoke',
args: [
buildRandom(0.5, 3),
],
},
],
},
],
}
},
},
},
},