Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,69 +1,71 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SubtextSign : Sign
|
||||
{
|
||||
private string m_Subtext;
|
||||
public class SubtextSign : Sign
|
||||
{
|
||||
private string m_Subtext;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Subtext
|
||||
{
|
||||
get => m_Subtext;
|
||||
set { m_Subtext = value; InvalidateProperties(); }
|
||||
}
|
||||
[Constructible]
|
||||
public SubtextSign(SignType type, SignFacing facing, string subtext)
|
||||
: base(type, facing)
|
||||
{
|
||||
m_Subtext = subtext;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SubtextSign( SignType type, SignFacing facing, string subtext )
|
||||
: base( type, facing )
|
||||
{
|
||||
m_Subtext = subtext;
|
||||
}
|
||||
[Constructible]
|
||||
public SubtextSign(int itemID, string subtext)
|
||||
: base(itemID)
|
||||
{
|
||||
m_Subtext = subtext;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SubtextSign( int itemID, string subtext )
|
||||
: base( itemID )
|
||||
{
|
||||
m_Subtext = subtext;
|
||||
}
|
||||
public SubtextSign(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string Subtext
|
||||
{
|
||||
get => m_Subtext;
|
||||
set
|
||||
{
|
||||
m_Subtext = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
if ( !string.IsNullOrEmpty( m_Subtext ) )
|
||||
LabelTo( from, m_Subtext );
|
||||
}
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
base.OnSingleClick(from);
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
if (!string.IsNullOrEmpty(m_Subtext))
|
||||
LabelTo(from, m_Subtext);
|
||||
}
|
||||
|
||||
if ( !string.IsNullOrEmpty( m_Subtext ) )
|
||||
list.Add( m_Subtext );
|
||||
}
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
public SubtextSign( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
if (!string.IsNullOrEmpty(m_Subtext))
|
||||
list.Add(m_Subtext);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write( m_Subtext );
|
||||
}
|
||||
writer.Write(m_Subtext);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Subtext = reader.ReadString();
|
||||
}
|
||||
}
|
||||
m_Subtext = reader.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue