fix: Fixes localization corner cases with OPL (#1050)

## Changes
- [X] Adds OPL convenience methods
    - `opl.Add(cliloc, value)` and `opl.Add(value)` - value as an integer or string works just like `opl.Add(cliloc, $"{value}")`
    - `opl.AddLocalized(cliloc, clilocValue)` - works the same as `opl.Add(cliloc, $"#{clilocValue}");`
- [X] Simplifies basic `list.Add()` situations
- [X] Changes cliloc as an argument so it works with custom IPropertyList implementations (HTML)
- [X] Fixes plants so they support the old localization and new (changed in 7.0.12.0+)
- [X] Exposes more methods to override for Item to make creating custom OPL possible.

## Important Notes
* Using a ternary as an argument, like this `opl.Add(number, showType ? $"{type}\t{value}" : $"{value}");` _will not use the correct string interpolation_. This means if you use a custom PropertyList (for HTML or some other purpose), the property list won't be localized properly.
* All localization values must be interpolated, even if they are literal strings, or integers. Example: `opl.Add(number, $"{"Charges"}\t{m_Charges}");` is correct. Using the following: `$"Charges\t{m_Charges}"` will not work for custom PropertyList implementations!
This commit is contained in:
Kamron Batman 2022-06-12 21:17:42 -07:00 committed by GitHub
parent 12404ba6f6
commit b74b47159f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
75 changed files with 715 additions and 477 deletions

View file

@ -39,6 +39,7 @@ public class ClientVersion : IComparable<ClientVersion>, IComparer<ClientVersion
public static readonly ClientVersion Version60142 = new("6.0.14.2");
public static readonly ClientVersion Version7000 = new("7.0.0.0");
public static readonly ClientVersion Version7090 = new("7.0.9.0");
public static readonly ClientVersion Version70120 = new("7.0.12.0"); // Plant localization change
public static readonly ClientVersion Version70130 = new("7.0.13.0");
public static readonly ClientVersion Version70160 = new("7.0.16.0");
public static readonly ClientVersion Version70300 = new("7.0.30.0");

View file

@ -1471,8 +1471,7 @@ namespace Server
World.RemoveEntity(this);
OnAfterDelete();
m_PropertyList = null;
ClearProperties();
}
public ISpawner Spawner
@ -1808,9 +1807,9 @@ namespace Server
/// <summary>
/// Overridable. Sends the <see cref="PropertyList">object property list</see> to <paramref name="from" />.
/// </summary>
public virtual void SendPropertiesTo(Mobile from)
public virtual void SendPropertiesTo(NetState ns)
{
from.NetState?.Send(PropertyList.Buffer);
ns?.Send(PropertyList.Buffer);
}
/// <summary>
@ -1829,7 +1828,7 @@ namespace Server
}
else
{
list.Add(1050039, $"{m_Amount}\t#{LabelNumber}"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{m_Amount}\t{LabelNumber:#}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
}
else
@ -1874,35 +1873,35 @@ namespace Server
if (v != 0)
{
list.Add(1060448, $"{v}"); // physical resist ~1_val~%
list.Add(1060448, v); // physical resist ~1_val~%
}
v = FireResistance;
if (v != 0)
{
list.Add(1060447, $"{v}"); // fire resist ~1_val~%
list.Add(1060447, v); // fire resist ~1_val~%
}
v = ColdResistance;
if (v != 0)
{
list.Add(1060445, $"{v}"); // cold resist ~1_val~%
list.Add(1060445, v); // cold resist ~1_val~%
}
v = PoisonResistance;
if (v != 0)
{
list.Add(1060449, $"{v}"); // poison resist ~1_val~%
list.Add(1060449, v); // poison resist ~1_val~%
}
v = EnergyResistance;
if (v != 0)
{
list.Add(1060446, $"{v}"); // energy resist ~1_val~%
list.Add(1060446, v); // energy resist ~1_val~%
}
}
@ -2401,7 +2400,7 @@ namespace Server
return list;
}
public void ClearProperties()
public virtual void ClearProperties()
{
m_PropertyList = null;
}
@ -3080,7 +3079,7 @@ namespace Server
SendOPLPacketTo(ns, opl);
}
public void SendOPLPacketTo(NetState ns, Span<byte> opl = default)
public virtual void SendOPLPacketTo(NetState ns, Span<byte> opl = default)
{
if (!ObjectPropertyList.Enabled)
{

View file

@ -3413,9 +3413,9 @@ namespace Server
public int GetAOSStatus(int index) => AOSStatusHandler?.Invoke(this, index) ?? 0;
public virtual void SendPropertiesTo(Mobile from)
public virtual void SendPropertiesTo(NetState ns)
{
from.NetState?.Send(PropertyList.Buffer);
ns?.Send(PropertyList.Buffer);
}
public virtual void OnAosSingleClick(Mobile from)
@ -3485,11 +3485,14 @@ namespace Server
if (guildTitle.Length > 0)
{
list.Add(
NewGuildDisplay
? $"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)}"
: $"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)} Guild{type}"
);
if (NewGuildDisplay)
{
list.Add($"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)}");
}
else
{
list.Add($"{Utility.FixHtml(guildTitle)}, {Utility.FixHtml(guild.Name)} Guild{type}");
}
}
else
{

View file

@ -175,7 +175,7 @@ public static class IncomingEntityPackets
if (m != null && from.CanSee(m) && Utility.InUpdateRange(from.Location, m.Location))
{
m.SendPropertiesTo(from);
m.SendPropertiesTo(state);
}
}
else if (s.IsItem)
@ -185,7 +185,7 @@ public static class IncomingEntityPackets
if (item?.Deleted == false && from.CanSee(item) &&
Utility.InUpdateRange(from.Location, item.GetWorldLocation()))
{
item.SendPropertiesTo(from);
item.SendPropertiesTo(state);
}
}
}

View file

@ -330,7 +330,7 @@ public static class IncomingExtendedCommandPackets
if (m != null && from.CanSee(m) && Utility.InUpdateRange(from.Location, m.Location))
{
m.SendPropertiesTo(from);
m.SendPropertiesTo(state);
}
}
else if (s.IsItem)
@ -340,7 +340,7 @@ public static class IncomingExtendedCommandPackets
if (item?.Deleted == false && from.CanSee(item) &&
Utility.InUpdateRange(from.Location, item.GetWorldLocation()))
{
item.SendPropertiesTo(from);
item.SendPropertiesTo(state);
}
}
}

View file

@ -22,9 +22,25 @@ public interface IPropertyList : ISelfInterpolatedStringHandler
{
public void Reset();
public void Terminate();
public void Add(int number, string argument = null);
public void Add(int number);
/** Convenience method for $"{argument}". */
public void Add(int number, string argument);
/** Convenience method for $"{text}". */
public void Add(string text);
/** Convenience method for $"{value}". */
public void Add(int number, int value);
/** Convenience method for $"{value:#}". */
public void AddLocalized(int value);
/** Convenience method for $"{value:#}". */
public void AddLocalized(int number, int value);
// String Interpolation
public void Add([InterpolatedStringHandlerArgument("")] ref InterpolatedStringHandler handler);
public void Add(int number, [InterpolatedStringHandlerArgument("")] ref InterpolatedStringHandler handler);
}

View file

