Skip to content

Commit

Permalink
feat: Add welcome message when player connects to the server (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDave1999 authored Oct 9, 2024
1 parent 0a71485 commit 8224c1e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Application/Common/Resources/Messages.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/Application/Common/Resources/Messages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,12 @@
<data name="WeaponSuccessfullyRemoved" xml:space="preserve">
<value>{Name} has been removed from your weapon package</value>
</data>
<data name="Welcome1" xml:space="preserve">
<value>&gt;&gt;&gt; Welcome to Capture The Flag TDM! We're excited to have you here!</value>
</data>
<data name="Welcome2" xml:space="preserve">
<value>Use /cmds and /help for more information about our server and to kick off your adventure. Have fun!</value>
</data>
<data name="WrongPassword" xml:space="preserve">
<value>The password you entered is incorrect. Please try again</value>
</data>
Expand Down
2 changes: 2 additions & 0 deletions src/Application/Teams/ClassSelection/ClassSelectionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public void OnGameModeInit(IServerService serverService)
[Event]
public void OnPlayerConnect(Player player)
{
player.SendClientMessage(Color.Yellow, Messages.Welcome1);
player.SendClientMessage(Color.Red, Messages.Welcome2);
player.Color = Team.None.ColorHex;
player.AddComponent<ClassSelectionComponent>();
player.RemoveAttachedObject(0);
Expand Down

0 comments on commit 8224c1e

Please sign in to comment.