From 291331e17b9e766b5f53d053d1f4e3ad1569d515 Mon Sep 17 00:00:00 2001 From: ymber Date: Wed, 18 Mar 2020 09:00:43 +0000 Subject: [PATCH] Remove quantum solarpanels --- data/json/construction.json | 3 +- data/json/itemgroups/main.json | 2 - data/json/items/migration.json | 15 ++++++ data/json/items/obsolete.json | 53 +++++++++++++++++++ data/json/items/tool_armor.json | 42 --------------- data/json/items/vehicle/solar.json | 11 ---- .../recipe_modular_field_common.json | 3 +- .../recipe_modular_firestation1.json | 3 +- .../recipe_modular_shelter_common.json | 3 +- .../recipe_modular_shelter_1_common.json | 3 +- .../basecamps/recipe_primitive_field.json | 3 +- data/json/recipes/recipe_deconstruction.json | 44 --------------- data/json/recipes/recipe_electronics.json | 24 --------- data/json/recipes/recipe_obsolete.json | 10 ++++ data/json/vehicleparts/obsolete.json | 24 +++++++++ data/json/vehicleparts/vehicle_parts.json | 22 -------- src/mapgen.cpp | 6 +-- 17 files changed, 111 insertions(+), 160 deletions(-) create mode 100644 data/json/vehicleparts/obsolete.json diff --git a/data/json/construction.json b/data/json/construction.json index 818823f005abb..1b37b37e3da7c 100644 --- a/data/json/construction.json +++ b/data/json/construction.json @@ -3528,8 +3528,7 @@ [ "solar_panel", 4 ], [ "reinforced_solar_panel", 4 ], [ "solar_panel_v2", 2 ], - [ "reinforced_solar_panel_v2", 2 ], - [ "solar_panel_v3", 1 ] + [ "reinforced_solar_panel_v2", 2 ] ], [ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ], [ [ "sheet_metal", 2 ], [ "wire", 8 ] ], diff --git a/data/json/itemgroups/main.json b/data/json/itemgroups/main.json index 57a4003fc297d..2bdfd2580ee64 100644 --- a/data/json/itemgroups/main.json +++ b/data/json/itemgroups/main.json @@ -92,8 +92,6 @@ { "item": "bot_laserturret", "prob": 10 }, { "item": "alloy_plate", "prob": 10 }, { "item": "plasma_gun", "prob": 10 }, - { "item": "solar_panel_v3", "prob": 10 }, - { "item": "q_solarpack", "prob": 10 }, { "item": "can_sealer", "prob": 10 }, { "item": "hk_g80", "prob": 10 }, { "item": "hk_g80mag", "prob": 10 }, diff --git a/data/json/items/migration.json b/data/json/items/migration.json index 23dacf6f67db4..822f09fccdcdb 100644 --- a/data/json/items/migration.json +++ b/data/json/items/migration.json @@ -1149,6 +1149,21 @@ "type": "MIGRATION", "replace": "m1911mag" }, + { + "id": "solar_panel_v3", + "type": "MIGRATION", + "replace": "solar_panel_v2" + }, + { + "id": "q_solarpack", + "type": "MIGRATION", + "replace": "solarpack" + }, + { + "id": "q_solarpack_on", + "type": "MIGRATION", + "replace": "solarpack_on" + }, { "id": "bio_solar", "type": "MIGRATION", diff --git a/data/json/items/obsolete.json b/data/json/items/obsolete.json index 621d4b499a9da..7a93c97ede751 100644 --- a/data/json/items/obsolete.json +++ b/data/json/items/obsolete.json @@ -1896,5 +1896,58 @@ "price": 450000, "weight": "100 g", "difficulty": 8 + }, + { + "type": "GENERIC", + "id": "solar_panel_v3", + "name": "quantum solar panel", + "description": "This solar panel is obviously cutting-edge technology and given where you found it, should probably provide a LOT of power. It's covered in strange-looking material, but the covering looks rather fragile; it doesn't look like it could support a reinforcing sheet, either.", + "to_hit": -5, + "material": [ "glass", "steel" ], + "volume": "4500 ml", + "price": 900000, + "copy-from": "solar_panel" + }, + { + "id": "q_solarpack", + "type": "TOOL_ARMOR", + "name": { "str": "quantum solar backpack (folded)", "str_pl": "quantum solar backpacks (folded)" }, + "description": "Personal portable charging system consisting of an array of quantum solar panels neatly folded in a form of a large backpack. It can be worn as one, and has an integrated cable to plug it into a cable charger system. Cutting edge technology.", + "weight": "7500 g", + "volume": "5 L", + "price": 1500000, + "bashing": 10, + "to_hit": -1, + "material": [ "glass", "steel" ], + "symbol": "[", + "color": "light_gray", + "covers": [ "TORSO" ], + "coverage": 40, + "encumbrance": 12, + "material_thickness": 3, + "use_action": "SOLARPACK", + "flags": [ "FRAGILE", "OUTER", "ONLY_ONE", "SOLARPACK" ] + }, + { + "id": "q_solarpack_on", + "type": "TOOL_ARMOR", + "repairs_like": "q_solarpack", + "name": { "str": "quantum solar backpack (unfolded)", "str_pl": "quantum solar backpacks (unfolded)" }, + "description": "Unfolded array of portable quantum solar panels ready to push some power into an active cable charger system.", + "weight": "7500 g", + "volume": "15 L", + "price": 1500000, + "bashing": 4, + "to_hit": -2, + "material": [ "glass", "steel" ], + "symbol": "[", + "color": "blue", + "covers": [ "TORSO" ], + "coverage": 40, + "encumbrance": 20, + "material_thickness": 1, + "use_action": "SOLARPACK_OFF", + "solar_efficiency": 0.3, + "flags": [ "FRAGILE", "OUTER", "ONLY_ONE", "SOLARPACK_ON" ] } ] diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index eb348af959331..61100e06cb557 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -2727,48 +2727,6 @@ "solar_efficiency": 0.05, "flags": [ "FRAGILE", "OUTER", "ONLY_ONE", "SOLARPACK_ON" ] }, - { - "id": "q_solarpack", - "type": "TOOL_ARMOR", - "name": { "str": "quantum solar backpack (folded)", "str_pl": "quantum solar backpacks (folded)" }, - "description": "Personal portable charging system consisting of an array of quantum solar panels neatly folded in a form of a large backpack. It can be worn as one, and has an integrated cable to plug it into a cable charger system. Cutting edge technology.", - "weight": "7500 g", - "volume": "5 L", - "price": 1500000, - "bashing": 10, - "to_hit": -1, - "material": [ "glass", "steel" ], - "symbol": "[", - "color": "light_gray", - "covers": [ "TORSO" ], - "coverage": 40, - "encumbrance": 12, - "material_thickness": 3, - "use_action": "SOLARPACK", - "flags": [ "FRAGILE", "OUTER", "ONLY_ONE", "SOLARPACK" ] - }, - { - "id": "q_solarpack_on", - "type": "TOOL_ARMOR", - "repairs_like": "q_solarpack", - "name": { "str": "quantum solar backpack (unfolded)", "str_pl": "quantum solar backpacks (unfolded)" }, - "description": "Unfolded array of portable quantum solar panels ready to push some power into an active cable charger system.", - "weight": "7500 g", - "volume": "15 L", - "price": 1500000, - "bashing": 4, - "to_hit": -2, - "material": [ "glass", "steel" ], - "symbol": "[", - "color": "blue", - "covers": [ "TORSO" ], - "coverage": 40, - "encumbrance": 20, - "material_thickness": 1, - "use_action": "SOLARPACK_OFF", - "solar_efficiency": 0.3, - "flags": [ "FRAGILE", "OUTER", "ONLY_ONE", "SOLARPACK_ON" ] - }, { "id": "helmet_riot", "repairs_like": "helmet_barbute", diff --git a/data/json/items/vehicle/solar.json b/data/json/items/vehicle/solar.json index 8ef702447d067..fcd64f81f3dba 100644 --- a/data/json/items/vehicle/solar.json +++ b/data/json/items/vehicle/solar.json @@ -48,17 +48,6 @@ "price": 240000, "copy-from": "reinforced_solar_panel" }, - { - "type": "GENERIC", - "id": "solar_panel_v3", - "name": { "str": "quantum solar panel" }, - "description": "This solar panel is obviously cutting-edge technology and given where you found it, should probably provide a LOT of power. It's covered in strange-looking material, but the covering looks rather fragile; it doesn't look like it could support a reinforcing sheet, either.", - "to_hit": -5, - "material": [ "glass", "steel" ], - "volume": "4500 ml", - "price": 900000, - "copy-from": "solar_panel" - }, { "type": "GENERIC", "id": "solar_cell", diff --git a/data/json/recipes/basecamps/recipe_modular_field_common.json b/data/json/recipes/basecamps/recipe_modular_field_common.json index 0019523f722f4..e0169f49b7516 100644 --- a/data/json/recipes/basecamps/recipe_modular_field_common.json +++ b/data/json/recipes/basecamps/recipe_modular_field_common.json @@ -899,8 +899,7 @@ [ "solar_panel", 4 ], [ "reinforced_solar_panel", 4 ], [ "solar_panel_v2", 2 ], - [ "reinforced_solar_panel_v2", 2 ], - [ "solar_panel_v3", 1 ] + [ "reinforced_solar_panel_v2", 2 ] ], [ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ], [ [ "sheet_metal", 2 ], [ "wire", 8 ] ], diff --git a/data/json/recipes/basecamps/recipe_modular_firestation1.json b/data/json/recipes/basecamps/recipe_modular_firestation1.json index 5157849c4f773..70268ff9421be 100644 --- a/data/json/recipes/basecamps/recipe_modular_firestation1.json +++ b/data/json/recipes/basecamps/recipe_modular_firestation1.json @@ -88,8 +88,7 @@ [ "solar_panel", 4 ], [ "reinforced_solar_panel", 4 ], [ "solar_panel_v2", 2 ], - [ "reinforced_solar_panel_v2", 2 ], - [ "solar_panel_v3", 1 ] + [ "reinforced_solar_panel_v2", 2 ] ], [ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ], [ [ "sheet_metal", 2 ], [ "wire", 8 ] ], diff --git a/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json b/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json index 84602176736e0..3fb71758e35f8 100644 --- a/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json +++ b/data/json/recipes/basecamps/recipe_modular_shelter/recipe_modular_shelter_common.json @@ -704,8 +704,7 @@ [ "solar_panel", 4 ], [ "reinforced_solar_panel", 4 ], [ "solar_panel_v2", 2 ], - [ "reinforced_solar_panel_v2", 2 ], - [ "solar_panel_v3", 1 ] + [ "reinforced_solar_panel_v2", 2 ] ], [ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ], [ [ "sheet_metal", 2 ], [ "wire", 8 ] ], diff --git a/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json b/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json index 08f3eaf1dc08d..cf7910c062efa 100644 --- a/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json +++ b/data/json/recipes/basecamps/recipe_modular_shelter_1/recipe_modular_shelter_1_common.json @@ -902,8 +902,7 @@ [ "solar_panel", 4 ], [ "reinforced_solar_panel", 4 ], [ "solar_panel_v2", 2 ], - [ "reinforced_solar_panel_v2", 2 ], - [ "solar_panel_v3", 1 ] + [ "reinforced_solar_panel_v2", 2 ] ], [ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ], [ [ "sheet_metal", 2 ], [ "wire", 8 ] ], diff --git a/data/json/recipes/basecamps/recipe_primitive_field.json b/data/json/recipes/basecamps/recipe_primitive_field.json index 863fbb8589630..b3648644563b6 100644 --- a/data/json/recipes/basecamps/recipe_primitive_field.json +++ b/data/json/recipes/basecamps/recipe_primitive_field.json @@ -435,8 +435,7 @@ [ "solar_panel", 4 ], [ "reinforced_solar_panel", 4 ], [ "solar_panel_v2", 2 ], - [ "reinforced_solar_panel_v2", 2 ], - [ "solar_panel_v3", 1 ] + [ "reinforced_solar_panel_v2", 2 ] ], [ [ "storage_battery", 1 ], [ "medium_storage_battery", 4 ], [ "small_storage_battery", 32 ] ], [ [ "sheet_metal", 2 ], [ "wire", 8 ] ], diff --git a/data/json/recipes/recipe_deconstruction.json b/data/json/recipes/recipe_deconstruction.json index ac9acfadaf6b0..830b574db0ff5 100644 --- a/data/json/recipes/recipe_deconstruction.json +++ b/data/json/recipes/recipe_deconstruction.json @@ -3306,50 +3306,6 @@ [ [ "rope_6", 1 ] ] ] }, - { - "//": "TODO: use copy-from inheritance for solarpack uncrafts -- it is currently not working properly #24702", - "result": "q_solarpack", - "type": "uncraft", - "skill_used": "electronics", - "difficulty": 10, - "skills_required": [ [ "fabrication", 2 ], [ "mechanics", 2 ] ], - "time": "50 m", - "using": [ [ "soldering_standard", 35 ], [ "welding_standard", 20 ] ], - "qualities": [ { "id": "SCREW", "level": 1 }, { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 2 } ], - "components": [ - [ [ "power_supply", 2 ] ], - [ [ "amplifier", 2 ] ], - [ [ "solar_panel_v3", 1 ] ], - [ [ "cable", 20 ] ], - [ [ "sheet_metal", 1 ] ], - [ [ "sheet_metal_small", 4 ] ], - [ [ "steel_chunk", 4 ] ], - [ [ "scrap", 8 ] ], - [ [ "rope_6", 1 ] ] - ] - }, - { - "//": "TODO: use copy-from inheritance for solarpack uncrafts -- it is currently not working properly #24702", - "result": "q_solarpack_on", - "type": "uncraft", - "skill_used": "electronics", - "difficulty": 10, - "skills_required": [ [ "fabrication", 2 ], [ "mechanics", 2 ] ], - "time": "50 m", - "using": [ [ "soldering_standard", 35 ], [ "welding_standard", 20 ] ], - "qualities": [ { "id": "SCREW", "level": 1 }, { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 2 } ], - "components": [ - [ [ "power_supply", 2 ] ], - [ [ "amplifier", 2 ] ], - [ [ "solar_panel_v3", 1 ] ], - [ [ "cable", 20 ] ], - [ [ "sheet_metal", 1 ] ], - [ [ "sheet_metal_small", 4 ] ], - [ [ "steel_chunk", 4 ] ], - [ [ "scrap", 8 ] ], - [ [ "rope_6", 1 ] ] - ] - }, { "result": "bundle_rag", "type": "uncraft", diff --git a/data/json/recipes/recipe_electronics.json b/data/json/recipes/recipe_electronics.json index f229142ffaa76..b53782d13a363 100644 --- a/data/json/recipes/recipe_electronics.json +++ b/data/json/recipes/recipe_electronics.json @@ -727,30 +727,6 @@ [ [ "rope_natural_short", 1, "LIST" ] ] ] }, - { - "type": "recipe", - "result": "q_solarpack", - "category": "CC_ELECTRONIC", - "subcategory": "CSC_ELECTRONIC_OTHER", - "skill_used": "electronics", - "skills_required": [ [ "fabrication", 2 ], [ "mechanics", 2 ] ], - "difficulty": 10, - "time": "50 m", - "decomp_learn": 5, - "autolearn": true, - "book_learn": [ [ "recipe_augs", 7 ], [ "recipe_lab_elec", 7 ], [ "advanced_electronics", 8 ] ], - "using": [ [ "soldering_standard", 35 ], [ "welding_standard", 20 ] ], - "qualities": [ { "id": "SCREW", "level": 1 }, { "id": "HAMMER", "level": 2 }, { "id": "SAW_M", "level": 2 } ], - "byproducts": [ [ "sheet_metal_small", 8 ], [ "scrap", 8 ] ], - "components": [ - [ [ "power_supply", 2 ] ], - [ [ "amplifier", 2 ] ], - [ [ "cable", 20 ] ], - [ [ "solar_panel_v3", 1 ] ], - [ [ "sheet_metal", 2 ] ], - [ [ "rope_natural_short", 1, "LIST" ] ] - ] - }, { "type": "recipe", "result": "solar_panel", diff --git a/data/json/recipes/recipe_obsolete.json b/data/json/recipes/recipe_obsolete.json index 81056646f8b80..0d9c0a8a2eca1 100644 --- a/data/json/recipes/recipe_obsolete.json +++ b/data/json/recipes/recipe_obsolete.json @@ -2368,5 +2368,15 @@ "type": "recipe", "result": "reflexrecurvebow", "obsolete": true + }, + { + "type": "recipe", + "result": "q_solarpack", + "obsolete": true + }, + { + "type": "recipe", + "result": "q_solarpack_on", + "obsolete": true } ] diff --git a/data/json/vehicleparts/obsolete.json b/data/json/vehicleparts/obsolete.json new file mode 100644 index 0000000000000..4fc42019ad588 --- /dev/null +++ b/data/json/vehicleparts/obsolete.json @@ -0,0 +1,24 @@ +[ + { + "type": "vehicle_part", + "id": "solar_panel_v3", + "copy-from": "solar_panel", + "name": "quantum solar panel", + "looks_like": "solar_panel_v2", + "proportional": { "epower": 6.0 }, + "item": "solar_panel_v3", + "durability": 40, + "description": "An extremely high performance solar panel. Will recharge the vehicle's electrical power when exposed to the sun. Clouds will slow the recharge speed. Extremely fragile and cannot be armored.", + "requirements": { + "install": { "skills": [ [ "mechanics", 8 ] ], "time": "60 m", "using": [ [ "vehicle_bolt", 1 ] ] }, + "removal": { "skills": [ [ "mechanics", 6 ] ], "time": "30 m", "using": [ [ "vehicle_bolt", 1 ] ] } + }, + "extend": { "flags": [ "NO_REPAIR" ] }, + "breaks_into": [ + { "item": "steel_lump", "count": [ 4, 4 ] }, + { "item": "steel_chunk", "count": [ 4, 4 ] }, + { "item": "scrap", "count": [ 4, 4 ] }, + { "item": "solar_cell", "count": [ 2, 8 ] } + ] + } +] diff --git a/data/json/vehicleparts/vehicle_parts.json b/data/json/vehicleparts/vehicle_parts.json index 7d63e4fa74f68..86796d457e5fe 100644 --- a/data/json/vehicleparts/vehicle_parts.json +++ b/data/json/vehicleparts/vehicle_parts.json @@ -2136,28 +2136,6 @@ ], "damage_reduction": { "all": 10 } }, - { - "type": "vehicle_part", - "id": "solar_panel_v3", - "copy-from": "solar_panel", - "name": { "str": "quantum solar panel" }, - "looks_like": "solar_panel_v2", - "proportional": { "epower": 6.0 }, - "item": "solar_panel_v3", - "durability": 40, - "description": "An extremely high performance solar panel. Will recharge the vehicle's electrical power when exposed to the sun. Clouds will slow the recharge speed. Extremely fragile and cannot be armored.", - "requirements": { - "install": { "skills": [ [ "mechanics", 8 ] ], "time": "60 m", "using": [ [ "vehicle_bolt", 1 ] ] }, - "removal": { "skills": [ [ "mechanics", 6 ] ], "time": "30 m", "using": [ [ "vehicle_bolt", 1 ] ] } - }, - "extend": { "flags": [ "NO_REPAIR" ] }, - "breaks_into": [ - { "item": "steel_lump", "count": [ 4, 4 ] }, - { "item": "steel_chunk", "count": [ 4, 4 ] }, - { "item": "scrap", "count": [ 4, 4 ] }, - { "item": "solar_cell", "count": [ 2, 8 ] } - ] - }, { "type": "vehicle_part", "id": "water_faucet", diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 5d15596c5921a..30f6ba0bc275a 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -4258,14 +4258,14 @@ void map::draw_lab( mapgendata &dat ) spawn_item( point( SEEX, SEEY ), "plasma_gun" ); spawn_item( point( SEEX, SEEY ), "plasma" ); spawn_item( point( SEEX - 1, SEEY ), "recipe_atomic_battery" ); - spawn_item( point( SEEX, SEEY - 1 ), "solar_panel_v3" ); + spawn_item( point( SEEX + 1, SEEY ), "plut_cell", rng( 8, 20 ) ); } else if( loot_variant < 89 ) { spawn_item( point( SEEX - 1, SEEY - 1 ), "mininuke", dice( 3, 6 ) ); spawn_item( point( SEEX, SEEY - 1 ), "mininuke", dice( 3, 6 ) ); spawn_item( point( SEEX - 1, SEEY ), "mininuke", dice( 3, 6 ) ); spawn_item( point( SEEX, SEEY ), "mininuke", dice( 3, 6 ) ); spawn_item( point( SEEX, SEEY ), "recipe_atomic_battery" ); - spawn_item( point( SEEX, SEEY ), "solar_panel_v3" ); + spawn_item( point( SEEX + 1, SEEY ), "plut_cell", rng( 8, 20 ) ); } else { // loot_variant between 90 and 96. spawn_item( point( SEEX - 1, SEEY - 1 ), "rm13_armor" ); spawn_item( point( SEEX, SEEY - 1 ), "plut_cell" ); @@ -4296,7 +4296,7 @@ void map::draw_lab( mapgendata &dat ) point( SEEX + 1, SEEY - 1 ), false, calendar::start_of_cataclysm ); place_items( "guns_rare", 96, point( SEEX - 2, SEEY ), point( SEEX + 1, SEEY ), false, calendar::start_of_cataclysm ); - spawn_item( point( SEEX + 1, SEEY ), "solar_panel_v3" ); + spawn_item( point( SEEX + 1, SEEY ), "plut_cell", rng( 1, 10 ) ); } break; // Netherworld access