Shortcut to Grenade (#1010)

* routine that finds, equips, and draws a grenade if the user has it; moved handling of ObjectHeldMessage from SessionActor to PlayerControl; placed a arm movement restriction condition

* loading of, and adding and removing of shortcuts to/from both the database and the client hotbar

* player-driven sanity tests to reload otherwise unavailable hotbar shortcuts; revamp to CreateShortcutMessage
This commit is contained in:
Fate-JH 2022-10-24 18:16:08 -04:00 committed by GitHub
parent 1369da22f0
commit 630c2809cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 1032 additions and 313 deletions

View file

@ -0,0 +1,9 @@
CREATE TABLE IF NOT EXISTS "shortcut" (
"avatar_id" INT NOT NULL REFERENCES avatar (id),
"slot" SMALLINT NOT NULL,
"purpose" SMALLINT NOT NULL,
"tile" VARCHAR(20) NOT NULL,
"effect1" VARCHAR(3),
"effect2" TEXT,
UNIQUE(avatar_id, slot)
);

View file

@ -237,8 +237,8 @@ class ObjectHeldTest extends ActorTest {
ServiceManager.boot(system)
val service = system.actorOf(Props(classOf[AvatarService], Zone.Nowhere), AvatarServiceTest.TestName)
service ! Service.Join("test")
service ! AvatarServiceMessage("test", AvatarAction.ObjectHeld(PlanetSideGUID(10), 1))
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarResponse.ObjectHeld(1)))
service ! AvatarServiceMessage("test", AvatarAction.ObjectHeld(PlanetSideGUID(10), 1, 2))
expectMsg(AvatarServiceResponse("/test/Avatar", PlanetSideGUID(10), AvatarResponse.ObjectHeld(1, 2)))
}
}
}