Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 • committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -79,7 +79,7 @@ namespace Server.Items
{
BaseHouse house = BaseHouse.FindHouseAt(from);
return house != null && house.IsCoOwner(from);
return house?.IsCoOwner(from) == true;
}
public static bool CheckUse(InteriorDecorator tool, Mobile from)
@ -105,15 +105,14 @@ namespace Server.Items
AddBackground(0, 0, 200, 200, 2600);
AddButton(50, 45, decorator.Command == DecorateCommand.Turn ? 2154 : 2152, 2154, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(90, 50, 70, 40, 1018323, false, false); // Turn
AddButton(50, 45, decorator.Command == DecorateCommand.Turn ? 2154 : 2152, 2154, 1);
AddHtmlLocalized(90, 50, 70, 40, 1018323); // Turn
AddButton(50, 95, decorator.Command == DecorateCommand.Up ? 2154 : 2152, 2154, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(90, 100, 70, 40, 1018324, false, false); // Up
AddButton(50, 95, decorator.Command == DecorateCommand.Up ? 2154 : 2152, 2154, 2);
AddHtmlLocalized(90, 100, 70, 40, 1018324); // Up
AddButton(50, 145, decorator.Command == DecorateCommand.Down ? 2154 : 2152, 2154, 3, GumpButtonType.Reply,
0);
AddHtmlLocalized(90, 150, 70, 40, 1018325, false, false); // Down
AddButton(50, 145, decorator.Command == DecorateCommand.Down ? 2154 : 2152, 2154, 3);
AddHtmlLocalized(90, 150, 70, 40, 1018325); // Down
}
public override void OnResponse(NetState sender, RelayInfo info)
@ -334,4 +333,4 @@ namespace Server.Items
}
}
}
}
}