C# Класс BarkingUpTheRightTree.Patches.Game1Patch

Contains patches for patching game code in the Game1 class.
Показать файл Открыть проект

Приватные методы

Метод Описание
CreateObjectDebrisPrefix ( int objectIndex ) : bool

The prefix for the Game1.createObjectDebris(int, int, int, int, int, float, GameLocation) and Game1.createObjectDebris(int, int, int, long, StardewValley.GameLocation)) methods.

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).

CreateRadialDebrisPrefix ( int debrisType ) : bool

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).