@ -119,29 +119,22 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable
_hash ^= (val >> 26) & 0x3F;
}
public void Add(int number, string? arguments = null)
public void Add(int number)
{
if (number == 0)
{
return;
}
arguments ??= "";
if (Header == 0)
{
Header = number;
HeaderArgs = arguments;
HeaderArgs = "";
}
AddHash(number);
if (arguments.Length > 0)
{
AddHash(arguments.GetHashCode(StringComparison.Ordinal));
}
int strLength = arguments.Length * 2;
int length = _bufferPos + 6 + strLength;
int length = _bufferPos + 6;
while (length > _buffer.Length)
{
Flush();
@ -149,24 +142,31 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable
var writer = new SpanWriter(_buffer.AsSpan(_bufferPos));
writer.Write(number);
writer.Write((ushort)strLength);
writer.WriteLittleUni(arguments);
_bufferPos += writer.BytesWritten;
_pos = 0;
writer.Write((ushort)0);
_bufferPos += 6;
}
public void Add(int number, string? arguments) => InternalAdd(number, $"{arguments}");
public void Add(string argument) => InternalAdd(GetStringNumber(), $"{argument}");
public void Add(int number, int value) => InternalAdd(number, $"{value}");
public void AddLocalized(int value) => InternalAdd(GetStringNumber(), $"{value:#}");
public void AddLocalized(int number, int value) => InternalAdd(number, $"{value:#}");
private int GetStringNumber() => _stringNumbers[_stringNumbersIndex++ % _stringNumbers.Length];
public void Add(string argument) => Add(GetStringNumber(), argument);
// String Interpolation
public void Add(
[InterpolatedStringHandlerArgument("")]
ref IPropertyList.InterpolatedStringHandler handler
) => Add(GetStringNumber(), ref handler);
) => InternalAdd(GetStringNumber(), ref handler);
// String Interpolation
public void Add(
int number,
[InterpolatedStringHandlerArgument("")]
ref IPropertyList.InterpolatedStringHandler handler
) => InternalAdd(number, ref handler);
private void InternalAdd(
int number,
[InterpolatedStringHandlerArgument("")]
ref IPropertyList.InterpolatedStringHandler handler)
@ -182,14 +182,10 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable
{
Header = number;
HeaderArgs = chars.ToString();
HeaderArgs.GetHashCode(StringComparison.Ordinal);
}
AddHash(number);
if (chars.Length > 0)
{
AddHash(string.GetHashCode(chars, StringComparison.Ordinal));
}
AddHash(string.GetHashCode(chars, StringComparison.Ordinal));
int strLength = chars.Length * 2;
int length = _bufferPos + 6 + strLength;
@ -253,7 +249,6 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable
public void AppendFormatted<T>(T value)
{
string? s;
if (value is IFormattable)
{
@ -284,6 +279,14 @@ public sealed class ObjectPropertyList : IPropertyList, IDisposable
public void AppendFormatted<T>(T value, string? format)
{
// We support localization '#' cliloc formatter for custom property lists
// This allows someone to build an IPropertyList that creates HTML using the same syntax as LocalizationInterpolationHandler
if (format == "#")
{
AppendLiteral("#");
format = null;
}
string? s;
if (value is IFormattable)
{

View file

@ -262,7 +262,7 @@ namespace Server.Engines.BulkOrders
{
base.GetProperties(list);
list.Add(1062344, $"{Entries.Count}"); // Deeds in book: ~1_val~
list.Add(1062344, Entries.Count); // Deeds in book: ~1_val~
if (!string.IsNullOrEmpty(m_BookName))
{

View file

@ -54,12 +54,12 @@ namespace Server.Engines.BulkOrders
list.Add(LargeBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material.
}
list.Add(1060656, $"{AmountMax}"); // amount to make: ~1_val~
list.Add(1060656, AmountMax); // amount to make: ~1_val~
for (var i = 0; i < _entries.Length; ++i)
{
var entry = _entries[i];
list.Add(1060658 + i, $"#{entry.Details.Number}\t{entry.Amount}"); // ~1_val~: ~2_val~
list.Add(1060658 + i, $"{entry.Details.Number:#}\t{entry.Amount}"); // ~1_val~: ~2_val~
}
}

View file

@ -77,8 +77,8 @@ namespace Server.Engines.BulkOrders
list.Add(SmallBODGump.GetMaterialNumberFor(Material)); // All items must be made with x material.
}
list.Add(1060656, $"{AmountMax}"); // amount to make: ~1_val~
list.Add(1060658, $"#{m_Number}\t{m_AmountCur}"); // ~1_val~: ~2_val~
list.Add(1060656, AmountMax); // amount to make: ~1_val~
list.Add(1060658, $"{m_Number:#}\t{m_AmountCur}"); // ~1_val~: ~2_val~
}
public override void OnDoubleClick(Mobile from)

View file

@ -945,12 +945,11 @@ namespace Server.Engines.CannedEvil
if (m_Active)
{
list.Add(1060742); // active
list.Add(1060658, $"Type\t{m_Type}"); // ~1_val~: ~2_val~
list.Add(1060659, $"Level\t{Level}"); // ~1_val~: ~2_val~
list.Add(1060742); // active
list.Add(1060658, $"{"Type"}\t{m_Type}"); // ~1_val~: ~2_val~
list.Add(1060659, $"{"Level"}\t{Level}"); // ~1_val~: ~2_val~
var killRatio = 100.0 * ((double)m_Kills / MaxKills);
list.Add(1060660, $"Kills\t{m_Kills} of {MaxKills} ({killRatio:F1}%)"); // ~1_val~: ~2_val~
//list.Add(1060661, "Spawn Range\t{0}", m_SpawnRange); // ~1_val~: ~2_val~
list.Add(1060660, $"{"Kills"}\t{m_Kills} of {MaxKills} ({killRatio:F1}%)"); // ~1_val~: ~2_val~
}
else
{

View file

@ -35,7 +35,7 @@ namespace Server.Factions
base.GetProperties(list);
// NOTE: OSI does not list uses remaining; intentional difference
list.Add(1060584, $"{Charges}"); // uses remaining: ~1_val~
list.Add(1060584, Charges); // uses remaining: ~1_val~
}
public override void Serialize(IGenericWriter writer)

View file

@ -314,7 +314,7 @@ namespace Server.Factions
if (m_Faction != null && Map == Faction.Facet)
{
list.Add(1060846, m_Faction.Definition.PropName); // Guard: ~1_val~
list.Add(1060846, $"{m_Faction.Definition.PropName}"); // Guard: ~1_val~
}
}

View file

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Gumps;
@ -30,17 +31,14 @@ namespace Server.Engines.Plants
public class PlantItem : Item, ISecurable
{
/*
* Clients 7.0.12.0+ expect a container type in the plant label.
* To support older (and only older) clients, change this to false.
*/
private static readonly bool ShowContainerType = true;
private PlantHue m_PlantHue;
private PlantStatus m_PlantStatus;
private PlantType m_PlantType;
private bool m_ShowType;
// For clients older than 7.0.12.0
private ObjectPropertyList _oldClientPropertyList;
[Constructible]
public PlantItem(bool fertileDirt = false) : base(0x1602)
{
@ -59,6 +57,9 @@ namespace Server.Engines.Plants
public PlantSystem PlantSystem { get; private set; }
public ObjectPropertyList OldClientPropertyList =>
_oldClientPropertyList ??= InitializePropertyList(_oldClientPropertyList);
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
[CommandProperty(AccessLevel.GameMaster)]
@ -248,80 +249,189 @@ namespace Server.Engines.Plants
InvalidateProperties();
}
public override void AddNameProperty(IPropertyList list)
private ObjectPropertyList InitializePropertyList(ObjectPropertyList list)
{
if (m_PlantStatus >= PlantStatus.DeadTwigs)
{
base.AddNameProperty(list);
}
else if (m_PlantStatus < PlantStatus.Seed)
{
string args;
GetProperties(list);
AppendChildProperties(list);
list.Terminate();
return list;
}
if (ShowContainerType)
// Overridden to support new and old client localization
public override void SendOPLPacketTo(NetState ns, Span<byte> opl = default)
{
if (!ObjectPropertyList.Enabled)
{
return;
}
if (ns.Version < ClientVersion.Version70120)
{
ns.SendOPLInfo(Serial, OldClientPropertyList.Hash);
return;
}
ns.SendOPLInfo(this);
}
public override void SendPropertiesTo(NetState ns)
{
if (ns?.Version < ClientVersion.Version70120)
{
ns?.Send(OldClientPropertyList.Buffer);
return;
}
ns?.Send(PropertyList.Buffer);
}
public override void ClearProperties()
{
base.ClearProperties();
_oldClientPropertyList = null;
}
public override void InvalidateProperties()
{
if (!ObjectPropertyList.Enabled)
{
return;
}
base.InvalidateProperties();
if (Map != null && Map != Map.Internal && !World.Loading)
{
int? oldHash = _oldClientPropertyList?.Hash;
if (oldHash != null)
{
args = $"#{GetLocalizedContainerType()}\t#{PlantSystem.GetLocalizedDirtStatus()}";
_oldClientPropertyList.Reset();
}
else
{
args = $"#{PlantSystem.GetLocalizedDirtStatus()}";
_oldClientPropertyList = new ObjectPropertyList(this);
}
list.Add(1060830, args); // a ~1_val~ of ~2_val~ dirt
InitializePropertyList(_oldClientPropertyList);
if (oldHash != _oldClientPropertyList.Hash)
{
Delta(ItemDelta.Properties);
}
}
else
{
var typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
var hueInfo = PlantHueInfo.GetInfo(m_PlantHue);
ClearProperties();
}
}
if (m_PlantStatus >= PlantStatus.DecorativePlant)
public override void OnAosSingleClick(Mobile from)
{
var ns = from?.NetState;
if (ns == null)
{
return;
}
var opl = ns.Version < ClientVersion.Version70120 ? OldClientPropertyList : PropertyList;
if (opl.Header > 0)
{
from.NetState.SendMessageLocalized(
Serial,
ItemID,
MessageType.Label,
0x3B2,
3,
opl.Header,
Name,
opl.HeaderArgs
);
}
}
public override void GetProperties(IPropertyList list)
{
if (m_PlantStatus >= PlantStatus.DeadTwigs)
{
base.GetProperties(list);
return;
}
var container = GetLocalizedContainerType();
var dirt = PlantSystem.GetLocalizedDirtStatus();
var health = PlantSystem.GetLocalizedHealth();
var plantStatus = GetLocalizedPlantStatus();
if (m_PlantStatus < PlantStatus.Seed)
{
// Clients above 7.0.12.0 use the regular PropertyList
if (list != _oldClientPropertyList)
{
list.Add(typeInfo.GetPlantLabelDecorative(hueInfo), $"#{hueInfo.Name}\t#{typeInfo.Name}");
// a ~1_val~ of ~2_val~ dirt
list.Add(1060830, $"{container:#}\t{dirt:#}");
}
else if (m_PlantStatus >= PlantStatus.FullGrownPlant)
else
{
// a ~1_val~ of ~2_val~ dirt
list.Add(1060830, $"{dirt:#}");
}
return;
}
var typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
var hueInfo = PlantHueInfo.GetInfo(m_PlantHue);
if (m_PlantStatus >= PlantStatus.DecorativePlant)
{
list.Add(typeInfo.GetPlantLabelDecorative(hueInfo), $"{hueInfo.Name:#}\t{typeInfo.Name:#}");
return;
}
if (m_PlantStatus >= PlantStatus.FullGrownPlant)
{
list.Add(
typeInfo.GetPlantLabelFullGrown(hueInfo),
$"{health:#}\t{hueInfo.Name:#}\t{typeInfo.Name:#}"
);
return;
}
if (m_ShowType)
{
var plantNumber = m_PlantStatus == PlantStatus.Plant
? typeInfo.GetPlantLabelPlant(hueInfo)
: typeInfo.GetPlantLabelSeed(hueInfo);
if (list != _oldClientPropertyList)
{
list.Add(
typeInfo.GetPlantLabelFullGrown(hueInfo),
$"#{PlantSystem.GetLocalizedHealth()}\t#{hueInfo.Name}\t#{typeInfo.Name}"
plantNumber,
$"{container:#}\t{dirt:#}\t{health:#}\t{hueInfo.Name:#}\t{typeInfo.Name:#}\t{plantStatus:#}"
);
}
else
{
string args;
if (ShowContainerType)
{
args =
$"#{GetLocalizedContainerType()}\t#{PlantSystem.GetLocalizedDirtStatus()}\t#{PlantSystem.GetLocalizedHealth()}";
}
else
{
args = $"#{PlantSystem.GetLocalizedDirtStatus()}\t#{PlantSystem.GetLocalizedHealth()}";
}
if (m_ShowType)
{
args += $"\t#{hueInfo.Name}\t#{typeInfo.Name}\t#{GetLocalizedPlantStatus()}";
if (m_PlantStatus == PlantStatus.Plant)
{
list.Add(typeInfo.GetPlantLabelPlant(hueInfo), args);
}
else
{
list.Add(typeInfo.GetPlantLabelSeed(hueInfo), args);
}
}
else
{
args +=
$"\t#{(typeInfo.PlantCategory == PlantCategory.Default ? hueInfo.Name : (int)typeInfo.PlantCategory)}\t#{GetLocalizedPlantStatus()}";
list.Add(
hueInfo.IsBright() ? 1060832 : 1060831,
args
); // a ~1_val~ of ~2_val~ dirt with a ~3_val~ [bright] ~4_val~ ~5_val~
}
list.Add(
plantNumber,
$"{dirt:#}\t{health:#}\t{hueInfo.Name:#}\t{typeInfo.Name:#}\t{plantStatus:#}"
);
}
}
else
{
var category = typeInfo.PlantCategory == PlantCategory.Default ? hueInfo.Name : (int)typeInfo.PlantCategory;
var plantNumber = hueInfo.IsBright() ? 1060832 : 1060831;
if (list != _oldClientPropertyList)
{
list.Add(plantNumber, $"{container:#}\t{dirt:#}\t{health:#}\t{category:#}\t{plantStatus:#}");
}
else
{
list.Add(plantNumber,$"{dirt:#}\t{health:#}\t{category:#}\t{plantStatus:#}");
}
}
}

View file

@ -126,7 +126,39 @@ namespace Server.Engines.Plants
public override void AddNameProperty(IPropertyList list)
{
list.Add(GetLabel(out var args), args);
var typeInfo = PlantTypeInfo.GetInfo(m_PlantType);
var hueInfo = PlantHueInfo.GetInfo(m_PlantHue);
int title;
if (m_ShowType || typeInfo.PlantCategory == PlantCategory.Default)
{
title = hueInfo.Name;
}
else
{
title = (int)typeInfo.PlantCategory;
}
if (Amount == 1)
{
if (m_ShowType)
{
list.Add(typeInfo.GetSeedLabel(hueInfo), $"{title:#}\t{typeInfo.Name:#}");
return;
}
list.Add(hueInfo.IsBright() ? 1060839 : 1060838, $"{title:#}");
return;
}
if (m_ShowType)
{
list.Add(typeInfo.GetSeedLabelPlural(hueInfo), $"{Amount}\t{title:#}\t{typeInfo.Name:#}");
return;
}
list.Add(hueInfo.IsBright() ? 1113491 : 1113490, $"{Amount}\t{title:#}");
}
public override void OnSingleClick(Mobile from)

View file

@ -34,7 +34,7 @@ namespace Server.Engines.Quests.Collector
public override void AddNameProperty(IPropertyList list)
{
var info = ImageTypeInfo.Get(m_Image);
list.Add(1060847, $"#1055126\t#{info.Name}"); // a painted image of:
list.Add(1060847, $"{1055126:#}\t{info.Name:#}"); // a painted image of:
}
public override void OnSingleClick(Mobile from)

View file

@ -47,7 +47,7 @@ namespace Server.Engines.Quests
{
base.GetProperties(list);
list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~
list.Add(1060741, m_Charges); // charges: ~1_val~
}
public override void OnDoubleClick(Mobile from)

View file

@ -391,13 +391,10 @@ namespace Server.Engines.Quests.Hag
if (creature.GetType() == type)
{
System.From.SendLocalizedMessage(
1055043,
$"#{info.Name}"
); // You gather a ~1_INGREDIENT_NAME~ from the corpse.
// You gather a ~1_INGREDIENT_NAME~ from the corpse.
System.From.SendLocalizedMessage(1055043, $"#{info.Name}");
CurProgress++;
break;
}
}

View file

@ -365,12 +365,12 @@ namespace Server.Engines.Spawners
{
list.Add(1060742); // active
list.Add(1060656, $"{m_Count}"); // amount to make: ~1_val~
list.Add(1061169, $"{m_HomeRange}"); // range ~1_val~
list.Add(1050039, $"walking range:\t{m_WalkingRange}"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1053099, $"group:\t{m_Group}"); // ~1_oretype~: ~2_armortype~
list.Add(1060847, $"team:\t{m_Team}"); // ~1_val~ ~2_val~
list.Add(1063483, $"delay:\t{m_MinDelay} to {m_MaxDelay}"); // ~1_MATERIAL~: ~2_ITEMNAME~
list.Add(1060656, m_Count); // amount to make: ~1_val~
list.Add(1061169, m_HomeRange); // range ~1_val~
list.Add(1050039, $"{"walking range:"}\t{m_WalkingRange}"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1053099, $"{"group:"}\t{m_Group}"); // ~1_oretype~: ~2_armortype~
list.Add(1060847, $"{"team:"}\t{m_Team}"); // ~1_val~ ~2_val~
list.Add(1063483, $"{"delay:"}\t{m_MinDelay} to {m_MaxDelay}"); // ~1_MATERIAL~: ~2_ITEMNAME~
GetSpawnerProperties(list);

View file

@ -94,7 +94,7 @@ namespace Server.Engines.Spawners
if (Running && m_SpawnRegion != null)
{
list.Add(1076228, $"region:\t{m_SpawnRegion.Name}"); // ~1_DUMMY~ ~2_DUMMY~
list.Add(1076228, $"{"region:"}\t{m_SpawnRegion.Name}"); // ~1_DUMMY~ ~2_DUMMY~
}
}

View file

@ -122,7 +122,7 @@ namespace Server.Items
TextDefinition.AddTo(list, m_Label);
}
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
}
public override void OnDoubleClick(Mobile from)

View file

@ -389,18 +389,18 @@ namespace Server.Items
if (dead > 0)
{
list.Add(1074248, $"{dead}"); // Dead Creatures: ~1_NUM~
list.Add(1074248, dead); // Dead Creatures: ~1_NUM~
}
var decorations = Items.Count - LiveCreatures - dead;
if (decorations > 0)
{
list.Add(1074249, $"{decorations}"); // Decorations: ~1_NUM~
list.Add(1074249, decorations); // Decorations: ~1_NUM~
}
list.Add(1074250, $"#{FoodNumber()}"); // Food state: ~1_STATE~
list.Add(1074251, $"#{WaterNumber()}"); // Water state: ~1_STATE~
list.AddLocalized(1074250, FoodNumber()); // Food state: ~1_STATE~
list.AddLocalized(1074251, WaterNumber()); // Water state: ~1_STATE~
if (_food.State == (int)FoodState.Dead)
{
@ -912,12 +912,8 @@ namespace Server.Items
AddItem(item);
from?.SendLocalizedMessage(
1073635,
item.LabelNumber != 0
? $"#{item.LabelNumber}"
: item.Name
); // You add the following decoration to your aquarium: ~1_NAME~
// You add the following decoration to your aquarium: ~1_NAME~
from?.SendLocalizedMessage(1073635, item.LabelNumber != 0 ? $"#{item.LabelNumber}" : item.Name);
InvalidateProperties();
return true;

View file

@ -88,7 +88,7 @@ namespace Server.Items
if (fish != null)
{
list.Add(1074494, $"#{fish.LabelNumber}"); // Contains: ~1_CREATURE~
list.AddLocalized(1074494, fish.LabelNumber); // Contains: ~1_CREATURE~
}
}
}

