public void Update(bool eu) { if (this.player == null || this.player.room == null || this.player.room.abstractRoom == null || this.player.room.abstractRoom.name == null || this.player.room.abstractRoom.name.Substring(0, 2).Equals("SS") || this.player.room.abstractRoom.name.Substring(0, 2).Equals("LM") || this.rainWorld == null || this.rainWorld.progression == null || this.rainWorld.progression.currentSaveState == null || !this.rainWorld.progression.currentSaveState.miscWorldSaveData.moonRevived) { if (currentConversation != null) { currentConversation.Destroy(); currentConversation = null; currentPearl = null; talking = false; } return; } if (!this.rainWorld.progression.currentSaveState.miscWorldSaveData.pebblesSeenGreenNeuron && this.player.room.abstractRoom.name.Equals("SB_D02")) { Debug.Log("Moon SI conversation"); this.rainWorld.progression.currentSaveState.miscWorldSaveData.pebblesSeenGreenNeuron = true; currentConversation = new PearlConversation.MoonConversation(Conversation.ID.MoonRecieveSwarmer, this); talking = true; } if (currentConversation != null) { if (currentConversation.id != Conversation.ID.MoonRecieveSwarmer) { player.Stun(40); } currentConversation.Update(); if (this.talking == false) { currentConversation.Destroy(); this.currentConversation = null; } if (this.player.dead || this.player.dangerGraspTime > 1) { currentConversation.Interrupt("...oh no...", 0); currentConversation.Destroy(); this.currentConversation = null; talking = false; } } else { talking = false; } }
public void PlayerSwallowItem(PhysicalObject item) { Debug.LogError("Player Swallow Item"); if (State.HaveIAlreadyDescribedThisItem(item.abstractPhysicalObject.ID)) { Debug.LogError("Pearl Already read"); return; } else { if (item is DataPearl) { if (currentConversation != null) { currentConversation.Interrupt("...", 0); currentConversation.Destroy(); currentConversation = null; currentPearl = null; } this.currentPearl = item as DataPearl; State.increaseLikeOnSave = true; State.InfluenceLike(0.1f); Debug.Log((item as DataPearl).AbstractPearl.dataPearlType); if ((item as DataPearl).AbstractPearl.dataPearlType == DataPearl.AbstractDataPearl.DataPearlType.Misc) { currentConversation = new PearlConversation.MoonConversation(Conversation.ID.Moon_Pearl_Misc, this); talking = true; } else if ((item as DataPearl).AbstractPearl.dataPearlType == DataPearl.AbstractDataPearl.DataPearlType.Misc2) { currentConversation = new PearlConversation.MoonConversation(Conversation.ID.Moon_Pearl_Misc2, this); talking = true; } else if ((item as DataPearl).AbstractPearl.dataPearlType == DataPearl.AbstractDataPearl.DataPearlType.PebblesPearl) { currentConversation = new PearlConversation.MoonConversation(Conversation.ID.Moon_Pebbles_Pearl, this); talking = true; } else { Debug.LogError("Pearl Conversation Started."); Conversation.ID id = Conversation.ID.None; switch ((item as DataPearl).AbstractPearl.dataPearlType) { case DataPearl.AbstractDataPearl.DataPearlType.CC: this.player.room.game.rainWorld.progression.currentSaveState.miscWorldSaveData.moonRevived = true; id = Conversation.ID.Moon_Pearl_CC; break; case DataPearl.AbstractDataPearl.DataPearlType.SI_west: id = Conversation.ID.Moon_Pearl_SI_west; break; case DataPearl.AbstractDataPearl.DataPearlType.SI_top: id = Conversation.ID.Moon_Pearl_SI_top; break; case DataPearl.AbstractDataPearl.DataPearlType.LF_west: id = Conversation.ID.Moon_Pearl_LF_west; break; case DataPearl.AbstractDataPearl.DataPearlType.LF_bottom: id = Conversation.ID.Moon_Pearl_LF_bottom; break; case DataPearl.AbstractDataPearl.DataPearlType.HI: id = Conversation.ID.Moon_Pearl_HI; break; case DataPearl.AbstractDataPearl.DataPearlType.SH: id = Conversation.ID.Moon_Pearl_SH; break; case DataPearl.AbstractDataPearl.DataPearlType.DS: id = Conversation.ID.Moon_Pearl_DS; break; case DataPearl.AbstractDataPearl.DataPearlType.SB_filtration: id = Conversation.ID.Moon_Pearl_SB_filtration; break; case DataPearl.AbstractDataPearl.DataPearlType.SB_ravine: id = Conversation.ID.Moon_Pearl_SB_ravine; break; case DataPearl.AbstractDataPearl.DataPearlType.GW: id = Conversation.ID.Moon_Pearl_GW; break; case DataPearl.AbstractDataPearl.DataPearlType.SL_bridge: id = Conversation.ID.Moon_Pearl_SL_bridge; break; case DataPearl.AbstractDataPearl.DataPearlType.SL_moon: id = Conversation.ID.Moon_Pearl_SL_moon; break; case DataPearl.AbstractDataPearl.DataPearlType.SU: id = Conversation.ID.Moon_Pearl_SU; break; case DataPearl.AbstractDataPearl.DataPearlType.UW: id = Conversation.ID.Moon_Pearl_UW; break; case DataPearl.AbstractDataPearl.DataPearlType.SL_chimney: id = Conversation.ID.Moon_Pearl_SL_chimney; break; case DataPearl.AbstractDataPearl.DataPearlType.Red_stomach: id = Conversation.ID.Moon_Pearl_Red_stomach; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.MoonPearl: id = (Conversation.ID)patch_Conversation.ID.Moon_Pearl_MoonPearl; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.DroughtPearl1: id = (Conversation.ID)patch_Conversation.ID.Moon_Pearl_Drought1; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.DroughtPearl2: id = (Conversation.ID)patch_Conversation.ID.Moon_Pearl_Drought2; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.DroughtPearl3: id = (Conversation.ID)patch_Conversation.ID.Moon_Pearl_Drought3; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.SI_Spire1: id = (Conversation.ID)patch_Conversation.ID.SI_Spire1; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.SI_Spire2: id = (Conversation.ID)patch_Conversation.ID.SI_Spire2; break; case (DataPearl.AbstractDataPearl.DataPearlType)patch_DataPearl.patch_AbstractDataPearl.DataPearlType.SI_Spire3: id = (Conversation.ID)patch_Conversation.ID.SI_Spire3; break; } currentConversation = new PearlConversation.MoonConversation(id, this); talking = true; State.significantPearls[(int)(item as DataPearl).AbstractPearl.dataPearlType] = true; State.totalPearlsBrought++; Debug.LogError("pearls brought up: " + State.totalPearlsBrought); } State.totalItemsBrought++; State.AddItemToAlreadyTalkedAbout(item.abstractPhysicalObject.ID); } } }