mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Add better chat command handling, help, and option to set basic mod state.
This commit is contained in:
parent
1ae96c71a3
commit
6f356105cc
7 changed files with 719 additions and 227 deletions
|
|
@ -60,6 +60,15 @@ public sealed partial class ActorManager : IDisposable
|
|||
public string ToWorldName(ushort worldId)
|
||||
=> worldId == ushort.MaxValue ? "Any World" : Worlds.TryGetValue(worldId, out var name) ? name : "Invalid";
|
||||
|
||||
/// <summary>
|
||||
/// Return the world id corresponding to the given name.
|
||||
/// </summary>
|
||||
/// <returns>ushort.MaxValue if the name is empty, 0 if it is not a valid world, or the worlds id.</returns>
|
||||
public ushort ToWorldId(string worldName)
|
||||
=> worldName.Length != 0
|
||||
? Worlds.FirstOrDefault(kvp => string.Equals(kvp.Value, worldName, StringComparison.OrdinalIgnoreCase), default).Key
|
||||
: ushort.MaxValue;
|
||||
|
||||
/// <summary>
|
||||
/// Convert a given ID for a certain ObjectKind to a name.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue