diff --git a/data/json/furniture_and_terrain/furniture-appliances.json b/data/json/furniture_and_terrain/furniture-appliances.json index 38ccc43c89cb..be8b8c8ade66 100644 --- a/data/json/furniture_and_terrain/furniture-appliances.json +++ b/data/json/furniture_and_terrain/furniture-appliances.json @@ -864,6 +864,7 @@ "coverage": 10, "required_str": -1, "crafting_pseudo_item": "fake_gridforge", + "examine_action": "use_furn_fake_item", "flags": [ "TRANSPARENT", "MOUNTABLE", "EASY_DECONSTRUCT" ], "deconstruct": { "items": [ { "item": "forge", "count": 1 }, { "item": "cable", "charges": 5 }, { "item": "power_supply", "count": 1 } ] diff --git a/data/json/items/fake.json b/data/json/items/fake.json index 4029000b69ed..052b835bda83 100644 --- a/data/json/items/fake.json +++ b/data/json/items/fake.json @@ -240,6 +240,32 @@ "name": { "str": "grid forge" }, "sub": "forge", "max_charges": 2500, + "charges_per_use": 4, + "use_action": [ + { + "type": "repair_item", + "item_action_type": "repair_metal", + "materials": [ + "iron", + "steel", + "hardsteel", + "aluminum", + "copper", + "bronze", + "silver", + "gold", + "platinum", + "superalloy", + "lead", + "tin", + "zinc" + ], + "skill": "fabrication", + "tool_quality": 8, + "cost_scaling": 0.1, + "move_cost": 500 + } + ], "flags": [ "USES_GRID_POWER" ] }, { diff --git a/data/json/items/tool/metalworking.json b/data/json/items/tool/metalworking.json index 4904e27d48ff..43d9d31ae80d 100644 --- a/data/json/items/tool/metalworking.json +++ b/data/json/items/tool/metalworking.json @@ -58,7 +58,7 @@ "type": "TOOL", "category": "tools", "name": { "str": "charcoal forge" }, - "description": "This is a portable, charcoal fired, metalworking forge. If combined with the right tools, you could use this for metalworking.", + "description": "This is a portable, charcoal fired, metalworking forge. If combined with the right tools, you could use this for metalworking, or it could be used to repair metal items.", "weight": "8600 g", "volume": "8 L", "price": 20000, @@ -71,6 +71,32 @@ "ammo": "charcoal", "sub": "forge", "max_charges": 500, + "charges_per_use": 8, + "use_action": [ + { + "type": "repair_item", + "item_action_type": "repair_metal", + "materials": [ + "iron", + "steel", + "hardsteel", + "aluminum", + "copper", + "bronze", + "silver", + "gold", + "platinum", + "superalloy", + "lead", + "tin", + "zinc" + ], + "skill": "fabrication", + "tool_quality": 4, + "cost_scaling": 0.1, + "move_cost": 500 + } + ], "flags": [ "ALLOWS_REMOTE_USE" ] }, { @@ -148,7 +174,7 @@ "type": "TOOL", "category": "tools", "name": { "str": "electric forge" }, - "description": "This is a portable electric metalworking forge, powered by batteries. Combined with the right tools, you could use this for metalworking. With a little mechanical know-how, you could probably even convert it to run directly off a vehicle's power system.", + "description": "This is a portable electric metalworking forge, powered by batteries. Combined with the right tools, you could use this for metalworking, or it could be used to repair metal items. With a little mechanical know-how, you could probably even convert it to run directly off a vehicle's power system.", "weight": "10000 g", "volume": "6 L", "price": 40000, @@ -159,6 +185,32 @@ "symbol": ";", "color": "light_gray", "ammo": "battery", + "charges_per_use": 4, + "use_action": [ + { + "type": "repair_item", + "item_action_type": "repair_metal", + "materials": [ + "iron", + "steel", + "hardsteel", + "aluminum", + "copper", + "bronze", + "silver", + "gold", + "platinum", + "superalloy", + "lead", + "tin", + "zinc" + ], + "skill": "fabrication", + "tool_quality": 8, + "cost_scaling": 0.1, + "move_cost": 500 + } + ], "flags": [ "ALLOWS_REMOTE_USE" ], "magazines": [ [ "battery", [ "heavy_battery_cell", "heavy_plus_battery_cell", "heavy_atomic_battery_cell", "heavy_disposable_cell" ] ] diff --git a/tests/iteminfo_test.cpp b/tests/iteminfo_test.cpp index 70f68c885a3c..c54720213513 100644 --- a/tests/iteminfo_test.cpp +++ b/tests/iteminfo_test.cpp @@ -470,7 +470,7 @@ TEST_CASE( "repairable and with what tools", "[item][iteminfo][repair]" ) test_info_contains( item( "test_halligan" ), q, - "Repair using grid welder, extended toolset, arc welder, or makeshift arc welder.\n" ); + "Repair using charcoal forge, grid forge, grid welder, electric forge, extended toolset, arc welder, or makeshift arc welder.\n" ); test_info_contains( item( "test_hazmat_suit" ), q,