private static void Player_ctor(On.Player.orig_ctor orig, Player self, AbstractCreature abstractCreature, World world) { orig.Invoke(self, abstractCreature, world); if (Downpour.snow && Downpour.blizzard && self.room.game.session is StoryGameSession) { Downpour.exposureControllers.Add(new ExposureController(self)); } }
private void Player_ctor(On.Player.orig_ctor orig, Player self, AbstractCreature abstractCreature, World world) { orig.Invoke(self, abstractCreature, world); if (self.slugcatStats.name != SlugcatStats.Name.Red) { if (!self.playerState.isGhost) { self.spearOnBack = new Player.SpearOnBack(self); } } }
private void PlayerCtorHook(On.Player.orig_ctor orig, Player self, AbstractCreature abstractCreature, World world) { orig.Invoke(self, abstractCreature, world); if (this.Enabled) { if (Type.GetType("JollyCoop.JollyMod, JollyCoop") != null) { if (JollyPlayerCheck(self.playerState.playerNumber) == true) { if (self.playerState.slugcatCharacter != PlayerManager.GetCustomPlayer("Electric").SlugcatIndex) { self.playerState.slugcatCharacter = PlayerManager.GetCustomPlayer("Electric").SlugcatIndex; } } } if (EVars == null) { EVars = new List <ElectricVars>(); Debug.Log("--Initializing new Evars"); } bool initTracker = true; for (int i = 0; i < EVars.Count; i++) { if (EVars[i].ply == self) { initTracker = false; Debug.Log("--Player already has Evars"); break; } } if (initTracker && self.playerState.slugcatCharacter == PlayerManager.GetCustomPlayer("Electric").SlugcatIndex) { EVars.Add(new ElectricVars(self)); Debug.Log("--Evars added for new Player"); } } }
private static void CtorHK(On.Player.orig_ctor orig, Player self, AbstractCreature abstractCreature, World world) { orig(self, abstractCreature, world); AbstractPhysicalObjectHK.GetField(self.abstractPhysicalObject).networkLife = 500; }
private static void Player_ctor(On.Player.orig_ctor orig, Player self, AbstractCreature abstractCreature, World world) { orig.Invoke(self, abstractCreature, world); cycleScore = 0; }
private void Player_ctor(On.Player.orig_ctor orig, Player self, AbstractCreature abstractCreature, World world) { orig(self, abstractCreature, world); needToInitCat = true; // or get NullReferenceException nightPalette.GenNext(); }
private static void PlayerPatch(On.Player.orig_ctor orig, Player player, AbstractCreature abstractCreature, World world) { orig(player, abstractCreature, world); int playerNumber = player.playerState.playerNumber; if (playerNumber >= totalPlayerNum) { Debug.Log("Extra slugcats detected: " + playerNumber); MoreSlugcat(playerNumber); } clubStats[playerNumber] = new ClubState { swingDelay = 0, swingTimer = 0, comboCount = 0, comboCooldown = 0, firstHit = false }; bowStats[playerNumber] = new BowState { drawTime = 0.0f, aimDir = new Vector2(0, 0), lastAimDir = bowStats[playerNumber].aimDir, controlLocked = 0, isDrawing = false, released = false }; globalStats[playerNumber] = new GlobalState { headSlot = null, bodySlot = null, accessorySlot = null, backSlot = null }; switch (player.slugcatStats.name) { case SlugcatStats.Name.White: globalStats[playerNumber].meleeSkill = 1f; globalStats[playerNumber].rangedSkill = 1f; bowStats[playerNumber].arrowLethality = 1f; break; case SlugcatStats.Name.Red: globalStats[playerNumber].meleeSkill = 1.25f; globalStats[playerNumber].rangedSkill = 0.8f; bowStats[playerNumber].arrowLethality = 1.15f; break; case SlugcatStats.Name.Yellow: globalStats[playerNumber].meleeSkill = 0.75f; globalStats[playerNumber].rangedSkill = 1.45f; bowStats[playerNumber].arrowLethality = 0.85f; break; default: globalStats[playerNumber].meleeSkill = 1f; globalStats[playerNumber].rangedSkill = 1f; bowStats[playerNumber].arrowLethality = 1f; break; } bowStats[playerNumber].drawSpeed = globalStats[playerNumber].rangedSkill * 1f; }