Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -42,16 +42,16 @@ namespace Server.Engines.Doom
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string TypeName{ get; set; }
|
||||
public string TypeName { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BaseDoor Door{ get; set; }
|
||||
public BaseDoor Door { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BaseAddon Addon{ get; set; }
|
||||
public BaseAddon Addon { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public GauntletSpawner Sequence{ get; set; }
|
||||
public GauntletSpawner Sequence { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool HasCompleted
|
||||
|
|
@ -74,7 +74,7 @@ namespace Server.Engines.Doom
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Rectangle2D RegionBounds{ get; set; }
|
||||
public Rectangle2D RegionBounds { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public GauntletSpawnerState State
|
||||
|
|
@ -145,11 +145,11 @@ namespace Server.Engines.Doom
|
|||
}
|
||||
}
|
||||
|
||||
public List<Mobile> Creatures{ get; set; }
|
||||
public List<Mobile> Creatures { get; set; }
|
||||
|
||||
public List<BaseTrap> Traps{ get; set; }
|
||||
public List<BaseTrap> Traps { get; set; }
|
||||
|
||||
public Region Region{ get; set; }
|
||||
public Region Region { get; set; }
|
||||
|
||||
public override string DefaultName => "doom spawner";
|
||||
|
||||
|
|
@ -199,13 +199,13 @@ namespace Server.Engines.Doom
|
|||
|
||||
int random = Utility.Random(100);
|
||||
|
||||
if (22 > random)
|
||||
if (random < 22)
|
||||
trap = new SawTrap(Utility.RandomBool() ? SawTrapType.WestFloor : SawTrapType.NorthFloor);
|
||||
else if (44 > random)
|
||||
else if (random < 44)
|
||||
trap = new SpikeTrap(Utility.RandomBool() ? SpikeTrapType.WestFloor : SpikeTrapType.NorthFloor);
|
||||
else if (66 > random)
|
||||
else if (random < 66)
|
||||
trap = new GasTrap(Utility.RandomBool() ? GasTrapType.NorthWall : GasTrapType.WestWall);
|
||||
else if (88 > random)
|
||||
else if (random < 88)
|
||||
trap = new FireColumnTrap();
|
||||
else
|
||||
trap = new MushroomTrap();
|
||||
|
|
@ -382,31 +382,31 @@ namespace Server.Engines.Doom
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
RegionBounds = reader.ReadRect2D();
|
||||
Traps = reader.ReadStrongItemList<BaseTrap>();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
if (version < 1)
|
||||
{
|
||||
Traps = new List<BaseTrap>();
|
||||
RegionBounds = new Rectangle2D(X - 40, Y - 40, 80, 80);
|
||||
RegionBounds = reader.ReadRect2D();
|
||||
Traps = reader.ReadStrongItemList<BaseTrap>();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
if (version < 1)
|
||||
{
|
||||
Traps = new List<BaseTrap>();
|
||||
RegionBounds = new Rectangle2D(X - 40, Y - 40, 80, 80);
|
||||
}
|
||||
|
||||
Creatures = reader.ReadStrongMobileList();
|
||||
Creatures = reader.ReadStrongMobileList();
|
||||
|
||||
TypeName = reader.ReadString();
|
||||
Door = reader.ReadItem<BaseDoor>();
|
||||
Addon = reader.ReadItem<BaseAddon>();
|
||||
Sequence = reader.ReadItem<GauntletSpawner>();
|
||||
TypeName = reader.ReadString();
|
||||
Door = reader.ReadItem<BaseDoor>();
|
||||
Addon = reader.ReadItem<BaseAddon>();
|
||||
Sequence = reader.ReadItem<GauntletSpawner>();
|
||||
|
||||
State = (GauntletSpawnerState)reader.ReadInt();
|
||||
State = (GauntletSpawnerState)reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -557,13 +557,13 @@ namespace Server.Engines.Doom
|
|||
CreateVarietyDealer(492, 369);
|
||||
|
||||
for (int x = 434; x <= 478; ++x)
|
||||
for (int y = 371; y <= 372; ++y)
|
||||
{
|
||||
Static item = new Static(0x524);
|
||||
for (int y = 371; y <= 372; ++y)
|
||||
{
|
||||
Static item = new Static(0x524);
|
||||
|
||||
item.Hue = 1;
|
||||
item.MoveToWorld(new Point3D(x, y, -1), Map.Malas);
|
||||
}
|
||||
item.Hue = 1;
|
||||
item.MoveToWorld(new Point3D(x, y, -1), Map.Malas);
|
||||
}
|
||||
/* End supply room */
|
||||
|
||||
/* Begin gauntlet cycle */
|
||||
|
|
@ -614,7 +614,6 @@ namespace Server.Engines.Doom
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public class GauntletRegion : BaseRegion
|
||||
{
|
||||
private GauntletSpawner m_Spawner;
|
||||
|
|
|
|||
|
|
@ -5,11 +5,6 @@ using Server.Mobiles;
|
|||
using Server.Network;
|
||||
using Server.Spells;
|
||||
|
||||
/*
|
||||
this is From me to you, Under no terms, Conditions... K? to apply you
|
||||
just simply Unpatch/delete, Stick these in, Same location.. Restart
|
||||
*/
|
||||
|
||||
namespace Server.Engines.Doom
|
||||
{
|
||||
public class LeverPuzzleController : Item
|
||||
|
|
@ -96,12 +91,12 @@ namespace Server.Engines.Doom
|
|||
|
||||
/* SOUNDS */
|
||||
|
||||
private static int[] fs = { 0x144, 0x154 };
|
||||
private static int[] ms = { 0x144, 0x14B };
|
||||
private static int[] fs2 = { 0x13F, 0x154 };
|
||||
private static int[] ms2 = { 0x13F, 0x14B };
|
||||
private static int[] cs1 = { 0x244 };
|
||||
private static int[] exp = { 0x307 };
|
||||
private static readonly int[] fs = { 0x144, 0x154 };
|
||||
private static readonly int[] ms = { 0x144, 0x14B };
|
||||
private static readonly int[] fs2 = { 0x13F, 0x154 };
|
||||
private static readonly int[] ms2 = { 0x13F, 0x14B };
|
||||
private static readonly int[] cs1 = { 0x244 };
|
||||
private static readonly int[] exp = { 0x307 };
|
||||
private Timer l_Timer;
|
||||
private LampRoomBox m_Box;
|
||||
private Region m_LampRoom;
|
||||
|
|
@ -151,15 +146,15 @@ namespace Server.Engines.Doom
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ushort MyKey{ get; set; }
|
||||
public ushort MyKey { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ushort TheirKey{ get; set; }
|
||||
public ushort TheirKey { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Enabled{ get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public Mobile Successful{ get; private set; }
|
||||
public Mobile Successful { get; private set; }
|
||||
|
||||
public bool CircleComplete
|
||||
{
|
||||
|
|
@ -196,12 +191,12 @@ namespace Server.Engines.Doom
|
|||
e.Mobile.SendMessage("Lamp room puzzle successfully generated.");
|
||||
}
|
||||
|
||||
public static Item AddLeverPuzzlePart(int[] Loc, Item newitem)
|
||||
public static Item AddLeverPuzzlePart(int[] loc, Item newitem)
|
||||
{
|
||||
if (newitem?.Deleted != false)
|
||||
installed = false;
|
||||
else
|
||||
newitem.MoveToWorld(new Point3D(Loc[0], Loc[1], Loc[2]), Map.Malas);
|
||||
newitem.MoveToWorld(new Point3D(loc[0], loc[1], loc[2]), Map.Malas);
|
||||
|
||||
return newitem;
|
||||
}
|
||||
|
|
@ -369,8 +364,8 @@ namespace Server.Engines.Doom
|
|||
|
||||
private static bool IsValidDamagable(Mobile m) =>
|
||||
m?.Deleted == false &&
|
||||
(m.Player && m.Alive ||
|
||||
m is BaseCreature bc && (bc.Controlled || bc.Summoned) && !bc.IsDeadBondedPet);
|
||||
((m.Player && m.Alive) ||
|
||||
(m is BaseCreature bc && (bc.Controlled || bc.Summoned) && !bc.IsDeadBondedPet));
|
||||
|
||||
public static void MoveMobileOut(Mobile m)
|
||||
{
|
||||
|
|
@ -387,7 +382,7 @@ namespace Server.Engines.Doom
|
|||
|
||||
public static bool AniSafe(Mobile m) => m?.BodyMod == 0 && m.Alive && !TransformationSpellHelper.UnderTransformation(m);
|
||||
|
||||
public static IEntity ZAdjustedIEFromMobile(Mobile m, int ZDelta) => new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + ZDelta), m.Map);
|
||||
public static IEntity ZAdjustedIEFromMobile(Mobile m, int zDelta) => new Entity(Serial.Zero, new Point3D(m.X, m.Y, m.Z + zDelta), m.Map);
|
||||
|
||||
public static void DoDamage(Mobile m, int min, int max, bool poison)
|
||||
{
|
||||
|
|
@ -475,14 +470,14 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
private int Count;
|
||||
private LeverPuzzleController m_Controller;
|
||||
private Mobile m_Player;
|
||||
private readonly Mobile m_Player;
|
||||
|
||||
public RockTimer(Mobile player, LeverPuzzleController Controller)
|
||||
public RockTimer(Mobile player, LeverPuzzleController controller)
|
||||
: base(TimeSpan.Zero, TimeSpan.FromSeconds(.25))
|
||||
{
|
||||
Count = 0;
|
||||
m_Player = player;
|
||||
m_Controller = Controller;
|
||||
m_Controller = controller;
|
||||
}
|
||||
|
||||
private int Rock() => 0x1363 + Utility.Random(0, 11);
|
||||
|
|
@ -547,7 +542,7 @@ namespace Server.Engines.Doom
|
|||
|
||||
public class LampRoomKickTimer : Timer
|
||||
{
|
||||
private Mobile m;
|
||||
private readonly Mobile m;
|
||||
|
||||
public LampRoomKickTimer(Mobile player)
|
||||
: base(TimeSpan.FromSeconds(.25)) =>
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ namespace Server.Engines.Doom
|
|||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ushort Code{ get; private set; }
|
||||
public ushort Code { get; private set; }
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
public class LampRoomRegion : BaseRegion
|
||||
{
|
||||
private LeverPuzzleController m_Controller;
|
||||
private readonly LeverPuzzleController m_Controller;
|
||||
|
||||
public LampRoomRegion(LeverPuzzleController controller)
|
||||
: base(null, Map.Malas, Find(LeverPuzzleController.lr_Enter, Map.Malas), LeverPuzzleController.lr_Rect)
|
||||
|
|
@ -43,7 +43,7 @@ namespace Server.Engines.Doom
|
|||
{
|
||||
if (m == m_Controller.Successful) return;
|
||||
}
|
||||
else if (m is BaseCreature bc && (bc.Controlled && bc.ControlMaster == m_Controller.Successful ||
|
||||
else if (m is BaseCreature bc && ((bc.Controlled && bc.ControlMaster == m_Controller.Successful) ||
|
||||
bc.Summoned))
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue