Add excite action

This commit is contained in:
Stubenhocker1399
2019-09-18 23:08:20 +02:00
parent f246d9279e
commit ba2b31c748
6 changed files with 18 additions and 4 deletions
+6 -1
View File
@@ -25,7 +25,7 @@ import { decodeUpdate, readOneUpdate } from '../common/encoders/updateDecoder';
import { updateEntityVelocity } from '../common/entityUtils';
import { decodePonyInfo } from '../common/compressPony';
import { mockPaletteManager } from '../common/ponyInfo';
import { yawn, laugh, sneeze } from './ponyAnimations';
import { yawn, laugh, sneeze, excite } from './ponyAnimations';
import {
findEntityById, getRegionGlobal, setTile, removeEntity, addEntity, removeEntityDirectly, setRegion,
addEntityToMapRegion, switchEntityRegion, getRegionUnsafe, addOrRemoveFromEntityList,
@@ -415,6 +415,11 @@ export function handleAction(game: PonyTownGame, id: number, action: Action) {
setHeadAnimation(pony, sneeze);
}
break;
case Action.Excite:
if (!hasHeadAnimation(pony)) {
setHeadAnimation(pony, excite);
}
break;
default:
log(`handleAction: Invalid action: ${action}`);
}