BarkingUpTheRightTree.Patches.Game1Patch.CreateRadialDebrisPrefix C# (CSharp) Метод

CreateRadialDebrisPrefix() статический приватный Метод

The prefix for the Game1.createRadialDebris(GameLocation, int, int, int, int, bool, int, bool, int) method.
This is used for ignoring debris spawning for debris that has an id of 21.
The reason for 21 is because OpCodes.Ldc_I4_S only accepts an and sbyte.MaxValue isn't big enough to be outside of the game object ids range. As such 21 was used as it's an unused id and isn't an 'aliased' id (check the in Debris(int, int, Vector2, Vector2, float) constructor for the 'aliased' types).
static private CreateRadialDebrisPrefix ( int debrisType ) : bool
debrisType int The type of debris that is about to be spawned.
Результат bool
        internal static bool CreateRadialDebrisPrefix(int debrisType) => debrisType != 21;