View file

@ -18,7 +18,7 @@ namespace Server.Items
{
base.AddNameProperties(list);
list.Add(1074432, $"{VacationDays}"); // Vacation days: ~1_DAYS~
list.AddLocalized(1074432, VacationDays); // Vacation days: ~1_DAYS~
}
}
}

View file

@ -1251,14 +1251,27 @@ namespace Server.Items
if (oreType != 0)
{
list.Add(
_quality == ArmorQuality.Exceptional ? 1053100 : 1053099,
name != null ? $"#{oreType}\t{Name}" : $"#{oreType}\t#{LabelNumber}"
);
var qualityNumber = _quality == ArmorQuality.Exceptional ? 1053100 : 1053099;
if (name != null)
{
list.Add(qualityNumber, $"{oreType:#}\t{Name}");
}
else
{
list.Add(qualityNumber, $"{oreType:#}\t{LabelNumber:#}");
}
}
else if (_quality == ArmorQuality.Exceptional)
{
list.Add(1050040, name ?? $"#{LabelNumber}"); // exceptional ~1_ITEMNAME~
if (name != null)
{
list.Add(1050040, name); // exceptional ~1_ITEMNAME~
}
else
{
list.AddLocalized(1050040, LabelNumber); // exceptional ~1_ITEMNAME~
}
}
else if (name == null)
{
@ -1312,72 +1325,72 @@ namespace Server.Items
if ((prop = ArtifactRarity) > 0)
{
list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~
list.Add(1061078, prop); // artifact rarity ~1_val~
}
if ((prop = Attributes.WeaponDamage) != 0)
{
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
list.Add(1060401, prop); // damage increase ~1_val~%
}
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = GetLowerStatReq()) != 0)
{
list.Add(1060435, $"{prop}"); // lower requirements ~1_val~%
list.Add(1060435, prop); // lower requirements ~1_val~%
}
if ((prop = GetLuckBonus() + Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if (ArmorAttributes.MageArmor != 0)
@ -1387,12 +1400,12 @@ namespace Server.Items
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -1402,22 +1415,22 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if ((prop = ArmorAttributes.SelfRepair) != 0)
{
list.Add(1060450, $"{prop}"); // self repair ~1_val~
list.Add(1060450, prop); // self repair ~1_val~
}
if (Attributes.SpellChanneling != 0)
@ -1427,39 +1440,39 @@ namespace Server.Items
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
{
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
list.Add(1075210, prop); // Increased Karma Loss ~1val~%
}
AddResistanceProperties(list);
if ((prop = GetDurabilityBonus()) > 0)
{
list.Add(1060410, $"{prop}"); // durability ~1_val~%
list.Add(1060410, prop); // durability ~1_val~%
}
if ((prop = ComputeStatReq(StatType.Str)) > 0)
{
list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
list.Add(1061170, prop); // strength requirement ~1_val~
}
if (_hitPoints >= 0 && _maxHitPoints > 0)

View file

@ -50,77 +50,77 @@ namespace Server.Items
if ((prop = _weaponAttributes.HitColdArea) != 0)
{
list.Add(1060416, $"{prop}"); // hit cold area ~1_val~%
list.Add(1060416, prop); // hit cold area ~1_val~%
}
if ((prop = _weaponAttributes.HitDispel) != 0)
{
list.Add(1060417, $"{prop}"); // hit dispel ~1_val~%
list.Add(1060417, prop); // hit dispel ~1_val~%
}
if ((prop = _weaponAttributes.HitEnergyArea) != 0)
{
list.Add(1060418, $"{prop}"); // hit energy area ~1_val~%
list.Add(1060418, prop); // hit energy area ~1_val~%
}
if ((prop = _weaponAttributes.HitFireArea) != 0)
{
list.Add(1060419, $"{prop}"); // hit fire area ~1_val~%
list.Add(1060419, prop); // hit fire area ~1_val~%
}
if ((prop = _weaponAttributes.HitFireball) != 0)
{
list.Add(1060420, $"{prop}"); // hit fireball ~1_val~%
list.Add(1060420, prop); // hit fireball ~1_val~%
}
if ((prop = _weaponAttributes.HitHarm) != 0)
{
list.Add(1060421, $"{prop}"); // hit harm ~1_val~%
list.Add(1060421, prop); // hit harm ~1_val~%
}
if ((prop = _weaponAttributes.HitLeechHits) != 0)
{
list.Add(1060422, $"{prop}"); // hit life leech ~1_val~%
list.Add(1060422, prop); // hit life leech ~1_val~%
}
if ((prop = _weaponAttributes.HitLightning) != 0)
{
list.Add(1060423, $"{prop}"); // hit lightning ~1_val~%
list.Add(1060423, prop); // hit lightning ~1_val~%
}
if ((prop = _weaponAttributes.HitLowerAttack) != 0)
{
list.Add(1060424, $"{prop}"); // hit lower attack ~1_val~%
list.Add(1060424, prop); // hit lower attack ~1_val~%
}
if ((prop = _weaponAttributes.HitLowerDefend) != 0)
{
list.Add(1060425, $"{prop}"); // hit lower defense ~1_val~%
list.Add(1060425, prop); // hit lower defense ~1_val~%
}
if ((prop = _weaponAttributes.HitMagicArrow) != 0)
{
list.Add(1060426, $"{prop}"); // hit magic arrow ~1_val~%
list.Add(1060426, prop); // hit magic arrow ~1_val~%
}
if ((prop = _weaponAttributes.HitLeechMana) != 0)
{
list.Add(1060427, $"{prop}"); // hit mana leech ~1_val~%
list.Add(1060427, prop); // hit mana leech ~1_val~%
}
if ((prop = _weaponAttributes.HitPhysicalArea) != 0)
{
list.Add(1060428, $"{prop}"); // hit physical area ~1_val~%
list.Add(1060428, prop); // hit physical area ~1_val~%
}
if ((prop = _weaponAttributes.HitPoisonArea) != 0)
{
list.Add(1060429, $"{prop}"); // hit poison area ~1_val~%
list.Add(1060429, prop); // hit poison area ~1_val~%
}
if ((prop = _weaponAttributes.HitLeechStam) != 0)
{
list.Add(1060430, $"{prop}"); // hit stamina leech ~1_val~%
list.Add(1060430, prop); // hit stamina leech ~1_val~%
}
}
}

