Adds verb categories (#766)

* Adds verb categories

* Update Content.Shared/GameObjects/Verbs/Verb.cs

Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Make GetCategory virtual

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
Víctor Aguilera Puerto
2020-03-06 20:11:24 +01:00
committed by GitHub
parent 5747eb5fac
commit e17ffbd76f
10 changed files with 97 additions and 12 deletions

View File

@@ -108,7 +108,7 @@ namespace Content.Server.GameObjects.EntitySystems
// TODO: These keys being giant strings is inefficient as hell.
data.Add(new VerbsResponseMessage.VerbData(verb.GetText(userEntity, component),
$"{component.GetType()}:{verb.GetType()}",
$"{component.GetType()}:{verb.GetType()}", verb.GetCategory(userEntity, component),
vis == VerbVisibility.Visible));
}
@@ -121,7 +121,7 @@ namespace Content.Server.GameObjects.EntitySystems
continue;
data.Add(new VerbsResponseMessage.VerbData(globalVerb.GetText(userEntity, entity),
globalVerb.GetType().ToString(), vis == VerbVisibility.Visible));
globalVerb.GetType().ToString(), globalVerb.GetCategory(userEntity, entity), vis == VerbVisibility.Visible));
}
var response = new VerbsResponseMessage(data, req.EntityUid);