private static void Player_Added(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); if (storedSpeedBerry != null) { SpeedBerry berry; if (scene.Tracker.CountEntities <SpeedBerry>() == 0) { // create a new SpeedBerry in the current room EntityData newData = storedSpeedBerry.EntityData; Vector2 lastPos = newData.Position; newData.Position = self.Position + new Vector2(8, -16); scene.Add(berry = new SpeedBerry(newData, Vector2.Zero, storedSpeedBerry.ID, restored: true)); newData.Position = lastPos; berry.TimerDisplay = storedSpeedBerry.TimerDisplay; berry.TimerDisplay.TrackedBerry = berry; self.Leader.GainFollower(berry.Follower); storedSpeedBerry.RemoveSelf(); } else { storedSpeedBerry.TimerDisplay?.RemoveSelf(); } storedSpeedBerry = null; } }
private void onPlayerAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); // reset the hiccup timer when the player respawns, for more consistency. regularHiccupTimer = Settings.RegularHiccups / 10f; }
private void DontMoveOnWakeup(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); if (this.InRandomizer) { self.JustRespawned = true; } }
private void Player_Added(On.Celeste.Player.orig_Added orig, Player self, Monocle.Scene scene) { ply = self; actionHelper.SetPlayer(self); spawnHelper.SetPlayer(self); orig(self, scene); }
private void PlayerOnAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); if (scene is Level level && teleportDeathInfo != null && teleportDeathInfo.Area == level.Session.Area && teleportDeathInfo.Room == level.Session.Level) { scene.Add(new DeathMarker(teleportDeathInfo.DeathPosition)); } }
private static void onPlayerAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); if (SpringCollab2020Module.Instance.Session.MadelineIsSilhouette) { refreshPlayerSpriteMode(self, true); } }
private void onPlayerSpawn(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); if (Settings.RestoreDashesOnRespawn && ExtendedVariantsModule.Session.DashCountOnLatestRespawn != -1) { self.Dashes = ExtendedVariantsModule.Session.DashCountOnLatestRespawn; } }
private static void PlayerOnAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); if (DJMapHelperModule.Session.BadelineProtectorConfig != null && DJMapHelperModule.Session.BadelineProtectorConfig.MaxQuantity > 0 && scene.Tracker.GetEntity <BadelineProtector>() == null) { scene.Add(new BadelineProtector(DJMapHelperModule.Session.BadelineProtectorConfig)); } }
private static void onPlayerAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); string mapSID = self.SceneAs <Level>().Session.Area.GetSID(); if (!self.Components.Any(component => component.GetType().ToString() == "Celeste.Mod.IsaGrabBag.WaterFix") && (mapSID == "SpringCollab2020/2-Intermediate/ProXas" || mapSID == "SpringCollab2020/2-Intermediate/ZZ-HeartSide")) { // Isa's Grab Bag didn't add the "water fix" and the current map needs it, so add it ourselves. self.Add(new WaterRocketLaunchingComponent(true, false)); } }
private static void Player_Added(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { if (!HasClearPipeInteraction(self)) { MarioClearPipeInteraction interaction = new MarioClearPipeInteraction(new Vector2(0f, 10f)); interaction.OnPipeBlocked = PlayerOnPipeBlocked; interaction.OnPipeEnter = PlayerOnPipeEnter; interaction.OnPipeExit = PlayerOnPipeExit; interaction.CanEnterPipe = PlayerCanEnterPipe; interaction.OnPipeUpdate = PlayerOnPipeUpdate; self.Add(interaction); } orig(self, scene); }
private static void Player_Added(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); List <Player> clones = scene.Tracker.GetEntities <CloneSpawner>().Select(c => (c as CloneSpawner).Clone).ToList <Player>(); List <Entity> players = scene.Tracker.GetEntities <Player>(); // Start own respawn animation if there is one player respawning foreach (Player player in players) { if (!clones.Contains(player)) { Tween respawnTween = (Tween)playerRespawnTween.GetValue(player); if (respawnTween != null && player != self) { self.StateMachine.State = player.StateMachine.State; syncedRespawn.Add(self, player); } } } }
public static void PlayerAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig(self, scene); Instance.maddyCrownSprite = null; }
/// <summary> /// Wraps the Added method in the base game (used to initialize the player state). /// </summary> /// <param name="orig">The original Added method</param> /// <param name="self">The Player instance</param> /// <param name="scene">Argument of the original method (passed as is)</param> private void modAdded(On.Celeste.Player.orig_Added orig, Player self, Scene scene) { orig.Invoke(self, scene); self.Dashes = determineDashCount(self.Dashes); }