humus-old/server/fixtures/fire.entity.js
2019-12-12 19:27:19 -06:00

80 lines
1.5 KiB
JavaScript

import {buildInvoke, buildTraversal} from '@avocado/behavior';
import {AFFINITY_FIRE} from '../../common/combat/constants';
// A fire.
export function fireJSON() {
return {
traits: {
animated: {
params: {
animations: {
idle: {
jitter: 0.1,
offset: [0, 0],
uri: '/fire.animation.json',
},
}
},
},
audible: {
params: {
sounds: {
fire: {
uri: '/fire.sound.json',
},
}
}
},
collider: {
params: {
collisionGroup: 'environmental',
isSensor: true,
},
},
harmful: {
params: {
harmfulSound: 'fire',
harmSpecs: [
{
affinity: AFFINITY_FIRE,
lock: 0.15,
power: 5,
variance: 0.25,
},
],
},
},
darkened: {
params: {
isDarkened: false,
},
},
existent: {
state: {
name: 'Fire',
},
},
layered: {},
listed: {},
physical: {},
positioned: {},
roomed: {},
shaped: {
params: {
shape: {
type: 'rectangle',
position: [0, 0],
size: [16, 16],
},
},
},
visible: {
params: {
filter: 'bloom',
},
},
},
};
}