Beispiel #1
0
        private void GiveItems(On.RoR2.Run.orig_SetupUserCharacterMaster orig, Run run, NetworkUser user)
        {
            orig(run, user);

            if (!DropInConfig.StartWithItems ||
                run.fixedTime < 5f) // Don't try to give items to players who spawn with the server
            {
                return;
            }

            if (DropInConfig.GiveExactItems)
            {
                ItemsHelper.CopyItemsFromRandom(user);
            }
            else
            {
                ItemsHelper.GiveAveragedItems(user, DropInConfig.GiveRedItems, DropInConfig.GiveLunarItems, DropInConfig.GiveBossItems);
            }
        }
Beispiel #2
0
        private void GiveItems(On.RoR2.Run.orig_SetupUserCharacterMaster orig, Run run, NetworkUser user)
        {
            orig(run, user);

            if (!_config.StartWithItems ||
                !run.isServer ||    // If we are not the server don't try to give items, let the server handle it
                run.fixedTime < 5f) // Don't try to give items to players who spawn with the server
            {
                return;
            }

            if (_config.GiveExactItems)
            {
                Debug.Log("Giving exact items");
                ItemsHelper.CopyItemsFromRandom(user);
            }
            else
            {
                Debug.Log("Giving averaged items");
                ItemsHelper.GiveAveragedItems(user, _config.GiveRedItems, _config.GiveLunarItems, _config.GiveBossItems);
            }
        }