Skip to content

Commit

Permalink
yet another portable charcoal kiln audit (#78622)
Browse files Browse the repository at this point in the history
* make char_kiln item deployable

* add missing space

* make portablwe own item, add to cpp

* fix furn size

* fix wording and wrong kiln size

* spacing and comment

* astyle

---------

Co-authored-by: marilynias <[email protected]>
  • Loading branch information
marilynias and marilynias authored Jan 6, 2025
1 parent 8ed51ba commit fd6b946
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 125 deletions.
11 changes: 11 additions & 0 deletions data/json/construction/furniture_tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,17 @@
"pre_special": "check_empty",
"post_terrain": "f_kiln_metal_empty"
},
{
"type": "construction",
"id": "constr_kiln_portable_empty",
"group": "place_char_kiln",
"category": "FURN",
"required_skills": [ [ "fabrication", 0 ] ],
"time": "1 m",
"components": [ [ [ "char_kiln", 1 ] ] ],
"pre_special": "check_empty",
"post_terrain": "f_kiln_portable_empty"
},
{
"type": "construction",
"id": "constr_place_screw_press",
Expand Down
5 changes: 5 additions & 0 deletions data/json/construction_group.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@
"id": "build_metal_charcoal_kiln",
"name": "Build Metal Charcoal Kiln"
},
{
"type": "construction_group",
"id": "place_char_kiln",
"name": "Place Metal Charcoal Kiln"
},
{
"type": "construction_group",
"id": "build_metal_door",
Expand Down
57 changes: 56 additions & 1 deletion data/json/furniture_and_terrain/furniture-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,61 @@
"items": [ { "item": "rock", "count": [ 15, 30 ] } ]
}
},
{
"type": "furniture",
"id": "f_kiln_portable_empty",
"name": "metal charcoal kiln",
"looks_like": "f_kiln_empty",
"description": "A metal kiln designed to burn wood and organic material into charcoal in the absence of oxygen. Much more efficient than its archaic rock counterpart.",
"//": "Based on page 6 of https://github.com/user-attachments/files/18196633/UsingimprovedkilnstoproducecharcoalinKenya-Apracticalguide.pdf",
"symbol": "U",
"color": "blue",
"move_cost_mod": -1,
"coverage": 40,
"required_str": -1,
"examine_action": "kiln_empty",
"max_volume": "200 L",
"crafting_pseudo_item": "fake_char_kiln",
"flags": [ "CONTAINER", "FIRE_CONTAINER", "PLACE_ITEM" ],
"deconstruct": { "items": [ { "item": "char_kiln", "count": 1 } ] },
"bash": {
"str_min": 12,
"str_max": 40,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "steel_lump", "count": [ 2, 12 ] },
{ "item": "steel_chunk", "count": [ 4, 15 ] },
{ "item": "pipe", "count": [ 0, 1 ] }
]
}
},
{
"type": "furniture",
"id": "f_kiln_portable_full",
"name": "filled metal charcoal kiln",
"looks_like": "f_kiln_metal_empty",
"description": "A metal kiln designed to burn wood and organic material into charcoal in the absence of oxygen. Much more efficient than its archaic rock counterpart.",
"symbol": "U",
"color": "blue_red",
"move_cost_mod": -1,
"coverage": 40,
"required_str": -1,
"examine_action": "kiln_full",
"deconstruct": { "items": [ { "item": "char_kiln", "count": 1 } ] },
"flags": [ "NOITEM", "SEALED", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM" ],
"bash": {
"str_min": 12,
"str_max": 40,
"sound": "metal screeching!",
"sound_fail": "clang!",
"items": [
{ "item": "steel_lump", "count": [ 2, 12 ] },
{ "item": "steel_chunk", "count": [ 4, 15 ] },
{ "item": "pipe", "count": [ 0, 1 ] }
]
}
},
{
"type": "furniture",
"id": "f_kiln_metal_empty",
Expand Down Expand Up @@ -427,8 +482,8 @@
"coverage": 40,
"required_str": -1,
"examine_action": "kiln_full",
"flags": [ "NOITEM", "SEALED", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM" ],
"deconstruct": { "items": [ { "item": "metal_tank", "count": [ 1, 4 ] }, { "item": "pipe", "count": [ 2, 4 ] } ] },
"flags": [ "NOITEM", "SEALED", "CONTAINER", "FIRE_CONTAINER", "SUPPRESS_SMOKE", "PLACE_ITEM" ],
"bash": {
"str_min": 12,
"str_max": 40,
Expand Down
73 changes: 7 additions & 66 deletions data/json/items/tool/metalworking.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,17 +123,18 @@
"id": "char_kiln",
"type": "GENERIC",
"category": "tools",
"name": { "str": "charcoal kiln" },
"description": "A stout metal box used for producing charcoal via pyrolysis: the incomplete burning of organic materials in the absence of oxygen.",
"weight": "16770 g",
"volume": "65 L",
"name": { "str": "portable charcoal kiln" },
"description": "A somewhat portable drum kiln to produce charcoal via pyrolysis: the incomplete burning of organic materials in the absence of oxygen. Needs to be deployed before use.",
"//": "Based on page 6 of https://github.com/user-attachments/files/18196633/UsingimprovedkilnstoproducecharcoalinKenya-Apracticalguide.pdf",
"weight": "21 kg",
"volume": "201 L",
"price": "160 USD",
"price_postapoc": "10 USD",
"material": [ "steel" ],
"pocket_data": [ { "pocket_type": "CONTAINER", "rigid": true, "max_contains_volume": "200 L", "max_contains_weight": "500 kg" } ],
"symbol": ";",
"color": "dark_gray",
"use_action": [ "HEAT_LIQUID_ITEMS" ],
"qualities": [ [ "BOIL", 2 ], [ "CONTAIN", 1 ] ]
"use_action": { "type": "deploy_furn", "furn_type": "f_kiln_portable_empty" }
},
{
"id": "chisel",
Expand Down Expand Up @@ -232,66 +233,6 @@
"use_action": { "type": "link_up", "cable_length": 2, "charge_rate": "1400 W" },
"melee_damage": { "bash": 8 }
},
{
"id": "kiln_done",
"type": "TOOL",
"category": "tools",
"name": { "str": "finished charcoal kiln" },
"description": "A charcoal kiln that has finished burning. Disassemble it to get the charcoal.",
"weight": "27170 g",
"volume": "65 L",
"price": "1 USD",
"price_postapoc": "5 USD",
"material": [ "steel" ],
"symbol": ";",
"color": "brown"
},
{
"id": "kiln_full",
"type": "TOOL",
"category": "tools",
"name": { "str": "filled charcoal kiln" },
"description": "A kiln filled with wood which will become charcoal after a slow period of burning.",
"weight": "45142 g",
"volume": "65 L",
"price": "1 USD",
"price_postapoc": "5 USD",
"material": [ "steel", "wood" ],
"symbol": ";",
"color": "brown",
"use_action": {
"target": "kiln_lit",
"msg": "You light the wood.",
"need_fire": 1,
"need_fire_msg": "You need something to light it with!",
"menu_text": "Light wood",
"type": "transform"
},
"flags": [ "ALLOWS_REMOTE_USE" ]
},
{
"id": "kiln_lit",
"type": "GENERIC",
"category": "tools",
"name": { "str": "lit charcoal kiln" },
"description": "A kiln full of wood that has been lit; better drop it!",
"weight": "15142 g",
"volume": "10 L",
"price": "1 USD",
"price_postapoc": "5 USD",
"material": [ "steel", "wood" ],
"symbol": ";",
"color": "brown",
"use_action": {
"target": "kiln_done",
"msg": "The kiln's embers have died out; you can now disassemble it to get the charcoal.",
"moves": 0,
"type": "delayed_transform",
"transform_age": 21600,
"not_ready_msg": "The kiln is still burning."
},
"flags": [ "TRADER_AVOID", "ALLOWS_REMOTE_USE" ]
},
{
"id": "link_sheet",
"type": "TOOL",
Expand Down
15 changes: 15 additions & 0 deletions data/json/obsoletion_and_migration_0.I/migration_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -2219,5 +2219,20 @@
"id": "460_casing",
"type": "MIGRATION",
"replace": "45_casing"
},
{
"id": "kiln_full",
"type": "MIGRATION",
"replace": "char_kiln"
},
{
"id": "kiln_lit",
"type": "MIGRATION",
"replace": "char_kiln"
},
{
"id": "kiln_done",
"type": "MIGRATION",
"replace": "char_kiln"
}
]
48 changes: 2 additions & 46 deletions data/json/recipes/recipe_others.json
Original file line number Diff line number Diff line change
Expand Up @@ -1580,53 +1580,9 @@
"time": "1 h 30 m",
"autolearn": true,
"book_learn": [ [ "textbook_fabrication", 2 ], [ "manual_fabrication", 2 ] ],
"qualities": [
{ "id": "HAMMER", "level": 3 },
{ "id": "SAW_M", "level": 1 },
{ "id": "SCREW", "level": 1 },
{ "id": "WRENCH", "level": 1 }
],
"tools": [
[
[ "welder", 150 ],
[ "welding_kit", 150 ],
[ "welder_crude", 225 ],
[ "integrated_welder", 225 ],
[ "soldering_iron", 225 ],
[ "soldering_iron_portable", 225 ],
[ "integrated_electrokit", 225 ],
[ "oxy_torch", 30 ]
]
],
"qualities": [ { "id": "HAMMER", "level": 3 }, [ { "id": "SAW_M", "level": 1 }, { "id": "CUT", "level": 1 } ] ],
"proficiencies": [ { "proficiency": "prof_metalworking" } ],
"components": [
[ [ "steel_lump", 5 ], [ "steel_chunk", 20 ], [ "scrap", 60 ] ],
[ [ "metal_tank", 1 ] ],
[ [ "pipe", 6 ] ],
[ [ "pipe_fittings", 4 ] ]
]
},
{
"type": "recipe",
"activity_level": "MODERATE_EXERCISE",
"result": "kiln_full",
"category": "CC_OTHER",
"subcategory": "CSC_OTHER_MATERIALS",
"skill_used": "fabrication",
"difficulty": 1,
"time": "1 m",
"autolearn": true,
"components": [
[
[ "splinter", 200 ],
[ "2x4", 12 ],
[ "stick", 20 ],
[ "bone_any", 156, "LIST" ],
[ "skewer_bone", 2000 ],
[ "log", 1 ]
],
[ [ "char_kiln", 1 ] ]
]
"components": [ [ [ "55gal_drum", 1 ] ], [ [ "pipe", 2 ] ] ]
},
{
"type": "recipe",
Expand Down
9 changes: 0 additions & 9 deletions data/json/uncraft/recipe_deconstruction.json
Original file line number Diff line number Diff line change
Expand Up @@ -3074,15 +3074,6 @@
"qualities": [ { "id": "SAW_M", "level": 2 } ],
"components": [ [ [ "sheet_metal_small", 2 ] ] ]
},
{
"result": "kiln_done",
"type": "uncraft",
"activity_level": "LIGHT_EXERCISE",
"skill_used": "fabrication",
"difficulty": 1,
"time": "3 m",
"components": [ [ [ "charcoal", 5000 ] ], [ [ "char_kiln", 1 ] ] ]
},
{
"type": "uncraft",
"activity_level": "MODERATE_EXERCISE",
Expand Down
14 changes: 11 additions & 3 deletions src/iexamine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ static const furn_str_id furn_f_kiln_empty( "f_kiln_empty" );
static const furn_str_id furn_f_kiln_full( "f_kiln_full" );
static const furn_str_id furn_f_kiln_metal_empty( "f_kiln_metal_empty" );
static const furn_str_id furn_f_kiln_metal_full( "f_kiln_metal_full" );
static const furn_str_id furn_f_kiln_portable_empty( "f_kiln_portable_empty" );
static const furn_str_id furn_f_kiln_portable_full( "f_kiln_portable_full" );
static const furn_str_id furn_f_metal_smoking_rack( "f_metal_smoking_rack" );
static const furn_str_id furn_f_metal_smoking_rack_active( "f_metal_smoking_rack_active" );
static const furn_str_id furn_f_safe_o( "f_safe_o" );
Expand Down Expand Up @@ -2946,6 +2948,8 @@ void iexamine::kiln_empty( Character &you, const tripoint_bub_ms &examp )
next_kiln_type = furn_f_kiln_full;
} else if( cur_kiln_type == furn_f_kiln_metal_empty ) {
next_kiln_type = furn_f_kiln_metal_full;
} else if( cur_kiln_type == furn_f_kiln_portable_empty ) {
next_kiln_type = furn_f_kiln_portable_full;
} else {
debugmsg( "Examined furniture has action kiln_empty, but is of type %s",
cur_kiln_type.id().c_str() );
Expand Down Expand Up @@ -2986,6 +2990,8 @@ void iexamine::kiln_empty( Character &you, const tripoint_bub_ms &examp )
// if the current kiln is a metal one, use a more efficient conversion rate otherwise default to assuming it is a rock pit kiln
if( cur_kiln_type == furn_f_kiln_metal_empty ) {
loss = 20 - 2 * skill;
} else if( cur_kiln_type == furn_f_kiln_portable_empty ) {
loss = 25 - 2 * skill;
} else {
loss = 60 - 2 * skill;
}
Expand Down Expand Up @@ -3035,10 +3041,12 @@ void iexamine::kiln_full( Character &, const tripoint_bub_ms &examp )
map &here = get_map();
const furn_id &cur_kiln_type = here.furn( examp );
furn_id next_kiln_type = furn_str_id::NULL_ID();
if( cur_kiln_type == furn_f_kiln_full ) {
next_kiln_type = furn_f_kiln_empty;
} else if( cur_kiln_type == furn_f_kiln_metal_full ) {
if( cur_kiln_type == furn_f_kiln_metal_full ) {
next_kiln_type = furn_f_kiln_metal_empty;
} else if( cur_kiln_type == furn_f_kiln_portable_full ) {
next_kiln_type = furn_f_kiln_portable_empty;
} else if( cur_kiln_type == furn_f_kiln_full ) {
next_kiln_type = furn_f_kiln_empty;
} else {
debugmsg( "Examined furniture has action kiln_full, but is of type %s",
cur_kiln_type.id().c_str() );
Expand Down

0 comments on commit fd6b946

Please sign in to comment.