View file

@ -690,7 +690,14 @@ namespace Server.Items
if (oreType != 0)
{
list.Add(1053099, name != null ? $"#{oreType}\t{name}" : $"#{oreType}\t#{LabelNumber}"); // ~1_oretype~ ~2_armortype~
if (name != null)
{
list.Add(1053099, $"{oreType:#}\t{name}"); // ~1_oretype~ ~2_armortype~
}
else
{
list.Add(1053099, $"{oreType:#}\t{LabelNumber:#}"); // ~1_oretype~ ~2_armortype~
}
}
else if (name == null)
{
@ -737,72 +744,72 @@ namespace Server.Items
if ((prop = ArtifactRarity) > 0)
{
list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~
list.Add(1061078, prop); // artifact rarity ~1_val~
}
if ((prop = Attributes.WeaponDamage) != 0)
{
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
list.Add(1060401, prop); // damage increase ~1_val~%
}
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = ClothingAttributes.LowerStatReq) != 0)
{
list.Add(1060435, $"{prop}"); // lower requirements ~1_val~%
list.Add(1060435, prop); // lower requirements ~1_val~%
}
if ((prop = Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if (ClothingAttributes.MageArmor != 0)
@ -812,12 +819,12 @@ namespace Server.Items
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -827,22 +834,22 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if ((prop = ClothingAttributes.SelfRepair) != 0)
{
list.Add(1060450, $"{prop}"); // self repair ~1_val~
list.Add(1060450, prop); // self repair ~1_val~
}
if (Attributes.SpellChanneling != 0)
@ -852,39 +859,39 @@ namespace Server.Items
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
{
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
list.Add(1075210, prop); // Increased Karma Loss ~1val~%
}
AddResistanceProperties(list);
if ((prop = ClothingAttributes.DurabilityBonus) > 0)
{
list.Add(1060410, $"{prop}"); // durability ~1_val~%
list.Add(1060410, prop); // durability ~1_val~%
}
if ((prop = ComputeStatReq(StatType.Str)) > 0)
{
list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
list.Add(1061170, prop); // strength requirement ~1_val~
}
if (_hitPoints >= 0 && _maxHitPoints > 0)

View file

@ -15,7 +15,7 @@ public abstract partial class BaseDecorationArtifact : Item
{
base.GetProperties(list);
list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~
list.Add(1061078, ArtifactRarity); // artifact rarity ~1_val~
}
}
@ -32,6 +32,6 @@ public abstract partial class BaseDecorationContainerArtifact : BaseContainer
{
base.AddNameProperties(list);
list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~
list.Add(1061078, ArtifactRarity); // artifact rarity ~1_val~
}
}

View file

