Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RadioFrequency/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,8 @@ public class Config : IConfig

[Description("Hint displayed when the frequency has been changed.")]
public string ChangedFrequencyHint { get; set; } = "You changed the radio frequency to {radio_frequency}.";

[Description("If no frequency is found")]
public string NoneFrequency { get; set; } = "None Frequency";
}
}
5 changes: 5 additions & 0 deletions RadioFrequency/Features/Frequency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public static Frequency GetNextFrequency(RoleTypeId role, Frequency currentFrequ

return frequencies[index == -1 ? 0 : (index + 1) % frequencies.Count];
}

public static string GetFrenquencyName(Player player)
{
return TryGetPlayerFrequency(player, out var frequency) ? frequency.Name : Plugin.Singleton.Config.NoneFrequency;
}

public void Init()
{
Expand Down
6 changes: 3 additions & 3 deletions RadioFrequency/RadioFrequency.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
<HintPath>..\packages\ExMod.Exiled.9.5.1\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
</Reference>
<Reference Include="Mirror">
<HintPath>..\..\..\refs_exiled\Mirror.dll</HintPath>
<HintPath>$(EXILED_REFERENCES)\Mirror.dll</HintPath>
</Reference>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="System.Data"/>
<Reference Include="System.Xml"/>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\refs_exiled\UnityEngine.CoreModule.dll</HintPath>
<HintPath>$(EXILED_REFERENCES)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>..\..\..\refs_exiled\UnityEngine.PhysicsModule.dll</HintPath>
<HintPath>$(EXILED_REFERENCES)UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down