From 85f957e31d3ef0377dfe7878fcbe5da1b354953a Mon Sep 17 00:00:00 2001
From: KheirFerrum <102964889+KheirFerrum@users.noreply.github.com>
Date: Thu, 10 Nov 2022 04:26:51 +0000
Subject: [PATCH] Fridge Tanks
Add documentation for flags and expansion of crafting_pseudo_items.
---
data/json/construction.json | 35 +++++++++++
data/json/construction_group.json | 5 ++
.../furniture-appliances.json | 62 +++++++++++++++++++
doc/JSON_FLAGS.md | 2 +
doc/JSON_INFO.md | 3 +-
5 files changed, 106 insertions(+), 1 deletion(-)
diff --git a/data/json/construction.json b/data/json/construction.json
index 9bc4033147a4..a479e4da8610 100644
--- a/data/json/construction.json
+++ b/data/json/construction.json
@@ -4224,6 +4224,41 @@
"pre_furniture": "f_fridge_off",
"post_furniture": "f_fridge_on"
},
+ {
+ "type": "construction",
+ "id": "constr_gridfridge_tank",
+ "group": "install_fridge_tank",
+ "category": "FURN",
+ "required_skills": [ ],
+ "time": "10 m",
+ "qualities": [ ],
+ "components": [ [ [ "fridgetank", 1 ] ] ],
+ "pre_note": "Will only work if constructed in/on a building that has an electric grid with a mounted battery.",
+ "pre_special": "check_empty",
+ "post_furniture": "f_fridge_tank"
+ },
+ {
+ "type": "construction",
+ "id": "constr_gridfridge_tank_switch_off",
+ "group": "toggle_refrigerator_freezer",
+ "required_skills": [ ],
+ "category": "FURN",
+ "time": "1 m",
+ "dark_craftable": true,
+ "pre_furniture": "f_fridge_tank_on",
+ "post_furniture": "f_fridge_tank_off"
+ },
+ {
+ "type": "construction",
+ "id": "constr_gridfridge_tank_switch_on",
+ "group": "toggle_refrigerator_freezer",
+ "required_skills": [ ],
+ "category": "FURN",
+ "time": "1 m",
+ "dark_craftable": true,
+ "pre_furniture": "f_fridge_tank_off",
+ "post_furniture": "f_fridge_tank_on"
+ },
{
"type": "construction",
"id": "constr_gridglass_fridge",
diff --git a/data/json/construction_group.json b/data/json/construction_group.json
index e52fa50031fb..e9e504cfa5d4 100644
--- a/data/json/construction_group.json
+++ b/data/json/construction_group.json
@@ -939,6 +939,11 @@
"id": "install_refrigerator",
"name": "Install Refrigerator"
},
+ {
+ "type": "construction_group",
+ "id": "install_fridge_tank",
+ "name": "Install 60L Refridgerated Tank"
+ },
{
"type": "construction_group",
"id": "install_glass_refrigerator",
diff --git a/data/json/furniture_and_terrain/furniture-appliances.json b/data/json/furniture_and_terrain/furniture-appliances.json
index a18a826d5120..d8aafd731bf8 100644
--- a/data/json/furniture_and_terrain/furniture-appliances.json
+++ b/data/json/furniture_and_terrain/furniture-appliances.json
@@ -1216,6 +1216,68 @@
{ "power": 20, "consume_every": "600 s", "transform": { "id": "f_fridge", "msg": "The fridge shuts down." } }
]
},
+ {
+ "type": "furniture",
+ "id": "f_fridge_tank_base",
+ "name": "-",
+ "looks_like": "f_standing_tank",
+ "description": "-",
+ "symbol": "O",
+ "color": "light_gray",
+ "move_cost_mod": -1,
+ "coverage": 90,
+ "required_str": -1,
+ "flags": [ "BASHABLE", "CONTAINER", "DECONSTRUCT", "LIQUIDCONT", "NOITEM", "SEALED", "TRANSPARENT" ],
+ "deconstruct": { "items": [ { "item": "fridgetank", "count": 1 } ] },
+ "examine_action": "keg",
+ "keg_capacity": 1200,
+ "bash": {
+ "str_min": 10,
+ "str_max": 20,
+ "sound": "metal screeching!",
+ "sound_fail": "clang!",
+ "items": [
+ { "item": "steel_lump", "count": [ 8, 13 ] },
+ { "item": "steel_chunk", "count": [ 8, 13 ] },
+ { "item": "scrap", "count": [ 8, 13 ] },
+ { "item": "hose", "prob": 50 },
+ { "item": "motor_tiny", "prob": 25 }
+ ]
+ }
+ },
+ {
+ "type": "furniture",
+ "id": "f_fridge_tank_off",
+ "name": "60L fridge tank (off)",
+ "copy-from": "f_fridge_tank_base",
+ "description": "A 60L refrigerated tank for keeping liquids cool. Provides some insulation from outside weather. It is switched off.",
+ "symbol": "O",
+ "color": "light_gray"
+ },
+ {
+ "type": "furniture",
+ "id": "f_fridge_tank",
+ "name": "60L fridge tank",
+ "copy-from": "f_fridge_tank_base",
+ "description": "A 60L refrigerated tank for keeping liquids cool. Provides some insulation from outside weather. It has no power.",
+ "symbol": "O",
+ "color": "light_gray",
+ "active": [ "charge_watcher", { "min_power": 30, "transform": { "id": "f_fridge_tank_on", "msg": "The refrigerated tank starts up." } } ]
+ },
+ {
+ "type": "furniture",
+ "id": "f_fridge_tank_on",
+ "name": "60L fridge tank (on)",
+ "copy-from": "f_fridge_tank_base",
+ "description": "A 60L refrigerated tank for keeping liquids cool. Provides some insulation from outside weather. It is switched on.",
+ "symbol": "O",
+ "color": "light_gray",
+ "extend": { "flags": [ "FRIDGE" ] },
+ "active": [
+ "steady_consumer",
+ { "power": 20, "consume_every": "600 s", "transform": { "id": "f_fridge_tank", "msg": "The refridgerated tank shuts down." } }
+ ]
+ },
{
"type": "furniture",
"id": "f_freezer_off",
diff --git a/doc/JSON_FLAGS.md b/doc/JSON_FLAGS.md
index 9067af20c1a7..7b5902276e39 100644
--- a/doc/JSON_FLAGS.md
+++ b/doc/JSON_FLAGS.md
@@ -550,6 +550,8 @@ List of known flags, used in both `terrain.json` and `furniture.json`.
- ```FLAT``` Player can build and move furniture on.
- ```FORAGE_HALLU``` This item can be found with the `HIDDEN_HALLU` flag when found through foraging.
- ```FORAGE_POISION``` This item can be found with the `HIDDEN_POISON` flag when found through foraging.
+- ```FRIDGE``` This item refrigerates items inside. Preserving them.
+- ```FREEZER``` This item freezes items inside. Preserving them extremely well.
- ```GOES_DOWN``` Can use > to go down a level.
- ```GOES_UP``` Can use < to go up a level.
- ```GROWTH_SEED``` This plant is in its seed stage of growth.
diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md
index 2cb2665724a1..c437e750d8d2 100644
--- a/doc/JSON_INFO.md
+++ b/doc/JSON_INFO.md
@@ -2706,7 +2706,8 @@ Strength required to move the furniture around. Negative values indicate an unmo
#### `crafting_pseudo_item`
-(Optional) Id of an item (tool) that will be available for crafting when this furniture is range (the furniture acts as an item of that type).
+(Optional) Id of an item (tool) that will be available for crafting when this furniture is range (the furniture acts as an item of that type). Can be made into an array.
+Example: `"crafting_pseudo_item": [ "fake_gridwelder", "fake_gridsolderingiron" ],`
#### `workbench`