Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Commit

Permalink
More api updates
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlOfDuty committed Apr 12, 2022
1 parent d31cd13 commit c54771b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
8 changes: 7 additions & 1 deletion SCPDiscordPlugin/EventListeners/EnvironmentEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ public void OnGeneratorFinish(GeneratorFinishEvent ev)
{
Dictionary<string, string> variables = new Dictionary<string, string>
{
{ "room", ev.Generator.Room.RoomType.ToString() }
{ "room", ev.Generator.Room.RoomType.ToString() },
{ "ipaddress", ev.ActivatingPlayer.IPAddress },
{ "name", ev.ActivatingPlayer.Name },
{ "playerid", ev.ActivatingPlayer.PlayerID.ToString() },
{ "steamid", ev.ActivatingPlayer.GetParsedUserID() },
{ "class", ev.ActivatingPlayer.PlayerRole.RoleID.ToString() },
{ "team", ev.ActivatingPlayer.PlayerRole.Team.ToString() }
};
this.plugin.SendMessage(Config.GetArray("channels.ongeneratorfinish"), "environment.ongeneratorfinish", variables);
}
Expand Down
9 changes: 7 additions & 2 deletions SCPDiscordPlugin/Languages/english-emote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,15 @@ environment:
mtf:
message: ":helicopter: **MTF helicopter is in visual range of the site, preparing to land.**"
regex: []

ongeneratorfinish:
# room
message: ":electric_plug: Generator has finished charging up in <var:room>"
# ipaddress
# name
# playerid
# steamid
# class
# team
message: ":electric_plug: Generator in <var:room> has been activated by <var:name> (<var:steamid>)."
regex: [ ]
onscpdeathannouncement:
# ipaddress
Expand Down
8 changes: 7 additions & 1 deletion SCPDiscordPlugin/Languages/english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,13 @@ environment:
regex: []
ongeneratorfinish:
# room
message: "Generator has finished charging up in <var:room>"
# ipaddress
# name
# playerid
# steamid
# class
# team
message: "Generator in <var:room> has been activated by <var:name> (<var:steamid>)."
regex: [ ]
onscpdeathannouncement:
# ipaddress
Expand Down
Binary file modified SCPDiscordPlugin/lib/Assembly-CSharp.dll
Binary file not shown.
Binary file modified SCPDiscordPlugin/lib/Smod2.dll
Binary file not shown.

0 comments on commit c54771b

Please sign in to comment.