Skip to content

Commit

Permalink
Merge pull request #2 from Antoniofo/untested
Browse files Browse the repository at this point in the history
Untested to main
  • Loading branch information
Antoniofo committed Apr 5, 2024
2 parents 83f39d7 + b39917d commit 0c67f9f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 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
5 changes: 4 additions & 1 deletion ElevatorBC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -30,6 +31,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
Expand Down Expand Up @@ -93,9 +95,10 @@
<Compile Include="Config.cs" />
<Compile Include="ElevatorBC.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Translation.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
16 changes: 16 additions & 0 deletions Translation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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%</color> 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%</color> started 914 in <color=red>%MODE%</color></size>";
}
}

0 comments on commit 0c67f9f

Please sign in to comment.