public void setFireplace(GameLocation location, bool playSound = true, bool broadcast = false) { _ = tileLocation.X; _ = tileLocation.Y; if ((bool)isOn) { if (base.lightSource == null) { initializeLightSource(tileLocation); } if (base.lightSource != null && (bool)isOn && !location.hasLightSource(base.lightSource.Identifier)) { location.sharedLights[base.lightSource.identifier] = base.lightSource.Clone(); } if (playSound) { location.localSound("fireball"); } AmbientLocationSounds.addSound(new Vector2(tileLocation.X, tileLocation.Y), 1); } else { if (playSound) { location.localSound("fireball"); } base.performRemoveAction(tileLocation, location); AmbientLocationSounds.removeSound(new Vector2(tileLocation.X, tileLocation.Y)); } }
// Token: 0x06001284 RID: 4740 RVA: 0x00177CF0 File Offset: 0x00175EF0 public override void performTenMinuteAction(int timeElapsed) { base.performTenMinuteAction(timeElapsed); for (int i = this.myJunimos.Count - 1; i >= 0; i--) { if (!Game1.getFarm().characters.Contains(this.myJunimos[i])) { this.myJunimos.RemoveAt(i); } else { this.myJunimos[i].pokeToHarvest(); } } if (this.myJunimos.Count <JunimoHarvester>() < 3 && Game1.timeOfDay < 1900) { this.junimoSendOutTimer = 1; } if (Game1.timeOfDay >= 2000 && Game1.timeOfDay < 2400 && !Game1.IsWinter && Utility.getLightSource(this.tileX + this.tileY * 777) == null && Game1.random.NextDouble() < 0.2) { Game1.currentLightSources.Add(new LightSource(4, new Vector2((float)(this.tileX + 1), (float)(this.tileY + 1)) * (float)Game1.tileSize + new Vector2((float)(Game1.tileSize / 2), (float)(Game1.tileSize / 2)), 0.5f) { identifier = this.tileX + this.tileY * 777 }); AmbientLocationSounds.addSound(new Vector2((float)(this.tileX + 1), (float)(this.tileY + 1)), 1); this.wasLit = true; return; } if (Game1.timeOfDay == 2400 && !Game1.IsWinter) { Utility.removeLightSource(this.tileX + this.tileY * 777); AmbientLocationSounds.removeSound(new Vector2((float)(this.tileX + 1), (float)(this.tileY + 1))); } }
public override void performRemoveAction(Vector2 tileLocation, GameLocation environment) { AmbientLocationSounds.removeSound(base.tileLocation); if ((bool)bigCraftable) { isOn.Value = false; } base.performRemoveAction(base.tileLocation, environment); }
public override void performRemoveAction(Vector2 tileLocation, GameLocation environment) { AmbientLocationSounds.removeSound(this.tileLocation); if (this.bigCraftable) { this.isOn = false; } base.performRemoveAction(this.tileLocation, environment); }
// Token: 0x06001160 RID: 4448 RVA: 0x00164008 File Offset: 0x00162208 public override void performTenMinuteUpdate(int timeOfDay) { base.performTenMinuteUpdate(timeOfDay); if (!Game1.isStartingToGetDarkOut()) { this.addClintMachineGraphics(); return; } AmbientLocationSounds.removeSound(new Vector2(100f, 79f)); }
//Make the ten minute update method call the FruitPokeToHarvest method instead of the regular one. public override void performTenMinuteAction(int timeElapsed) { //building base does nothing for (int index = this.myJunimos.Count - 1; index >= 0; --index) { if (!Game1.getFarm().characters.Contains((NPC)this.myJunimos[index])) { this.myJunimos.RemoveAt(index); } else { (this.myJunimos[index] as FruitTreeAwareJunimoHarvester).FruitPokeToHarvest(); } } if (this.myJunimos.Count <JunimoHarvester>() < 3 && Game1.timeOfDay < 1900) { this.fjunimoSendOutTimer.SetValue(1); } if (Game1.timeOfDay >= 2000 && Game1.timeOfDay < 2400 && (!Game1.IsWinter && Utility.getLightSource(this.tileX + this.tileY * 777) == null) && Game1.random.NextDouble() < 0.2) { Game1.currentLightSources.Add(new LightSource(4, new Vector2((float)(this.tileX + 1), (float)(this.tileY + 1)) * (float)Game1.tileSize + new Vector2((float)(Game1.tileSize / 2), (float)(Game1.tileSize / 2)), 0.5f) { identifier = this.tileX + this.tileY * 777 }); AmbientLocationSounds.addSound(new Vector2((float)(this.tileX + 1), (float)(this.tileY + 1)), 1); this.fwasLit.SetValue(true); } else { if (Game1.timeOfDay != 2400 || Game1.IsWinter) { return; } Utility.removeLightSource(this.tileX + this.tileY * 777); AmbientLocationSounds.removeSound(new Vector2((float)(this.tileX + 1), (float)(this.tileY + 1))); } }
public void updateLightState() { if (Game1.currentLocation != Game1.getFarm()) { return; } if (wasLit.Value) { if (Utility.getLightSource((int)tileX + (int)tileY * 777) == null) { Game1.currentLightSources.Add(new LightSource(4, new Vector2((int)tileX + 1, (int)tileY + 1) * 64f + new Vector2(32f, 32f), 0.5f, LightSource.LightContext.None, 0L) { Identifier = (int)tileX + (int)tileY * 777 }); } AmbientLocationSounds.addSound(new Vector2((int)tileX + 1, (int)tileY + 1), 1); } else { Utility.removeLightSource((int)tileX + (int)tileY * 777); AmbientLocationSounds.removeSound(new Vector2((int)tileX + 1, (int)tileY + 1)); } }