From d3f9a8c8ac45ce3d7f273697239c6ef7c7867bad Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sat, 21 Nov 2020 17:41:13 -0500 Subject: [PATCH] Remove unused images; add ActionRelay --- public/media/cafat/images/belch.webp | 3 --- public/media/cafat/images/belly-crush.webp | 3 --- public/media/cafat/images/crunch.webp | 3 --- public/media/cafat/images/lower-stomach.webp | 3 --- public/media/cafat/images/stomach.webp | 3 --- src/game/events.ts | 17 +++++++++++++++++ 6 files changed, 17 insertions(+), 15 deletions(-) delete mode 100644 public/media/cafat/images/belch.webp delete mode 100644 public/media/cafat/images/belly-crush.webp delete mode 100644 public/media/cafat/images/crunch.webp delete mode 100644 public/media/cafat/images/lower-stomach.webp delete mode 100644 public/media/cafat/images/stomach.webp diff --git a/public/media/cafat/images/belch.webp b/public/media/cafat/images/belch.webp deleted file mode 100644 index 171619c..0000000 --- a/public/media/cafat/images/belch.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f33bba6327c0a75e40d3e67a1c757421acde2d826ce3de05f397ab4c80fd039 -size 39712 diff --git a/public/media/cafat/images/belly-crush.webp b/public/media/cafat/images/belly-crush.webp deleted file mode 100644 index cef5431..0000000 --- a/public/media/cafat/images/belly-crush.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e8cb78e4cbaaa195ca23b200037128734f2d00e8ce73fe766ff91d63454fe1e1 -size 34866 diff --git a/public/media/cafat/images/crunch.webp b/public/media/cafat/images/crunch.webp deleted file mode 100644 index 3a40e45..0000000 --- a/public/media/cafat/images/crunch.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9af601f92ecf19fbef987599e4fbba7162be7fe24cc1fa809ca1d8dbb57091b8 -size 43650 diff --git a/public/media/cafat/images/lower-stomach.webp b/public/media/cafat/images/lower-stomach.webp deleted file mode 100644 index 207f179..0000000 --- a/public/media/cafat/images/lower-stomach.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e29868efd8a6fb854ab3a3c0381dcdd1f9677e7f446183e4f9b4360cc997bbca -size 26554 diff --git a/public/media/cafat/images/stomach.webp b/public/media/cafat/images/stomach.webp deleted file mode 100644 index 8ab036b..0000000 --- a/public/media/cafat/images/stomach.webp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc9e319a2319b4ae676650a4cec84ceb5a70a76ebe92c222f6d0722aff9a6214 -size 29310 diff --git a/src/game/events.ts b/src/game/events.ts index 7d00e32..f1ddac8 100644 --- a/src/game/events.ts +++ b/src/game/events.ts @@ -2,6 +2,7 @@ import { TargetDrainedVigorCondition } from '@/game/combat/conditions' import { Creature } from '@/game/creature' import { LogEntry, LogLines, nilLog } from "@/game/interface" import { VoreContainer } from '@/game/vore' +import { Action } from './combat' // eslint-disable-next-line @typescript-eslint/no-explicit-any abstract class Relay { @@ -51,3 +52,19 @@ export class VoreRelay extends Relay { super(["onEaten", "onReleased", "onDigested", "onAbsorbed"]) } } + +type ActionMap = { + "onActionAttempt": { user: Creature; target: Creature; action: Action }; + "onActionFail": { user: Creature; target: Creature; action: Action }; + "onActionSuccess": { user: Creature; target: Creature; action: Action }; +} + +export class ActionRelay extends Relay { + constructor () { + super([ + "onActionAttempt", + "onActionFail", + "onActionSuccess" + ]) + } +}