Example #1
0
        internal static FarmEvent InvokeChooseNightlyFarmEvent(FarmEvent vanilla)
        {
            var args = new EventArgsChooseNightlyFarmEvent();

            args.NightEvent = vanilla;

            Log.trace("Event: SelectHotbarSlot");
            if (ChooseNightlyFarmEvent == null)
            {
                return(args.NightEvent);
            }
            Util.invokeEvent("SpaceEvents.SelectHotbarSlot", SelectHotbarSlot.GetInvocationList(), null, args);
            return(args.NightEvent);
        }
Example #2
0
        internal static bool InvokeSelectHotbarSlot(int slot)
        {
            EventArgsSelectHotbarSlot args = new EventArgsSelectHotbarSlot();

            args.Slot = slot;

            Log.trace("Event: SelectHotbarSlot");
            if (SelectHotbarSlot == null)
            {
                return(!args.Canceled);
            }
            Util.invokeEvent("SpaceEvents.SelectHotbarSlot", SelectHotbarSlot.GetInvocationList(), null, args);
            return(!args.Canceled);
        }