From 58914c1ad303ab61cad6a6fdf7344fb29bcbd5ef Mon Sep 17 00:00:00 2001 From: Dakota <42098508+BlackFira@users.noreply.github.com> Date: Fri, 10 May 2024 01:27:02 -0500 Subject: [PATCH] Fixed items placed in condoms when spawned on zombie corpses (#73313) * Fixed items placed in condoms when spawned on zombie corpses Changed wallet loot to use condom_sealed item, can be opened to get any existing condom in game. also added any_condom requirement list as to not require the player to open each condom prior to crafting. * Update data/mods/innawood/recipes/chem_other.json Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update containers.json removed unused final row * Update containers.json * test * Update data/json/ascii_art/containers/containers.json * Update data/json/ascii_art/containers/containers.json * Update wallets.json A bruh moment typo. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> Co-authored-by: Maleclypse <54345792+Maleclypse@users.noreply.github.com> --- .../json/ascii_art/containers/containers.json | 9 +++++++ .../itemgroups/Clothing_Gear/wallets.json | 26 +++++++++---------- data/json/items/containers/containers.json | 17 ++++++++++++ data/json/recipes/chem/other.json | 8 +++++- data/json/recipes/other/medical.json | 2 +- data/json/requirements/materials.json | 6 +++++ .../items/clothing/wallets.json | 2 +- data/mods/innawood/recipes/chem_other.json | 4 +-- 8 files changed, 56 insertions(+), 18 deletions(-) diff --git a/data/json/ascii_art/containers/containers.json b/data/json/ascii_art/containers/containers.json index 7e95763373999..951ada6041048 100644 --- a/data/json/ascii_art/containers/containers.json +++ b/data/json/ascii_art/containers/containers.json @@ -2162,6 +2162,15 @@ "╚↔↔↔╝" ] }, + { + "type": "ascii_art", + "id": "condom_sealed", + "picture": [ + "╔↔↔↔╗", + "║( )║", + "╚↔↔↔╝" + ] + }, { "type": "ascii_art", "id": "balloon", diff --git a/data/json/itemgroups/Clothing_Gear/wallets.json b/data/json/itemgroups/Clothing_Gear/wallets.json index 5da43fe51c462..f7ec453cfb475 100644 --- a/data/json/itemgroups/Clothing_Gear/wallets.json +++ b/data/json/itemgroups/Clothing_Gear/wallets.json @@ -41,7 +41,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] @@ -57,7 +57,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] @@ -73,7 +73,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] @@ -88,7 +88,7 @@ { "group": "banknotes", "prob": 50, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 10 }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 40 ] ] @@ -103,7 +103,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 60, "count": [ 2, 5 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "money_hundred", "prob": 10, "count": [ 1, 5 ] }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 5 ] @@ -121,7 +121,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] @@ -138,7 +138,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] @@ -157,7 +157,7 @@ { "item": "id_science", "prob": 100 }, { "item": "id_science_visitor_1", "prob": 100 }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "labmap", "prob": 30 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] @@ -177,7 +177,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "labmap", "prob": 20 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] @@ -197,7 +197,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 60, "count": [ 2, 5 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "labmap", "prob": 20 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 5 ] @@ -215,7 +215,7 @@ { "item": "id_science_visitor_1", "prob": 100 }, { "group": "banknotes", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "labmap", "prob": 20 }, { "item": "wallet_photo", "prob": 30 }, [ "scorecard", 20 ] @@ -233,7 +233,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] @@ -250,7 +250,7 @@ { "group": "banknotes", "prob": 80, "count": [ 1, 20 ] }, { "group": "coins", "prob": 80, "count": [ 1, 10 ] }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] ] diff --git a/data/json/items/containers/containers.json b/data/json/items/containers/containers.json index b9c3d6176feab..cfc42b895ff0f 100644 --- a/data/json/items/containers/containers.json +++ b/data/json/items/containers/containers.json @@ -3766,6 +3766,23 @@ "flags": [ "BANK_NOTE_SHAPED" ], "properties": { "burst_when_filled": "75" } }, + { + "id": "condom_sealed", + "type": "GENERIC", + "looks_like": "condom", + "name": { "str": "sealed condom" }, + "description": "A sealed condom wrapper, activate to open it.", + "ascii_picture": "condom_sealed", + "weight": "5 g", + "volume": "15 ml", + "price": "0 cent", + "price_postapoc": "25 cent", + "material": [ "plastic" ], + "symbol": ")", + "color": "white", + "use_action": { "menu_text": "open", "type": "transform", "target": "condom", "msg": "You rip open the wrapped condom." }, + "flags": [ "BANK_NOTE_SHAPED" ] + }, { "id": "balloon", "type": "GENERIC", diff --git a/data/json/recipes/chem/other.json b/data/json/recipes/chem/other.json index 3d8e0aa9ae0ef..63a7ec9e3ecdb 100644 --- a/data/json/recipes/chem/other.json +++ b/data/json/recipes/chem/other.json @@ -64,7 +64,13 @@ "components": [ [ [ "chem_acetone", 1 ], [ "chem_chloroform", 250 ], [ "ammonia_hydroxide", 1 ], [ "chem_toluene", 250 ] ], [ [ "chem_ethanol", 10 ], [ "denat_alcohol", 10 ], [ "methed_alcohol", 10 ], [ "chem_methanol", 10 ] ], - [ [ "balloon", 3 ], [ "shredded_rubber", 20 ], [ "gloves_medical", 2 ], [ "latex", 2 ], [ "condom", 3 ] ] + [ + [ "balloon", 3 ], + [ "shredded_rubber", 20 ], + [ "gloves_medical", 2 ], + [ "latex", 2 ], + [ "any_condom", 3, "LIST" ] + ] ] }, { diff --git a/data/json/recipes/other/medical.json b/data/json/recipes/other/medical.json index 25ede7ffdb00f..01e31b530d70b 100644 --- a/data/json/recipes/other/medical.json +++ b/data/json/recipes/other/medical.json @@ -304,7 +304,7 @@ [ "metal_funnel", 2 ] ], [ [ "hose", 1 ] ], - [ [ "condom", 1 ], [ "balloon", 1 ] ] + [ [ "any_condom", 1, "LIST" ], [ "balloon", 1 ] ] ] }, { diff --git a/data/json/requirements/materials.json b/data/json/requirements/materials.json index 062da5b53c6ca..846007a8a7da8 100644 --- a/data/json/requirements/materials.json +++ b/data/json/requirements/materials.json @@ -640,5 +640,11 @@ [ "onyx", 1 ] ] ] + }, + { + "id": "any_condom", + "type": "requirement", + "//": "Prevents having to open condoms before crafts", + "components": [ [ [ "condom", 1 ], [ "condom_sealed", 1 ] ] ] } ] diff --git a/data/mods/MindOverMatter/items/clothing/wallets.json b/data/mods/MindOverMatter/items/clothing/wallets.json index e4f8dd222bb3a..a8e87fd418c68 100644 --- a/data/mods/MindOverMatter/items/clothing/wallets.json +++ b/data/mods/MindOverMatter/items/clothing/wallets.json @@ -14,7 +14,7 @@ { "item": "id_science_visitor_phavian", "prob": 100 }, { "item": "id_science_visitor_1", "prob": 15 }, { "group": "discount_cards", "prob": 40, "count": [ 1, 3 ] }, - { "item": "condom", "prob": 10 }, + { "item": "condom_sealed", "prob": 10 }, { "item": "labmap", "prob": 30 }, { "item": "wallet_photo", "prob": 20 }, [ "scorecard", 20 ] diff --git a/data/mods/innawood/recipes/chem_other.json b/data/mods/innawood/recipes/chem_other.json index 5dfcad1ae6402..17ddb20412916 100644 --- a/data/mods/innawood/recipes/chem_other.json +++ b/data/mods/innawood/recipes/chem_other.json @@ -16,7 +16,7 @@ [ [ "chem_ethanol", 10 ], [ "denat_alcohol", 10 ], [ "methed_alcohol", 10 ], [ "chem_methanol", 10 ] ], [ [ "balloon", 2 ], - [ "condom", 2 ], + [ "any_condom", 2, "LIST" ], [ "gloves_medical", 2 ], [ "chunk_rubber", 1 ], [ "latex", 2 ], @@ -44,7 +44,7 @@ [ [ "chem_ethanol", 10 ], [ "denat_alcohol", 10 ], [ "methed_alcohol", 10 ], [ "chem_methanol", 10 ] ], [ [ "balloon", 2 ], - [ "condom", 2 ], + [ "any_condom", 2, "LIST" ], [ "gloves_medical", 2 ], [ "chunk_rubber", 1 ], [ "latex", 2 ],