@ -1,5 +1,6 @@
using ModernUO.Serialization;
using Server.Targeting;
using Server.Text;
namespace Server.Items;
@ -66,13 +67,20 @@ public partial class CommodityDeed : Item
{
base.GetProperties(list);
if (Commodity != null)
if (Commodity is ICommodity ic)
{
var args = Commodity.Name == null
? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}"
: $"{Commodity.Name}\t{Commodity.Amount}";
list.Add(1060658, args); // ~1_val~: ~2_val~
list.Add(1060658, $"{ic.DescriptionNumber:#}\t{Commodity.Amount}"); // ~1_val~: ~2_val~
}
else if (Commodity != null)
{
if (Commodity.Name == null)
{
list.Add(1060658, $"{Commodity.LabelNumber:#}\t{Commodity.Amount}"); // ~1_val~: ~2_val~
}
else
{
list.Add(1060658, $"{Commodity.Name}\t{Commodity.Amount}"); // ~1_val~: ~2_val~
}
}
else
{
@ -86,11 +94,13 @@ public partial class CommodityDeed : Item
if (Commodity != null)
{
var args = Commodity.Name == null
? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}"
: $"{Commodity.Name}\t{Commodity.Amount}";
LabelTo(from, 1060658, args); // ~1_val~: ~2_val~
LabelTo(
from,
1060658, // ~1_val~: ~2_val~
Commodity.Name == null
? $"#{(Commodity as ICommodity)?.DescriptionNumber ?? Commodity.LabelNumber}\t{Commodity.Amount}"
: $"{Commodity.Name}\t{Commodity.Amount}"
);
}
}

View file

@ -265,77 +265,77 @@ namespace Server.Items
if ((prop = ArtifactRarity) > 0)
{
list.Add(1061078, $"{prop}"); // artifact rarity ~1_val~
list.Add(1061078, prop); // artifact rarity ~1_val~
}
if ((prop = Attributes.WeaponDamage) != 0)
{
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
list.Add(1060401, prop); // damage increase ~1_val~%
}
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -345,17 +345,17 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if (Attributes.SpellChanneling != 0)
@ -365,27 +365,27 @@ namespace Server.Items
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
{
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
list.Add(1075210, prop); // Increased Karma Loss ~1val~%
}
AddResistanceProperties(list);

View file

@ -71,7 +71,14 @@ namespace Server.Items
public override void GetProperties(IPropertyList list)
{
base.GetProperties(list);
list.Add(1060738, Core.ML ? $"{m_Worth:N0}" : m_Worth.ToString()); // value: ~1_val~)
if (Core.ML)
{
list.Add(1060738, $"{m_Worth:N0}"); // value: ~1_val~
}
else
{
list.Add(1060738, m_Worth); // value: ~1_val~
}
}
public override void OnAdded(IEntity parent)

View file

@ -97,11 +97,11 @@ namespace Server.Items
list.Add(Active ? 1060742 : 1060743); // active / inactive
list.Add(1060745); // broadcast
list.Add(1060741, $"{Charges}"); // charges: ~1_val~
list.Add(1060741, Charges); // charges: ~1_val~
if (Receivers.Count > 0)
{
list.Add(1060746, $"{Receivers.Count}"); // links: ~1_val~
list.Add(1060746, Receivers.Count); // links: ~1_val~
}
}

View file

@ -27,7 +27,17 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1070998, $"{ItemName}"); // Use this to redeem<br>your ~1_PROMO~
if (ItemName != null)
{
if (ItemName.Number > 0)
{
list.Add(1070998, ItemName.Number); // Use this to redeem<br>your ~1_PROMO~
}
else
{
list.Add(1070998, ItemName.String); // Use this to redeem<br>your ~1_PROMO~
}
}
}
public override void OnDoubleClick(Mobile from)

View file

@ -168,15 +168,15 @@ namespace Server.Items
if (m_MapDest != null)
{
list.Add(1060658, $"Map\t{m_MapDest}");
list.Add(1060658, $"{"Map"}\t{m_MapDest}");
}
if (m_PointDest != Point3D.Zero)
{
list.Add(1060659, $"Coords\t{m_PointDest}");
list.Add(1060659, $"{"Coords"}\t{m_PointDest}");
}
list.Add(1060660, $"Creatures\t{(m_Creatures ? "Yes" : "No")}");
list.Add(1060660, $"{"Creatures"}\t{(m_Creatures ? "Yes" : "No")}");
}
public override void OnSingleClick(Mobile from)
@ -483,11 +483,11 @@ namespace Server.Items
if (m_MessageString != null)
{
list.Add(1060662, $"Message\t{m_MessageString}");
list.Add(1060662, $"{"Message"}\t{m_MessageString}");
}
else if (m_MessageNumber != 0)
{
list.Add(1060662, $"Message\t#{m_MessageNumber}");
list.Add(1060662, $"{"Message"}\t{m_MessageNumber:#}");
}
}
@ -625,16 +625,16 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060661, $"Range\t{m_Range}");
list.Add(1060661, $"{"Range"}\t{m_Range}");
if (m_Keyword >= 0)
{
list.Add(1060662, $"Keyword\t{m_Keyword}");
list.Add(1060662, $"{"Keyword"}\t{m_Keyword}");
}
if (m_Substring != null)
{
list.Add(1060663, $"Substring\t{m_Substring}");
list.Add(1060663, $"{"Substring"}\t{m_Substring}");
}
}

View file

@ -272,7 +272,7 @@ namespace Server.Items
if ((prop = m_DamageIncrease) != 0)
{
list.Add(1074762, $"{prop}"); // Damage modifier: ~1_PERCENT~%
list.Add(1074762, prop); // Damage modifier: ~1_PERCENT~%
}
int phys = 0, fire = 0, cold = 0, pois = 0, nrgy = 0, chaos = 0, direct = 0;
@ -281,104 +281,104 @@ namespace Server.Items
if (phys != 0)
{
list.Add(1060403, $"{phys}"); // physical damage ~1_val~%
list.Add(1060403, phys); // physical damage ~1_val~%
}
if (fire != 0)
{
list.Add(1060405, $"{fire}"); // fire damage ~1_val~%
list.Add(1060405, fire); // fire damage ~1_val~%
}
if (cold != 0)
{
list.Add(1060404, $"{cold}"); // cold damage ~1_val~%
list.Add(1060404, cold); // cold damage ~1_val~%
}
if (pois != 0)
{
list.Add(1060406, $"{pois}"); // poison damage ~1_val~%
list.Add(1060406, pois); // poison damage ~1_val~%
}
if (nrgy != 0)
{
list.Add(1060407, $"{nrgy}"); // energy damage ~1_val
list.Add(1060407, nrgy); // energy damage ~1_val
}
if (chaos != 0)
{
list.Add(1072846, $"{chaos}"); // chaos damage ~1_val~%
list.Add(1072846, chaos); // chaos damage ~1_val~%
}
if (direct != 0)
{
list.Add(1079978, $"{direct}"); // Direct Damage: ~1_PERCENT~%
list.Add(1079978, direct); // Direct Damage: ~1_PERCENT~%
}
list.Add(1075085); // Requirement: Mondain's Legacy
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -388,42 +388,42 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if ((prop = m_LowerAmmoCost) > 0)
{
list.Add(1075208, $"{prop}"); // Lower Ammo Cost ~1_Percentage~%
list.Add(1075208, prop); // Lower Ammo Cost ~1_Percentage~%
}
var weight = ammo != null ? ammo.Weight + ammo.Amount : 0;
@ -435,7 +435,7 @@ namespace Server.Items
if ((prop = m_WeightReduction) != 0)
{
list.Add(1072210, $"{prop}"); // Weight reduction: ~1_PERCENTAGE~%
list.Add(1072210, prop); // Weight reduction: ~1_PERCENTAGE~%
}
}

View file

