From 225056007c45fd63584f538942f56938cd728c10 Mon Sep 17 00:00:00 2001 From: Drew4484 <57647637+Drew4484@users.noreply.github.com> Date: Thu, 3 Mar 2022 22:55:38 -0800 Subject: [PATCH] Replace hard steel with tempered steel (#55648) --- data/json/items/armor/power_armor.json | 12 +++++------ data/json/items/generic.json | 2 +- data/json/items/gun/308.json | 2 +- data/json/items/tool/workshop.json | 4 +--- data/json/items/vehicle/frames.json | 2 +- data/json/items/vehicle/plating.json | 6 +++--- data/json/items/vehicle/wheel.json | 2 +- data/json/materials.json | 21 ------------------- .../items/armor/modular_exos/exo_gear.json | 2 +- .../items/armor/modular_exos/exo_tool.json | 2 +- data/mods/Aftershock/items/weapons.json | 16 +++++++------- data/mods/CRT_EXPANSION/items/crt_armor.json | 2 +- .../CRT_EXPANSION/items/crt_toolarmor.json | 6 +++--- data/mods/CRT_EXPANSION/items/crt_tools.json | 16 +++++++------- data/mods/CRT_EXPANSION/readme/README.md | 2 +- data/mods/TEST_DATA/items.json | 4 ++-- data/mods/innawood/items/tool_workshop.json | 2 +- src/bionics.cpp | 8 +++++-- src/character.cpp | 13 ++++++------ src/monattack.cpp | 19 ++++++++++++----- src/ranged.cpp | 3 +-- tests/iteminfo_test.cpp | 6 +++--- 22 files changed, 70 insertions(+), 82 deletions(-) diff --git a/data/json/items/armor/power_armor.json b/data/json/items/armor/power_armor.json index 9a0c85fdb7964..341ea7c54a1ba 100644 --- a/data/json/items/armor/power_armor.json +++ b/data/json/items/armor/power_armor.json @@ -135,7 +135,7 @@ "price_postapoc": 30000, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "hyperweave_off", "kevlar_rigid" ], + "material": [ "qt_steel", "hyperweave_off", "kevlar_rigid" ], "symbol": "[", "looks_like": "depowered_armor", "color": "light_gray", @@ -290,7 +290,7 @@ "price_postapoc": 40000, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "hyperweave_off", "kevlar_rigid" ], + "material": [ "qt_steel", "hyperweave_off", "kevlar_rigid" ], "symbol": "[", "looks_like": "power_armor_basic", "color": "dark_gray", @@ -413,7 +413,7 @@ "price_postapoc": 7500, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "hyperweave_off", "kevlar_rigid" ], + "material": [ "qt_steel", "hyperweave_off", "kevlar_rigid" ], "symbol": "[", "looks_like": "depowered_helmet", "color": "light_gray", @@ -459,7 +459,7 @@ "price_postapoc": 10000, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "hyperweave_off", "kevlar_rigid" ], + "material": [ "qt_steel", "hyperweave_off", "kevlar_rigid" ], "symbol": "[", "looks_like": "power_armor_helmet_basic", "color": "dark_gray", @@ -505,7 +505,7 @@ "price_postapoc": 10000, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "kevlar", "kevlar_rigid" ], + "material": [ "qt_steel", "kevlar", "kevlar_rigid" ], "symbol": "[", "looks_like": "power_armor_helmet_basic", "color": "dark_gray", @@ -550,7 +550,7 @@ "price_postapoc": 40000, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "kevlar", "kevlar_rigid" ], + "material": [ "qt_steel", "kevlar", "kevlar_rigid" ], "symbol": "[", "looks_like": "depowered_armor", "color": "dark_gray", diff --git a/data/json/items/generic.json b/data/json/items/generic.json index 782d99e93bf44..f977f3c86cc32 100644 --- a/data/json/items/generic.json +++ b/data/json/items/generic.json @@ -3100,7 +3100,7 @@ "description": "An armor plating made of a very thick steel, specifically engineered for use in a bullet resistant vest.", "price": 10000, "price_postapoc": 100, - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "weight": "1500 g", "volume": "500 ml", "bashing": 6 diff --git a/data/json/items/gun/308.json b/data/json/items/gun/308.json index 0c6fbea64934a..6ab5785ce6dd4 100644 --- a/data/json/items/gun/308.json +++ b/data/json/items/gun/308.json @@ -64,7 +64,7 @@ "price_postapoc": 10000, "to_hit": -4, "bashing": 18, - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "symbol": "(", "color": "dark_gray", "ammo": [ "308" ], diff --git a/data/json/items/tool/workshop.json b/data/json/items/tool/workshop.json index 3b05beac54efb..34fc014e4bee8 100644 --- a/data/json/items/tool/workshop.json +++ b/data/json/items/tool/workshop.json @@ -1239,7 +1239,7 @@ "materials": [ "iron", "steel", - "hardsteel", + "qt_steel", "aluminum", "copper", "bronze", @@ -1296,7 +1296,6 @@ "materials": [ "iron", "steel", - "hardsteel", "aluminum", "copper", "bronze", @@ -1350,7 +1349,6 @@ "materials": [ "iron", "steel", - "hardsteel", "aluminum", "copper", "bronze", diff --git a/data/json/items/vehicle/frames.json b/data/json/items/vehicle/frames.json index 6e7b14a88f5e6..f4e32c839d9cc 100644 --- a/data/json/items/vehicle/frames.json +++ b/data/json/items/vehicle/frames.json @@ -47,7 +47,7 @@ "weight": "100000 g", "to_hit": -6, "color": "green", - "material": [ "hardsteel", "steel" ], + "material": [ "qt_steel", "steel" ], "volume": "20 L", "bashing": 25, "price": 12000, diff --git a/data/json/items/vehicle/plating.json b/data/json/items/vehicle/plating.json index 7b9e1b6f01cac..e213205d86c17 100644 --- a/data/json/items/vehicle/plating.json +++ b/data/json/items/vehicle/plating.json @@ -122,12 +122,12 @@ "type": "GENERIC", "id": "hard_plate", "name": { "str": "hard plating" }, - "description": "A piece of very thick armor plating made of steel.", + "description": "A piece of very thick armor plating made of tempered steel.", "weight": "32640 g", "to_hit": -1, "color": "light_cyan", "symbol": "]", - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "volume": "3 L", "bashing": 6, "category": "veh_parts", @@ -144,7 +144,7 @@ "to_hit": -1, "color": "green", "symbol": "]", - "material": [ "hardsteel", "ceramic" ], + "material": [ "qt_steel", "ceramic" ], "volume": "3 L", "bashing": 8, "category": "veh_parts", diff --git a/data/json/items/vehicle/wheel.json b/data/json/items/vehicle/wheel.json index 8ea6a96b89eaf..5b491f4074857 100644 --- a/data/json/items/vehicle/wheel.json +++ b/data/json/items/vehicle/wheel.json @@ -408,7 +408,7 @@ "price_postapoc": 750, "bashing": 17, "to_hit": -1, - "material": [ "hardsteel", "ceramic" ], + "material": [ "qt_steel", "ceramic" ], "symbol": "]", "color": "green", "diameter": 32, diff --git a/data/json/materials.json b/data/json/materials.json index 103f67b38f70e..831dfd9e09112 100644 --- a/data/json/materials.json +++ b/data/json/materials.json @@ -1839,27 +1839,6 @@ "cut_dmg_verb": "scratched", "burn_products": [ [ "scrap", 1 ] ] }, - { - "type": "material", - "id": "hardsteel", - "name": "Hard Steel", - "density": 40, - "specific_heat_liquid": 0.82, - "specific_heat_solid": 0.45, - "latent_heat": 273, - "bash_resist": 10, - "cut_resist": 16, - "bullet_resist": 9, - "acid_resist": 6, - "fire_resist": 3, - "elec_resist": 0, - "chip_resist": 30, - "repaired_with": "scrap", - "dmg_adj": [ "marked", "dented", "smashed", "shattered" ], - "bash_dmg_verb": "dented", - "cut_dmg_verb": "scratched", - "burn_products": [ [ "scrap", 1 ] ] - }, { "type": "material", "id": "plut_cell", diff --git a/data/mods/Aftershock/items/armor/modular_exos/exo_gear.json b/data/mods/Aftershock/items/armor/modular_exos/exo_gear.json index 3245525c5f899..bc45ad9ff46d9 100644 --- a/data/mods/Aftershock/items/armor/modular_exos/exo_gear.json +++ b/data/mods/Aftershock/items/armor/modular_exos/exo_gear.json @@ -11,7 +11,7 @@ "longest_side": "5 cm", "bashing": 60, "to_hit": { "grip": "weapon", "length": "short", "surface": "any", "balance": "clumsy" }, - "material": [ "hardsteel", "vacuum_carbide" ], + "material": [ "qt_steel", "vacuum_carbide" ], "symbol": ";", "color": "light_gray", "techniques": [ "WBLOCK_1", "SWEEP" ], diff --git a/data/mods/Aftershock/items/armor/modular_exos/exo_tool.json b/data/mods/Aftershock/items/armor/modular_exos/exo_tool.json index 535632751466b..268e937b9f7ee 100644 --- a/data/mods/Aftershock/items/armor/modular_exos/exo_tool.json +++ b/data/mods/Aftershock/items/armor/modular_exos/exo_tool.json @@ -19,7 +19,7 @@ { "type": "repair_item", "item_action_type": "repair_metal", - "materials": [ "steel", "hardsteel", "titanium" ], + "materials": [ "steel", "qt_steel", "titanium" ], "skill": "fabrication", "cost_scaling": 0.1, "move_cost": 1500 diff --git a/data/mods/Aftershock/items/weapons.json b/data/mods/Aftershock/items/weapons.json index 0fa14701f55fd..b33d734f6331d 100644 --- a/data/mods/Aftershock/items/weapons.json +++ b/data/mods/Aftershock/items/weapons.json @@ -16,7 +16,7 @@ "longest_side": "90 cm", "price": 100000, "price_postapoc": 2000, - "material": [ "superalloy", "hardsteel" ], + "material": [ "superalloy", "qt_steel" ], "relic_data": { "passive_effects": [ { "id": "afs_ench_esab" } ] }, "symbol": "[", "looks_like": "PR24-extended", @@ -89,7 +89,7 @@ "description": "A delicate strand of light links the antipodes of this crescent-shaped device. If the strand is interrupted, the device clanks and shudders before violently emitting a bolt of plasma from its apex.", "price": 1000000, "price_postapoc": 20000, - "material": [ "superalloy", "hardsteel" ], + "material": [ "superalloy", "qt_steel" ], "flags": [ "FIRE_TWOHAND", "STR_DRAW", "SLOW_WIELD", "WATERPROOF_GUN", "NEVER_JAMS" ], "skill": "archery", "min_strength": 4, @@ -127,7 +127,7 @@ "volume": "2 L", "price": 10000000, "price_postapoc": 20000, - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "symbol": "[", "looks_like": "gauntlets_chitin", "color": "light_gray", @@ -271,7 +271,7 @@ "name": { "str": "aztlani bow" }, "description": "An ornate bow used by Aztlani nobility during hunting rituals. Designed to fell the plated creatures of Aztlan, its articulated and power assisted limbs allow it to fire projectiles with a strength comparable to modern assault rifles. .\n\nWith its drawing aid system currently disabled, firing it will require truly superhuman strength. It can be activated to toggle it drawing assist functionality.", "price": 50000, - "material": [ "superalloy", "hardsteel", "wood" ], + "material": [ "superalloy", "qt_steel", "wood" ], "flags": [ "FIRE_TWOHAND", "RELOAD_AND_SHOOT", "BELTED", "SHEATH_BOW", "WATERPROOF_GUN", "NEVER_JAMS" ], "ammo_effects": [ "NEVER_MISFIRES" ], "skill": "archery", @@ -287,7 +287,7 @@ { "material": [ { "type": "superalloy", "covered_by_mat": 100, "thickness": 1.0 }, - { "type": "hardsteel", "covered_by_mat": 100, "thickness": 1.0 }, + { "type": "qt_steel", "covered_by_mat": 100, "thickness": 1.0 }, { "type": "wood", "covered_by_mat": 100, "thickness": 1.0 } ], "encumbrance": 20, @@ -322,7 +322,7 @@ "name": { "str": "aztlani bow (active)", "str_pl": "aztlani bows (active)" }, "description": "An ornate bow used by Aztlani nobility during hunting rituals. Designed to fell the plated creatures of Aztlan, its articulated and power assisted limbs allow it to fire projectiles with a strength comparable to modern assault rifles. .\n\nWith its drawing aid system enabled, it can be much more easily drawn, at the cost of a modest amount of UPS power consumption per arrow. It can be activated to toggle it drawing assist functionality.", "price": 50000, - "material": [ "superalloy", "hardsteel", "wood" ], + "material": [ "superalloy", "qt_steel", "wood" ], "flags": [ "FIRE_TWOHAND", "RELOAD_AND_SHOOT", "BELTED", "SHEATH_BOW", "WATERPROOF_GUN", "NEVER_JAMS" ], "ammo_effects": [ "NEVER_MISFIRES" ], "skill": "archery", @@ -338,7 +338,7 @@ { "material": [ { "type": "superalloy", "covered_by_mat": 100, "thickness": 1.0 }, - { "type": "hardsteel", "covered_by_mat": 100, "thickness": 1.0 }, + { "type": "qt_steel", "covered_by_mat": 100, "thickness": 1.0 }, { "type": "wood", "covered_by_mat": 100, "thickness": 1.0 } ], "encumbrance": 20, @@ -366,7 +366,7 @@ "description": "An ornate, single-handed sword used by Aztlani hunters to finish injured game. Made from gleaming composite alloy, its tip and frontal blade have been sharpened to a monomolecular point, while its back features a serrated saw edge.", "price": 100000, "price_postapoc": 450000, - "material": [ "superalloy", "hardsteel", "wood" ], + "material": [ "superalloy", "qt_steel", "wood" ], "flags": [ "DURABLE_MELEE", "SHEATH_SWORD" ], "techniques": [ "WBLOCK_2" ], "weight": "1360 g", diff --git a/data/mods/CRT_EXPANSION/items/crt_armor.json b/data/mods/CRT_EXPANSION/items/crt_armor.json index 88fa4b4a4c229..4e0220d3efbd0 100644 --- a/data/mods/CRT_EXPANSION/items/crt_armor.json +++ b/data/mods/CRT_EXPANSION/items/crt_armor.json @@ -277,7 +277,7 @@ "weight": "42563 g", "volume": "12500 ml", "price": 100000000, - "material": [ "hardsteel", "kevlar" ], + "material": [ "qt_steel", "kevlar" ], "symbol": "[", "color": "light_green", "warmth": 25, diff --git a/data/mods/CRT_EXPANSION/items/crt_toolarmor.json b/data/mods/CRT_EXPANSION/items/crt_toolarmor.json index 02c69ac2a5eb3..d83e0dd2535a6 100644 --- a/data/mods/CRT_EXPANSION/items/crt_toolarmor.json +++ b/data/mods/CRT_EXPANSION/items/crt_toolarmor.json @@ -155,7 +155,7 @@ "name": { "str": "CRIT helmet (off)", "str_pl": "CRIT helmets (off)" }, "description": "A standard-issue helmet. Protects the noggin and has a stretch of insulated steel mesh for neck warmth and protection.", "color": "light_gray", - "material": [ "kevlar", "hardsteel" ], + "material": [ "kevlar", "qt_steel" ], "material_thickness": 3, "warmth": 20, "charges_per_use": 1, @@ -189,7 +189,7 @@ "name": { "str": "CRIT helmet (on)", "str_pl": "CRIT helmets (on)" }, "description": "A standard-issue helmet. Protects the noggin and has a stretch of insulated steel mesh for neck warmth and protection. A tactically dim flashlight is attached to the side. This light is currently on and drawing power.", "color": "light_gray", - "material": [ "kevlar", "hardsteel" ], + "material": [ "kevlar", "qt_steel" ], "flags": [ "WATERPROOF", "STURDY", @@ -220,7 +220,7 @@ "name": "CRIT canteen", "description": "A durable steel canteen that can heat up food with built in atomic heating elements.", "color": "dark_gray", - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "material_thickness": 1, "qualities": [ [ "BOIL", 1 ], [ "CONTAIN", 1 ] ], "use_action": [ "HOTPLATE" ] diff --git a/data/mods/CRT_EXPANSION/items/crt_tools.json b/data/mods/CRT_EXPANSION/items/crt_tools.json index 40bbc1626cd5c..d7f810eeee360 100644 --- a/data/mods/CRT_EXPANSION/items/crt_tools.json +++ b/data/mods/CRT_EXPANSION/items/crt_tools.json @@ -34,7 +34,7 @@ "name": { "str": "CRIT service knife", "str_pl": "CRIT service knives" }, "description": "A modified trench knife. Has a knuckleduster guard and a small, hooked pry bar at the bottom. The matte black finish helps it avoid flash in dim-light situations and tanto tip allows for light-armor penetration. Blade length allows for decent reach.", "color": "dark_gray", - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "weight": "350 g", "volume": "750 ml", "price": 20000, @@ -54,7 +54,7 @@ "name": { "str": "pair of CRIT Knuckledusters", "str_pl": "pairs of CRIT Knuckledusters" }, "description": "C.R.I.T CQB knuckledusters. Not too different from any normal pair other than weight.", "color": "dark_gray", - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "weight": "550 g", "volume": "750 ml", "price": 20000, @@ -71,7 +71,7 @@ "name": "CRIT Reso-blade", "description": "CRIT melee weapon. Alien runes adorn the carbon steel blade. The blade oddly seems to lack sharpness, and yet upon closer inspection, a hum of energy thrums from within.", "color": "dark_gray", - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "//": "Legacy artifact data is set for always on wield dex +2 and speed up times 2", "relic_data": { "passive_effects": [ @@ -100,7 +100,7 @@ "name": "Dragon Slayer", "description": "C.R.I.T R&D's masterpiece weapon. Alien runes adorn the ridiculously oversized carbon steel blade and a hum of energy thrums from within. Merely brushing your fingers over the weapon brings a feeling of invincibility. It looks more like a raw heap of iron than a sword. The thing is… can you wield it?", "color": "dark_gray", - "material": [ "hardsteel" ], + "material": [ "qt_steel" ], "//": "Legacy artifact data was set for all stats +2 Str +6, carry_more, speed up x6, resist electricity, sap hp", "relic_data": { "passive_effects": [ @@ -141,7 +141,7 @@ "description": "An incredibly sharp, heavy duty, one-handed hatchet. Makes a great melee weapon, and is useful both for chopping things and for use as a hammer when extended.", "price": 25000, "price_postapoc": 5000, - "material": [ "hardsteel", "plastic", "rubber" ], + "material": [ "qt_steel", "plastic", "rubber" ], "techniques": [ "CHOP", "HOOK", "TEAR" ], "weight": "1807 g", "volume": "550 ml", @@ -162,7 +162,7 @@ "description": "An incredibly sharp, heavy duty, full length axe. Makes a heavy-hitting melee weapon, and is useful both for chopping things and for use as a hammer when extended.", "price": 25000, "price_postapoc": 5000, - "material": [ "hardsteel", "plastic", "rubber" ], + "material": [ "qt_steel", "plastic", "rubber" ], "techniques": [ "CHOP", "INERTIAL", "SMASH" ], "weight": "1807 g", "volume": "2500 ml", @@ -185,7 +185,7 @@ "to_hit": 1, "bashing": 6, "cutting": 10, - "material": [ "hardsteel", "plastic" ], + "material": [ "qt_steel", "plastic" ], "techniques": [ "CHOP", "SHOVE", "SMASH" ], "symbol": "/", "color": "dark_gray", @@ -202,7 +202,7 @@ "price": 4000, "to_hit": 2, "bashing": 14, - "material": [ "hardsteel", "plastic", "rubber" ], + "material": [ "qt_steel", "plastic", "rubber" ], "techniques": [ "WBLOCK_3", "tec_break", "SMASH" ], "symbol": "/", "color": "dark_gray", diff --git a/data/mods/CRT_EXPANSION/readme/README.md b/data/mods/CRT_EXPANSION/readme/README.md index c21f0c3b2b4f7..b7d36337edd4d 100644 --- a/data/mods/CRT_EXPANSION/readme/README.md +++ b/data/mods/CRT_EXPANSION/readme/README.md @@ -1,5 +1,5 @@ # C.R.T Expansion mod pack -The core mod of the CRT Expansion mod pack, it currently adds an armor set, mildly OP gas mask and transforming vest, some gun mods, a new melee/tool and a new material. The items also use a lot of higher end materials such as superalloy, rubber (the "new" material), the lesser used hardsteel and also neoprene. +The core mod of the CRT Expansion mod pack, it currently adds an armor set, mildly OP gas mask and transforming vest, some gun mods, a new melee/tool and a new material. The items also use a lot of higher end materials such as superalloy, rubber (the "new" material), the lesser used tempered steel and also neoprene. This mod also adds a few new classes to CDDA. To name a few: the C.R.I.T Medic, C.R.I.T Commanding Officer, C.R.I.T Automatic Rifleman, C.R.I.T Grunt, C.R.I.T NCO, C.R.I.T ROTC member, and also some more. diff --git a/data/mods/TEST_DATA/items.json b/data/mods/TEST_DATA/items.json index cbfa251c768ee..4703741347677 100644 --- a/data/mods/TEST_DATA/items.json +++ b/data/mods/TEST_DATA/items.json @@ -1092,7 +1092,7 @@ "material": [ { "type": "qt_steel", "covered_by_mat": 95, "thickness": 1 }, { "type": "cotton", "covered_by_mat": 100, "thickness": 1 }, - { "type": "hardsteel", "covered_by_mat": 5, "thickness": 1 } + { "type": "qt_steel", "covered_by_mat": 5, "thickness": 1 } ], "encumbrance": 7 } @@ -2154,7 +2154,7 @@ "price_postapoc": 30000, "to_hit": 1, "bashing": 1, - "material": [ "hardsteel", "ceramic", "kevlar_rigid" ], + "material": [ "qt_steel", "ceramic", "kevlar_rigid" ], "symbol": "[", "looks_like": "depowered_armor", "color": "light_gray", diff --git a/data/mods/innawood/items/tool_workshop.json b/data/mods/innawood/items/tool_workshop.json index 6b969d27feb0e..0f45acc31f3f6 100644 --- a/data/mods/innawood/items/tool_workshop.json +++ b/data/mods/innawood/items/tool_workshop.json @@ -30,7 +30,7 @@ { "type": "repair_item", "item_action_type": "repair_metal", - "materials": [ "iron", "steel", "hardsteel", "aluminum", "copper", "bronze", "silver", "gold", "platinum", "superalloy" ], + "materials": [ "iron", "steel", "aluminum", "copper", "bronze", "silver", "gold", "platinum", "superalloy" ], "skill": "fabrication", "tool_quality": 5, "cost_scaling": 0.1, diff --git a/src/bionics.cpp b/src/bionics.cpp index ba77bed26e536..f330251fa7797 100644 --- a/src/bionics.cpp +++ b/src/bionics.cpp @@ -170,8 +170,12 @@ static const material_id fuel_type_muscle( "muscle" ); static const material_id fuel_type_sun_light( "sunlight" ); static const material_id fuel_type_wind( "wind" ); static const material_id material_budget_steel( "budget_steel" ); -static const material_id material_hardsteel( "hardsteel" ); +static const material_id material_ch_steel( "ch_steel" ); +static const material_id material_hc_steel( "hc_steel" ); static const material_id material_iron( "iron" ); +static const material_id material_lc_steel( "lc_steel" ); +static const material_id material_mc_steel( "mc_steel" ); +static const material_id material_qt_steel( "qt_steel" ); static const material_id material_steel( "steel" ); static const requirement_id requirement_data_anesthetic( "anesthetic" ); @@ -995,7 +999,7 @@ bool Character::activate_bionic( bionic &bio, bool eff_only, bool *close_bionics } else if( bio.id == bio_magnet ) { add_msg_activate(); static const std::set affected_materials = - { material_iron, material_steel, material_hardsteel, material_budget_steel }; + { material_iron, material_steel, material_lc_steel, material_mc_steel, material_hc_steel, material_ch_steel, material_qt_steel, material_budget_steel }; // Remember all items that will be affected, then affect them // Don't "snowball" by affecting some items multiple times std::vector> affected; diff --git a/src/character.cpp b/src/character.cpp index e126e0a14713d..5ed93091bd241 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -330,16 +330,15 @@ static const limb_score_id limb_score_vision( "vision" ); static const matec_id tec_none( "tec_none" ); static const material_id material_budget_steel( "budget_steel" ); -static const material_id material_case_hardened_steel( "case_hardened_steel" ); +static const material_id material_ch_steel( "ch_steel" ); static const material_id material_flesh( "flesh" ); -static const material_id material_hardsteel( "hardsteel" ); +static const material_id material_hc_steel( "hc_steel" ); static const material_id material_hflesh( "hflesh" ); -static const material_id material_high_steel( "high_steel" ); static const material_id material_iron( "iron" ); -static const material_id material_low_steel( "low_steel" ); -static const material_id material_med_steel( "med_steel" ); +static const material_id material_lc_steel( "lc_steel" ); +static const material_id material_mc_steel( "mc_steel" ); +static const material_id material_qt_steel( "qt_steel" ); static const material_id material_steel( "steel" ); -static const material_id material_tempered_steel( "tempered_steel" ); static const material_id material_wool( "wool" ); static const morale_type morale_nightmare( "morale_nightmare" ); @@ -480,7 +479,7 @@ static const trait_id trait_WEB_WEAVER( "WEB_WEAVER" ); static const vitamin_id vitamin_calcium( "calcium" ); static const vitamin_id vitamin_iron( "iron" ); -static const std::set ferric = { material_iron, material_steel, material_budget_steel, material_case_hardened_steel, material_high_steel, material_low_steel, material_med_steel, material_tempered_steel, material_hardsteel }; +static const std::set ferric = { material_iron, material_steel, material_budget_steel, material_ch_steel, material_hc_steel, material_lc_steel, material_mc_steel, material_qt_steel }; namespace io { diff --git a/src/monattack.cpp b/src/monattack.cpp index af8765a390e3d..0547da9935c02 100644 --- a/src/monattack.cpp +++ b/src/monattack.cpp @@ -165,11 +165,15 @@ static const limb_score_id limb_score_reaction( "reaction" ); static const matec_id tec_none( "tec_none" ); static const material_id material_budget_steel( "budget_steel" ); +static const material_id material_ch_steel( "ch_steel" ); static const material_id material_flesh( "flesh" ); -static const material_id material_hardsteel( "hardsteel" ); +static const material_id material_hc_steel( "hc_steel" ); static const material_id material_hflesh( "hflesh" ); static const material_id material_iflesh( "iflesh" ); static const material_id material_iron( "iron" ); +static const material_id material_lc_steel( "lc_steel" ); +static const material_id material_mc_steel( "mc_steel" ); +static const material_id material_qt_steel( "qt_steel" ); static const material_id material_steel( "steel" ); static const material_id material_veggy( "veggy" ); @@ -905,10 +909,15 @@ bool mattack::pull_metal_weapon( monster *z ) if( foe != nullptr ) { // Wielded steel or iron items except for built-in things like bionic claws or monomolecular blade const item &weapon = foe->get_wielded_item(); - const int metal_portion = weapon.made_of( material_iron ) + - weapon.made_of( material_hardsteel ) + - weapon.made_of( material_steel ) + - weapon.made_of( material_budget_steel ); + const int metal_portion = weapon.made_of( material_budget_steel ) + + weapon.made_of( material_ch_steel ) + + weapon.made_of( material_hc_steel ) + + weapon.made_of( material_iron ) + + weapon.made_of( material_lc_steel ) + + weapon.made_of( material_mc_steel ) + + weapon.made_of( material_qt_steel ) + + weapon.made_of( material_steel ); + // Take the total portion of metal in the item into account const float metal_fraction = metal_portion / static_cast( weapon.type->mat_portion_total ); if( !weapon.has_flag( flag_NO_UNWIELD ) && metal_portion ) { diff --git a/src/ranged.cpp b/src/ranged.cpp index 86eaa04bd9658..8b3d849829bc0 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -109,7 +109,6 @@ static const itype_id itype_metal_rail( "metal_rail" ); static const material_id material_budget_steel( "budget_steel" ); static const material_id material_case_hardened_steel( "case_hardened_steel" ); static const material_id material_glass( "glass" ); -static const material_id material_hardsteel( "hardsteel" ); static const material_id material_high_steel( "high_steel" ); static const material_id material_iron( "iron" ); static const material_id material_low_steel( "low_steel" ); @@ -132,7 +131,7 @@ static const trait_id trait_PYROMANIA( "PYROMANIA" ); static const trap_str_id tr_practice_target( "tr_practice_target" ); -static const std::set ferric = { material_iron, material_steel, material_budget_steel, material_case_hardened_steel, material_high_steel, material_low_steel, material_med_steel, material_tempered_steel, material_hardsteel }; +static const std::set ferric = { material_iron, material_steel, material_budget_steel, material_case_hardened_steel, material_high_steel, material_low_steel, material_med_steel, material_tempered_steel }; // Maximum duration of aim-and-fire loop, in turns static constexpr int AIF_DURATION_LIMIT = 10; diff --git a/tests/iteminfo_test.cpp b/tests/iteminfo_test.cpp index 88ddc1d84751a..b060b4af328ea 100644 --- a/tests/iteminfo_test.cpp +++ b/tests/iteminfo_test.cpp @@ -1289,7 +1289,7 @@ TEST_CASE( "armor protection", "[iteminfo][armor][protection]" ) item super_tanktop( "test_complex_tanktop" ); REQUIRE( super_tanktop.get_covered_body_parts().any() ); // these values are averaged values but test that assumed armor portion is working at all - expected_armor_values( super_tanktop, 14, 18, 14.4f, 10.66667f ); + expected_armor_values( super_tanktop, 14, 14, 11.2f, 8.66667f ); // Protection info displayed on two lines CHECK( item_info_str( super_tanktop, more_protection ) == @@ -1299,8 +1299,8 @@ TEST_CASE( "armor protection", "[iteminfo][armor][protection]" ) " Default: 100\n" "Torso Protection: 4%, Median, 4%\n" " Bash: 1.00, 11.00, 21.00\n" - " Cut: 1.00, 11.00, 27.00\n" - " Ballistic: 1.00, 7.00, 16.00\n" + " Cut: 1.00, 11.00, 21.00\n" + " Ballistic: 1.00, 7.00, 13.00\n" " Breathability: 2\n" ); }