Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit c54771b

Browse files
committed
More api updates
1 parent d31cd13 commit c54771b

5 files changed

Lines changed: 21 additions & 4 deletions

File tree

SCPDiscordPlugin/EventListeners/EnvironmentEventListener.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,13 @@ public void OnGeneratorFinish(GeneratorFinishEvent ev)
131131
{
132132
Dictionary<string, string> variables = new Dictionary<string, string>
133133
{
134-
{ "room", ev.Generator.Room.RoomType.ToString() }
134+
{ "room", ev.Generator.Room.RoomType.ToString() },
135+
{ "ipaddress", ev.ActivatingPlayer.IPAddress },
136+
{ "name", ev.ActivatingPlayer.Name },
137+
{ "playerid", ev.ActivatingPlayer.PlayerID.ToString() },
138+
{ "steamid", ev.ActivatingPlayer.GetParsedUserID() },
139+
{ "class", ev.ActivatingPlayer.PlayerRole.RoleID.ToString() },
140+
{ "team", ev.ActivatingPlayer.PlayerRole.Team.ToString() }
135141
};
136142
this.plugin.SendMessage(Config.GetArray("channels.ongeneratorfinish"), "environment.ongeneratorfinish", variables);
137143
}

SCPDiscordPlugin/Languages/english-emote.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,15 @@ environment:
285285
mtf:
286286
message: ":helicopter: **MTF helicopter is in visual range of the site, preparing to land.**"
287287
regex: []
288-
289288
ongeneratorfinish:
290289
# room
291-
message: ":electric_plug: Generator has finished charging up in <var:room>"
290+
# ipaddress
291+
# name
292+
# playerid
293+
# steamid
294+
# class
295+
# team
296+
message: ":electric_plug: Generator in <var:room> has been activated by <var:name> (<var:steamid>)."
292297
regex: [ ]
293298
onscpdeathannouncement:
294299
# ipaddress

SCPDiscordPlugin/Languages/english.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,13 @@ environment:
288288
regex: []
289289
ongeneratorfinish:
290290
# room
291-
message: "Generator has finished charging up in <var:room>"
291+
# ipaddress
292+
# name
293+
# playerid
294+
# steamid
295+
# class
296+
# team
297+
message: "Generator in <var:room> has been activated by <var:name> (<var:steamid>)."
292298
regex: [ ]
293299
onscpdeathannouncement:
294300
# ipaddress
0 Bytes
Binary file not shown.

SCPDiscordPlugin/lib/Smod2.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)