diff --git a/data/json/items/chemicals_and_resources.json b/data/json/items/chemicals_and_resources.json index 02431bc4db41e..5608d816e56a5 100644 --- a/data/json/items/chemicals_and_resources.json +++ b/data/json/items/chemicals_and_resources.json @@ -224,7 +224,7 @@ "charges": 2, "category": "chems", "fun": -30, - "freezing_point": 17, + "freezing_point": -8, "conditional_names": [ { "type": "FLAG", "condition": "DIRTY", "name": "bleach spill" } ] }, { @@ -248,7 +248,7 @@ "charges": 2, "category": "chems", "fun": -30, - "freezing_point": -108 + "freezing_point": -78 }, { "type": "COMESTIBLE", @@ -365,7 +365,7 @@ "volume": "250 ml", "phase": "liquid", "category": "chems", - "freezing_point": 28, + "freezing_point": -2, "fun": -1 }, { @@ -386,7 +386,7 @@ "volume": "250 ml", "phase": "liquid", "category": "chems", - "freezing_point": 28, + "freezing_point": -2, "fun": -1 }, { diff --git a/data/json/items/classes/comestible.json b/data/json/items/classes/comestible.json index 7bf287864d6b2..f7401bdd4c5e7 100644 --- a/data/json/items/classes/comestible.json +++ b/data/json/items/classes/comestible.json @@ -13,6 +13,6 @@ "material": [ "powder" ], "symbol": "%", "charges": 100, - "freezing_point": -459 + "freezing_point": -274 } ] diff --git a/data/json/items/comestibles/alcohol.json b/data/json/items/comestibles/alcohol.json index f1ae939e677a8..6616bfec72467 100644 --- a/data/json/items/comestibles/alcohol.json +++ b/data/json/items/comestibles/alcohol.json @@ -24,7 +24,7 @@ "charges": 5, "flags": [ "EATEN_COLD", "MYCUS_OK" ], "fun": 25, - "freezing_point": 17 + "freezing_point": -8 }, { "type": "COMESTIBLE", @@ -52,7 +52,7 @@ "charges": 5, "flags": [ "EATEN_COLD" ], "fun": 15, - "freezing_point": 17 + "freezing_point": -8 }, { "type": "COMESTIBLE", @@ -80,7 +80,7 @@ "charges": 5, "flags": [ "EATEN_COLD" ], "fun": 15, - "freezing_point": 17 + "freezing_point": -8 }, { "type": "COMESTIBLE", @@ -106,7 +106,7 @@ "phase": "liquid", "charges": 5, "fun": 15, - "freezing_point": 17 + "freezing_point": -8 }, { "type": "COMESTIBLE", @@ -133,7 +133,7 @@ "charges": 5, "flags": [ "EATEN_COLD" ], "fun": 16, - "freezing_point": 15 + "freezing_point": -9 }, { "type": "COMESTIBLE", @@ -160,7 +160,7 @@ "charges": 5, "flags": [ "EATEN_COLD" ], "fun": 15, - "freezing_point": 17 + "freezing_point": -8 }, { "type": "COMESTIBLE", @@ -187,7 +187,7 @@ "charges": 5, "flags": [ "EATEN_COLD" ], "fun": 15, - "freezing_point": 17 + "freezing_point": -8 }, { "type": "COMESTIBLE", @@ -213,7 +213,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 14, "vitamins": [ [ "calcium", 1 ] ] }, @@ -240,7 +240,7 @@ "material": [ "alcohol" ], "volume": "250 ml", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "phase": "liquid", "charges": 7, "fun": 15 @@ -269,7 +269,7 @@ "phase": "liquid", "charges": 7, "flags": [ "EATEN_COLD", "NUTRIENT_OVERRIDE" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 15 }, { @@ -296,7 +296,7 @@ "phase": "liquid", "charges": 7, "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 15 }, { @@ -324,7 +324,7 @@ "charges": 7, "fun": 15, "flags": [ "EATEN_COLD" ], - "freezing_point": -22 + "freezing_point": -30 }, { "type": "COMESTIBLE", @@ -351,7 +351,7 @@ "charges": 7, "fun": 18, "flags": [ "EATEN_COLD" ], - "freezing_point": -22 + "freezing_point": -30 }, { "type": "COMESTIBLE", @@ -375,7 +375,7 @@ "material": [ "alcohol" ], "volume": "250 ml", "flags": [ "EDIBLE_FROZEN" ], - "freezing_point": 0, + "freezing_point": -17, "phase": "liquid", "charges": 7, "fun": 10 @@ -407,7 +407,7 @@ "charges": 7, "flags": [ "EATEN_COLD" ], "fun": 10, - "freezing_point": 22 + "freezing_point": -6 }, { "type": "COMESTIBLE", @@ -433,7 +433,7 @@ "phase": "liquid", "charges": 7, "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 5 }, { @@ -461,7 +461,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD", "NUTRIENT_OVERRIDE" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 4 }, { @@ -490,7 +490,7 @@ "charges": 7, "flags": [ "EATEN_COLD" ], "fun": 2, - "freezing_point": 20 + "freezing_point": -7 }, { "type": "COMESTIBLE", @@ -514,7 +514,7 @@ "material": [ "alcohol" ], "volume": "250 ml", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "phase": "liquid", "charges": 7, "fun": 12 @@ -597,7 +597,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -29, + "freezing_point": -34, "fun": 20, "vitamins": [ [ "vitA", 2 ], [ "vitC", 118 ], [ "calcium", 2 ], [ "iron", 1 ] ] }, @@ -625,7 +625,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -29, + "freezing_point": -34, "fun": 20, "vitamins": [ [ "vitC", 135 ], [ "calcium", 1 ], [ "iron", 1 ] ] }, @@ -653,7 +653,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 20 }, { @@ -679,7 +679,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 10, "vitamins": [ [ "calcium", 1 ] ] }, @@ -707,7 +707,7 @@ "phase": "liquid", "charges": 7, "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 14 }, { @@ -736,7 +736,7 @@ "charges": 7, "flags": [ "EATEN_COLD" ], "fun": 16, - "freezing_point": 25 + "freezing_point": -4 }, { "type": "COMESTIBLE", @@ -763,7 +763,7 @@ "charges": 7, "flags": [ "EATEN_COLD" ], "fun": 16, - "freezing_point": 25 + "freezing_point": -4 }, { "type": "COMESTIBLE", @@ -790,7 +790,7 @@ "phase": "liquid", "charges": 7, "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 12 }, { @@ -817,7 +817,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 8, "vitamins": [ [ "calcium", 1 ] ] }, @@ -846,7 +846,7 @@ "phase": "liquid", "charges": 7, "flags": [ "EATEN_COLD" ], - "freezing_point": -49, + "freezing_point": -45, "fun": 12 }, { @@ -873,7 +873,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 10, "vitamins": [ [ "calcium", 1 ] ] }, @@ -901,7 +901,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 14, "vitamins": [ [ "calcium", 1 ] ] }, @@ -929,7 +929,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 14, "vitamins": [ [ "calcium", 1 ] ] }, @@ -956,7 +956,7 @@ "primary_material": "alcohol", "volume": "250 ml", "phase": "liquid", - "freezing_point": 23, + "freezing_point": -5, "fun": 14, "vitamins": [ [ "calcium", 1 ], [ "iron", 1 ] ], "flags": [ "EATEN_COLD" ] @@ -985,7 +985,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 14, "vitamins": [ [ "calcium", 1 ] ] }, @@ -1015,7 +1015,7 @@ "fun": 18, "vitamins": [ [ "calcium", 1 ], [ "iron", 1 ] ], "flags": [ "EATEN_COLD" ], - "freezing_point": 23 + "freezing_point": -5 }, { "type": "COMESTIBLE", @@ -1044,7 +1044,7 @@ "flags": [ "EATEN_COLD", "EDIBLE_FROZEN" ], "fun": 8, "vitamins": [ [ "vitC", 20 ] ], - "freezing_point": -22 + "freezing_point": -30 }, { "type": "COMESTIBLE", @@ -1073,7 +1073,7 @@ "flags": [ "EATEN_COLD", "EDIBLE_FROZEN" ], "fun": -12, "vitamins": [ [ "vitC", 20 ] ], - "freezing_point": -22 + "freezing_point": -30 }, { "type": "COMESTIBLE", @@ -1098,7 +1098,7 @@ "material": [ "alcohol" ], "volume": "250 ml", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "phase": "liquid", "charges": 7, "fun": 17 @@ -1155,7 +1155,7 @@ "material": [ "alcohol" ], "volume": "250 ml", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "phase": "liquid", "charges": 7, "fun": 17 @@ -1205,7 +1205,7 @@ "phase": "liquid", "charges": 5, "flags": [ "EATEN_COLD" ], - "freezing_point": -27, + "freezing_point": -33, "fun": 20 }, { @@ -1233,7 +1233,7 @@ "phase": "liquid", "charges": 2, "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 20 }, { @@ -1259,7 +1259,7 @@ "volume": "500 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 20 }, { @@ -1285,7 +1285,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 20 }, { @@ -1368,7 +1368,7 @@ "flags": [ "EATEN_COLD", "FREEZERBURN" ], "fun": 20, "vitamins": [ [ "vitA", 5 ], [ "vitC", 3 ], [ "calcium", 12 ], [ "iron", 2 ] ], - "freezing_point": 12 + "freezing_point": -11 }, { "type": "COMESTIBLE", @@ -1394,7 +1394,7 @@ "charges": 5, "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -22, + "freezing_point": -30, "fun": 20 }, { @@ -1421,7 +1421,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": -29, + "freezing_point": -34, "fun": 25, "vitamins": [ [ "vitA", 2 ], [ "vitC", 23 ], [ "calcium", 1 ], [ "iron", 2 ] ] }, @@ -1449,7 +1449,7 @@ "volume": "250 ml", "phase": "liquid", "flags": [ "EATEN_COLD" ], - "freezing_point": 23, + "freezing_point": -5, "fun": 10, "vitamins": [ [ "calcium", 1 ] ] } diff --git a/data/json/items/comestibles/drink.json b/data/json/items/comestibles/drink.json index 86ac6d0e05ebd..767e3acc26509 100644 --- a/data/json/items/comestibles/drink.json +++ b/data/json/items/comestibles/drink.json @@ -1013,7 +1013,7 @@ "volume": "250 ml", "phase": "liquid", "fun": 2, - "freezing_point": 22 + "freezing_point": -5 }, { "type": "COMESTIBLE", diff --git a/data/json/items/comestibles/drink_other.json b/data/json/items/comestibles/drink_other.json index 153549c05982e..e5cb02f33e9f8 100644 --- a/data/json/items/comestibles/drink_other.json +++ b/data/json/items/comestibles/drink_other.json @@ -46,7 +46,7 @@ "flags": [ "EATEN_COLD", "RAW" ], "phase": "liquid", "vitamins": [ ], - "freezing_point": 30 + "freezing_point": -1 }, { "id": "mayonnaise", @@ -69,7 +69,7 @@ "fun": -1, "flags": [ "FREEZERBURN" ], "phase": "liquid", - "freezing_point": 25 + "freezing_point": -4 }, { "id": "ketchup", @@ -155,7 +155,7 @@ "phase": "liquid", "charges": 16, "fun": -4, - "freezing_point": 28 + "freezing_point": -2 }, { "type": "COMESTIBLE", @@ -179,7 +179,7 @@ "fun": -25, "flags": [ "NUTRIENT_OVERRIDE" ], "vitamins": [ ], - "freezing_point": 14 + "freezing_point": -26 }, { "type": "COMESTIBLE", @@ -213,7 +213,7 @@ "fun": 2, "flags": [ "USE_EAT_VERB" ], "vitamins": [ [ "calcium", 18 ], [ "iron", 23 ] ], - "freezing_point": -20 + "freezing_point": -29 }, { "id": "horseradish", diff --git a/data/json/items/comestibles/egg.json b/data/json/items/comestibles/egg.json index f6e1070108758..5d17be2fbaa06 100644 --- a/data/json/items/comestibles/egg.json +++ b/data/json/items/comestibles/egg.json @@ -303,7 +303,7 @@ "flags": [ "EDIBLE_FROZEN" ], "charges": 16, "fun": -4, - "freezing_point": -459, + "freezing_point": -274, "vitamins": [ [ "vitB", 2 ] ] }, { diff --git a/data/json/items/comestibles/junkfood.json b/data/json/items/comestibles/junkfood.json index 4831417945a6c..f3288ba8378ac 100644 --- a/data/json/items/comestibles/junkfood.json +++ b/data/json/items/comestibles/junkfood.json @@ -518,7 +518,7 @@ "charges": 16, "fun": 5, "vitamins": [ [ "calcium", 2 ] ], - "freezing_point": -70 + "freezing_point": -57 }, { "type": "COMESTIBLE", diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index a43233a3f92f3..c2d2c1cace9a0 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -438,7 +438,7 @@ "phase": "liquid", "charges": 4, "flags": [ "EATEN_COLD" ], - "freezing_point": -49, + "freezing_point": -45, "fun": 30 }, { diff --git a/data/json/items/comestibles/mutagen.json b/data/json/items/comestibles/mutagen.json index c61ea57a91b56..c17dbe2d332bf 100644 --- a/data/json/items/comestibles/mutagen.json +++ b/data/json/items/comestibles/mutagen.json @@ -21,7 +21,7 @@ "flags": [ "NUTRIENT_OVERRIDE" ], "vitamins": [ ], "material": [ "water" ], - "freezing_point": 17 + "freezing_point": -8 }, { "abstract": "iv_mutagen_flavor", diff --git a/data/json/items/comestibles/nuts.json b/data/json/items/comestibles/nuts.json index cc75f8256ba3e..c141fc7c2045c 100644 --- a/data/json/items/comestibles/nuts.json +++ b/data/json/items/comestibles/nuts.json @@ -428,7 +428,7 @@ "charges": 4, "flags": [ "EATEN_HOT" ], "fun": 5, - "freezing_point": -80 + "freezing_point": -62 }, { "id": "peanutbutter", diff --git a/data/json/items/comestibles/other.json b/data/json/items/comestibles/other.json index 7fff34d328366..7aea6e36a17d6 100644 --- a/data/json/items/comestibles/other.json +++ b/data/json/items/comestibles/other.json @@ -284,7 +284,7 @@ "price_postapoc": 0, "material": [ "paper" ], "volume": "250 ml", - "freezing_point": -459, + "freezing_point": -274, "charges": 50, "fun": -20 }, @@ -303,7 +303,7 @@ "price_postapoc": 0, "material": [ "cardboard" ], "volume": "250 ml", - "freezing_point": -459, + "freezing_point": -274, "charges": 10, "fun": -20 }, @@ -570,7 +570,7 @@ "calories": 2, "charges": 20, "fun": -5, - "freezing_point": -459 + "freezing_point": -274 }, { "type": "COMESTIBLE", @@ -667,7 +667,7 @@ "calories": 170, "vitamins": [ [ "vitA", 20 ], [ "vitC", 45 ], [ "calcium", 5 ], [ "iron", 5 ] ], "fun": 5, - "freezing_point": -459, + "freezing_point": -274, "color": "brown", "flags": [ "INEDIBLE", "CATTLE" ], "use_action": [ "CATTLEFODDER" ] @@ -689,7 +689,7 @@ "calories": 400, "vitamins": [ [ "calcium", 1 ], [ "iron", 7 ] ], "fun": 5, - "freezing_point": -459, + "freezing_point": -274, "color": "brown", "flags": [ "INEDIBLE", "BIRD", "NUTRIENT_OVERRIDE" ], "use_action": [ "BIRDFOOD" ] @@ -738,7 +738,7 @@ "calories": 380, "vitamins": [ [ "vitA", 25 ], [ "iron", 25 ], [ "vitB", 20 ], [ "calcium", 30 ] ], "fun": -15, - "freezing_point": -459, + "freezing_point": -274, "color": "brown", "flags": [ "LUPINE" ], "use_action": [ "DOGFOOD" ] @@ -787,7 +787,7 @@ "calories": 380, "vitamins": [ [ "vitA", 25 ], [ "iron", 25 ], [ "vitB", 20 ], [ "calcium", 30 ] ], "fun": -15, - "freezing_point": -459, + "freezing_point": -274, "color": "brown", "flags": [ "FELINE" ], "use_action": [ "CATFOOD" ] @@ -856,7 +856,7 @@ "material": [ "paper" ], "price": 50, "price_postapoc": 200, - "freezing_point": -459, + "freezing_point": -274, "description": "A paper sachet with tea leaves inside. Put it into boiling water to make a cup of black tea." }, { @@ -910,7 +910,7 @@ "material": [ "plastic" ], "price": 50, "price_postapoc": 200, - "freezing_point": -459, + "freezing_point": -274, "description": "A small packet of commercial instant coffee powder. No creamer or sweetener added." }, { diff --git a/data/json/items/comestibles/protein.json b/data/json/items/comestibles/protein.json index e2606881a9660..c53ec23f5d907 100644 --- a/data/json/items/comestibles/protein.json +++ b/data/json/items/comestibles/protein.json @@ -51,7 +51,7 @@ "color": "white", "container": "bottle_plastic_small", "calories": 100, - "freezing_point": -459, + "freezing_point": -274, "vitamins": [ ] }, { diff --git a/data/json/items/comestibles/seed.json b/data/json/items/comestibles/seed.json index 9d1470d6ff7c9..8baf3413c641b 100644 --- a/data/json/items/comestibles/seed.json +++ b/data/json/items/comestibles/seed.json @@ -678,7 +678,7 @@ "primary_material": "dried_vegetable", "volume": "250 ml", "flags": [ "SMOKED" ], - "freezing_point": -459, + "freezing_point": -274, "charges": 4, "fun": 3 }, diff --git a/data/json/items/comestibles/spice.json b/data/json/items/comestibles/spice.json index bfc6cd92eb589..9afad56556cdf 100644 --- a/data/json/items/comestibles/spice.json +++ b/data/json/items/comestibles/spice.json @@ -19,7 +19,7 @@ "volume": "250 ml", "color": "red", "primary_material": "water", - "freezing_point": -22, + "freezing_point": -30, "phase": "liquid" }, { @@ -142,7 +142,7 @@ "charges": 10, "healthy": -1, "fun": -15, - "freezing_point": -22, + "freezing_point": -30, "phase": "liquid" }, { diff --git a/data/mods/Magiclysm/items/alchemy_items.json b/data/mods/Magiclysm/items/alchemy_items.json index 2fc3143dea1e5..e2b871562648d 100644 --- a/data/mods/Magiclysm/items/alchemy_items.json +++ b/data/mods/Magiclysm/items/alchemy_items.json @@ -173,7 +173,7 @@ "container": "flask_glass", "charges": 1, "phase": "liquid", - "freezing_point": -100 + "freezing_point": -73 }, { "id": "stirge_proboscis", diff --git a/data/mods/Magiclysm/items/cast_spell_items.json b/data/mods/Magiclysm/items/cast_spell_items.json index 8ebb9e3283124..bd5f1a5a49a02 100644 --- a/data/mods/Magiclysm/items/cast_spell_items.json +++ b/data/mods/Magiclysm/items/cast_spell_items.json @@ -19,7 +19,7 @@ "flags": [ "EATEN_COLD", "NUTRIENT_OVERRIDE" ], "phase": "liquid", "price": 2500, - "freezing_point": 40 + "freezing_point": 4 }, { "id": "mana_potion", @@ -56,7 +56,7 @@ "flags": [ "EATEN_COLD", "NUTRIENT_OVERRIDE" ], "phase": "liquid", "price": 3000, - "freezing_point": 40 + "freezing_point": 4 }, { "id": "ogres_strength_potion", @@ -139,7 +139,7 @@ "flags": [ "TRADER_AVOID", "NUTRIENT_OVERRIDE" ], "phase": "liquid", "price": 2500, - "freezing_point": 10 + "freezing_point": -12 }, { "id": "twisted_restore_potion_improved", diff --git a/data/mods/Magiclysm/items/mutagen.json b/data/mods/Magiclysm/items/mutagen.json index 5e12fc705c9a1..b7dcd25032157 100644 --- a/data/mods/Magiclysm/items/mutagen.json +++ b/data/mods/Magiclysm/items/mutagen.json @@ -20,7 +20,7 @@ "charges": 2, "use_action": { "type": "mutagen_iv", "mutation_category": "MANATOUCHED" }, "flags": [ "EATEN_COLD", "NUTRIENT_OVERRIDE" ], - "freezing_point": -22, + "freezing_point": -30, "fun": -15 }, { diff --git a/data/mods/TEST_DATA/items.json b/data/mods/TEST_DATA/items.json index e3b6be5073653..3fd587bede745 100644 --- a/data/mods/TEST_DATA/items.json +++ b/data/mods/TEST_DATA/items.json @@ -1341,7 +1341,7 @@ "charges": 7, "flags": [ "EATEN_COLD" ], "fun": -5, - "freezing_point": 20 + "freezing_point": -7 }, { "id": "test_nuclear_carafe", diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index 42002388737d3..97aee7655b8b6 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -829,7 +829,7 @@ When you sort your inventory by category, these are the categories that are disp | `specific_heat_liquid` | Specific heat of a material when not frozen (J/(g K)). Default 4.186. | `specific_heat_solid` | Specific heat of a material when frozen (J/(g K)). Default 2.108. | `latent_heat` | Latent heat of fusion for a material (J/g). Default 334. -| `freeze_point` | Freezing point of this material (F). Default 32 F ( 0 C ). +| `freezing_point` | Freezing point of this material (C). Default 0 C ( 32 F ). | `edible` | Optional boolean. Default is false. | `rotting` | Optional boolean. Default is false. | `soft` | Optional boolean. Default is false. @@ -2579,7 +2579,7 @@ CBMs can be defined like this: "charges" : 4, // Number of uses when spawned "stack_size" : 8, // (Optional) How many uses are in the above-defined volume. If omitted, is the same as 'charges' "fun" : 50 // Morale effects when used -"freezing_point": 32, // (Optional) Temperature in F at which item freezes, default is water (32F/0C) +"freezing_point": 32, // (Optional) Temperature in C at which item freezes, default is water (32F/0C) "cooks_like": "meat_cooked", // (Optional) If the item is used in a recipe, replaces it with its cooks_like "parasites": 10, // (Optional) Probability of becoming parasitised when eating "contamination": [ { "disease": "bad_food", "probability": 5 } ], // (Optional) List of diseases carried by this comestible and their associated probability. Values must be in the [0, 100] range. diff --git a/src/cata_utility.cpp b/src/cata_utility.cpp index 55423a14645a9..93926db360f9f 100644 --- a/src/cata_utility.cpp +++ b/src/cata_utility.cpp @@ -214,6 +214,11 @@ double temp_to_kelvin( double fahrenheit ) return temp_to_celsius( fahrenheit ) + 273.15; } +double celsius_to_kelvin( double celsius ) +{ + return celsius + 273.15; +} + double kelvin_to_fahrenheit( double kelvin ) { return 1.8 * ( kelvin - 273.15 ) + 32; diff --git a/src/cata_utility.h b/src/cata_utility.h index aab1bf794a077..e1891eadd4f76 100644 --- a/src/cata_utility.h +++ b/src/cata_utility.h @@ -198,6 +198,13 @@ double temp_to_celsius( double fahrenheit ); */ double temp_to_kelvin( double fahrenheit ); +/** + * Convert a temperature from degrees Celsius to Kelvin. + * + * @return Temperature in degrees K. + */ +double celsius_to_kelvin( double celsius ); + /** * Convert a temperature from Kelvin to degrees Fahrenheit. * diff --git a/src/item.cpp b/src/item.cpp index 4e77f4e6d390c..bc0c85ec42c92 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -1788,7 +1788,7 @@ void item::debug_info( std::vector &info, const iteminfo_query *parts, iteminfo::lower_is_better, get_latent_heat() ) ); info.push_back( iteminfo( "BASE", _( "Freeze point: " ), "", - iteminfo::lower_is_better, + iteminfo::lower_is_better | iteminfo::is_decimal, get_freeze_point() ) ); } } @@ -8791,7 +8791,7 @@ void item::set_item_specific_energy( const float new_specific_energy ) const float specific_heat_liquid = get_specific_heat_liquid(); // J/g K const float specific_heat_solid = get_specific_heat_solid(); // J/g K const float latent_heat = get_latent_heat(); // J/kg - const float freezing_temperature = temp_to_kelvin( get_freeze_point() ); // K + const float freezing_temperature = celsius_to_kelvin( get_freeze_point() ); // K const float completely_frozen_specific_energy = specific_heat_solid * freezing_temperature; // Energy that the item would have if it was completely solid at freezing temperature const float completely_liquid_specific_energy = completely_frozen_specific_energy + @@ -8854,7 +8854,7 @@ float item::get_specific_energy_from_temperature( const float new_temperature ) const float specific_heat_liquid = get_specific_heat_liquid(); // J/g K const float specific_heat_solid = get_specific_heat_solid(); // J/g K const float latent_heat = get_latent_heat(); // J/kg - const float freezing_temperature = temp_to_kelvin( get_freeze_point() ); // K + const float freezing_temperature = celsius_to_kelvin( get_freeze_point() ); // K const float completely_frozen_energy = specific_heat_solid * freezing_temperature; // Energy that the item would have if it was completely solid at freezing temperature const float completely_liquid_energy = completely_frozen_energy + @@ -8872,7 +8872,7 @@ float item::get_specific_energy_from_temperature( const float new_temperature ) void item::set_item_temperature( float new_temperature ) { - const float freezing_temperature = temp_to_kelvin( get_freeze_point() ); // K + const float freezing_temperature = celsius_to_kelvin( get_freeze_point() ); // K const float specific_heat_solid = get_specific_heat_solid(); // J/g K const float latent_heat = get_latent_heat(); // J/kg @@ -9514,7 +9514,7 @@ void item::calc_temp( const int temp, const float insulation, const time_duratio const float specific_heat_liquid = get_specific_heat_liquid(); const float specific_heat_solid = get_specific_heat_solid(); const float latent_heat = get_latent_heat(); - const float freezing_temperature = temp_to_kelvin( get_freeze_point() ); // K + const float freezing_temperature = celsius_to_kelvin( get_freeze_point() ); // K const float completely_frozen_specific_energy = specific_heat_solid * freezing_temperature; // Energy that the item would have if it was completely solid at freezing temperature const float completely_liquid_specific_energy = completely_frozen_specific_energy + diff --git a/src/item.h b/src/item.h index aa74d7b8ef549..04aeb55fe375d 100644 --- a/src/item.h +++ b/src/item.h @@ -1240,7 +1240,7 @@ class item : public visitable float get_specific_heat_liquid() const; float get_specific_heat_solid() const; float get_latent_heat() const; - float get_freeze_point() const; // Fahrenheit + float get_freeze_point() const; // Celsius // If this is food, returns itself. If it contains food, return that // contents. Otherwise, returns nullptr. diff --git a/src/itype.h b/src/itype.h index a4894e37834ba..471013f573dc6 100644 --- a/src/itype.h +++ b/src/itype.h @@ -161,8 +161,8 @@ struct islot_comestible { /**Amount of radiation you get from this comestible*/ int radiation = 0; - /** freezing point in degrees Fahrenheit, below this temperature item can freeze */ - int freeze_point = temperatures::freezing; + /** freezing point in degrees celsius, below this temperature item can freeze */ + float freeze_point = 0; /**List of diseases carried by this comestible and their associated probability*/ std::map contamination; diff --git a/src/material.cpp b/src/material.cpp index 32e8cbf57e267..54a6d9f01bf2b 100644 --- a/src/material.cpp +++ b/src/material.cpp @@ -68,7 +68,7 @@ void material_type::load( const JsonObject &jsobj, const std::string & ) optional( jsobj, was_loaded, "specific_heat_liquid", _specific_heat_liquid ); optional( jsobj, was_loaded, "specific_heat_solid", _specific_heat_solid ); optional( jsobj, was_loaded, "latent_heat", _latent_heat ); - optional( jsobj, was_loaded, "freeze_point", _freeze_point ); + optional( jsobj, was_loaded, "freezing_point", _freeze_point ); assign( jsobj, "salvaged_into", _salvaged_into ); optional( jsobj, was_loaded, "repaired_with", _repaired_with, itype_id::NULL_ID() ); @@ -227,7 +227,7 @@ float material_type::latent_heat() const return _latent_heat; } -int material_type::freeze_point() const +float material_type::freeze_point() const { return _freeze_point; } diff --git a/src/material.h b/src/material.h index c20e83c02128f..5ecd0914e34c8 100644 --- a/src/material.h +++ b/src/material.h @@ -75,7 +75,7 @@ class material_type float _specific_heat_liquid = 4.186f; float _specific_heat_solid = 2.108f; float _latent_heat = 334.0f; - int _freeze_point = 32; // Fahrenheit + float _freeze_point = 0; // Celsius bool _edible = false; bool _rotting = false; bool _soft = false; @@ -127,7 +127,7 @@ class material_type float specific_heat_liquid() const; float specific_heat_solid() const; float latent_heat() const; - int freeze_point() const; + float freeze_point() const; int density() const; bool edible() const; bool rotting() const;