diff --git a/game/03-JavaScript/weather/01-setup/weather-descriptions.js b/game/03-JavaScript/weather/01-setup/weather-descriptions.js index be98a149c33be184f43eaa346547e6c02313e3a3..7333d38ea5659d0293da8aa6a650fa5323785097 100644 --- a/game/03-JavaScript/weather/01-setup/weather-descriptions.js +++ b/game/03-JavaScript/weather/01-setup/weather-descriptions.js @@ -137,6 +137,8 @@ setup.WeatherDescriptions = { } }, bodyTemperatureChanges: () => { + if (Math.abs(Weather.BodyTemperature.target - Weather.bodyTemperature) <= 0.5) + return ""; if (Weather.bodyTemperature < 35) { if (Weather.BodyTemperature.target - Weather.bodyTemperature > 1) { return "You let the warmth take the chill from your bones."; diff --git a/game/03-JavaScript/weather/01-setup/weather-generation.js b/game/03-JavaScript/weather/01-setup/weather-generation.js index 7d74181dc2f675a091b389942ccb66e83fed11c1..66b5d37412f4bf891e8f70bf04c0935d98301123 100644 --- a/game/03-JavaScript/weather/01-setup/weather-generation.js +++ b/game/03-JavaScript/weather/01-setup/weather-generation.js @@ -155,10 +155,6 @@ setup.WeatherGeneration = { small: () => random(0, 2), large: () => 0, }, - // This is a factor that adjusts temperature based on weather conditions. It generally increases - // in clear weather to simulate greater heat from the sun or faster heat loss during clear nights and winters. - // Conversely, it decreases under cloudy conditions to reflect the effect of cloud cover on temperature. - temperatureModifier: 2, // Modifies the tanning factor, based on cloud coverage. A modifier of 1 has no penalties. tanningModifier: 1, // Determines how overcast the sky should be. (Between 0 and 1) @@ -182,7 +178,6 @@ setup.WeatherGeneration = { small: () => random(1, 3), large: () => random(0, 1), }, - temperatureModifier: 1.5, tanningModifier: 0.5, overcast: () => randomFloat(0, 0.3), precipitationIntensity: 0, @@ -202,7 +197,6 @@ setup.WeatherGeneration = { small: () => 0, large: () => random(0, 4), }, - temperatureModifier: 1.2, tanningModifier: 0.2, overcast: () => randomFloat(0.5, 0.8), precipitationIntensity: 0, @@ -222,7 +216,6 @@ setup.WeatherGeneration = { small: () => 0, large: () => random(1, 5), }, - temperatureModifier: 1, tanningModifier: 0.2, overcast: () => randomFloat(0.8, 1), precipitationIntensity: 1, @@ -242,7 +235,6 @@ setup.WeatherGeneration = { small: () => 0, large: () => random(2, 5), }, - temperatureModifier: 1, tanningModifier: 0.1, overcast: () => 1, precipitationIntensity: 1.5, @@ -262,7 +254,6 @@ setup.WeatherGeneration = { small: () => 0, large: () => random(3, 5), }, - temperatureModifier: 1, tanningModifier: 0, overcast: () => 1, precipitationIntensity: 2, diff --git a/game/03-JavaScript/weather/01-setup/weather-temperature.js b/game/03-JavaScript/weather/01-setup/weather-temperature.js index 2e666bf5b7759715bec623681ff6eeff1eb725db..2a0ba3c63bac5291240a9f621c4adf2c6552c5cf 100644 --- a/game/03-JavaScript/weather/01-setup/weather-temperature.js +++ b/game/03-JavaScript/weather/01-setup/weather-temperature.js @@ -5,7 +5,13 @@ setup.WeatherTemperature = { fill: "img/misc/icon/weather/thermo_filled.png", upArrow: "img/misc/icon/weather/arrow_up.png", downArrow: "img/misc/icon/weather/arrow_down.png", + constant: "img/misc/icon/weather/constant.png", }, + dayMultiplier: 1.5, // Multiplier on day calculations + seasonMultiplier: 2, // Multiplier on season calculations + precipitationEffect: 1.5, // Effect on temperature, in degrees - per precipitationIntensity + maxDiurnalVariation: 6.5, // Max temperature difference between day and night (if 0 overcast) + minDiurnalVariation: 2.25, // Min temperature difference between day and night (if 1 overcast) snow: { minAccumulation: 15, // Min 15 mm for it to be considered snow on the ground maxAccumulation: 500, // max 500 mm of accumulated snow on the ground diff --git a/game/03-JavaScript/weather/02-main/01-weather.js b/game/03-JavaScript/weather/02-main/01-weather.js index d0b5d891935b3700a4c5854acfd17f533d8e6b2b..92cc6bbf6dabee5f01304ebd5780a51be7bd466e 100644 --- a/game/03-JavaScript/weather/02-main/01-weather.js +++ b/game/03-JavaScript/weather/02-main/01-weather.js @@ -175,7 +175,10 @@ const Weather = (() => { return Weather.Temperature.getWaterTemperature(); }, get bodyTemperature() { - return Weather.BodyTemperature.current; + return Weather.BodyTemperature.get(); + }, + set bodyTemperature(value) { + Weather.BodyTemperature.set(value); }, get wetness() { return Weather.BodyTemperature.wetness; diff --git a/game/03-JavaScript/weather/02-main/02-body-temperature.js b/game/03-JavaScript/weather/02-main/02-body-temperature.js index 2849d8613719845e150ec8342a5dc87cfc8f0abf..abbe9fae39b7268a417f0bf310c57b5092bd99f7 100644 --- a/game/03-JavaScript/weather/02-main/02-body-temperature.js +++ b/game/03-JavaScript/weather/02-main/02-body-temperature.js @@ -88,12 +88,12 @@ Weather.BodyTemperature = (() => { } const scaledMinutes = Math.min(minutes, 60 + Math.sqrt(Math.max(minutes - 60, 0))); - V.player.bodyTemperature = calculateTemperatureChange(V.player.bodyTemperature, temperature, scaledMinutes, getTotalWarmth()); + this.set(calculateTemperatureChange(Weather.BodyTemperature.get(), temperature, scaledMinutes, getTotalWarmth())); resetActivity(); - if (V.player.bodyTemperature < Weather.tempSettings.minTemperature) { + if (Weather.BodyTemperature.get() < Weather.tempSettings.minTemperature) { V.passout = "cold"; - } else if (V.player.bodyTemperature > Weather.tempSettings.maxTemperature) { + } else if (Weather.BodyTemperature.get() > Weather.tempSettings.maxTemperature) { V.passout = "heat"; } else { delete V.passout; @@ -101,14 +101,15 @@ Weather.BodyTemperature = (() => { } function getRestingPoint(iterations = 6, warmth = undefined, bodyTemperature, outside) { - let temperature = outside || V.outside ? Weather.temperature : Weather.insideTemperature; + let ambientTemperature = outside || V.outside ? Weather.temperature : Weather.insideTemperature; + if (T.inWater) { - temperature = Weather.waterTemperature; + ambientTemperature = Weather.waterTemperature; } - let temp = bodyTemperature ?? V.player.bodyTemperature; + let temp = bodyTemperature ?? Weather.BodyTemperature.get(); for (let i = 0; i < iterations; i++) { - temp = calculateTemperatureChange(temp, temperature, 15, warmth); + temp = calculateTemperatureChange(temp, ambientTemperature, 15, warmth); } return temp; @@ -132,8 +133,8 @@ Weather.BodyTemperature = (() => { function calculateWetness() { if (T.inWater) return 1; // 100% wet if in water if (V.outside && Weather.precipitation === "rain" && T.bottomless && T.topless) return 0.7; - const upper = (Math.max(V.overupperwet, V.upperwet, V.underupperwet) / settings.maxWetness) * (settings.maxClothingFactor / 2); - const lower = (Math.max(V.overlowerwet, V.lowerwet, V.underlowerwet) / settings.maxWetness) * (settings.maxClothingFactor / 2); + const upper = (Math.max(V.overupperwet ?? 0, V.upperwet ?? 0, V.underupperwet ?? 0) / settings.maxWetness) * (settings.maxClothingFactor / 2); + const lower = (Math.max(V.overlowerwet ?? 0, V.lowerwet ?? 0, V.underlowerwet ?? 0) / settings.maxWetness) * (settings.maxClothingFactor / 2); return Math.min(upper + lower, settings.maxClothingFactor); } @@ -145,19 +146,18 @@ Weather.BodyTemperature = (() => { * * @param {number} outsideTemperature The current air temperature. * @param temperature - * @param warmth2 + * @param warmth * @returns {number} The adjusted insulation factor. */ - function calculateHeatDissipation(temperature, warmth2) { - const temperatureDifference = Math.max(0, V.player.bodyTemperature - temperature); + function calculateHeatDissipation(temperature, warmth) { + const temperatureDifference = Math.max(0, Weather.BodyTemperature.get() - temperature); // Base dissipation const dissipation = temperatureDifference * settings.dissipationRate; const totalDissipation = settings.baseDissipation + dissipation; // Insulation reduces dissipation - const warmth = warmth2 ?? getTotalWarmth(); - const insulationModifier = Math.exp((-warmth * settings.insulationMultiplier) / settings.insulationCap); + const insulationModifier = Math.exp((-(warmth ?? getTotalWarmth()) * settings.insulationMultiplier) / settings.insulationCap); // Wetness increases dissipation - but not if inside warm water const wetnessMultiplier = T.inWater && Weather.waterTemperature >= settings.baseBodyTemperature ? 1 : 1 + calculateWetness() * settings.wetnessFactor; @@ -175,22 +175,22 @@ Weather.BodyTemperature = (() => { */ function calculateHeatGeneration(bodyTemperature, outsideTemperature) { outsideTemperature += settings.sunIntensityBaseModifier * Weather.sunIntensity; - const outsideTemperatureDifference = Math.max(0, outsideTemperature - V.player.bodyTemperature); + const outsideTemperatureDifference = Math.max(0, outsideTemperature - Weather.BodyTemperature.get()); + const baseGeneration = settings.baseHeatGeneration + outsideTemperatureDifference * (getTotalWarmth() * settings.warmthHeatModifier); // Sun intensity increases heat const activityHeatGeneration = settings.activityRate * activityLevel(); const bodyTemperatureDifference = bodyTemperature - settings.baseBodyTemperature; - return baseGeneration + activityHeatGeneration - 0.01 * bodyTemperatureDifference; } function temperatureFactor() { - if (V.player.bodyTemperature <= settings.effects.lowerThresholdStart) { - return 1 - normalise(V.player.bodyTemperature, settings.effects.lowerThresholdStart, settings.effects.lowerThresholdEnd); + if (Weather.BodyTemperature.get() <= settings.effects.lowerThresholdStart) { + return 1 - normalise(Weather.BodyTemperature.get(), settings.effects.lowerThresholdStart, settings.effects.lowerThresholdEnd); } - if (V.player.bodyTemperature >= settings.effects.upperThresholdStart) { - return normalise(V.player.bodyTemperature, settings.effects.upperThresholdEnd, settings.effects.upperThresholdStart); + if (Weather.BodyTemperature.get() >= settings.effects.upperThresholdStart) { + return normalise(Weather.BodyTemperature.get(), settings.effects.upperThresholdEnd, settings.effects.upperThresholdStart); } return 0; } @@ -215,14 +215,25 @@ Weather.BodyTemperature = (() => { } return Object.create({ + get() { + if (isNaN(V.player.bodyTemperature)) return 37; + return V.player.bodyTemperature; + }, + set(value) { + if (isNaN(value)) console.warn("Tried to set temperature to a non-number value", value); + V.player.bodyTemperature = Number(value); + }, isDecreasing() { return Weather.BodyTemperature.direction < 0; }, isIncreasing() { return Weather.BodyTemperature.direction > 0; }, + get current() { + return this.get(); + }, get direction() { - return Math.sign(Weather.BodyTemperature.target - V.player.bodyTemperature); + return Math.sign(Weather.BodyTemperature.target - this.get()); }, get target() { if (!T.temperatureRestingPoint) { @@ -235,33 +246,30 @@ Weather.BodyTemperature = (() => { }, // For compatibility with /base-combat/ - since I don't want to touch it get state() { - if (V.player.bodyTemperature < 35) return "cold"; - if (V.player.bodyTemperature < 36.5) return "chilly"; - if (V.player.bodyTemperature < 37.5) return "comfy"; - if (V.player.bodyTemperature < 39) return "warm"; + if (this.get() < 35) return "cold"; + if (this.get() < 36.5) return "chilly"; + if (this.get() < 37.5) return "comfy"; + if (this.get() < 39) return "warm"; return "hot"; }, get fatigueModifier() { const factor = temperatureFactor(); - return V.player.bodyTemperature > settings.baseBodyTemperature ? interpolate(1, settings.effects.maxFatigueGainMultiplier, factor) : 1; + return this.get() > settings.baseBodyTemperature ? interpolate(1, settings.effects.maxFatigueGainMultiplier, factor) : 1; }, get arousalModifier() { const factor = temperatureFactor(); - return V.player.bodyTemperature < settings.baseBodyTemperature ? interpolate(1, settings.effects.maxArousalGainMultiplier, factor) : 1; + return this.get() < settings.baseBodyTemperature ? interpolate(1, settings.effects.maxArousalGainMultiplier, factor) : 1; }, get painModifier() { const factor = temperatureFactor(); - return V.player.bodyTemperature < settings.baseBodyTemperature ? interpolate(1, settings.effects.maxPainGainMultiplier, factor) : 1; + return this.get() < settings.baseBodyTemperature ? interpolate(1, settings.effects.maxPainGainMultiplier, factor) : 1; }, get stressModifier() { const factor = temperatureFactor(); - if (V.player.bodyTemperature > settings.baseBodyTemperature) return interpolate(0, settings.effects.upperMaxStressGain, factor); + if (this.get() > settings.baseBodyTemperature) return interpolate(0, settings.effects.upperMaxStressGain, factor); return interpolate(0, settings.effects.lowerMaxStressGain, factor); }, addActivity, - get current() { - return V.player.bodyTemperature; - }, update, activityLevel, calculateHeatGeneration, diff --git a/game/03-JavaScript/weather/02-main/02-temperature.js b/game/03-JavaScript/weather/02-main/02-temperature.js index 2e72a1ba9efefe98f28d1e78110973499492be8d..fb94296cde85b2bfbfe397bb6b8486ccb01f9c32 100644 --- a/game/03-JavaScript/weather/02-main/02-temperature.js +++ b/game/03-JavaScript/weather/02-main/02-temperature.js @@ -8,7 +8,7 @@ Weather.Temperature = (() => { function set(temperature, date) { date = new DateTime(date ?? Time.date); if (V.weatherObj.monthlyTemperatures.length < 1) return; - const modifiers = calculateModifiers(date); + const modifiers = calculateModifiers(temperature, date); V.weatherObj.monthlyTemperatures[0].t[date.day - 1] = temperature - modifiers; const baseTemperature = interpolateDailyTemperature(date); T.baseTemperature = round(baseTemperature, 2); @@ -78,7 +78,7 @@ Weather.Temperature = (() => { if (T.currentTemperature === undefined) { const date = new DateTime(Time.date); const baseTemperature = getBaseTemperature(date); - const modifiers = calculateModifiers(date); + const modifiers = calculateModifiers(baseTemperature, date); T.currentTemperature = round(baseTemperature + modifiers, 2); } return T.currentTemperature; @@ -170,35 +170,66 @@ Weather.Temperature = (() => { /* Calculates additional temperature modifiers based on sun, season, current weather conditions, and location. */ - function calculateModifiers(date) { - const dayModifier = calculateDayModifier(date.fractionOfDay); - const seasonModifier = calculateSeasonModifier(date); - const weatherModifier = getWeatherModifier(Weather.name); + function calculateModifiers(baseTemperature, date) { + const precipitationModifier = calculatePrecipitationModifier(baseTemperature); + const dayModifier = calculateDayModifier(date) * setup.WeatherTemperature.dayMultiplier; const locationModifier = getLocationModifier(); - return round(locationModifier + (1.5 * dayModifier + 2 * seasonModifier) * weatherModifier, 2); + return round(precipitationModifier + dayModifier + locationModifier, 2); } - function calculateDayModifier(fraction) { - return 2 * (1 - Math.abs(fraction - 0.5) * 2) - 1; + function calculatePrecipitationModifier(baseTemperature) { + if (baseTemperature <= 0) return 0; + return Weather.type.precipitationIntensity * setup.WeatherTemperature.precipitationEffect; } - function calculateSeasonModifier(date) { - const totalDaysInYear = DateTime.getDaysOfYear(date.year); - return -2 * Math.pow((Time.getDayOfYear(date) - totalDaysInYear / 2) / (totalDaysInYear / 2), 2) + 1; + function calculateDayModifier(date) { + const factor = Weather.sky?.orbitals?.sun.getFactor(date) ?? 0; + return factor * getWeatherModifier(); } - function getWeatherModifier(weatherCondition) { - return Weather.genSettings.weatherTypes.find(type => type.name === weatherCondition)?.temperatureModifier ?? 1.0; + function getWeatherModifier() { + const maxVariation = setup.WeatherTemperature.maxDiurnalVariation * 0.5; + const minVariation = setup.WeatherTemperature.minDiurnalVariation * 0.5; + return interpolate(minVariation, maxVariation, 1 - Weather.overcast); } function getLocationModifier() { // Location modifiers placeholder - switch (V.location) { - case "town": - return 3; - default: - return 0; + // Placeholder + const townLocations = [ + "alley", + "brothel", + "canal", + "compound", + "dance_studio", + "dilapitaded_shop", + "estate", + "factory", + "home", + "hospital", + "kylar_manor", + "landfill", + "market", + "museum", + "office", + "park", + "police_station", + "pool", + "pub", + "school", + "sewers", + "shopping_centre", + "spa", + "studio", + "strip_club", + "temple", + "town", + ]; + // +3 in town + if (townLocations.includes(V.location)) { + return 3; } + return 0; } /* diff --git a/game/03-JavaScript/weather/03-canvas/01-src/00-classes/orbit.js b/game/03-JavaScript/weather/03-canvas/01-src/00-classes/orbit.js index 3b2c1678741dc14dfef17875377fd020ab647f71..01d821f90f3dce584282d90205ac0d07053cb607 100644 --- a/game/03-JavaScript/weather/03-canvas/01-src/00-classes/orbit.js +++ b/game/03-JavaScript/weather/03-canvas/01-src/00-classes/orbit.js @@ -12,6 +12,12 @@ class Orbital { * @param {DateTime} date */ setPosition(date) { + const position = this.getPosition(date); + this.position = position; + this.factor = this.getFactor(date); + } + + getPosition(date) { const currentTime = Time.getSecondsSinceMidnight(date); const riseTimeInSeconds = this.settings.riseTime * TimeConstants.secondsPerHour; @@ -37,21 +43,20 @@ class Orbital { const factor = 1 - 4 * Math.pow(adjustedTimePercent - 0.5, 2); // Use a simple lerp for the x position while y uses a parabolic function for a simplified arc - this.position = { + return { x: lerp(adjustedTimePercent, startX, endX), y: baselineY + amplitude * factor, bottom: bottomY + amplitude, }; - - const steepness = 5; - this.setFactor(steepness, 1); } - setFactor(steepness, amplitude) { + getFactor(date) { + const position = this.getPosition(date); + const steepness = 5; const horizon = this.settings.path.horizon * this.setup.scale; const peakY = this.settings.path.peakY * this.setup.scale; - const x = (this.position.y - horizon) / (peakY - horizon); - this.factor = 2 * Math.pow(1 / (1 + Math.exp(-steepness * x)), amplitude) - 1; + const x = (position.y - horizon) / (peakY - horizon); + return 2 * Math.pow(1 / (1 + Math.exp(-steepness * x)), 1) - 1; } } window.Orbital = Orbital; diff --git a/game/03-JavaScript/weather/03-canvas/01-src/01-main/00-thermometer.js b/game/03-JavaScript/weather/03-canvas/01-src/01-main/00-thermometer.js index c445e2882bf1cdeba7953837d3e108112e15d04d..52578e1fd8bbec8eef53782f666ab0ffd27562f8 100644 --- a/game/03-JavaScript/weather/03-canvas/01-src/01-main/00-thermometer.js +++ b/game/03-JavaScript/weather/03-canvas/01-src/01-main/00-thermometer.js @@ -11,6 +11,7 @@ Weather.Thermometer = (() => { min: "#000dff", mid: "#00ff91", max: "#ff0000", + warn: "#ddff00", }; const size = { scaleFactor: 2, @@ -22,6 +23,7 @@ Weather.Thermometer = (() => { fillImg: { src: Weather.tempSettings.thermometer.fill }, upImg: { src: Weather.tempSettings.thermometer.upArrow }, downImg: { src: Weather.tempSettings.thermometer.downArrow }, + constantImg: { src: Weather.tempSettings.thermometer.constant }, }; const element = $("<div />", { id: "characterTemperature" }); const tooltipElement = $("<div />", { id: "characterTemperatureTooltip" }); @@ -98,17 +100,28 @@ Weather.Thermometer = (() => { thermometerCanvas.ctx.restore(); // Add the up or down arrows - if (Weather.BodyTemperature.direction !== 0) { - const img = Weather.BodyTemperature.direction > 0 ? images.upImg.img : images.downImg.img; - thermometerCanvas.ctx.drawImage(img, 13, 2, img.width, img.height); + const img = + Weather.BodyTemperature.direction !== 0 && Math.abs(Weather.BodyTemperature.target - Weather.bodyTemperature) > 0.5 + ? Weather.BodyTemperature.direction > 0 + ? images.upImg.img + : images.downImg.img + : images.constantImg.img; + thermometerCanvas.ctx.drawImage(img, 13, 2, img.width, img.height); + if (Weather.BodyTemperature.direction !== 0 && Math.abs(Weather.BodyTemperature.target - Weather.bodyTemperature) > 0.5) { if (Weather.BodyTemperature.direction > 0) { thermometerCanvas.ctx.fillStyle = normalisedTemperature > 0.5 ? color.max : color.mid; } else { thermometerCanvas.ctx.fillStyle = normalisedTemperature <= 0.5 ? color.max : color.mid; } - thermometerCanvas.ctx.globalCompositeOperation = "source-atop"; - thermometerCanvas.ctx.fillRect(13, 2, img.width, img.height); + } else { + thermometerCanvas.ctx.fillStyle = + Weather.bodyTemperature > setup.WeatherTemperature.baseBodyTemperature - 1 && + Weather.bodyTemperature < setup.WeatherTemperature.baseBodyTemperature + 1 + ? color.mid + : color.warn; } + thermometerCanvas.ctx.globalCompositeOperation = "source-atop"; + thermometerCanvas.ctx.fillRect(13, 2, img.width, img.height); Weather.Tooltips.thermometer(); } diff --git a/game/03-JavaScript/weather/03-canvas/01-src/01-main/02-tooltips.js b/game/03-JavaScript/weather/03-canvas/01-src/01-main/02-tooltips.js index 6d75a2b31e10cd85644e832c9a7e8193d41f3edb..4141929a409adc55662ff64a37d16b8c23cba95e 100644 --- a/game/03-JavaScript/weather/03-canvas/01-src/01-main/02-tooltips.js +++ b/game/03-JavaScript/weather/03-canvas/01-src/01-main/02-tooltips.js @@ -65,8 +65,7 @@ Weather.Tooltips = (() => { message: tempDescription + (waterDescription ? "<br>" + waterDescription : "") + - "<br>" + - tempChangeDescription + + (tempChangeDescription ? "<br>" + tempChangeDescription : "") + (overrideDescription ? "<br>" + overrideDescription : "") + modifiers + debug, diff --git a/game/03-JavaScript/weather/03-canvas/02-lib/00-effects/effects-location.js b/game/03-JavaScript/weather/03-canvas/02-lib/00-effects/effects-location.js index c780ab963e4bfdacfba45d595386bb479216d9d8..ca038b4ff4b9aae01f0dd11e0d92c67f2bb4c235 100644 --- a/game/03-JavaScript/weather/03-canvas/02-lib/00-effects/effects-location.js +++ b/game/03-JavaScript/weather/03-canvas/02-lib/00-effects/effects-location.js @@ -429,10 +429,13 @@ Weather.Renderer.Effects.add({ image.src = this.fullPath + imagePath; image.onload = handleLoadedImage; image.onerror = () => { - console.error("Could not load image", image.src); + console.warn("Could not load image", image.src); resolve(); }; + return; } + Errors.report("Warning: Missing location image: " + image.src); + resolve(); }; } }); diff --git a/game/base-system/weather/passout-scenes.twee b/game/base-system/weather/passout-scenes.twee index 78f52f8ecc0d028e3ffb88cffff7aad35707471b..ac634aa5869268cb582a74bb552d1633a5a864d0 100644 --- a/game/base-system/weather/passout-scenes.twee +++ b/game/base-system/weather/passout-scenes.twee @@ -8,7 +8,7 @@ <<pass 60>> /* FROSTBITE */ <<if _passout is "cold">> - <<set V.player.bodyTemperature to Weather.tempSettings.minTemperature + 1.5>> + <<set Weather.bodyTemperature to Weather.tempSettings.minTemperature + 1.5>> <<if !["beach", "forest", "moor", "sea"].includes($location)>> You pass out from the cold. <br><br> @@ -168,7 +168,7 @@ <</switch>> /* HEATSTROKE */ <<elseif _passout is "heat">> - <<set V.player.bodyTemperature to Weather.tempSettings.maxTemperature - 1>> + <<set Weather.bodyTemperature to Weather.tempSettings.maxTemperature - 1>> <<if !["beach", "forest", "moor", "sea"].includes($location)>> You pass out from the heat. <br><br> @@ -452,7 +452,7 @@ To get the previous major area passage, use: $safePassage (for links in the last :: Passout Hypothermia Molest Finish <<effects>> -<<set V.player.bodyTemperature++>> +<<set Weather.bodyTemperature++>> <<if $enemyarousal gte $enemyarousalmax>> <<ejaculation>> The <<person>> pushes <<himself>> off you with a satisfied groan, grinning at you. "There, all warmed up. You're lucky a good Samaritan like me was here to help." <<He>> gives your cheek a condescending pat before walking off with a chuckle. <<tearful>> you stand up and rub your hands together, teeth chattering. @@ -503,7 +503,7 @@ To get the previous major area passage, use: $safePassage (for links in the last :: Passout Heatstroke Strip Finish <<effects>> <<outfitChecks>> -<<set V.player.bodyTemperature-->> +<<set Weather.bodyTemperature-->> <<if _fullyNaked>> With one last tug, the <<person>> rips the last of your clothes off. <<He>> rakes <<his>> eyes down your nude body. "Nice," <<he>> says appreciatively. <<He>> climbs to <<his>> feet, tucking your clothes under <<his>> arm. "There, you should be plenty cool now." <br><br> @@ -790,14 +790,14 @@ You awaken in a dingy windowless room, the stone walls lit only by a flaming tor Remy sets down the bowl and <<= $cow gte 2 and $transformationParts.cow.horns isnot "hidden" ? "rubs the base of your horns" : "pets your head">>. "That's a good <<girl>>. You'll take care next time, won't you?" <br><br> - <<set V.player.bodyTemperature-->> + <<set Weather.bodyTemperature-->> <<link [[Listen|Livestock Passout 2]]>><<set $phase to 0>><<livestock_obey 1>><<transform cow 1>><</link>><<gobey>> <br> <<link [[Push away|Livestock Passout 2]]>><<set $phase to 1>><<livestock_obey -1>><<trauma -6>><</link>><<lobey>><<ltrauma>> <<else>> "We found you passed out and shivering. You caused quite the worry, but my examination found no problems. You simply got too cold." <<He>> strokes your hair. <br><br> - <<set V.player.bodyTemperature++>> + <<set Weather.bodyTemperature++>> <<if $speech_attitude is "meek">> "Um... maybe if I had some clothes, that would help?" you whisper. <<elseif $speech_attitude is "bratty">> @@ -821,10 +821,10 @@ You awaken in a dingy windowless room, the stone walls lit only by a flaming tor <<outfitChecks>> <<if $pirate_rank gte 1>> <<if $passoutReason is "hyperthermia">> - <<set V.player.bodyTemperature-->> + <<set Weather.bodyTemperature-->> You wake up <<= _fullyNaked ? "cool and dry" : "naked and cool, but dry">>, save the water being poured on you. You <<= $speech_attitude is "meek" ? "whimper" : $speech_attitude is "bratty" ? "groan" : "gasp">> and wipe at your face to clear your airways, much to the <<= $pirate_status gte 70 ? "cheers" : $pirate_status gte 50 ? "pleased chatter" : "amusement">> of your mates. <<else>> - <<set V.player.bodyTemperature++>> + <<set Weather.bodyTemperature++>> You wake up dry and bundled in blankets, nestled between two large bodies. You <<= $speech_attitude is "meek" ? "whimper" : $speech_attitude is "bratty" ? "groan" : "gasp">> as a shiver runs through you, shaking off the last of your frostbite. The pirates on either side of you <<= $pirate_status gte 50 ? "rub your back and sides" : "roughly pat you on the back">> with a laugh at your recovery. <</if>> <br><br> @@ -843,11 +843,11 @@ You awaken in a dingy windowless room, the stone walls lit only by a flaming tor <<ruined>> <<if $passoutReason is "hyperthermia">> You wake up naked and bound, wind whipping at you and sea mist spraying you. You've cooled down a lot, but that doesn't protect you much from the realisation that you're suspended off the ground! <<gstress>><<stress 6>> - <<set V.player.bodyTemperature-->> + <<set Weather.bodyTemperature-->> <<else>> <<towelup>> <!-- replace with a thin sheet if a spriter makes one --> You wake up bound, bare of anything but what feels like a cocoon of sheets. The wind <<if ["rain", "snow"].includes(Weather.precipitation)>><<= Weather.precipitation>> whip<<else>>whips<</if>> at your face, and the sea mist sprays you. You feel a lot warmer, but that doesn't provide much relief from the realisation that you're suspended off the ground! <<gstress>><<stress 6>> - <<set V.player.bodyTemperature++>> + <<set Weather.bodyTemperature++>> <</if>> <br><br> @@ -875,7 +875,7 @@ You sit straight up, coughing water out of your lungs as the ocean waves surge o :: Passout Beach Heatstroke Lemonade <<effects>><<npc Robin>><<person1>> -<<set V.player.bodyTemperature-->> +<<set Weather.bodyTemperature-->> You feel a pair of hands on your body, trying to shake you awake. "Wake up!" a familiar voice says. There's a splash of cold water on your face, and you blink, looking around. Your vision is fuzzy, but you can make out most of the features of the person standing in front of you. It's Robin. <br><br> @@ -959,7 +959,7 @@ Robin stands up. "I should get back to my stand now," <<he>> says, glancing over You feel a pair of arms hook under you and lift you off the sand. <<if $cool gte 240>> - <<set V.player.bodyTemperature-->> + <<set Weather.bodyTemperature-->> Someone splashes water over your face. Some of your friends are standing over you, a concerned look on their faces. "We found you on the sand. What happened?" one of them asks. <br><br> "Hot..." you mumble, feeling ready to go back to sleep. They pull you closer to the surf, dragging you across the rough sand. The cool water laps over your feet. @@ -1559,7 +1559,7 @@ You rest in the nest, conserving your strength while the Great Hawk hunts. By th <<effects>><<outfitChecks>> <<npc Whitney>><<generatey2>><<person1>> -You wake up to cold water drenching your face. Whitney stands above you, holding an empty water bottle. <<set V.player.bodyTemperature-->> +You wake up to cold water drenching your face. Whitney stands above you, holding an empty water bottle. <<set Weather.bodyTemperature-->> <<if $whitneyrescued>> You feel a strange sense of deja vu. You meet Whitney's eyes and see the sentiment reflected in them for the briefest of seconds. It dissipates at the sound of hushed snickers from <<his>> friends. <<else>> diff --git a/img/misc/icon/weather/constant.png b/img/misc/icon/weather/constant.png new file mode 100644 index 0000000000000000000000000000000000000000..0a6d0a9ffbec5424f295cb885111b5ee9b62fd57 Binary files /dev/null and b/img/misc/icon/weather/constant.png differ