@ -72,7 +72,7 @@ namespace Server.Items
{
if (Amount > 1)
{
list.Add(1050039, $"{Amount}\t#{1027154}"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t{1027154:#}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{

View file

@ -87,7 +87,7 @@ namespace Server.Items
{
if (Amount > 1)
{
list.Add(1050039, $"{Amount}\t#{1026583}"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t{1026583:#}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{

View file

@ -59,7 +59,7 @@ namespace Server.Items
{
if (Amount > 1)
{
list.Add(1050039, $"{Amount}\t#1024216"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t{1024216:#}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{

View file

@ -59,7 +59,7 @@ namespace Server.Items
{
if (Amount > 1)
{
list.Add(1050039, $"{Amount}\t#1024199"); // ~1_NUMBER~ ~2_ITEMNAME~
list.Add(1050039, $"{Amount}\t{1024199:#}"); // ~1_NUMBER~ ~2_ITEMNAME~
}
else
{

View file

@ -264,7 +264,7 @@ namespace Server.Items
list.Add(1070857, m_Hunter.Name); // Caught by ~1_fisherman~
}
list.Add(1070858, $"{m_AnimalWeight}"); // ~1_weight~ stones
list.Add(1070858, m_AnimalWeight); // ~1_weight~ stones
}
}
@ -439,7 +439,7 @@ namespace Server.Items
list.Add(1070857, m_Hunter.Name); // Caught by ~1_fisherman~
}
list.Add(1070858, $"{m_AnimalWeight}"); // ~1_weight~ stones
list.Add(1070858, m_AnimalWeight); // ~1_weight~ stones
}
}

View file

@ -48,7 +48,7 @@ namespace Server.Items
public override void OnSingleClick(Mobile from)
{
LabelTo(from, 1050039, $"#{LabelNumber}\t#1041645");
LabelTo(from, 1050039, $"{LabelNumber:#}\t{1041645:#}");
}
public override void AddNameProperties(IPropertyList list)

View file

@ -122,7 +122,7 @@ namespace Server.Items
list.Add(1060636); // exceptional
}
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
}
public virtual void DisplayDurabilityTo(Mobile m)

View file

@ -246,9 +246,13 @@ namespace Server.Items
{
list.Add(House != null ? 1062453 : 1060806, $"a recall rune for {desc}"); // ~1_val~ (Trammel)[(House)]
}
else if (House != null)
{
list.Add($"a recall rune for {desc} ({m_TargetMap})(House)");
}
else
{
list.Add(House != null ? $"a recall rune for {desc} ({m_TargetMap})(House)" : $"a recall rune for {desc} ({m_TargetMap})");
list.Add($"a recall rune for {desc} ({m_TargetMap})");
}
}
}

View file

@ -738,72 +738,72 @@ namespace Server.Items
if ((prop = Attributes.WeaponDamage) != 0)
{
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
list.Add(1060401, prop); // damage increase ~1_val~%
}
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -813,17 +813,17 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if (Attributes.SpellChanneling != 0)
@ -833,30 +833,30 @@ namespace Server.Items
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
{
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
list.Add(1075210, prop); // Increased Karma Loss ~1val~%
}
list.Add(1042886, $"{SpellCount}"); // ~1_NUMBERS_OF_SPELLS~ Spells
list.Add(1042886, SpellCount); // ~1_NUMBERS_OF_SPELLS~ Spells
}
public override void OnSingleClick(Mobile from)

View file

@ -50,7 +50,14 @@ namespace Server.Items
if (r != null)
{
list.Add(1049644, $"{r.TextDefinition}"); // [~1_stuff~]
if (r.TextDefinition.Number > 0)
{
list.Add(1049644, r.TextDefinition.Number); // [~1_stuff~]
}
else
{
list.Add(1049644, r.TextDefinition.String); // [~1_stuff~]
}
}
}

View file

@ -376,7 +376,7 @@ namespace Server.Items
list.Add(1060636); // exceptional
}
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
if (m_ReplenishesCharges)
{

View file

@ -91,7 +91,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -77,7 +77,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -93,7 +93,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -78,7 +78,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
if (m_Poison != null && m_PoisonCharges > 0)
{

View file

@ -127,7 +127,7 @@ namespace Server.Items
list.Add(1060636); // exceptional
}
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
}
public virtual void DisplayDurabilityTo(Mobile m)

View file

@ -26,23 +26,24 @@ namespace Server.Items
public override void AddNameProperty(IPropertyList list)
{
var v = " ";
if (!CraftResources.IsStandard(Resource))
if (CraftResources.IsStandard(Resource))
{
var num = CraftResources.GetLocalizationNumber(Resource);
if (num > 0)
{
v = $"#{num}";
}
else
{
v = CraftResources.GetName(Resource);
}
list.Add(1061119, " "); // ~1_LEATHER_TYPE~ runic sewing kit
return;
}
list.Add(1061119, v); // ~1_LEATHER_TYPE~ runic sewing kit
var num = CraftResources.GetLocalizationNumber(Resource);
if (num > 0)
{
// ~1_LEATHER_TYPE~ runic sewing kit
list.Add(1061119, $"#{num}");
}
else
{
// ~1_LEATHER_TYPE~ runic sewing kit
list.Add(1061119, CraftResources.GetName(Resource));
}
}
public override void OnSingleClick(Mobile from)

View file

@ -169,17 +169,17 @@ namespace Server.Items
if (commonSongs > 0)
{
list.Add(1075234, $"{commonSongs}"); // ~1_NUMBER~ Common Tracks
list.Add(1075234, commonSongs); // ~1_NUMBER~ Common Tracks
}
if (uncommonSongs > 0)
{
list.Add(1075235, $"{uncommonSongs}"); // ~1_NUMBER~ Uncommon Tracks
list.Add(1075235, uncommonSongs); // ~1_NUMBER~ Uncommon Tracks
}
if (rareSongs > 0)
{
list.Add(1075236, $"{rareSongs}"); // ~1_NUMBER~ Rare Tracks
list.Add(1075236, rareSongs); // ~1_NUMBER~ Rare Tracks
}
}

View file

@ -125,7 +125,7 @@ namespace Server.Items
{
base.AddNameProperties(list);
list.Add(1075217, $"{m_Charges}"); // ~1_val~ charges remaining
list.Add(1075217, m_Charges); // ~1_val~ charges remaining
}
public override void OnDelete()

View file

@ -29,7 +29,7 @@ namespace Server.Items
public override void AddNameProperty(IPropertyList list)
{
list.Add(1075200, $"#{(int)Form}");
list.Add(1075200, $"{(int)Form:#}");
}
public override void Serialize(IGenericWriter writer)

View file

@ -79,7 +79,7 @@ namespace Server.Items
if (m_Bonus != 0)
{
list.Add(1060451, $"#1042354\t{m_Bonus}"); // ~1_skillname~ +~2_val~
list.Add(1060451, $"{1042354:#}\t{m_Bonus}"); // ~1_skillname~ +~2_val~
}
}

View file

@ -202,7 +202,7 @@ namespace Server.Items
if (m_Bonus != 0)
{
list.Add(1062005, $"{m_Bonus}"); // mining bonus +~1_val~
list.Add(1062005, m_Bonus); // mining bonus +~1_val~
}
}

View file

@ -66,7 +66,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
}
public virtual void DisplayDurabilityTo(Mobile m)

View file

@ -69,7 +69,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1062925, $"{Petals}"); // Petals: ~1_COUNT~
list.Add(1062925, Petals); // Petals: ~1_COUNT~
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)

View file

@ -34,7 +34,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1070998, $"#{1076595}"); // Use this to redeem<br>Your Heritage Items
list.AddLocalized(1070998, 1076595); // Use this to redeem<br>Your Heritage Items
}
public override void Serialize(IGenericWriter writer)

View file

@ -93,9 +93,9 @@ namespace Server.Items
{
list.Add(
1060658, // ~1_val~: ~2_val~
$"location\t{HouseRaffleStone.FormatLocation(m_PlotLocation, m_Facet, false)}"
$"{"location"}\t{HouseRaffleStone.FormatLocation(m_PlotLocation, m_Facet, false)}"
);
list.Add(1060659, $"facet\t{m_Facet}"); // ~1_val~: ~2_val~
list.Add(1060659, $"{"facet"}\t{m_Facet}"); // ~1_val~: ~2_val~
list.Add(1150486); // [Marked Item]
}

View file

@ -411,8 +411,8 @@ namespace Server.Items
{
case HouseRaffleState.Active:
{
list.Add(1060658, $"ticket price\t{FormatPrice()}"); // ~1_val~: ~2_val~
list.Add(1060659, $"ends\t{m_Started + m_Duration}"); // ~1_val~: ~2_val~
list.Add(1060658, $"{"ticket price"}\t{FormatPrice()}"); // ~1_val~: ~2_val~
list.Add(1060659, $"{"ends"}\t{m_Started + m_Duration}"); // ~1_val~: ~2_val~
break;
}
case HouseRaffleState.Completed:

View file

@ -106,7 +106,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~
list.Add(1060741, m_Charges); // charges: ~1_val~
}
public override void OnSingleClick(Mobile from)

View file

@ -91,19 +91,17 @@ namespace Server.Items
public override void AddNameProperty(IPropertyList list)
{
list.Add(
1054000,
$"{m_Charges}\t{m_Inscription.DefaultIfNullOrEmpty(" ")}"
); // a bracelet of binding : ~1_val~ ~2_val~
// a bracelet of binding : ~1_val~ ~2_val~
list.Add(1054000, $"{m_Charges}\t{m_Inscription.DefaultIfNullOrEmpty(" ")}");
}
public override void OnSingleClick(Mobile from)
{
LabelTo(
from,
1054000,
1054000, // a bracelet of binding : ~1_val~ ~2_val~
$"{m_Charges}\t{m_Inscription.DefaultIfNullOrEmpty(" ")}"
); // a bracelet of binding : ~1_val~ ~2_val~
);
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)

View file

@ -129,11 +129,18 @@ namespace Server.Items
{
list.Add(
1070721, // Skill stored: ~1_skillname~ ~2_skillamount~
$"#{AosSkillBonuses.GetLabel(Skill)}\t{SkillValue:F1}"
$"{AosSkillBonuses.GetLabel(Skill):#}\t{SkillValue:F1}"
);
}
list.Add(1041602, LastUserName ?? $"#{1074235}"); // Owner: ~1_val~
if (LastUserName != null)
{
list.Add(1041602, LastUserName); // Owner: ~1_val~
}
else
{
list.AddLocalized(1041602, 1074235); // Owner: ~1_val~
}
}
private static bool CheckCombat(Mobile m, TimeSpan time)
@ -968,7 +975,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
}
public override void Serialize(IGenericWriter writer)

View file

