Skip to content

Commit

Permalink
Added Translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoniofo committed Apr 5, 2024
1 parent 83f39d7 commit cae8299
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
3 changes: 0 additions & 3 deletions Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@ public class Config : IConfig

public bool Debug { get; set; } = false;

public string ElevatorMessage { get; set; } = "<br><br><br><br><br><br><br><br><br><br><br><br><size=18>Le joureur <color=red>%NAME%</color> a appuyé sur le bouton</size>";

public string Scp914Message { get; set; } = "<br><br><br><br><br><br><br><br><br><br><br><br><size=18>Le joureur <color=red>%NAME%</color> a lancer 914 en <color=red>%MODE%</color></size>";
}
}
6 changes: 3 additions & 3 deletions ElevatorBC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace ElevatorBC
{
public class ElevatorBC : Plugin<Config>
public class ElevatorBC : Plugin<Config, Translation>
{
public override string Author => "Antoniofo";

Expand Down Expand Up @@ -40,7 +40,7 @@ public void On914Activating(ActivatingEventArgs ev)
{
if (Vector3.Distance(ply.Position, Exiled.API.Features.Scp914.Transform.position) < 10.0f)
{
ply.ShowHint(Config.Scp914Message.Replace("%NAME%", ev.Player.DisplayNickname).Replace("%MODE%",Exiled.API.Features.Scp914.KnobStatus.ToString()));
ply.ShowHint(Translation.Scp914Message.Replace("%NAME%", ev.Player.DisplayNickname).Replace("%MODE%",Exiled.API.Features.Scp914.KnobStatus.ToString()));
}
}
}
Expand All @@ -51,7 +51,7 @@ public void OnPlayerInteractElevator(InteractingElevatorEventArgs ev)
{
if (Vector3.Distance(ply.Position, ev.Elevator.gameObject.transform.position) < 10.0f)
{
ply.ShowHint(Config.ElevatorMessage.Replace("%NAME%", ev.Player.DisplayNickname));
ply.ShowHint(Translation.ElevatorMessage.Replace("%NAME%", ev.Player.DisplayNickname));
}
}

Expand Down
1 change: 1 addition & 0 deletions ElevatorBC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
<Compile Include="Config.cs" />
<Compile Include="ElevatorBC.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Translation.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
Expand Down
18 changes: 18 additions & 0 deletions Translation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Exiled.API.Interfaces;

namespace ElevatorBC
{
public class Translation : ITranslation
{
public string ElevatorMessage { get; set; } = "<br><br><br><br><br><br><br><br><br><br><br><br><size=18>The player <color=red>%NAME%</co
lor> has pressed the button</size>";

public string Scp914Message { get; set; } = "<br><br><br><br><br><br><br><br><br><br><br><br><size=18>The player <color=red>%NAME%</colo
r> started 914 in <color=red>%MODE%</color></size>";
}
}

0 comments on commit cae8299

Please sign in to comment.