Skip to content

Commit

Permalink
Sweep of sanification for electronic devices (#76029)
Browse files Browse the repository at this point in the history
* sanify electronic

* more

* more

* fix few errors

* fix itemgroups after changes, fix battery test

* more test fixes

* add missed comment on heavy flashlight

* add shoulder strap because it's cool and it's part of irl item

* more test fixes

* Update tests/item_autopickup_test.cpp

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* and more

* and more

* more

* more

* more

* further tweaks of heavy-duty flashlight

* more

* more

* more

* more

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
GuardianDll and github-actions[bot] authored Sep 1, 2024
1 parent 746a170 commit 9dfbd30
Show file tree
Hide file tree
Showing 27 changed files with 286 additions and 399 deletions.
4 changes: 2 additions & 2 deletions data/json/itemgroups/Clothing_Gear/clothing.json
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
"type": "item_group",
"subtype": "collection",
"container-item": "hat_hard",
"items": [ { "item": "light_disposable_cell", "charges": [ 0, -1 ], "container-item": "flashlight" } ]
"items": [ { "item": "flashlight", "charges": [ 0, -1 ] } ]
},
{
"id": "hat_hard_modified",
Expand All @@ -685,7 +685,7 @@
"container-item": "hat_hard",
"items": [
{ "group": "common_nape_protectors", "prob": 50 },
{ "item": "light_minus_disposable_cell", "charges": 100, "container-item": "flashlight", "prob": 50 },
{ "item": "flashlight", "charges": [ 0, -1 ], "prob": 50 },
{ "group": "common_face_shields", "prob": 15 },
{ "item": "plastic_chin_guard", "prob": 10 },
{ "item": "attachable_ear_muffs", "prob": 5 }
Expand Down
6 changes: 3 additions & 3 deletions data/json/itemgroups/Locations_MapExtras/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@
[ "amplifier", 25 ],
{ "item": "smart_lamp", "prob": 5, "charges": [ 0, 100 ] },
{ "item": "reading_light", "prob": 10, "charges": [ 0, 100 ] },
{ "item": "carver_off", "prob": 5, "charges": [ 0, 500 ] },
{ "item": "carver_off", "prob": 5 },
{ "item": "coffeemaker", "prob": 5 },
{ "item": "dehydrator", "prob": 5 },
{ "item": "food_processor", "prob": 5 },
Expand Down Expand Up @@ -1250,7 +1250,7 @@
{ "item": "extinguisher", "prob": 20, "charges": 100 },
{ "item": "laptop", "prob": 20, "charges": [ 0, 500 ] },
{ "item": "flashlight", "prob": 40, "charges": [ 0, 300 ] },
{ "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] },
{ "item": "water_purifier", "prob": 5 },
[ "flyer", 10 ],
[ "decoy_elfa", 10 ],
[ "tongs", 10 ],
Expand Down Expand Up @@ -2535,7 +2535,7 @@
{ "item": "popcan_stove", "prob": 5, "charges": [ 0, 500 ] },
{ "item": "denat_alcohol", "prob": 6, "charges": [ 250, -1 ] },
{ "item": "methed_alcohol", "prob": 4, "charges": [ 250, -1 ] },
{ "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] },
{ "item": "water_purifier", "prob": 5 },
{ "item": "radio", "prob": 20, "charges": [ 0, 100 ] },
[ "rollmat", 40 ],
[ "tent_kit", 17 ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@
[ "chainsaw_off", 7 ],
{ "item": "elec_chainsaw_off", "prob": 4, "charges": [ 0, 500 ] },
{ "item": "elec_chainsaw_cord_off", "prob": 4 },
{ "item": "carver_off", "prob": 7, "charges": [ 0, 500 ] },
{ "item": "carver_off", "prob": 7 },
[ "jackhammer", 2 ],
[ "elec_jackhammer", 1 ],
[ "pickaxe", 1 ],
Expand Down
6 changes: 3 additions & 3 deletions data/json/itemgroups/SUS/domestic.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
{ "item": "ceramic_shard", "prob": 30 },
{ "item": "e_scrap", "prob": 50, "count": [ 1, 5 ] },
{ "item": "razor_blade", "prob": 40 },
{ "item": "flashlight", "prob": 55, "ammo-item": "battery", "charges": [ 2, 8 ] },
{ "item": "flashlight", "prob": 55, "charges": [ 2, 8 ] },
{ "item": "bottle_plastic_small", "prob": 42 },
{ "item": "glowstick_dead", "prob": 30 },
{ "item": "condom", "prob": 40 },
Expand Down Expand Up @@ -332,7 +332,7 @@
{ "group": "superglue", "prob": 90 },
{ "item": "boxcutter", "prob": 85 },
{ "item": "duct_tape", "prob": 85, "charges": [ 5, 200 ] },
{ "item": "flashlight", "prob": 80, "ammo-item": "light_battery_cell", "charges": [ 100, 300 ] },
{ "item": "flashlight", "prob": 80, "charges": [ 100, 300 ] },
{ "item": "toothbrush_plain", "custom-flags": [ "FILTHY" ], "prob": 80 },
{ "item": "bottle_opener", "prob": 75 },
{ "item": "pockknife", "prob": 75 },
Expand Down Expand Up @@ -390,7 +390,7 @@
{ "item": "paper", "charges": [ 25, 100 ] },
{ "item": "scissors", "prob": 80 },
{ "item": "stapler", "prob": 80 },
{ "item": "flashlight", "prob": 80, "ammo-item": "battery", "charges": 300 },
{ "item": "flashlight", "prob": 80, "charges": 300 },
{ "item": "hairbrush", "prob": 80 },
{ "item": "office_letter_opener", "prob": 75 },
{ "item": "candle", "count": [ 1, 2 ], "prob": 75, "charges": [ 70, -1 ] },
Expand Down
4 changes: 2 additions & 2 deletions data/json/itemgroups/activities_hobbies.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
[ "hammer", 35 ],
{ "item": "flashlight", "prob": 40, "charges": [ 0, 300 ] },
{ "item": "heavy_flashlight", "prob": 20, "charges": [ 0, 300 ] },
{ "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] },
{ "item": "water_purifier", "prob": 5 },
{ "item": "radio", "prob": 20, "charges": [ 0, 100 ] },
[ "beartrap", 5 ],
{ "item": "UPS_OFF", "prob": 8, "charges": [ 0, 1000 ] },
Expand Down Expand Up @@ -517,7 +517,7 @@
[ "hammer", 35 ],
{ "item": "flashlight", "prob": 40, "charges": [ 0, 300 ] },
{ "item": "heavy_flashlight", "prob": 20, "charges": [ 0, 300 ] },
{ "item": "water_purifier", "prob": 5, "charges": [ 0, 100 ] },
{ "item": "water_purifier", "prob": 5 },
{ "item": "radio", "prob": 20, "charges": [ 0, 100 ] },
[ "string_36", 40 ],
[ "wire", 50 ],
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/food_service.json
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@
{ "item": "knife_huge", "variant": "knife_butcher", "prob": 30 },
{ "item": "butchering_kit", "prob": 5 },
{ "item": "tongs", "prob": 10 },
{ "item": "carver_off", "prob": 5, "charges": [ 0, 500 ] },
{ "item": "carver_off", "prob": 5 },
{ "item": "meat", "prob": 1 },
{ "item": "hacksaw", "prob": 10 },
{ "item": "gloves_cut_resistant", "prob": 10 }
Expand Down
4 changes: 2 additions & 2 deletions data/json/itemgroups/misc.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
{ "item": "socks", "count": 3 },
{ "item": "gloves_tactical" },
{ "group": "batteries" },
{ "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" },
{ "item": "flashlight", "charges": 150 },
{ "item": "light_battery_cell", "charges": 150, "container-item": "radio" },
{ "item": "lighter", "charges": 100 },
{ "item": "pockknife" },
Expand All @@ -249,7 +249,7 @@
{ "item": "flint_steel" },
{ "item": "whistle_multitool" },
{ "item": "bottle_folding" },
{ "item": "light_battery_cell", "charges": 150, "container-item": "flashlight" },
{ "item": "flashlight", "charges": 150 },
{ "item": "picklocks" },
{ "item": "lifestraw" },
{ "item": "pocket_survival" },
Expand Down
2 changes: 1 addition & 1 deletion data/json/items/armor/robofac_armor.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_MEDIUM" ],
"default_magazine": "medimedium_battery_cellum_atomic_battery_cell"
"default_magazine": "medium_battery_cell"
}
],
"ammo": "battery",
Expand Down
4 changes: 2 additions & 2 deletions data/json/items/containers/containers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3444,8 +3444,8 @@
"pocket_data": [
{
"pocket_type": "CONTAINER",
"max_contains_volume": "100 ml",
"max_contains_weight": "230 g",
"max_contains_volume": "111 ml",
"max_contains_weight": "233 g",
"max_item_length": "15 cm",
"moves": 100,
"watertight": true,
Expand Down
113 changes: 44 additions & 69 deletions data/json/items/tool/cooking.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,46 +70,42 @@
"id": "carver_off",
"type": "TOOL",
"name": { "str": "electric carver (off)", "str_pl": "electric carvers (off)" },
"description": "An electric meat carver powered by batteries. It has two serrated blades that vibrate together to slice just about anything from turkey to ham… even zombies!",
"to_hit": { "grip": "solid", "length": "hand", "surface": "line", "balance": "neutral" },
"weight": "1106 g",
"description": "An electric meat carver powered by cord. It has two serrated blades that vibrate together to slice just about anything from turkey to ham… even zombies!",
"//": "https://www.amazon.com/dp/B07CDR4KFM",
"to_hit": { "grip": "solid", "length": "short", "surface": "line", "balance": "good" },
"weight": "680 g",
"volume": "1500 ml",
"longest_side": "30 cm",
"price": "20 USD",
"price_postapoc": "50 cent",
"longest_side": "482 mm",
"price": "24 USD",
"price_postapoc": "1 cent",
"material": [ "steel", "plastic" ],
"symbol": "/",
"color": "yellow",
"ammo": [ "battery" ],
"charges_per_use": 5,
"use_action": {
"type": "effect_on_conditions",
"menu_text": "Turn on",
"effect_on_conditions": [
{
"id": "EOC_toolweapon_activate__carver",
"effect": {
"run_eoc_with": "EOC_toolweapon_activate",
"variables": {
"turn_cost": "0.8",
"transform_target": "carver_on",
"success_message": { "i18n": true, "str": "The electric carver's serrated blades start buzzing!" },
"volume": "20",
"failure_message": { "i18n": true, "str": "You pull the trigger, but nothing happens." }
"charges_per_use": 1,
"use_action": [
{
"type": "effect_on_conditions",
"menu_text": "Turn on",
"effect_on_conditions": [
{
"id": "EOC_toolweapon_activate__carver",
"effect": {
"run_eoc_with": "EOC_toolweapon_activate",
"variables": {
"turn_cost": "0.8",
"transform_target": "carver_on",
"success_message": { "i18n": true, "str": "The electric carver's serrated blades start buzzing!" },
"volume": "20",
"failure_message": { "i18n": true, "str": "You pull the trigger, but nothing happens." }
}
}
}
}
]
},
"flags": [ "SHEATH_SWORD", "NONCONDUCTIVE", "WATER_BREAK_ACTIVE" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_MEDIUM" ],
"default_magazine": "medium_battery_cell"
}
]
},
{ "type": "link_up", "cable_length": 2, "charge_rate": "120 W" }
],
"flags": [ "SHEATH_SWORD", "NONCONDUCTIVE", "WATER_BREAK_ACTIVE" ],
"melee_damage": { "bash": 2, "cut": 8 }
},
{
Expand All @@ -118,21 +114,24 @@
"type": "TOOL",
"name": { "str": "electric carver (on)", "str_pl": "electric carvers (on)" },
"description": "This carver is on and the blades are buzzing. Use it to turn it off.",
"power_draw": "150 W",
"power_draw": "120 W",
"charges_per_use": 0,
"revert_to": "carver_off",
"qualities": [ [ "CUT", 2 ], [ "BUTCHER", 25 ] ],
"use_action": {
"type": "effect_on_conditions",
"ammo_scale": 0,
"menu_text": "Turn off",
"effect_on_conditions": [
{
"id": "EOC_toolweapon_deactivate__carver",
"effect": { "run_eoc_with": "EOC_toolweapon_deactivate", "variables": { "transform_target": "carver_off" } }
}
]
},
"use_action": [
{
"type": "effect_on_conditions",
"ammo_scale": 0,
"menu_text": "Turn off",
"effect_on_conditions": [
{
"id": "EOC_toolweapon_deactivate__carver",
"effect": { "run_eoc_with": "EOC_toolweapon_deactivate", "variables": { "transform_target": "carver_off" } }
}
]
},
{ "type": "link_up", "cable_length": 2, "charge_rate": "120 W" }
],
"tick_action": {
"type": "effect_on_conditions",
"effect_on_conditions": [
Expand All @@ -151,7 +150,7 @@
]
},
"flags": [ "MESSY", "TRADER_AVOID", "NONCONDUCTIVE", "WATER_BREAK" ],
"melee_damage": { "bash": 2, "cut": 30 }
"melee_damage": { "bash": 2, "cut": 8 }
},
{
"id": "char_purifier",
Expand Down Expand Up @@ -538,14 +537,6 @@
"ammo": [ "battery" ],
"flags": [ "ALLOWS_REMOTE_USE", "WATER_BREAK" ],
"use_action": { "type": "link_up", "cable_length": 4, "charge_rate": "55 W" },
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_MEDIUM" ],
"default_magazine": "medium_battery_cell"
}
],
"melee_damage": { "bash": 8 }
},
{
Expand Down Expand Up @@ -995,14 +986,6 @@
"ammo": [ "battery" ],
"flags": [ "ALLOWS_REMOTE_USE", "WATER_BREAK" ],
"use_action": { "type": "link_up", "cable_length": 2, "charge_rate": "110 W" },
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_MEDIUM" ],
"default_magazine": "medium_battery_cell"
}
],
"melee_damage": { "bash": 8 }
},
{
Expand Down Expand Up @@ -1043,14 +1026,6 @@
"charges_per_use": 14,
"use_action": [ "WATER_PURIFIER", { "type": "link_up", "cable_length": 2, "charge_rate": "30 W" } ],
"flags": [ "ALLOWS_REMOTE_USE" ],
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"rigid": true,
"flag_restriction": [ "BATTERY_LIGHT", "BATTERY_ULTRA_LIGHT" ],
"default_magazine": "light_battery_cell"
}
],
"melee_damage": { "bash": 2 }
},
{
Expand Down
Loading

0 comments on commit 9dfbd30

Please sign in to comment.