@ -27,7 +27,7 @@ namespace Server.Items
list.Add(1076223); // 7th Year Veteran Reward
}
list.Add(1076207, $"{addon.Charges}"); // Remaining Charges: ~1_val~
list.Add(1076207, addon.Charges); // Remaining Charges: ~1_val~
}
}
@ -471,7 +471,7 @@ namespace Server.Items
list.Add(1076223); // 7th Year Veteran Reward
}
list.Add(1076207, $"{m_Charges}"); // Remaining Charges: ~1_val~
list.Add(1076207, m_Charges); // Remaining Charges: ~1_val~
}
public override void OnDoubleClick(Mobile from)

View file

@ -110,7 +110,7 @@ namespace Server.Items
if (ShowUsesRemaining)
{
list.Add(1060584, $"{m_UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, m_UsesRemaining); // uses remaining: ~1_val~
}
}

View file

@ -557,14 +557,19 @@ namespace Server.Items
}
else if (m_Summoner?.IsEmpty == false)
{
list.Add(
1072400,
m_Summoner?.Name ?? "Unknown"
); // Talisman of ~1_name~ Summoning
var name = m_Summoner?.Name;
if (name?.Number > 0)
{
list.Add(1072400, name.Number); // Talisman of ~1_name~ Summoning
}
else
{
list.Add(1072400, name?.String ?? "Unknown"); // Talisman of ~1_name~ Summoning
}
}
else if (m_Removal != TalismanRemoval.None)
{
list.Add(1072389, $"#{1072000 + (int)m_Removal}"); // Talisman of ~1_name~
list.AddLocalized(1072389, 1072000 + (int)m_Removal); // Talisman of ~1_name~
}
else
{
@ -595,7 +600,7 @@ namespace Server.Items
{
if (m_ChargeTime > 0)
{
list.Add(1074884, $"{m_ChargeTime}"); // Charge time left: ~1_val~
list.Add(1074884, m_ChargeTime); // Charge time left: ~1_val~
}
else
{
@ -625,7 +630,7 @@ namespace Server.Items
{
list.Add(
1072395, // ~1_NAME~ Exceptional Bonus: ~2_val~%
$"#{AosSkillBonuses.GetLabel(m_Skill)}\t{m_ExceptionalBonus}"
$"{AosSkillBonuses.GetLabel(m_Skill):#}\t{m_ExceptionalBonus}"
);
}
@ -633,7 +638,7 @@ namespace Server.Items
{
list.Add(
1072394, // ~1_NAME~ Bonus: ~2_val~%
$"#{AosSkillBonuses.GetLabel(m_Skill)}\t{m_SuccessBonus}"
$"{AosSkillBonuses.GetLabel(m_Skill):#}\t{m_SuccessBonus}"
);
}
@ -643,72 +648,72 @@ namespace Server.Items
if ((prop = Attributes.WeaponDamage) != 0)
{
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
list.Add(1060401, prop); // damage increase ~1_val~%
}
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -718,17 +723,17 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if (Attributes.SpellChanneling != 0)
@ -738,32 +743,32 @@ namespace Server.Items
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
{
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
list.Add(1075210, prop); // Increased Karma Loss ~1val~%
}
if (m_MaxCharges > 0)
{
list.Add(1060741, $"{m_Charges}"); // charges: ~1_val~
list.Add(1060741, m_Charges); // charges: ~1_val~
}
if (m_Slayer != TalismanSlayerName.None)

View file

@ -2778,7 +2778,14 @@ namespace Server.Items
if (oreType != 0)
{
list.Add(1053099, name != null ? $"#{oreType}\t{name}" : $"#{oreType}\t#{LabelNumber}"); // ~1_oretype~ ~2_armortype~
if (name != null)
{
list.Add(1053099, $"{oreType:#}\t{name}"); // ~1_oretype~ ~2_armortype~
}
else
{
list.Add(1053099, $"{oreType:#}\t{LabelNumber:#}"); // ~1_oretype~ ~2_armortype~
}
}
else if (name == null)
{
@ -2848,12 +2855,12 @@ namespace Server.Items
if (ArtifactRarity > 0)
{
list.Add(1061078, $"{ArtifactRarity}"); // artifact rarity ~1_val~
list.Add(1061078, ArtifactRarity); // artifact rarity ~1_val~
}
if (this is IUsesRemaining usesRemaining && usesRemaining.ShowUsesRemaining)
{
list.Add(1060584, $"{usesRemaining.UsesRemaining}"); // uses remaining: ~1_val~
list.Add(1060584, usesRemaining.UsesRemaining); // uses remaining: ~1_val~
}
if (m_Poison != null && m_PoisonCharges > 0)
@ -2897,107 +2904,107 @@ namespace Server.Items
if ((prop = GetDamageBonus() + Attributes.WeaponDamage) != 0)
{
list.Add(1060401, $"{prop}"); // damage increase ~1_val~%
list.Add(1060401, prop); // damage increase ~1_val~%
}
if ((prop = Attributes.DefendChance) != 0)
{
list.Add(1060408, $"{prop}"); // defense chance increase ~1_val~%
list.Add(1060408, prop); // defense chance increase ~1_val~%
}
if ((prop = Attributes.EnhancePotions) != 0)
{
list.Add(1060411, $"{prop}"); // enhance potions ~1_val~%
list.Add(1060411, prop); // enhance potions ~1_val~%
}
if ((prop = Attributes.CastRecovery) != 0)
{
list.Add(1060412, $"{prop}"); // faster cast recovery ~1_val~
list.Add(1060412, prop); // faster cast recovery ~1_val~
}
if ((prop = Attributes.CastSpeed) != 0)
{
list.Add(1060413, $"{prop}"); // faster casting ~1_val~
list.Add(1060413, prop); // faster casting ~1_val~
}
if ((prop = GetHitChanceBonus() + Attributes.AttackChance) != 0)
{
list.Add(1060415, $"{prop}"); // hit chance increase ~1_val~%
list.Add(1060415, prop); // hit chance increase ~1_val~%
}
if ((prop = WeaponAttributes.HitColdArea) != 0)
{
list.Add(1060416, $"{prop}"); // hit cold area ~1_val~%
list.Add(1060416, prop); // hit cold area ~1_val~%
}
if ((prop = WeaponAttributes.HitDispel) != 0)
{
list.Add(1060417, $"{prop}"); // hit dispel ~1_val~%
list.Add(1060417, prop); // hit dispel ~1_val~%
}
if ((prop = WeaponAttributes.HitEnergyArea) != 0)
{
list.Add(1060418, $"{prop}"); // hit energy area ~1_val~%
list.Add(1060418, prop); // hit energy area ~1_val~%
}
if ((prop = WeaponAttributes.HitFireArea) != 0)
{
list.Add(1060419, $"{prop}"); // hit fire area ~1_val~%
list.Add(1060419, prop); // hit fire area ~1_val~%
}
if ((prop = WeaponAttributes.HitFireball) != 0)
{
list.Add(1060420, $"{prop}"); // hit fireball ~1_val~%
list.Add(1060420, prop); // hit fireball ~1_val~%
}
if ((prop = WeaponAttributes.HitHarm) != 0)
{
list.Add(1060421, $"{prop}"); // hit harm ~1_val~%
list.Add(1060421, prop); // hit harm ~1_val~%
}
if ((prop = WeaponAttributes.HitLeechHits) != 0)
{
list.Add(1060422, $"{prop}"); // hit life leech ~1_val~%
list.Add(1060422, prop); // hit life leech ~1_val~%
}
if ((prop = WeaponAttributes.HitLightning) != 0)
{
list.Add(1060423, $"{prop}"); // hit lightning ~1_val~%
list.Add(1060423, prop); // hit lightning ~1_val~%
}
if ((prop = WeaponAttributes.HitLowerAttack) != 0)
{
list.Add(1060424, $"{prop}"); // hit lower attack ~1_val~%
list.Add(1060424, prop); // hit lower attack ~1_val~%
}
if ((prop = WeaponAttributes.HitLowerDefend) != 0)
{
list.Add(1060425, $"{prop}"); // hit lower defense ~1_val~%
list.Add(1060425, prop); // hit lower defense ~1_val~%
}
if ((prop = WeaponAttributes.HitMagicArrow) != 0)
{
list.Add(1060426, $"{prop}"); // hit magic arrow ~1_val~%
list.Add(1060426, prop); // hit magic arrow ~1_val~%
}
if ((prop = WeaponAttributes.HitLeechMana) != 0)
{
list.Add(1060427, $"{prop}"); // hit mana leech ~1_val~%
list.Add(1060427, prop); // hit mana leech ~1_val~%
}
if ((prop = WeaponAttributes.HitPhysicalArea) != 0)
{
list.Add(1060428, $"{prop}"); // hit physical area ~1_val~%
list.Add(1060428, prop); // hit physical area ~1_val~%
}
if ((prop = WeaponAttributes.HitPoisonArea) != 0)
{
list.Add(1060429, $"{prop}"); // hit poison area ~1_val~%
list.Add(1060429, prop); // hit poison area ~1_val~%
}
if ((prop = WeaponAttributes.HitLeechStam) != 0)
{
list.Add(1060430, $"{prop}"); // hit stamina leech ~1_val~%
list.Add(1060430, prop); // hit stamina leech ~1_val~%
}
if (ImmolatingWeaponSpell.IsImmolating(this))
@ -3007,42 +3014,42 @@ namespace Server.Items
if (Core.ML && (ranged?.Velocity ?? 0) != 0)
{
list.Add(1072793, $"{prop}"); // Velocity ~1_val~%
list.Add(1072793, prop); // Velocity ~1_val~%
}
if ((prop = Attributes.BonusDex) != 0)
{
list.Add(1060409, $"{prop}"); // dexterity bonus ~1_val~
list.Add(1060409, prop); // dexterity bonus ~1_val~
}
if ((prop = Attributes.BonusHits) != 0)
{
list.Add(1060431, $"{prop}"); // hit point increase ~1_val~
list.Add(1060431, prop); // hit point increase ~1_val~
}
if ((prop = Attributes.BonusInt) != 0)
{
list.Add(1060432, $"{prop}"); // intelligence bonus ~1_val~
list.Add(1060432, prop); // intelligence bonus ~1_val~
}
if ((prop = Attributes.LowerManaCost) != 0)
{
list.Add(1060433, $"{prop}"); // lower mana cost ~1_val~%
list.Add(1060433, prop); // lower mana cost ~1_val~%
}
if ((prop = Attributes.LowerRegCost) != 0)
{
list.Add(1060434, $"{prop}"); // lower reagent cost ~1_val~%
list.Add(1060434, prop); // lower reagent cost ~1_val~%
}
if ((prop = GetLowerStatReq()) != 0)
{
list.Add(1060435, $"{prop}"); // lower requirements ~1_val~%
list.Add(1060435, prop); // lower requirements ~1_val~%
}
if ((prop = GetLuckBonus() + Attributes.Luck) != 0)
{
list.Add(1060436, $"{prop}"); // luck ~1_val~
list.Add(1060436, prop); // luck ~1_val~
}
if ((prop = WeaponAttributes.MageWeapon) != 0)
@ -3052,12 +3059,12 @@ namespace Server.Items
if ((prop = Attributes.BonusMana) != 0)
{
list.Add(1060439, $"{prop}"); // mana increase ~1_val~
list.Add(1060439, prop); // mana increase ~1_val~
}
if ((prop = Attributes.RegenMana) != 0)
{
list.Add(1060440, $"{prop}"); // mana regeneration ~1_val~
list.Add(1060440, prop); // mana regeneration ~1_val~
}
if (Attributes.NightSight != 0)
@ -3067,22 +3074,22 @@ namespace Server.Items
if ((prop = Attributes.ReflectPhysical) != 0)
{
list.Add(1060442, $"{prop}"); // reflect physical damage ~1_val~%
list.Add(1060442, prop); // reflect physical damage ~1_val~%
}
if ((prop = Attributes.RegenStam) != 0)
{
list.Add(1060443, $"{prop}"); // stamina regeneration ~1_val~
list.Add(1060443, prop); // stamina regeneration ~1_val~
}
if ((prop = Attributes.RegenHits) != 0)
{
list.Add(1060444, $"{prop}"); // hit point regeneration ~1_val~
list.Add(1060444, prop); // hit point regeneration ~1_val~
}
if ((prop = WeaponAttributes.SelfRepair) != 0)
{
list.Add(1060450, $"{prop}"); // self repair ~1_val~
list.Add(1060450, prop); // self repair ~1_val~
}
if (Attributes.SpellChanneling != 0)
@ -3092,27 +3099,27 @@ namespace Server.Items
if ((prop = Attributes.SpellDamage) != 0)
{
list.Add(1060483, $"{prop}"); // spell damage increase ~1_val~%
list.Add(1060483, prop); // spell damage increase ~1_val~%
}
if ((prop = Attributes.BonusStam) != 0)
{
list.Add(1060484, $"{prop}"); // stamina increase ~1_val~
list.Add(1060484, prop); // stamina increase ~1_val~
}
if ((prop = Attributes.BonusStr) != 0)
{
list.Add(1060485, $"{prop}"); // strength bonus ~1_val~
list.Add(1060485, prop); // strength bonus ~1_val~
}
if ((prop = Attributes.WeaponSpeed) != 0)
{
list.Add(1060486, $"{prop}"); // swing speed increase ~1_val~%
list.Add(1060486, prop); // swing speed increase ~1_val~%
}
if (Core.ML && (prop = Attributes.IncreasedKarmaLoss) != 0)
{
list.Add(1075210, $"{prop}"); // Increased Karma Loss ~1val~%
list.Add(1075210, prop); // Increased Karma Loss ~1val~%
}
GetDamageTypes(
@ -3128,37 +3135,37 @@ namespace Server.Items
if (phys != 0)
{
list.Add(1060403, $"{phys}"); // physical damage ~1_val~%
list.Add(1060403, phys); // physical damage ~1_val~%
}
if (fire != 0)
{
list.Add(1060405, $"{fire}"); // fire damage ~1_val~%
list.Add(1060405, fire); // fire damage ~1_val~%
}
if (cold != 0)
{
list.Add(1060404, $"{cold}"); // cold damage ~1_val~%
list.Add(1060404, cold); // cold damage ~1_val~%
}
if (pois != 0)
{
list.Add(1060406, $"{pois}"); // poison damage ~1_val~%
list.Add(1060406, pois); // poison damage ~1_val~%
}
if (nrgy != 0)
{
list.Add(1060407, $"{nrgy}"); // energy damage ~1_val
list.Add(1060407, nrgy); // energy damage ~1_val
}
if (Core.ML && chaos != 0)
{
list.Add(1072846, $"{chaos}"); // chaos damage ~1_val~%
list.Add(1072846, chaos); // chaos damage ~1_val~%
}
if (Core.ML && direct != 0)
{
list.Add(1079978, $"{direct}"); // Direct Damage: ~1_PERCENT~%
list.Add(1079978, direct); // Direct Damage: ~1_PERCENT~%
}
list.Add(1061168, $"{MinDamage}\t{MaxDamage}"); // weapon damage ~1_val~ - ~2_val~
@ -3174,14 +3181,14 @@ namespace Server.Items
if (MaxRange > 1)
{
list.Add(1061169, $"{MaxRange}"); // range ~1_val~
list.Add(1061169, MaxRange); // range ~1_val~
}
var strReq = AOS.Scale(StrRequirement, 100 - GetLowerStatReq());
if (strReq > 0)
{
list.Add(1061170, $"{strReq}"); // strength requirement ~1_val~
list.Add(1061170, strReq); // strength requirement ~1_val~
}
if (Layer == Layer.TwoHanded)

View file

@ -1041,7 +1041,7 @@ namespace Server
{
if (GetValues(i, out var skill, out var bonus))
{
list.Add(1060451 + i, $"#{GetLabel(skill)}\t{bonus}");
list.Add(1060451 + i, $"{GetLabel(skill):#}\t{bonus}");
}
}
}

View file

@ -3525,14 +3525,15 @@ namespace Server.Mobiles
if (faction.Commander == this)
{
list.Add(1042733, faction.Definition.PropName); // Commanding Lord of the ~1_FACTION_NAME~
// Commanding Lord of the ~1_FACTION_NAME~
list.Add(1042733, $"{faction.Definition.PropName}");
}
else if (pl.Sheriff != null)
{
list.Add(
1042734,
1042734, // The Sheriff of ~1_CITY~, ~2_FACTION_NAME~
$"{pl.Sheriff.Definition.FriendlyName}\t{faction.Definition.PropName}"
); // The Sheriff of ~1_CITY~, ~2_FACTION_NAME~
);
}
else if (pl.Finance != null)
{

View file

@ -3721,12 +3721,17 @@ namespace Server.Multis
ref ySouth
);
var location =
valid ? $"{yLat}° {yMins}'{(ySouth ? "S" : "N")}, {xLong}° {xMins}'{(xEast ? "E" : "W")}" : "unknown";
list.Add(1061112, Utility.FixHtml(houseName)); // House Name: ~1_val~
list.Add(1061113, owner); // Owner: ~1_val~
list.Add(1061114, location); // Location: ~1_val~
if (valid)
{
// Location: ~1_val~
list.Add(1061114, $"{yLat}° {yMins}'{(ySouth ? "S" : "N")}, {xLong}° {xMins}'{(xEast ? "E" : "W")}");
}
else
{
list.Add(1061114, "unknown"); // Location: ~1_val~
}
}
public override void Serialize(IGenericWriter writer)

View file

@ -83,7 +83,7 @@ namespace Server.Multis
level = DecayLevel.IDOC;
}
list.Add(1062028, $"#{1043009 + (int)level}"); // Condition: This structure is ...
list.AddLocalized(1062028, 1043009 + (int)level); // Condition: This structure is ...
}
}
}

View file

@ -38,7 +38,7 @@ namespace Server.Items
{
base.GetProperties(list);
list.Add(1060485, $"{StrengthBonus}"); // strength bonus ~1_val~
list.Add(1060485, StrengthBonus); // strength bonus ~1_val~
}
public override void Serialize(IGenericWriter writer)

View file

@ -53,9 +53,9 @@ namespace Server.Items
public virtual void SendTimeRemainingMessage(Mobile to)
{
to.SendLocalizedMessage(
1072516,
1072516, // ~1_name~ will expire in ~2_val~ seconds!
$"{Name ?? $"#{LabelNumber}"}\t{(int)LifeSpan.TotalSeconds}"
); // ~1_name~ will expire in ~2_val~ seconds!
);
}
public override void OnDelete()