diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 1177174111711..cd9f1fff19e6f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,14 +4,14 @@ about: Suggest an idea for this project --- -**Is your feature request related to a problem? Please describe.** +# Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -**Describe the solution you'd like** +# Describe the solution you'd like A clear and concise description of what you want to happen. -**Describe alternatives you've considered** +# Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. -**Additional context** +# Additional context Add any other context (such as mock-ups, proof of concepts or screenshots) about the feature request here. diff --git a/data/json/game_balance.json b/data/json/game_balance.json index 7628961159695..6a6f6f3e42228 100644 --- a/data/json/game_balance.json +++ b/data/json/game_balance.json @@ -125,13 +125,6 @@ "stype": "bool", "value": false }, - { - "type": "EXTERNAL_OPTION", - "name": "SLEEP_DEPRIVATION", - "info": "Enables sleep deprivation mechanics. If true, stimulants will only help you so far, and you might have to enforce proper sleep hygiene for a while.", - "stype": "bool", - "value": true - }, { "type": "EXTERNAL_OPTION", "name": "CBM_SLOTS_ENABLED", diff --git a/data/json/item_actions.json b/data/json/item_actions.json index d18b67bae7e7a..ede621ccbe690 100644 --- a/data/json/item_actions.json +++ b/data/json/item_actions.json @@ -54,11 +54,6 @@ "id": "PICKAXE", "name": "Dig through rock" }, - { - "type": "item_action", - "id": "MELATONIN_TABLET", - "name": "Take a melatonin tablet" - }, { "type": "item_action", "id": "PACK_CBM", diff --git a/data/json/items/armor.json b/data/json/items/armor.json index 7582860a8be73..d341ae7f5c9a1 100644 --- a/data/json/items/armor.json +++ b/data/json/items/armor.json @@ -1,73 +1,4 @@ [ - { - "id": "arm_splint", - "type": "ARMOR", - "name": "arm splint", - "description": "A tool to help set bones and hold them in place.", - "weight": "300 g", - "volume": "1 L", - "price": 20000, - "material": [ "wood", "cotton" ], - "symbol": "[", - "looks_like": "armguard_hard", - "color": "white", - "covers": [ "ARM_EITHER" ], - "coverage": 75, - "encumbrance": 70, - "warmth": 5, - "material_thickness": 1, - "flags": [ "WATER_FRIENDLY", "OUTER", "SPLINT" ] - }, - { - "id": "arm_xlsplint", - "type": "ARMOR", - "name": "arm splint XL", - "description": "A tool to help set bones and hold them in place. It is specifically designed to fit Huge survivors.", - "copy-from": "arm_splint", - "looks_like": "arm_splint", - "weight": "600 g", - "volume": "2 L", - "price": 25000, - "encumbrance": 140, - "flags": [ "OVERSIZE", "WATER_FRIENDLY", "OUTER", "SPLINT" ] - }, - { - "id": "arm_warmers", - "type": "ARMOR", - "name": "pair of arm warmers", - "name_plural": "pairs of arm warmers", - "description": "Snug, soft cloth sleeves to keep your arms warm.", - "weight": "32 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "armguard_larmor", - "color": "light_gray", - "covers": [ "ARMS" ], - "coverage": 80, - "encumbrance": 1, - "warmth": 20, - "material_thickness": 1, - "flags": [ "SKINTIGHT" ] - }, - { - "id": "army_top", - "type": "ARMOR", - "name": "camo tank top", - "description": "A sleeveless cotton shirt with camouflage dye. Very easy to move in.", - "weight": "78 g", - "volume": "250 ml", - "price": 1500, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "tank_top", - "color": "green", - "covers": [ "TORSO" ], - "coverage": 60, - "material_thickness": 1, - "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] - }, { "id": "b_shorts", "repairs_like": "jeans", @@ -90,186 +21,6 @@ "material_thickness": 1, "flags": [ "VARSIZE" ] }, - { - "id": "barrette", - "type": "ARMOR", - "name": "barrette", - "description": "A barrette with lots of ornaments.", - "weight": "5 g", - "volume": 0, - "price": 800, - "material": [ "plastic" ], - "symbol": "[", - "color": "pink", - "flags": [ "FANCY" ] - }, - { - "id": "bikini_bottom", - "type": "ARMOR", - "name": "bikini bottom", - "description": "A simple bikini bottom.", - "weight": "32 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "panties", - "color": "light_red", - "covers": [ "LEGS" ], - "coverage": 15, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] - }, - { - "id": "bikini_top", - "type": "ARMOR", - "name": "bikini top", - "description": "A simple bikini top.", - "weight": "32 g", - "volume": "250 ml", - "price": 1800, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "bra", - "color": "light_red", - "covers": [ "TORSO" ], - "coverage": 10, - "material_thickness": 1, - "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] - }, - { - "id": "bikini_top_fur", - "type": "ARMOR", - "name": "fur bikini top", - "description": "A simple fur bikini top.", - "weight": "44 g", - "volume": "250 ml", - "price": 4900, - "material": [ "fur" ], - "symbol": "[", - "looks_like": "bikini_top", - "color": "brown", - "covers": [ "TORSO" ], - "coverage": 10, - "warmth": 10, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "bikini_top_leather", - "type": "ARMOR", - "name": "leather bikini top", - "description": "A simple leather bikini top.", - "weight": "38 g", - "volume": "250 ml", - "price": 3500, - "material": [ "leather" ], - "symbol": "[", - "looks_like": "bikini_top", - "color": "dark_gray", - "covers": [ "TORSO" ], - "coverage": 10, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "blindfold", - "type": "ARMOR", - "name": "blindfold", - "//": "A folded bandana still takes up some space on the head.", - "description": "A simple fabric covering tied over the eyes to block sight. Useful for sleeping in bright areas.", - "weight": "72 g", - "volume": "250 ml", - "price": 600, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "scarf", - "color": "dark_gray", - "covers": [ "EYES" ], - "coverage": 95, - "encumbrance": 10, - "warmth": 5, - "material_thickness": 1, - "environmental_protection": 1, - "flags": [ "BLIND" ] - }, - { - "id": "boxer_briefs", - "type": "ARMOR", - "name": "boxer briefs", - "name_plural": "boxer briefs", - "description": "The age-old question, boxers or briefs? Your answer? Yes.", - "weight": "37 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "shorts", - "color": "light_gray", - "covers": [ "LEGS" ], - "coverage": 20, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "boxer_shorts", - "type": "ARMOR", - "name": "boxer shorts", - "name_plural": "boxer shorts", - "description": "Men's boxer shorts. More fashionable than briefs and just as comfortable.", - "weight": "42 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "boxer_briefs", - "color": "light_gray", - "covers": [ "LEGS" ], - "coverage": 25, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "boy_shorts", - "type": "ARMOR", - "name": "boy shorts", - "name_plural": "boy shorts", - "description": "Female underwear similar to men's boxer shorts, but much more close-fitting.", - "weight": "42 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "boxer_briefs", - "color": "light_gray", - "covers": [ "LEGS" ], - "coverage": 25, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "bra", - "type": "ARMOR", - "name": "bra", - "description": "A simple bra. For protecting those bits you don't want zombies to look at.", - "weight": "32 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "tank_top", - "color": "white", - "covers": [ "TORSO" ], - "coverage": 15, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, { "id": "breeches", "type": "ARMOR", @@ -291,25 +42,6 @@ "material_thickness": 2, "flags": [ "VARSIZE", "FANCY" ] }, - { - "id": "briefs", - "type": "ARMOR", - "name": "briefs", - "name_plural": "briefs", - "description": "A pair of briefs. Comfortable underwear worn by men.", - "weight": "32 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "boxer-briefs", - "color": "white", - "covers": [ "LEGS" ], - "coverage": 15, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, { "id": "bunker_pants", "repairs_like": "pants_leather", @@ -337,67 +69,6 @@ "environmental_protection": 6, "flags": [ "VARSIZE", "POCKETS", "STURDY", "WATERPROOF", "OUTER" ] }, - { - "id": "camisole", - "type": "ARMOR", - "name": "camisole", - "description": "A small camisole made from silk. Typically used as an undergarment, they are light and easy to wear.", - "weight": "42 g", - "volume": "500 ml", - "price": 2000, - "to_hit": -5, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "tank_top", - "color": "light_blue", - "covers": [ "TORSO" ], - "coverage": 45, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "cape_fp", - "repairs_like": "sheet", - "type": "ARMOR", - "name": "Foodperson's cape", - "description": "A brightly-colored cape emblazoned with the \"Fp\" symbol.", - "weight": "900 g", - "volume": "3 L", - "price": 5000, - "to_hit": -1, - "material": [ "cotton" ], - "symbol": "]", - "looks_like": "cloak", - "color": "pink", - "covers": [ "TORSO" ], - "coverage": 50, - "encumbrance": 4, - "warmth": 10, - "material_thickness": 1, - "flags": [ "OVERSIZE", "BELTED" ] - }, - { - "id": "cassock", - "repairs_like": "trenchcoat", - "type": "ARMOR", - "name": "cassock", - "name_plural": "cassocks", - "description": "A piece of clerical clothing, usually worn by Christian priests.", - "weight": "1200 g", - "volume": "5 L", - "price": 20000, - "to_hit": -5, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "robe", - "color": "dark_gray", - "covers": [ "LEGS", "TORSO", "ARMS" ], - "coverage": 90, - "encumbrance": 10, - "warmth": 20, - "material_thickness": 2, - "flags": [ "VARSIZE" ] - }, { "id": "chainmail_arms", "type": "ARMOR", @@ -440,27 +111,6 @@ "material_thickness": 4, "flags": [ "VARSIZE", "STURDY" ] }, - { - "id": "chainmail_hauberk", - "type": "ARMOR", - "category": "armor", - "name": "chainmail hauberk", - "description": "A fully customized chainmail outfit, leaving the head uncovered. The shirt, arms, and leggings have been modified with straps and combined with a gambeson to deal with uneven weight distribution, cold environments and to allow them to be used separately.", - "weight": "14430 g", - "volume": "2750 ml", - "price": 35988, - "to_hit": -1, - "material": [ "iron", "cotton" ], - "symbol": "[", - "looks_like": "armor_blarmor", - "color": "light_red", - "covers": [ "TORSO", "ARMS", "LEGS" ], - "coverage": 95, - "encumbrance": 20, - "warmth": 30, - "material_thickness": 6, - "flags": [ "VARSIZE", "STURDY" ] - }, { "id": "chaps_leather", "type": "ARMOR", @@ -482,81 +132,6 @@ "material_thickness": 3, "flags": [ "OUTER" ] }, - { - "id": "chestwrap", - "type": "ARMOR", - "name": "chestwrap", - "description": "Rags wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", - "weight": "64 g", - "volume": "500 ml", - "price": 500, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "tshirt", - "color": "brown", - "covers": [ "TORSO" ], - "coverage": 25, - "warmth": 5, - "material_thickness": 1, - "flags": [ "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "chestwrap_fur", - "type": "ARMOR", - "name": "fur chestwrap", - "description": "Fur pelts wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", - "weight": "154 g", - "volume": "750 ml", - "price": 700, - "material": [ "fur" ], - "symbol": "[", - "looks_like": "chestwrap_leather", - "color": "brown", - "covers": [ "TORSO" ], - "coverage": 25, - "encumbrance": 5, - "warmth": 20, - "material_thickness": 1, - "flags": [ "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "chestwrap_leather", - "type": "ARMOR", - "name": "leather chestwrap", - "description": "Leather patches wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", - "weight": "137 g", - "volume": "750 ml", - "price": 525, - "material": [ "leather" ], - "symbol": "[", - "looks_like": "chestwrap", - "color": "brown", - "covers": [ "TORSO" ], - "coverage": 25, - "encumbrance": 5, - "warmth": 10, - "material_thickness": 1, - "flags": [ "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "chestwrap_wool", - "type": "ARMOR", - "name": "wool chestwrap", - "description": "Felt patches wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", - "weight": "64 g", - "volume": "500 ml", - "price": 500, - "material": [ "wool" ], - "symbol": "[", - "looks_like": "chestwrap", - "color": "blue", - "covers": [ "TORSO" ], - "coverage": 25, - "encumbrance": 5, - "warmth": 15, - "material_thickness": 1, - "flags": [ "SKINTIGHT", "OVERSIZE" ] - }, { "id": "clown_wig", "repairs_like": "balaclava", @@ -591,27 +166,6 @@ "color": "red", "flags": [ "FANCY" ] }, - { - "id": "corset", - "type": "ARMOR", - "name": "leather corset", - "description": "A snug, black leather corset. Has no pockets, but its thick material provides good protection from harm.", - "weight": "640 g", - "volume": "1250 ml", - "price": 11000, - "to_hit": -3, - "material": [ "leather" ], - "symbol": "[", - "looks_like": "vest_leather", - "color": "dark_gray", - "covers": [ "TORSO" ], - "coverage": 75, - "encumbrance": 15, - "warmth": 25, - "material_thickness": 3, - "environmental_protection": 1, - "flags": [ "VARSIZE", "FANCY", "SKINTIGHT" ] - }, { "id": "cowl_wool", "type": "ARMOR", @@ -668,22 +222,6 @@ "material_thickness": 2, "flags": [ "FANCY" ] }, - { - "id": "ear_plugs", - "type": "ARMOR", - "name": "pair of ear plugs", - "name_plural": "pairs of ear plugs", - "description": "Industrial grade ear plugs. They fit inside the ear.", - "weight": "10 g", - "volume": "10 ml", - "price": 10, - "material": [ "plastic" ], - "symbol": ";", - "color": "light_gray", - "coverage": 1, - "material_thickness": 1, - "flags": [ "DEAF", "OVERSIZE", "POWERARMOR_COMPATIBLE" ] - }, { "id": "fencing_pants", "repairs_like": "miner_hat", @@ -708,113 +246,26 @@ }, { "id": "fishing_waders", - "repairs_like": "boots_larmor", - "type": "ARMOR", - "name": "pair of fishing waders", - "name_plural": "pairs of fishing waders", - "description": "Waterproof plastic fishing waders with a single large front pocket.", - "weight": "1360 g", - "volume": "9500 ml", - "price": 10000, - "material": [ "plastic" ], - "symbol": "[", - "looks_like": "pants_ski", - "color": "green", - "covers": [ "TORSO", "LEGS", "FEET" ], - "coverage": 100, - "encumbrance": 25, - "storage": "1500 ml", - "warmth": 5, - "material_thickness": 2, - "environmental_protection": 6, - "flags": [ "VARSIZE", "WATERPROOF" ] - }, - { - "id": "gobag", - "type": "ARMOR", - "name": "go bag", - "description": "A huge duffel bag with backpack attached, both packed to the gills. Judging by the feel, a National Guard soldier could have packed this to be ready for deployment. Activate to unpack and enjoy.", - "weight": "18043 g", - "volume": "35750 ml", - "price": 100000, - "to_hit": -5, - "material": [ "cotton", "plastic" ], - "symbol": "[", - "looks_like": "duffelbag", - "color": "green", - "covers": [ "TORSO", "ARMS" ], - "coverage": 50, - "encumbrance": 35, - "warmth": 10, - "material_thickness": 3, - "flags": [ "BELTED", "WATER_FRIENDLY" ], - "use_action": "GOBAG_NORMAL" - }, - { - "id": "personal_gobag", - "repairs_like": "backpack_hiking", - "type": "ARMOR", - "name": "personal go bag", - "description": "A huge duffel bag with backpack attached, both packed to the gills. You have packed this to be ready for deployment. Activate to unpack and enjoy.", - "looks_like": "gobag", - "use_action": "GOBAG_PERSONAL", - "copy-from": "gobag" - }, - { - "id": "hot_pants", - "type": "ARMOR", - "name": "hot pants", - "name_plural": "hot pants", - "description": "A simple pair of short shorts.", - "weight": "92 g", - "volume": "250 ml", - "price": 2500, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "boxer_briefs", - "color": "light_red", - "covers": [ "LEGS" ], - "coverage": 15, - "material_thickness": 1, - "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] - }, - { - "id": "hot_pants_fur", - "type": "ARMOR", - "name": "fur hot pants", - "name_plural": "fur hot pants", - "description": "A simple pair of fur short shorts.", - "weight": "118 g", - "volume": "250 ml", - "price": 5500, - "material": [ "fur" ], - "symbol": "[", - "looks_like": "hot_pants_leather", - "color": "brown", - "covers": [ "LEGS" ], - "coverage": 15, - "warmth": 10, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "hot_pants_leather", + "repairs_like": "boots_larmor", "type": "ARMOR", - "name": "leather hot pants", - "name_plural": "leather hot pants", - "description": "A simple pair of leather short shorts.", - "weight": "106 g", - "volume": "250 ml", - "price": 2500, - "material": [ "leather" ], + "name": "pair of fishing waders", + "name_plural": "pairs of fishing waders", + "description": "Waterproof plastic fishing waders with a single large front pocket.", + "weight": "1360 g", + "volume": "9500 ml", + "price": 10000, + "material": [ "plastic" ], "symbol": "[", - "looks_like": "hot_pants", - "color": "dark_gray", - "covers": [ "LEGS" ], - "coverage": 15, + "looks_like": "pants_ski", + "color": "green", + "covers": [ "TORSO", "LEGS", "FEET" ], + "coverage": 100, + "encumbrance": 25, + "storage": "1500 ml", "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] + "material_thickness": 2, + "environmental_protection": 6, + "flags": [ "VARSIZE", "WATERPROOF" ] }, { "id": "jeans", @@ -930,223 +381,6 @@ "material_thickness": 3, "flags": [ "VARSIZE" ] }, - { - "id": "leg_splint", - "type": "ARMOR", - "name": "leg splint", - "description": "A tool to help set bones and hold them in place.", - "weight": "500 g", - "volume": "1 L", - "price": 20000, - "material": [ "wood", "cotton" ], - "symbol": "[", - "looks_like": "legguard_hard", - "color": "white", - "covers": [ "LEG_EITHER" ], - "coverage": 75, - "encumbrance": 70, - "warmth": 5, - "material_thickness": 1, - "flags": [ "WATER_FRIENDLY", "OUTER", "SPLINT" ] - }, - { - "id": "leg_xlsplint", - "type": "ARMOR", - "name": "leg splint XL", - "description": "A tool to help set bones and hold them in place. It is specifically designed to fit Huge people.", - "copy-from": "leg_splint", - "weight": "1000 g", - "volume": "2 L", - "price": 25000, - "encumbrance": 140, - "flags": [ "OVERSIZE", "WATER_FRIENDLY", "OUTER", "SPLINT" ] - }, - { - "id": "leg_warmers", - "type": "ARMOR", - "name": "pair of leg warmers", - "name_plural": "pairs of leg warmers", - "description": "Snug, soft cloth sleeves to keep your legs warm.", - "weight": "46 g", - "volume": "500 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "leggings", - "color": "light_gray", - "covers": [ "LEGS" ], - "coverage": 60, - "encumbrance": 1, - "warmth": 20, - "material_thickness": 1, - "flags": [ "SKINTIGHT" ] - }, - { - "id": "leg_warmers_xl", - "type": "ARMOR", - "name": "pair of XL leg warmers", - "name_plural": "pairs of XL leg warmers", - "description": "Large, soft, snug cloth sleeves to keep your exotic anatomy warm.", - "weight": "50 g", - "volume": "750 ml", - "price": 20000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "leg_warmers", - "color": "light_gray", - "covers": [ "LEGS" ], - "coverage": 60, - "encumbrance": 7, - "warmth": 20, - "material_thickness": 2, - "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "leggings", - "type": "ARMOR", - "name": "leggings", - "name_plural": "leggings", - "description": "Skin-tight nylon leggings, sometimes used when exercising, that keep your legs nice and warm.", - "weight": "155 g", - "volume": "500 ml", - "price": 1000, - "material": [ "lycra" ], - "symbol": "[", - "looks_like": "leg_warmers", - "color": "dark_gray", - "covers": [ "LEGS" ], - "coverage": 100, - "warmth": 20, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] - }, - { - "id": "loincloth", - "type": "ARMOR", - "name": "loincloth", - "description": "Rags stitched together and tied into a makeshift loincloth. Covers your modesty, but not much else.", - "weight": "32 g", - "volume": "250 ml", - "price": 900, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "briefs", - "color": "brown", - "covers": [ "LEGS" ], - "coverage": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "loincloth_fur", - "type": "ARMOR", - "name": "fur loincloth", - "description": "A fur pelt tied into a loincloth. Covers your modesty, but not much else. Now you are a true barbarian warrior.", - "weight": "64 g", - "volume": "250 ml", - "price": 7500, - "material": [ "fur" ], - "symbol": "[", - "looks_like": "loincloth_leather", - "color": "brown", - "covers": [ "LEGS" ], - "coverage": 5, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "loincloth_leather", - "type": "ARMOR", - "name": "leather loincloth", - "description": "Leather patches stitched together and tied into a makeshift loincloth. Covers your modesty, but not much else.", - "weight": "64 g", - "volume": "250 ml", - "price": 7500, - "material": [ "leather" ], - "symbol": "[", - "looks_like": "loincloth", - "color": "brown", - "covers": [ "LEGS" ], - "coverage": 5, - "material_thickness": 2, - "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "loincloth_wool", - "type": "ARMOR", - "name": "wool loincloth", - "description": "Bits of wool stitched together and tied into a makeshift loincloth. Covers your modesty, but not much else.", - "weight": "56 g", - "volume": "250 ml", - "price": 900, - "material": [ "wool" ], - "symbol": "[", - "looks_like": "loincloth", - "color": "blue", - "covers": [ "LEGS" ], - "coverage": 5, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] - }, - { - "id": "long_underpants", - "type": "ARMOR", - "name": "long underwear bottom", - "description": "A pair of long underwear that help to maintain body temperature.", - "weight": "88 g", - "volume": "500 ml", - "price": 1500, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "leggings", - "color": "light_gray", - "covers": [ "LEGS" ], - "coverage": 95, - "encumbrance": 3, - "warmth": 30, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "long_undertop", - "type": "ARMOR", - "name": "long underwear top", - "description": "A long underwear top that helps to maintain body temperature.", - "weight": "96 g", - "volume": "500 ml", - "price": 1500, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "longshirt", - "color": "light_gray", - "covers": [ "TORSO", "ARMS" ], - "coverage": 95, - "encumbrance": 3, - "warmth": 30, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, - { - "id": "long_undertop_sleeveless", - "type": "ARMOR", - "name": "sleeveless underwear top", - "description": "A sleeveless underwear top that helps to maintain body temperature.", - "weight": "80 g", - "volume": "400 ml", - "price": 1200, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "long_undertop", - "color": "light_gray", - "covers": [ "TORSO" ], - "coverage": 95, - "encumbrance": 3, - "warmth": 30, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, { "id": "lsurvivor_pants", "type": "ARMOR", @@ -1229,25 +463,6 @@ "material_thickness": 1, "flags": [ "VARSIZE", "FANCY" ] }, - { - "id": "panties", - "type": "ARMOR", - "name": "panties", - "name_plural": "panties", - "description": "Underwear designed to be worn by women. Preserves your modesty in desperate times.", - "weight": "32 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "briefs", - "color": "white", - "covers": [ "LEGS" ], - "coverage": 15, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, { "id": "pants", "repairs_like": "jeans", @@ -1336,26 +551,6 @@ "material_thickness": 1, "flags": [ "VARSIZE" ] }, - { - "id": "leg_warmers_f", - "type": "ARMOR", - "name": "pair of fur leggings", - "name_plural": "pairs of fur leggings", - "description": "Snug fur sleeves to keep your legs warm. Simple yet effective since prehistoric times.", - "weight": "694 g", - "volume": "1500 ml", - "price": 1500, - "material": [ "fur" ], - "symbol": "[", - "looks_like": "leg_warmers", - "color": "brown", - "covers": [ "LEGS" ], - "coverage": 60, - "encumbrance": 3, - "warmth": 40, - "material_thickness": 2, - "flags": [ "VARSIZE" ] - }, { "id": "pants_fur", "type": "ARMOR", @@ -1461,20 +656,6 @@ "environmental_protection": 3, "flags": [ "VARSIZE", "POCKETS", "STURDY", "WATERPROOF" ] }, - { - "id": "pearl_collar", - "type": "ARMOR", - "name": "pearl collar", - "description": "A collar made from round and lustrous pearls, its former owner must be a wealthy individual.", - "weight": "30 g", - "volume": "300 ml", - "price": 590000, - "price_postapoc": 2000, - "material": [ "stone" ], - "symbol": "[", - "color": "white", - "flags": [ "SUPER_FANCY" ] - }, { "id": "postman_shorts", "repairs_like": "jeans", @@ -1563,23 +744,6 @@ "material_thickness": 3, "flags": [ "VARSIZE" ] }, - { - "id": "thermal_shirt", - "type": "ARMOR", - "name": "thermal shirt", - "description": "A lightweight, form-fitting long-sleeved spandex undershirt that helps maintains body temperature.", - "weight": "92 g", - "volume": "250 ml", - "price": 3200, - "material": [ "lycra" ], - "symbol": "[", - "color": "dark_gray", - "covers": [ "TORSO", "ARMS" ], - "coverage": 95, - "warmth": 20, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] - }, { "id": "tie_skinny", "type": "ARMOR", @@ -1705,24 +869,6 @@ "msg": "You unroll up the fur sleeping bag." } }, - { - "id": "sports_bra", - "type": "ARMOR", - "name": "sports bra", - "description": "A sturdy nylon bra to provide additional support during physical movement. Typically worn when exercising, it clings to the skin and is easy to wear.", - "weight": "92 g", - "volume": "500 ml", - "price": 4200, - "material": [ "lycra" ], - "symbol": "[", - "looks_like": "bra", - "color": "white", - "covers": [ "TORSO" ], - "coverage": 30, - "warmth": 5, - "material_thickness": 1, - "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] - }, { "id": "striped_pants", "repairs_like": "jeans", @@ -1746,23 +892,6 @@ "material_thickness": 2, "flags": [ "VARSIZE", "POCKETS" ] }, - { - "id": "tank_top", - "type": "ARMOR", - "name": "tank top", - "description": "A sleeveless cotton shirt. Very easy to move in.", - "weight": "78 g", - "volume": "250 ml", - "price": 500, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "tshirt", - "color": "light_gray", - "covers": [ "TORSO" ], - "coverage": 40, - "material_thickness": 1, - "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] - }, { "id": "technician_pants_gray", "repairs_like": "jeans", @@ -1830,26 +959,6 @@ "color": "green", "flags": [ "FANCY" ] }, - { - "id": "tights", - "repairs_like": "jeans", - "type": "ARMOR", - "name": "tights", - "name_plural": "tights", - "description": "A snug cloth garment which clings tightly to the legs and feet to protect them from the cold.", - "weight": "114 g", - "volume": "250 ml", - "price": 2000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "leggings", - "color": "dark_gray", - "covers": [ "FEET", "LEGS" ], - "coverage": 100, - "warmth": 10, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, { "id": "headscarf", "repairs_like": "miner_hat", @@ -1871,61 +980,6 @@ "material_thickness": 1, "flags": [ "OVERSIZE", "ALLOWS_NATURAL_ATTACKS" ] }, - { - "id": "under_armor", - "type": "ARMOR", - "name": "compression top", - "description": "Nylon sportswear that clings to your chest and maintains body temperature.", - "weight": "92 g", - "volume": "250 ml", - "price": 2000, - "material": [ "lycra" ], - "symbol": "[", - "looks_like": "longshirt", - "color": "dark_gray", - "covers": [ "TORSO" ], - "coverage": 95, - "warmth": 20, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] - }, - { - "id": "under_armor_shorts", - "type": "ARMOR", - "name": "compression shorts", - "name_plural": "compression shorts", - "description": "Nylon sportswear that clings to your upper legs, aiding muscle tone and maintaining warmth.", - "weight": "82 g", - "volume": "250 ml", - "price": 2000, - "material": [ "lycra" ], - "symbol": "[", - "looks_like": "shorts", - "color": "dark_gray", - "covers": [ "LEGS" ], - "coverage": 45, - "warmth": 20, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] - }, - { - "id": "undershirt", - "type": "ARMOR", - "name": "undershirt", - "description": "A simple white undershirt. Worn beneath your regular clothes, it provides a little extra warmth.", - "weight": "64 g", - "volume": "250 ml", - "price": 1000, - "material": [ "cotton" ], - "symbol": "[", - "looks_like": "tshirt", - "color": "white", - "covers": [ "TORSO" ], - "coverage": 60, - "warmth": 10, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT" ] - }, { "id": "veil_wedding", "repairs_like": "miner_hat", @@ -2008,22 +1062,5 @@ "material_thickness": 1, "environmental_protection": 1, "flags": [ "OVERSIZE", "OUTER", "WATERPROOF", "ALLOWS_NATURAL_ATTACKS" ] - }, - { - "id": "unitard", - "type": "ARMOR", - "name": "unitard", - "description": "A skin-tight spandex garment resembling a crew necked leotard combined with leggings. Commonly used by gymnasts, dancers and equestrian vaulters, the unitard provides overall coverage with great flexibility.", - "weight": "110 g", - "volume": "250 ml", - "price": 3100, - "material": [ "lycra" ], - "symbol": "[", - "color": "dark_gray", - "covers": [ "TORSO", "LEGS" ], - "coverage": 90, - "warmth": 20, - "material_thickness": 1, - "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] } ] diff --git a/data/json/items/armor/cloaks.json b/data/json/items/armor/cloaks.json index 97b5ddec67440..4e7eec53c9316 100644 --- a/data/json/items/armor/cloaks.json +++ b/data/json/items/armor/cloaks.json @@ -21,6 +21,27 @@ "environmental_protection": 1, "flags": [ "OVERSIZE", "OUTER", "ALLOWS_NATURAL_ATTACKS" ] }, + { + "id": "cape_fp", + "repairs_like": "sheet", + "type": "ARMOR", + "name": "Foodperson's cape", + "description": "A brightly-colored cape emblazoned with the \"Fp\" symbol.", + "weight": "900 g", + "volume": "3 L", + "price": 5000, + "to_hit": -1, + "material": [ "cotton" ], + "symbol": "]", + "looks_like": "cloak", + "color": "pink", + "covers": [ "TORSO" ], + "coverage": 50, + "encumbrance": 4, + "warmth": 10, + "material_thickness": 1, + "flags": [ "OVERSIZE", "BELTED" ] + }, { "id": "cloak", "type": "ARMOR", diff --git a/data/json/items/armor/coats.json b/data/json/items/armor/coats.json index d425542d149b7..0a619c08ba18d 100644 --- a/data/json/items/armor/coats.json +++ b/data/json/items/armor/coats.json @@ -24,6 +24,28 @@ "environmental_protection": 6, "flags": [ "VARSIZE", "POCKETS", "STURDY", "WATERPROOF", "RAINPROOF", "OUTER" ] }, + { + "id": "cassock", + "repairs_like": "trenchcoat", + "type": "ARMOR", + "name": "cassock", + "name_plural": "cassocks", + "description": "A piece of clerical clothing, usually worn by Christian priests.", + "weight": "1200 g", + "volume": "5 L", + "price": 20000, + "to_hit": -5, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "robe", + "color": "dark_gray", + "covers": [ "LEGS", "TORSO", "ARMS" ], + "coverage": 90, + "encumbrance": 10, + "warmth": 20, + "material_thickness": 2, + "flags": [ "VARSIZE" ] + }, { "id": "coat_fur", "type": "ARMOR", diff --git a/data/json/items/armor/jewelry.json b/data/json/items/armor/jewelry.json index 4a2581bf3ae82..ba838fd4e19fd 100644 --- a/data/json/items/armor/jewelry.json +++ b/data/json/items/armor/jewelry.json @@ -185,6 +185,19 @@ "description": "Fake teeth inlaid with citrines, worn over the teeth. It looks very shiny.", "color": "yellow" }, + { + "id": "barrette", + "type": "ARMOR", + "name": "barrette", + "description": "A barrette with lots of ornaments.", + "weight": "5 g", + "volume": 0, + "price": 800, + "material": [ "plastic" ], + "symbol": "[", + "color": "pink", + "flags": [ "FANCY" ] + }, { "id": "blue_topaz_dental_grill", "type": "ARMOR", @@ -996,6 +1009,20 @@ "color": "green", "flags": [ "FANCY" ] }, + { + "id": "pearl_collar", + "type": "ARMOR", + "name": "pearl collar", + "description": "A collar made from round and lustrous pearls, its former owner must be a wealthy individual.", + "weight": "30 g", + "volume": "300 ml", + "price": 590000, + "price_postapoc": 2000, + "material": [ "stone" ], + "symbol": "[", + "color": "white", + "flags": [ "SUPER_FANCY" ] + }, { "id": "platinum_watch", "type": "ARMOR", diff --git a/data/json/items/armor/legs_clothes.json b/data/json/items/armor/legs_clothes.json new file mode 100644 index 0000000000000..c6b3dd7d5b804 --- /dev/null +++ b/data/json/items/armor/legs_clothes.json @@ -0,0 +1,147 @@ +[ + { + "id": "hot_pants", + "type": "ARMOR", + "name": "hot pants", + "name_plural": "hot pants", + "description": "A simple pair of short shorts.", + "weight": "92 g", + "volume": "250 ml", + "price": 2500, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "boxer_briefs", + "color": "light_red", + "covers": [ "LEGS" ], + "coverage": 15, + "material_thickness": 1, + "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] + }, + { + "id": "hot_pants_fur", + "type": "ARMOR", + "name": "fur hot pants", + "name_plural": "fur hot pants", + "description": "A simple pair of fur short shorts.", + "weight": "118 g", + "volume": "250 ml", + "price": 5500, + "material": [ "fur" ], + "symbol": "[", + "looks_like": "hot_pants_leather", + "color": "brown", + "covers": [ "LEGS" ], + "coverage": 15, + "warmth": 10, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "hot_pants_leather", + "type": "ARMOR", + "name": "leather hot pants", + "name_plural": "leather hot pants", + "description": "A simple pair of leather short shorts.", + "weight": "106 g", + "volume": "250 ml", + "price": 2500, + "material": [ "leather" ], + "symbol": "[", + "looks_like": "hot_pants", + "color": "dark_gray", + "covers": [ "LEGS" ], + "coverage": 15, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "leggings", + "type": "ARMOR", + "name": "leggings", + "name_plural": "leggings", + "description": "Skin-tight nylon leggings, sometimes used when exercising, that keep your legs nice and warm.", + "weight": "155 g", + "volume": "500 ml", + "price": 1000, + "material": [ "lycra" ], + "symbol": "[", + "looks_like": "leg_warmers", + "color": "dark_gray", + "covers": [ "LEGS" ], + "coverage": 100, + "warmth": 20, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] + }, + { + "id": "loincloth", + "type": "ARMOR", + "name": "loincloth", + "description": "Rags stitched together and tied into a makeshift loincloth. Covers your modesty, but not much else.", + "weight": "32 g", + "volume": "250 ml", + "price": 900, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "briefs", + "color": "brown", + "covers": [ "LEGS" ], + "coverage": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "loincloth_fur", + "type": "ARMOR", + "name": "fur loincloth", + "description": "A fur pelt tied into a loincloth. Covers your modesty, but not much else. Now you are a true barbarian warrior.", + "weight": "64 g", + "volume": "250 ml", + "price": 7500, + "material": [ "fur" ], + "symbol": "[", + "looks_like": "loincloth_leather", + "color": "brown", + "covers": [ "LEGS" ], + "coverage": 5, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "loincloth_leather", + "type": "ARMOR", + "name": "leather loincloth", + "description": "Leather patches stitched together and tied into a makeshift loincloth. Covers your modesty, but not much else.", + "weight": "64 g", + "volume": "250 ml", + "price": 7500, + "material": [ "leather" ], + "symbol": "[", + "looks_like": "loincloth", + "color": "brown", + "covers": [ "LEGS" ], + "coverage": 5, + "material_thickness": 2, + "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "loincloth_wool", + "type": "ARMOR", + "name": "wool loincloth", + "description": "Bits of wool stitched together and tied into a makeshift loincloth. Covers your modesty, but not much else.", + "weight": "56 g", + "volume": "250 ml", + "price": 900, + "material": [ "wool" ], + "symbol": "[", + "looks_like": "loincloth", + "color": "blue", + "covers": [ "LEGS" ], + "coverage": 5, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] + } +] diff --git a/data/json/items/armor/suits_protection.json b/data/json/items/armor/suits_protection.json index 4e6300830d83d..508b35d2a1e3c 100644 --- a/data/json/items/armor/suits_protection.json +++ b/data/json/items/armor/suits_protection.json @@ -374,6 +374,27 @@ "environmental_protection": 1, "flags": [ "VARSIZE", "OUTER" ] }, + { + "id": "chainmail_hauberk", + "type": "ARMOR", + "category": "armor", + "name": "chainmail hauberk", + "description": "A fully customized chainmail outfit, leaving the head uncovered. The shirt, arms, and leggings have been modified with straps and combined with a gambeson to deal with uneven weight distribution, cold environments and to allow them to be used separately.", + "weight": "14430 g", + "volume": "2750 ml", + "price": 35988, + "to_hit": -1, + "material": [ "iron", "cotton" ], + "symbol": "[", + "looks_like": "armor_blarmor", + "color": "light_red", + "covers": [ "TORSO", "ARMS", "LEGS" ], + "coverage": 95, + "encumbrance": 20, + "warmth": 30, + "material_thickness": 6, + "flags": [ "VARSIZE", "STURDY" ] + }, { "id": "chainmail_suit", "type": "ARMOR", diff --git a/data/json/items/armor/undergarment.json b/data/json/items/armor/undergarment.json new file mode 100644 index 0000000000000..c9e7fad03030a --- /dev/null +++ b/data/json/items/armor/undergarment.json @@ -0,0 +1,598 @@ +[ + { + "id": "arm_warmers", + "type": "ARMOR", + "name": "pair of arm warmers", + "name_plural": "pairs of arm warmers", + "description": "Snug, soft cloth sleeves to keep your arms warm.", + "weight": "32 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "armguard_larmor", + "color": "light_gray", + "covers": [ "ARMS" ], + "coverage": 80, + "encumbrance": 1, + "warmth": 20, + "material_thickness": 1, + "flags": [ "SKINTIGHT" ] + }, + { + "id": "army_top", + "type": "ARMOR", + "name": "camo tank top", + "description": "A sleeveless cotton shirt with camouflage dye. Very easy to move in.", + "weight": "78 g", + "volume": "250 ml", + "price": 1500, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "tank_top", + "color": "green", + "covers": [ "TORSO" ], + "coverage": 60, + "material_thickness": 1, + "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] + }, + { + "id": "bikini_bottom", + "type": "ARMOR", + "name": "bikini bottom", + "description": "A simple bikini bottom.", + "weight": "32 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "panties", + "color": "light_red", + "covers": [ "LEGS" ], + "coverage": 15, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] + }, + { + "id": "bikini_top", + "type": "ARMOR", + "name": "bikini top", + "description": "A simple bikini top.", + "weight": "32 g", + "volume": "250 ml", + "price": 1800, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "bra", + "color": "light_red", + "covers": [ "TORSO" ], + "coverage": 10, + "material_thickness": 1, + "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] + }, + { + "id": "bikini_top_fur", + "type": "ARMOR", + "name": "fur bikini top", + "description": "A simple fur bikini top.", + "weight": "44 g", + "volume": "250 ml", + "price": 4900, + "material": [ "fur" ], + "symbol": "[", + "looks_like": "bikini_top", + "color": "brown", + "covers": [ "TORSO" ], + "coverage": 10, + "warmth": 10, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "bikini_top_leather", + "type": "ARMOR", + "name": "leather bikini top", + "description": "A simple leather bikini top.", + "weight": "38 g", + "volume": "250 ml", + "price": 3500, + "material": [ "leather" ], + "symbol": "[", + "looks_like": "bikini_top", + "color": "dark_gray", + "covers": [ "TORSO" ], + "coverage": 10, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "boxer_briefs", + "type": "ARMOR", + "name": "boxer briefs", + "name_plural": "boxer briefs", + "description": "The age-old question, boxers or briefs? Your answer? Yes.", + "weight": "37 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "shorts", + "color": "light_gray", + "covers": [ "LEGS" ], + "coverage": 20, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "boxer_shorts", + "type": "ARMOR", + "name": "boxer shorts", + "name_plural": "boxer shorts", + "description": "Men's boxer shorts. More fashionable than briefs and just as comfortable.", + "weight": "42 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "boxer_briefs", + "color": "light_gray", + "covers": [ "LEGS" ], + "coverage": 25, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "boy_shorts", + "type": "ARMOR", + "name": "boy shorts", + "name_plural": "boy shorts", + "description": "Female underwear similar to men's boxer shorts, but much more close-fitting.", + "weight": "42 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "boxer_briefs", + "color": "light_gray", + "covers": [ "LEGS" ], + "coverage": 25, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "bra", + "type": "ARMOR", + "name": "bra", + "description": "A simple bra. For protecting those bits you don't want zombies to look at.", + "weight": "32 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "tank_top", + "color": "white", + "covers": [ "TORSO" ], + "coverage": 15, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "briefs", + "type": "ARMOR", + "name": "briefs", + "name_plural": "briefs", + "description": "A pair of briefs. Comfortable underwear worn by men.", + "weight": "32 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "boxer-briefs", + "color": "white", + "covers": [ "LEGS" ], + "coverage": 15, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "camisole", + "type": "ARMOR", + "name": "camisole", + "description": "A small camisole made from silk. Typically used as an undergarment, they are light and easy to wear.", + "weight": "42 g", + "volume": "500 ml", + "price": 2000, + "to_hit": -5, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "tank_top", + "color": "light_blue", + "covers": [ "TORSO" ], + "coverage": 45, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "chestwrap", + "type": "ARMOR", + "name": "chestwrap", + "description": "Rags wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", + "weight": "64 g", + "volume": "500 ml", + "price": 500, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "tshirt", + "color": "brown", + "covers": [ "TORSO" ], + "coverage": 25, + "warmth": 5, + "material_thickness": 1, + "flags": [ "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "chestwrap_fur", + "type": "ARMOR", + "name": "fur chestwrap", + "description": "Fur pelts wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", + "weight": "154 g", + "volume": "750 ml", + "price": 700, + "material": [ "fur" ], + "symbol": "[", + "looks_like": "chestwrap_leather", + "color": "brown", + "covers": [ "TORSO" ], + "coverage": 25, + "encumbrance": 5, + "warmth": 20, + "material_thickness": 1, + "flags": [ "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "chestwrap_leather", + "type": "ARMOR", + "name": "leather chestwrap", + "description": "Leather patches wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", + "weight": "137 g", + "volume": "750 ml", + "price": 525, + "material": [ "leather" ], + "symbol": "[", + "looks_like": "chestwrap", + "color": "brown", + "covers": [ "TORSO" ], + "coverage": 25, + "encumbrance": 5, + "warmth": 10, + "material_thickness": 1, + "flags": [ "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "chestwrap_wool", + "type": "ARMOR", + "name": "wool chestwrap", + "description": "Felt patches wrapped around the chest. Preserves your modesty and keeps things out of the way, but not good for much else.", + "weight": "64 g", + "volume": "500 ml", + "price": 500, + "material": [ "wool" ], + "symbol": "[", + "looks_like": "chestwrap", + "color": "blue", + "covers": [ "TORSO" ], + "coverage": 25, + "encumbrance": 5, + "warmth": 15, + "material_thickness": 1, + "flags": [ "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "corset", + "type": "ARMOR", + "name": "leather corset", + "description": "A snug, black leather corset. Has no pockets, but its thick material provides good protection from harm.", + "weight": "640 g", + "volume": "1250 ml", + "price": 11000, + "to_hit": -3, + "material": [ "leather" ], + "symbol": "[", + "looks_like": "vest_leather", + "color": "dark_gray", + "covers": [ "TORSO" ], + "coverage": 75, + "encumbrance": 15, + "warmth": 25, + "material_thickness": 3, + "environmental_protection": 1, + "flags": [ "VARSIZE", "FANCY", "SKINTIGHT" ] + }, + { + "id": "leg_warmers", + "type": "ARMOR", + "name": "pair of leg warmers", + "name_plural": "pairs of leg warmers", + "description": "Snug, soft cloth sleeves to keep your legs warm.", + "weight": "46 g", + "volume": "500 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "leggings", + "color": "light_gray", + "covers": [ "LEGS" ], + "coverage": 60, + "encumbrance": 1, + "warmth": 20, + "material_thickness": 1, + "flags": [ "SKINTIGHT" ] + }, + { + "id": "leg_warmers_f", + "type": "ARMOR", + "name": "pair of fur leggings", + "name_plural": "pairs of fur leggings", + "description": "Snug fur sleeves to keep your legs warm. Simple yet effective since prehistoric times.", + "weight": "694 g", + "volume": "1500 ml", + "price": 1500, + "material": [ "fur" ], + "symbol": "[", + "looks_like": "leg_warmers", + "color": "brown", + "covers": [ "LEGS" ], + "coverage": 60, + "encumbrance": 3, + "warmth": 40, + "material_thickness": 2, + "flags": [ "VARSIZE" ] + }, + { + "id": "leg_warmers_xl", + "type": "ARMOR", + "name": "pair of XL leg warmers", + "name_plural": "pairs of XL leg warmers", + "description": "Large, soft, snug cloth sleeves to keep your exotic anatomy warm.", + "weight": "50 g", + "volume": "750 ml", + "price": 20000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "leg_warmers", + "color": "light_gray", + "covers": [ "LEGS" ], + "coverage": 60, + "encumbrance": 7, + "warmth": 20, + "material_thickness": 2, + "flags": [ "VARSIZE", "SKINTIGHT", "OVERSIZE" ] + }, + { + "id": "long_underpants", + "type": "ARMOR", + "name": "long underwear bottom", + "description": "A pair of long underwear that help to maintain body temperature.", + "weight": "88 g", + "volume": "500 ml", + "price": 1500, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "leggings", + "color": "light_gray", + "covers": [ "LEGS" ], + "coverage": 95, + "encumbrance": 3, + "warmth": 30, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "long_undertop", + "type": "ARMOR", + "name": "long underwear top", + "description": "A long underwear top that helps to maintain body temperature.", + "weight": "96 g", + "volume": "500 ml", + "price": 1500, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "longshirt", + "color": "light_gray", + "covers": [ "TORSO", "ARMS" ], + "coverage": 95, + "encumbrance": 3, + "warmth": 30, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "long_undertop_sleeveless", + "type": "ARMOR", + "name": "sleeveless underwear top", + "description": "A sleeveless underwear top that helps to maintain body temperature.", + "weight": "80 g", + "volume": "400 ml", + "price": 1200, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "long_undertop", + "color": "light_gray", + "covers": [ "TORSO" ], + "coverage": 95, + "encumbrance": 3, + "warmth": 30, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "panties", + "type": "ARMOR", + "name": "panties", + "name_plural": "panties", + "description": "Underwear designed to be worn by women. Preserves your modesty in desperate times.", + "weight": "32 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "briefs", + "color": "white", + "covers": [ "LEGS" ], + "coverage": 15, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "thermal_shirt", + "type": "ARMOR", + "name": "thermal shirt", + "description": "A lightweight, form-fitting long-sleeved spandex undershirt that helps maintains body temperature.", + "weight": "92 g", + "volume": "250 ml", + "price": 3200, + "material": [ "lycra" ], + "symbol": "[", + "color": "dark_gray", + "covers": [ "TORSO", "ARMS" ], + "coverage": 95, + "warmth": 20, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] + }, + { + "id": "sports_bra", + "type": "ARMOR", + "name": "sports bra", + "description": "A sturdy nylon bra to provide additional support during physical movement. Typically worn when exercising, it clings to the skin and is easy to wear.", + "weight": "92 g", + "volume": "500 ml", + "price": 4200, + "material": [ "lycra" ], + "symbol": "[", + "looks_like": "bra", + "color": "white", + "covers": [ "TORSO" ], + "coverage": 30, + "warmth": 5, + "material_thickness": 1, + "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] + }, + { + "id": "tank_top", + "type": "ARMOR", + "name": "tank top", + "description": "A sleeveless cotton shirt. Very easy to move in.", + "weight": "78 g", + "volume": "250 ml", + "price": 500, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "tshirt", + "color": "light_gray", + "covers": [ "TORSO" ], + "coverage": 40, + "material_thickness": 1, + "flags": [ "VARSIZE", "WATER_FRIENDLY", "SKINTIGHT" ] + }, + { + "id": "tights", + "repairs_like": "jeans", + "type": "ARMOR", + "name": "tights", + "name_plural": "tights", + "description": "A snug cloth garment which clings tightly to the legs and feet to protect them from the cold.", + "weight": "114 g", + "volume": "250 ml", + "price": 2000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "leggings", + "color": "dark_gray", + "covers": [ "FEET", "LEGS" ], + "coverage": 100, + "warmth": 10, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "under_armor", + "type": "ARMOR", + "name": "compression top", + "description": "Nylon sportswear that clings to your chest and maintains body temperature.", + "weight": "92 g", + "volume": "250 ml", + "price": 2000, + "material": [ "lycra" ], + "symbol": "[", + "looks_like": "longshirt", + "color": "dark_gray", + "covers": [ "TORSO" ], + "coverage": 95, + "warmth": 20, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] + }, + { + "id": "under_armor_shorts", + "type": "ARMOR", + "name": "compression shorts", + "name_plural": "compression shorts", + "description": "Nylon sportswear that clings to your upper legs, aiding muscle tone and maintaining warmth.", + "weight": "82 g", + "volume": "250 ml", + "price": 2000, + "material": [ "lycra" ], + "symbol": "[", + "looks_like": "shorts", + "color": "dark_gray", + "covers": [ "LEGS" ], + "coverage": 45, + "warmth": 20, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] + }, + { + "id": "undershirt", + "type": "ARMOR", + "name": "undershirt", + "description": "A simple white undershirt. Worn beneath your regular clothes, it provides a little extra warmth.", + "weight": "64 g", + "volume": "250 ml", + "price": 1000, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "tshirt", + "color": "white", + "covers": [ "TORSO" ], + "coverage": 60, + "warmth": 10, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT" ] + }, + { + "id": "unitard", + "type": "ARMOR", + "name": "unitard", + "description": "A skin-tight spandex garment resembling a crew necked leotard combined with leggings. Commonly used by gymnasts, dancers and equestrian vaulters, the unitard provides overall coverage with great flexibility.", + "weight": "110 g", + "volume": "250 ml", + "price": 3100, + "material": [ "lycra" ], + "symbol": "[", + "color": "dark_gray", + "covers": [ "TORSO", "LEGS" ], + "coverage": 90, + "warmth": 20, + "material_thickness": 1, + "flags": [ "VARSIZE", "SKINTIGHT", "WATER_FRIENDLY" ] + } +] diff --git a/data/json/items/comestibles/med.json b/data/json/items/comestibles/med.json index 51b60dba8fa6f..2fe8d170f9c94 100644 --- a/data/json/items/comestibles/med.json +++ b/data/json/items/comestibles/med.json @@ -27,7 +27,11 @@ "stack_size": 30, "symbol": "!", "color": "yellow", - "use_action": "MELATONIN_TABLET" + "use_action": { + "type": "consume_drug", + "activation_message": "You pop a melatonin tablet.", + "effects": [ { "id": "melatonin", "duration": "16 h" } ] + } }, { "id": "adderall", diff --git a/data/json/items/tool/cooking.json b/data/json/items/tool/cooking.json index 5a87b70160121..e03bb6635fa0c 100644 --- a/data/json/items/tool/cooking.json +++ b/data/json/items/tool/cooking.json @@ -629,8 +629,7 @@ { "id": "mortar_pestle", "type": "TOOL", - "name": "mortar and pestle", - "name_plural": "sets of mortar and pestle", + "name": { "str": "mortar and pestle", "str_pl": "mortars and pestles" }, "description": "This is a simple combination of a small grindstone and a bowl-shaped stone. Used for grinding grain, but time-consuming compared to more complex methods.", "weight": "1632 g", "volume": "1 L", diff --git a/data/json/items/tool/electronics.json b/data/json/items/tool/electronics.json index 46e344b6afe6a..7a4eda2bbcfb5 100644 --- a/data/json/items/tool/electronics.json +++ b/data/json/items/tool/electronics.json @@ -252,8 +252,7 @@ { "id": "geiger_off", "type": "TOOL", - "name": "geiger counter (off)", - "name_plural": "geiger counters (off)", + "name": { "str": "geiger counter (off)", "str_pl": "geiger counters (off)" }, "description": "This is a tool for measuring radiation. Using it will prompt you to choose whether to scan yourself or the terrain, or to turn it on, which will provide continuous feedback on ambient radiation. It is currently off.", "weight": "225 g", "volume": "500 ml", @@ -326,8 +325,7 @@ { "id": "mp3", "type": "TOOL", - "name": "mp3 player (off)", - "name_plural": "mp3 players (off)", + "name": { "str": "mp3 player (off)", "str_pl": "mp3 players (off)" }, "description": "This battery-powered device is loaded up with someone's music collection. Fortunately, there's lots of songs you like, and listening to it will raise your morale slightly. Use it to turn it on.", "weight": "140 g", "volume": "50 ml", @@ -526,8 +524,7 @@ { "id": "vibrator", "type": "TOOL", - "name": "vibrator", - "name_plural": "vibrators", + "name": { "str": "vibrator" }, "description": "This battery-devouring device is just the thing to knead the tension out and help you relax. Use it to take a break and unwind.", "weight": "453 g", "volume": "500 ml", diff --git a/data/json/items/tool/explosives.json b/data/json/items/tool/explosives.json index 8a0dfa27dca19..b6bf54621986f 100644 --- a/data/json/items/tool/explosives.json +++ b/data/json/items/tool/explosives.json @@ -316,11 +316,10 @@ { "id": "firecracker_pack", "type": "TOOL", - "name": "pack of firecrackers", - "name_plural": "packs of firecrackers", + "name": { "str": "pack of firecrackers", "str_pl": "packs of firecrackers" }, "description": "This is a pack of 25 firecrackers with a starter fuse. Use this item to light the fuse. Of course, you will need a lighter or some matches to do so. Shortly after you light the fuse they will begin to explode, so throw them quickly!", "weight": "75 g", - "volume": 0, + "volume": "50 ml", "price": 100, "to_hit": -3, "bashing": 1, diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index 28df06fe4b55e..4012d549a0f7b 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -185,8 +185,7 @@ { "id": "flashlight", "type": "TOOL", - "name": "flashlight (off)", - "name_plural": "flashlights (off)", + "name": { "str": "flashlight (off)", "str_pl": "flashlights (off)" }, "description": "This is a typical household flashlight with a plastic handle. Using this flashlight will turn it on and provide light, assuming it is charged with batteries.", "material": [ "plastic", "aluminum" ], "symbol": ";", @@ -365,8 +364,7 @@ { "id": "heavy_flashlight", "type": "TOOL", - "name": "heavy duty flashlight (off)", - "name_plural": "heavy duty flashlights (off)", + "name": { "str": "heavy duty flashlight (off)", "str_pl": "heavy duty flashlights (off)" }, "description": "This is a heavy duty tubular aluminum LED flashlight as often used by security guards. Makes for a passable melee weapon. Using this flashlight will turn it on and provide light, assuming it is charged with batteries.", "weight": "650 g", "volume": "750 ml", @@ -520,8 +518,7 @@ { "id": "oxylamp", "type": "TOOL", - "name": "acetylene lamp (off)", - "name_plural": "acetylene lamps (off)", + "name": { "str": "acetylene lamp (off)", "str_pl": "acetylene lamps (off)" }, "description": "An antique brass lamp designed to run from a pressurized cylinder of acetylene. It is an efficient, if not somewhat dangerous light source.", "weight": "800 g", "volume": "500 ml", @@ -555,11 +552,10 @@ { "id": "reading_light", "type": "TOOL", - "name": "reading light", - "name_plural": "reading lights", + "name": { "str": "reading light", "str_pl": "reading lights" }, "description": "A little clip-on LED light, meant for reading books in the dark.", "weight": "90 g", - "volume": 0, + "volume": "100 ml", "price": 100, "material": [ "plastic", "aluminum" ], "symbol": ";", @@ -646,8 +642,7 @@ { "id": "torch", "type": "TOOL", - "name": "torch", - "name_plural": "torches", + "name": { "str": "torch", "str_pl": "torches" }, "description": "This is a large stick, wrapped in rags that are soaked with a flammable material. When lit, produces a fair amount of light. You'll need a lighter or matches to light it.", "weight": "831 g", "volume": "750 ml", diff --git a/data/json/items/tool/radio_tools.json b/data/json/items/tool/radio_tools.json index 292fd4a096017..e1f6d6b01c80d 100644 --- a/data/json/items/tool/radio_tools.json +++ b/data/json/items/tool/radio_tools.json @@ -87,8 +87,7 @@ { "id": "radio", "type": "TOOL", - "name": "radio (off)", - "name_plural": "radios (off)", + "name": { "str": "radio (off)", "str_pl": "radios (off)" }, "description": "This is a portable radio. Using this radio turns it on. It will pick up any nearby signals being broadcast and play them audibly.", "weight": "295 g", "volume": "1 L", diff --git a/data/json/items/tool/traps.json b/data/json/items/tool/traps.json index 8faefe73240df..08fdc7ce9bd80 100644 --- a/data/json/items/tool/traps.json +++ b/data/json/items/tool/traps.json @@ -113,8 +113,7 @@ { "id": "caltrops", "type": "TOOL", - "name": "loose caltrops", - "name_plural": "loose caltrops", + "name": { "str": "loose caltrops", "str_pl": "loose caltrops" }, "description": "These are small metal objects covered with many sharp points. If an unsuspecting victim steps on one, they'll get a spine through the foot.", "weight": "264 g", "volume": "250 ml", @@ -136,8 +135,7 @@ { "id": "caltrops_glass", "type": "TOOL", - "name": "loose glass caltrops", - "name_plural": "loose glass caltrops", + "name": { "str": "loose glass caltrops", "str_pl": "loose glass caltrops" }, "description": "These are glass shards glued together to expose their sharp edges. If an unsuspecting victim steps on one, they'll get cut.", "weight": "264 g", "volume": "500 ml", diff --git a/data/json/items/tool/workshop.json b/data/json/items/tool/workshop.json index 214c86dcdfb17..bb70f3f9519ab 100644 --- a/data/json/items/tool/workshop.json +++ b/data/json/items/tool/workshop.json @@ -797,8 +797,7 @@ { "id": "toolbox", "type": "TOOL", - "name": "toolbox", - "name_plural": "toolboxes", + "name": { "str": "toolbox", "str_pl": "toolboxes" }, "description": "This is a stout metal box containing a complete tool kit suitable for most household maintenance and construction activities.", "weight": "3522 g", "volume": "2500 ml", diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index e061f18193fdf..8741959ed9930 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -1,4 +1,135 @@ [ + { + "id": "arm_splint", + "type": "ARMOR", + "name": "arm splint", + "description": "A tool to help set bones and hold them in place.", + "weight": "300 g", + "volume": "1 L", + "price": 20000, + "material": [ "wood", "cotton" ], + "symbol": "[", + "looks_like": "armguard_hard", + "color": "white", + "covers": [ "ARM_EITHER" ], + "coverage": 75, + "encumbrance": 70, + "warmth": 5, + "material_thickness": 1, + "flags": [ "WATER_FRIENDLY", "OUTER", "SPLINT" ] + }, + { + "id": "arm_xlsplint", + "type": "ARMOR", + "name": "arm splint XL", + "description": "A tool to help set bones and hold them in place. It is specifically designed to fit Huge survivors.", + "copy-from": "arm_splint", + "looks_like": "arm_splint", + "weight": "600 g", + "volume": "2 L", + "price": 25000, + "encumbrance": 140, + "flags": [ "OVERSIZE", "WATER_FRIENDLY", "OUTER", "SPLINT" ] + }, + { + "id": "blindfold", + "type": "ARMOR", + "name": "blindfold", + "//": "A folded bandana still takes up some space on the head.", + "description": "A simple fabric covering tied over the eyes to block sight. Useful for sleeping in bright areas.", + "weight": "72 g", + "volume": "250 ml", + "price": 600, + "material": [ "cotton" ], + "symbol": "[", + "looks_like": "scarf", + "color": "dark_gray", + "covers": [ "EYES" ], + "coverage": 95, + "encumbrance": 10, + "warmth": 5, + "material_thickness": 1, + "environmental_protection": 1, + "flags": [ "BLIND" ] + }, + { + "id": "ear_plugs", + "type": "ARMOR", + "name": "pair of ear plugs", + "name_plural": "pairs of ear plugs", + "description": "Industrial grade ear plugs. They fit inside the ear.", + "weight": "10 g", + "volume": "10 ml", + "price": 10, + "material": [ "plastic" ], + "symbol": ";", + "color": "light_gray", + "coverage": 1, + "material_thickness": 1, + "flags": [ "DEAF", "OVERSIZE", "POWERARMOR_COMPATIBLE" ] + }, + { + "id": "gobag", + "type": "ARMOR", + "name": "go bag", + "description": "A huge duffel bag with backpack attached, both packed to the gills. Judging by the feel, a National Guard soldier could have packed this to be ready for deployment. Activate to unpack and enjoy.", + "weight": "18043 g", + "volume": "35750 ml", + "price": 100000, + "to_hit": -5, + "material": [ "cotton", "plastic" ], + "symbol": "[", + "looks_like": "duffelbag", + "color": "green", + "covers": [ "TORSO", "ARMS" ], + "coverage": 50, + "encumbrance": 35, + "warmth": 10, + "material_thickness": 3, + "flags": [ "BELTED", "WATER_FRIENDLY" ], + "use_action": "GOBAG_NORMAL" + }, + { + "id": "personal_gobag", + "repairs_like": "backpack_hiking", + "type": "ARMOR", + "name": "personal go bag", + "description": "A huge duffel bag with backpack attached, both packed to the gills. You have packed this to be ready for deployment. Activate to unpack and enjoy.", + "looks_like": "gobag", + "use_action": "GOBAG_PERSONAL", + "copy-from": "gobag" + }, + { + "id": "leg_splint", + "type": "ARMOR", + "name": "leg splint", + "description": "A tool to help set bones and hold them in place.", + "weight": "500 g", + "volume": "1 L", + "price": 20000, + "material": [ "wood", "cotton" ], + "symbol": "[", + "looks_like": "legguard_hard", + "color": "white", + "covers": [ "LEG_EITHER" ], + "coverage": 75, + "encumbrance": 70, + "warmth": 5, + "material_thickness": 1, + "flags": [ "WATER_FRIENDLY", "OUTER", "SPLINT" ] + }, + { + "id": "leg_xlsplint", + "type": "ARMOR", + "name": "leg splint XL", + "description": "A tool to help set bones and hold them in place. It is specifically designed to fit Huge people.", + "copy-from": "leg_splint", + "weight": "1000 g", + "volume": "2 L", + "price": 25000, + "encumbrance": 140, + "flags": [ "OVERSIZE", "WATER_FRIENDLY", "OUTER", "SPLINT" ] + }, { "id": "miner_hat", "type": "TOOL_ARMOR", diff --git a/data/json/npcs/holdouts/Mr_Lapin.json b/data/json/npcs/holdouts/Mr_Lapin.json index 434f7ac346a90..69577816daba9 100644 --- a/data/json/npcs/holdouts/Mr_Lapin.json +++ b/data/json/npcs/holdouts/Mr_Lapin.json @@ -86,7 +86,7 @@ "no": "CRISPR? Radiation? Something in the water? Maybe it was bunnies." }, "responses": [ - { "text": "So it goes", "topic": "TALK_WARRENER" }, + { "text": "So it goes.", "topic": "TALK_WARRENER" }, { "text": "You're disgusting.", "topic": "TALK_WARRENER_MUTATION_INSULT" } ] }, diff --git a/data/json/recipes/food/brewing.json b/data/json/recipes/food/brewing.json index 21cd9be418d22..e5ff3e65bd65b 100644 --- a/data/json/recipes/food/brewing.json +++ b/data/json/recipes/food/brewing.json @@ -150,7 +150,7 @@ "book_learn": [ [ "brewing_cookbook", 1 ], [ "family_cookbook", 2 ] ], "qualities": [ { "id": "COOK", "level": 2 } ], "tools": [ [ [ "surface_heat", 6, "LIST" ] ] ], - "components": [ [ [ "water", 3 ], [ "water_clean", 3 ] ], [ [ "sweet_fruit", 2, "LIST" ], [ "juice", 1 ] ] ] + "components": [ [ [ "water", 3 ], [ "water_clean", 3 ] ], [ [ "sweet_fruit", 2, "LIST" ], [ "juice", 1 ] ], [ [ "yeast", 1 ] ] ] }, { "type": "recipe", diff --git a/data/json/recipes/other/tool.json b/data/json/recipes/other/tool.json index 50623b12a2b12..ba96198ffc175 100644 --- a/data/json/recipes/other/tool.json +++ b/data/json/recipes/other/tool.json @@ -13,6 +13,20 @@ "tools": [ [ [ "swage", -1 ] ] ], "components": [ [ [ "2x4", 1 ], [ "stick", 2 ] ] ] }, + { + "result": "hand_pump", + "type": "recipe", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_TOOLS", + "skill_used": "fabrication", + "difficulty": 5, + "skills_required": [ "mechanics", 2 ], + "time": "2 h", + "book_learn": [ [ "textbook_fabrication", 4 ], [ "welding_book", 5 ], [ "manual_mechanics", 4 ] ], + "using": [ [ "welding_standard", 1 ] ], + "qualities": [ { "id": "SCREW_FINE", "level": 1 }, { "id": "WRENCH", "level": 1 } ], + "components": [ [ [ "pipe", 2 ] ], [ [ "hose", 1 ] ], [ [ "scrap", 10 ] ] ] + }, { "result": "sickle", "type": "recipe", diff --git a/data/json/recipes/recipe_medsandchemicals.json b/data/json/recipes/recipe_medsandchemicals.json index f08b8adca9c06..8b15c820d3046 100644 --- a/data/json/recipes/recipe_medsandchemicals.json +++ b/data/json/recipes/recipe_medsandchemicals.json @@ -340,7 +340,7 @@ [ "tobacco_raw", 50 ], [ "nicotine_liquid", 50 ] ], - [ [ "lye", 50 ] ] + [ [ "lye", 2 ], [ "lye_powder", 50 ] ] ] }, { diff --git a/data/json/recipes/recipe_vehicle.json b/data/json/recipes/recipe_vehicle.json index aad0a9ad42299..0d9aa568ac043 100644 --- a/data/json/recipes/recipe_vehicle.json +++ b/data/json/recipes/recipe_vehicle.json @@ -452,6 +452,25 @@ "qualities": [ { "id": "DRILL", "level": 3 } ], "components": [ [ [ "scrap", 2 ] ] ] }, + { + "type": "recipe", + "result": "turret_mount", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_VEHICLE", + "skill_used": "mechanics", + "skills_required": [ "electronics", 1 ], + "difficulty": 3, + "time": "1 h", + "autolearn": true, + "using": [ [ "welding_standard", 3 ], [ "steel_standard", 2 ], [ "soldering_standard", 10 ] ], + "qualities": [ + { "id": "HAMMER", "level": 2 }, + { "id": "SAW_M", "level": 1 }, + { "id": "WRENCH", "level": 1 }, + { "id": "SCREW", "level": 1 } + ], + "components": [ [ [ "pipe", 3 ] ], [ [ "motor_tiny", 2 ] ], [ [ "spring", 1 ] ], [ [ "cable", 10 ] ] ] + }, { "type": "recipe", "result": "turret_controls", diff --git a/data/json/scenarios.json b/data/json/scenarios.json index 5a4d65271b510..a0934c2638528 100644 --- a/data/json/scenarios.json +++ b/data/json/scenarios.json @@ -16,7 +16,12 @@ "points": 0, "description": "Whether due to stubbornness, ignorance, or just plain bad luck, you missed the evacuation, and are stuck in a city full of the risen dead.", "allowed_locs": [ - "house", + "house_w_1", + "house_w_2", + "house_w_3", + "house_w_4", + "house_w_5", + "house_w_6", "s_grocery", "s_grocery_1", "s_garage", @@ -67,7 +72,12 @@ "points": -2, "description": "You've attracted the attention of living dead in some way, now they're all around and you'll likely have to fight thorough them if you want to escape.", "allowed_locs": [ - "house", + "house_w_1", + "house_w_2", + "house_w_3", + "house_w_4", + "house_w_5", + "house_w_6", "school", "s_grocery", "s_grocery_1", @@ -107,7 +117,12 @@ "points": -4, "start_name": "In Town", "allowed_locs": [ - "house", + "house_w_1", + "house_w_2", + "house_w_3", + "house_w_4", + "house_w_5", + "house_w_6", "school", "s_grocery", "s_grocery_1", @@ -134,7 +149,12 @@ "points": -2, "start_name": "In Town", "allowed_locs": [ - "house", + "house_w_1", + "house_w_2", + "house_w_3", + "house_w_4", + "house_w_5", + "house_w_6", "school", "s_grocery", "s_grocery_1", @@ -155,7 +175,12 @@ "description": "You start drunk to the point of incapacitation, depressed, infected, surrounded by fire, and sick with the flu. This day went downhill really fast.", "start_name": "In Town", "allowed_locs": [ - "house", + "house_w_1", + "house_w_2", + "house_w_3", + "house_w_4", + "house_w_5", + "house_w_6", "school", "s_grocery", "s_grocery_1", diff --git a/data/json/start_locations.json b/data/json/start_locations.json index 0347ceec85d0d..1ba9161c863b4 100644 --- a/data/json/start_locations.json +++ b/data/json/start_locations.json @@ -39,9 +39,39 @@ }, { "type": "start_location", - "ident": "house", + "ident": "house_w_1", "name": "House", - "target": "house" + "target": "house_w_1" + }, + { + "type": "start_location", + "ident": "house_w_2", + "name": "House", + "target": "house_w_2" + }, + { + "type": "start_location", + "ident": "house_w_3", + "name": "House", + "target": "house_w_3" + }, + { + "type": "start_location", + "ident": "house_w_4", + "name": "House", + "target": "house_w_4" + }, + { + "type": "start_location", + "ident": "house_w_5", + "name": "House", + "target": "house_w_5" + }, + { + "type": "start_location", + "ident": "house_w_6", + "name": "House", + "target": "house_w_6" }, { "type": "start_location", diff --git a/data/mods/Aftershock/recipes/recipes.json b/data/mods/Aftershock/recipes/recipes.json index 61cfedba89796..367bb1783ad6a 100644 --- a/data/mods/Aftershock/recipes/recipes.json +++ b/data/mods/Aftershock/recipes/recipes.json @@ -148,39 +148,6 @@ "qualities": [ { "id": "HAMMER", "level": 2 } ], "components": [ [ [ "sheet_metal", 1 ] ] ] }, - { - "type": "recipe", - "result": "turret_mount", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_VEHICLE", - "skill_used": "electronics", - "skills_required": [ [ "mechanics", 7 ], [ "computer", 6 ], [ "fabrication", 6 ] ], - "difficulty": 9, - "time": "8 h", - "reversible": true, - "decomp_learn": 9, - "book_learn": [ [ "recipe_lab_elec", 8 ], [ "textbook_robots", 10 ] ], - "using": [ [ "soldering_standard", 14 ], [ "welding_standard", 5 ], [ "forging_standard", 4 ], [ "steel_standard", 4 ] ], - "tools": [ [ [ "surface_heat", 30, "LIST" ] ] ], - "qualities": [ - { "id": "HAMMER", "level": 3 }, - { "id": "SCREW", "level": 1 }, - { "id": "WRENCH", "level": 2 }, - { "id": "SAW_M", "level": 1 }, - { "id": "DRILL", "level": 1 } - ], - "components": [ - [ [ "ai_module", 1 ] ], - [ [ "RAM", 1 ] ], - [ [ "gun_module", 1 ] ], - [ [ "small_storage_battery", 1 ] ], - [ [ "sensor_module", 1 ] ], - [ [ "identification_module", 1 ] ], - [ [ "power_supply", 1 ] ], - [ [ "pipe", 2 ] ], - [ [ "spring", 2 ] ] - ] - }, { "type": "recipe", "result": "thermometer", diff --git a/data/mods/classic_zombies/modinfo.json b/data/mods/classic_zombies/modinfo.json index 5fe43b5157298..9ef1c1e10f6b6 100644 --- a/data/mods/classic_zombies/modinfo.json +++ b/data/mods/classic_zombies/modinfo.json @@ -2,10 +2,10 @@ { "type": "MOD_INFO", "ident": "classic_zombies", - "name": "Classic zombies", + "name": "Cataclysm: Dark Days of the Dead (formerly Classic Zombies)", "authors": [ "Hirmuolio" ], - "maintainers": [ "" ], - "description": "Only spawn classic zombies and natural wildlife. This disables certain buildings and map extras.", + "maintainers": [ "I-am-Erk" ], + "description": "Only spawn classic zombies and natural wildlife. This disables certain buildings and map extras. The long term plan is to make this a classic zombie movie simulator set in the present day.", "category": "monster_exclude", "dependencies": [ "dda" ] }, diff --git a/doc/MODDING.md b/doc/MODDING.md index 6bd045efff5ef..c6435d7b790d3 100644 --- a/doc/MODDING.md +++ b/doc/MODDING.md @@ -1,55 +1,221 @@ -# Modding guide +# Modding guide Certain features of the game can be modified without rebuilding the game from source code. This includes professions, monsters, npcs, and more. Just modify the pertinent files and run the game to see your changes. The majority of modding is done by editing JSON files. An in-depth review of all json files and their appropriate fields is available in [JSON_INFO.md](JSON_INFO.md). -## Adding a profession. +## The basics -Let's say we want to add a "survivalist" profession. - -We'll say this profession starts with archery, survival, traps, beef jerky and a few survival items. We'll set the starting cost at 3 points since it modifies skills and items. We can do that with the following entries: +### Creating a barebones mod +A mod is created by creating a folder within Cataclysm's `data/mods` directory. The mod's properties are set by the `modinfo.json` file that is present within that folder. In order for Cataclysm to recognize the folder as a mod, it **must** have a `modinfo.json` file present within it. +### Modinfo.json +The modinfo.json file is a file that contains metadata for your mod. Every mod must have a `modinfo.json` file in order for Cataclysm to find it. +A barebones `modinfo.json` file looks like this: ````json -{ - "ident" : "survivalist", - "name": "Wilderness Survivalist", - "description": "You live off the wild and wander the world; you've never - had a place to live or items other than what you can - scavenge off the land. People called you crazy; now, - after the disaster, you're the sane one.", + { + "type": "MOD_INFO", + "ident": "Mod_ID", + "name": "Mod's Display Name", + "authors": [ "Your name here", "Your friend's name if you want" ], + "description": "Your description here", + "category": "content", + "dependencies": [ "dda" ] + } +```` +The `category` attribute denotes where the mod will appear in the mod selection menu. These are the available categories to choose from, with some examples chosen from mods that existed when this document was written. Pick whichever one applies best to your mod when writing your modinfo file. + - `content` - A mod that adds a lot of stuff. Typically reserved for very large mods or complete game overhauls (eg: Core game files, Aftershock) + - `items` - A mod that adds new items and recipes to the game (eg: More survival tools) + - `creatures` - A mod that adds new creatures or NPCs to the game (eg: Modular turrets) + - `misc_additions` - Miscellaneous content additions to the game (eg: Alternative map key, Crazy cataclysm) + - `buildings` - New overmap locations and structures (eg: Fuji's more buildings). If you're blacklisting buildings from spawning, this is also a usable category (eg: No rail stations). + - `vehicles` - New cars or vehicle parts (eg: Tanks and other vehicles) + - `rebalance` - A mod designed to rebalance the game in some way (eg: Safe autodocs). + - `magical` - A mod that adds something magic-related to the game (eg: Necromancy) + - `item_exclude` - A mod that stops items from spawning in the world (eg: No survivor armor, No drugs) + - `monster_exclude` - A mod that stops certain monster varieties from spawning in the world (eg: No fungal monsters, No ants) + - `graphical` - A mod that adjusts game graphics in some way (eg: Graphical overmap) + +The `dependencies` attribute is used to tell Cataclysm that your mod is dependent on something present in another mod. If you have no dependencies outside of the core game, then just including `dda` in the list is good enough. If your mod depends on another one to work properly, adding that mod's `ident` attribute to the array causes Cataclysm to force that mod to load before yours. - "points" : 3, - "items": ["pants_cargo", "boots", "beltrig", "selfbow", "jerky", "arrow_field_point"], +## Actually adding things to your mod +Now that you have a basic mod, you can get around to actually putting some stuff into it! - "skills" : [ - { - "name": "archery", - "level" : 1 - }, - { - "name" : "survival", - "level" : 1 - }, - { - "name" : "traps", - "level" : 1 - } - ] -}, +### File structure +It's a good idea to put different categories of additions into different json files. Any json files that are present in the mod folder or its subfolders will be detected and read by Cataclysm, but otherwise, there are no restrictions on what you can put where. + +### JSON_INFO.md +It's worth reading [JSON_INFO.md](JSON_INFO.md) to get a comprehensive list of everything you can do with these mods. The rest of this document will have a few examples to copy and paste, but it is by no means comprehensive. The base game's data is also defined in the same way as any mod you write, so taking a look through the game's json files (in `data/json`) can also teach you a lot. If the game finds any issues in your JSON syntax when you try to load a game world, it will spit out an error message, and you won't be able to load that game until the issue is fixed. + +### Adding a scenario +Scenarios are what the game uses to determine your general situation when you create a character. They determine when and where your character may spawn in the world, and what professions can be used. They are also used to determine whether those professions can have mutations starting out. Below you will find the JSON definition for the game's built-in `Large Building` scenario. +````json +[ + { + "type": "scenario", + "ident": "largebuilding", + "name": "Large Building", + "points": -2, + "description": "Whether due to stubbornness, ignorance, or just plain bad luck, you missed the evacuation, and are stuck in a large building full of the risen dead.", + "allowed_locs": [ + "mall_a_12", + "mall_a_30", + "apartments_con_tower_114", + "apartments_con_tower_014", + "apartments_con_tower_104", + "apartments_con_tower_004", + "hospital_1", + "hospital_2", + "hospital_3", + "hospital_4", + "hospital_5", + "hospital_6", + "hospital_7", + "hospital_8", + "hospital_9" + ], + "start_name": "In Large Building", + "flags": [ "SUR_START", "CITY_START", "LONE_START" ] + } +] ```` -After adding this to the `data/json/professions` file, we should see the new profession show up in the character creation screen. +### Adding a profession. +Professions are what the game calls the character classes you can choose from when the game starts. Professions can start with traits, skills, items, and even pets! Below is the definition for the Police Officer profession: +````json +[ + { + "type": "profession", + "ident": "cop", + "name": "Police Officer", + "description": "Just a small-town deputy when you got the call, you were still ready to come to the rescue. Except that soon it was you who needed rescuing - you were lucky to escape with your life. Who's going to respect your authority when the government this badge represents might not even exist anymore?", + "points": 2, + "skills": [ { "level": 3, "name": "gun" }, { "level": 3, "name": "pistol" } ], + "traits": [ "PROF_POLICE" ], + "items": { + "both": { + "items": [ "pants_army", "socks", "badge_deputy", "sheriffshirt", "police_belt", "boots", "whistle", "wristwatch" ], + "entries": [ + { "group": "charged_cell_phone" }, + { "group": "charged_two_way_radio" }, + { "item": "ear_plugs", "custom-flags": [ "no_auto_equip" ] }, + { "item": "usp_45", "ammo-item": "45_acp", "charges": 12, "container-item": "holster" }, + { "item": "legpouch_large", "contents-group": "army_mags_usp45" } + ] + }, + "male": [ "boxer_shorts" ], + "female": [ "bra", "boy_shorts" ] + } + } +] +```` -## Adding an item -1. Open the appropriate json in `data/json/items` and add your item near similar types. +### Adding an item +Items are where you really want to read the [JSON_INFO.md](JSON_INFO.md) file, just because there's so much that you can do with them, and every category of item is a little bit different. + +````json +[ + { + "id": "family_photo", + "type": "GENERIC", + "//": "Unique mission item for the CITY_COP.", + "category": "other", + "name": "family photo", + "description": "A photo of a smiling family on a camping trip. One of the parents looks like a cleaner, happier version of the person you know.", + "weight": "1 g", + "volume": 0, + "price": 800, + "material": [ "paper" ], + "symbol": "*", + "color": "light_gray" + } +] +```` -> **NOTE:** See `JSON_INFO` for a more in-depth review of each individual item .json file/flags +### Preventing monsters from spawning +This kind of mod is relatively simple, but very useful. If you don't want to deal with certain types of monsters in your world, this is how you do it. There are two ways to go about this, and both will be detailed below. You can blacklist entire monster groups, or you can blacklist certain monsters. In order to do either of those things, you need that monster's ID. These can be found in the relevant data files. For the core game, these are in the `data/json/monsters` directory. +The example below is from the `No Ants` mod, and will stop any kind of ant from spawning in-game. +````json +[ + { + "type": "MONSTER_BLACKLIST", + "categories": [ "GROUP_ANT", "GROUP_ANT_ACID" ] + }, + { + "type": "MONSTER_BLACKLIST", + "monsters": [ + "mon_ant_acid_larva", + "mon_ant_acid_soldier", + "mon_ant_acid_queen", + "mon_ant_larva", + "mon_ant_soldier", + "mon_ant_queen", + "mon_ant_acid", + "mon_ant" + ] + } +] +```` +### Preventing locations from spawning + +Preventing certain types of locations from spawning in-game is a little trickier depending on the type of thing you want to target. An overmap building can either be a standard building, or an overmap special. If you want to block things with a specific flag from spawning, you can blacklist those in a very similar manner to monsters. The example below is also from the `No Ants` mod, and stops all anthills from spawning. +````json +[ + { + "type": "region_overlay", + "regions": [ "all" ], + "overmap_feature_flag_settings": { "blacklist": [ "ANT" ] } + } +] +```` -2. Add the item to `data/json/itemgroups` to have it spawn in in-game locations +If the location you want to blacklist is an overmap special, you'll likely have to copy it from its definition, and manually set it's `occurrences` attribute to read `[ 0, 0 ]`. +Finally, if you're trying to blacklist something that spawns inside of cities, you can do that with a region overlay. The below example is used in the `No rail stations` mod, and stops railroad stations from spawning inside of cities. It doesn't stop the railroad station overmap special from spawning, though. +````json +[ + { + "type": "region_overlay", + "regions": [ "all" ], + "city": { "houses": { "railroad_city": 0 } } + } +] +```` ## Important note on json files The following characters: `[ { , } ] : "` are *very* important when adding or modifying JSON files. This means a single missing `,` or `[` or `}` can be the difference between a working file and a hanging game at startup. +If you want to include these characters in whatever you are doing (for instance, if you want to put a quote inside an item's description), you can do so by putting a backslash before the relevant character. This is known as "escaping" that character. For instance, I can make an item's description contain a quote if I want by doing this: +````json +... +"description": "This is a shirt that says \"I wanna kill ALL the zombies\" on the front.", +... +```` -Many editors have features that let you track `{ [` and `] }` to see if they're balanced (ie, have a matching opposite); [Notepad++](https://notepad-plus-plus.org/) is a popular, free editor on Windows that contains this feature. On Linux, there are a plethora of options, and you probably already have a preferred one 🙂 +In game, that appears like this: +`This is a shirt that says "I wanna kill ALL the zombies" on the front.` + +Many editors have features that let you track `{ [` and `] }` to see if they're balanced (ie, have a matching opposite); These editors will also respect escaped characters properly. [Notepad++](https://notepad-plus-plus.org/) is a popular, free editor on Windows that contains this feature. On Linux, there are a plethora of options, and you probably already have a preferred one 🙂 + +## Addendum + +### No Zombie Revival +This mod is very simple, but it's worth a special section because it does things a little differently than other mods, and documentation on it is tricky to find. + +The entire mod can fit into fifteen lines of JSON, and it's presented below. Just copy/paste that into a modinfo.json file, and put it in a new folder in your mods directory. +````json +[ + { + "type": "MOD_INFO", + "ident": "no_reviving_zombies", + "name": "Prevent Zombie Revivication", + "description": "Disables zombie revival.", + "category": "rebalance", + "dependencies": [ "dda" ] + }, + { + "type": "monster_adjustment", + "species": "ZOMBIE", + "flag": { "name": "REVIVES", "value": false } + } +] +```` diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index ccd046a9817ae..68a6fa96419d4 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -2341,7 +2341,7 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei }; int subtile = 0; int rotation = 0; - get_tile_values( f, neighborhood, subtile, rotation ); + get_tile_values( f.to_i(), neighborhood, subtile, rotation ); const std::string &fname = f.id().str(); if( g->m.check_seen_cache( p ) ) { g->u.memorize_tile( g->m.getabs( p ), fname, subtile, rotation ); @@ -2371,7 +2371,7 @@ bool cata_tiles::draw_furniture( const tripoint &p, const lit_level ll, int &hei }; int subtile = 0; int rotation = 0; - get_tile_values( f2, neighborhood, subtile, rotation ); + get_tile_values( f2.to_i(), neighborhood, subtile, rotation ); const std::string &fname = f2.id().str(); // tile overrides are never memorized // tile overrides are always shown with full visibility @@ -2415,7 +2415,7 @@ bool cata_tiles::draw_trap( const tripoint &p, const lit_level ll, int &height_3 }; int subtile = 0; int rotation = 0; - get_tile_values( tr, neighborhood, subtile, rotation ); + get_tile_values( tr.to_i(), neighborhood, subtile, rotation ); const std::string trname = tr.id().str(); if( g->m.check_seen_cache( p ) ) { g->u.memorize_tile( g->m.getabs( p ), trname, subtile, rotation ); @@ -2445,7 +2445,7 @@ bool cata_tiles::draw_trap( const tripoint &p, const lit_level ll, int &height_3 }; int subtile = 0; int rotation = 0; - get_tile_values( tr2, neighborhood, subtile, rotation ); + get_tile_values( tr2.to_i(), neighborhood, subtile, rotation ); const std::string &trname = tr2.id().str(); // tile overrides are never memorized // tile overrides are always shown with full visibility @@ -2503,7 +2503,7 @@ bool cata_tiles::draw_field_or_item( const tripoint &p, const lit_level ll, int int subtile = 0; int rotation = 0; - get_tile_values( fld, neighborhood, subtile, rotation ); + get_tile_values( fld.to_i(), neighborhood, subtile, rotation ); ret_draw_field = draw_from_id_string( fld.id().str(), C_FIELD, empty_string, p, subtile, rotation, lit, nv ); diff --git a/src/character.cpp b/src/character.cpp index 0d3a360342c25..ca6597fd33c9a 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -2470,6 +2470,26 @@ int Character::rust_rate( bool return_stat_effect ) const return ( return_stat_effect ? ret : ret / 10 ); } +int Character::read_speed( bool return_stat_effect ) const +{ + // Stat window shows stat effects on based on current stat + const int intel = get_int(); + /** @EFFECT_INT increases reading speed by 3s per level above 8*/ + int ret = to_moves( 1_minutes ) - to_moves( 3_seconds ) * ( intel - 8 ); + + if( has_bionic( afs_bio_linguistic_coprocessor ) ) { // Aftershock + ret *= .85; + } + + ret *= mutation_value( "reading_speed_multiplier" ); + + if( ret < to_moves( 1_seconds ) ) { + ret = to_moves( 1_seconds ); + } + // return_stat_effect actually matters here + return return_stat_effect ? ret : ret * 100 / to_moves( 1_minutes ); +} + bool Character::meets_skill_requirements( const std::map &req, const item &context ) const { @@ -3569,10 +3589,6 @@ int Character::get_fatigue() const int Character::get_sleep_deprivation() const { - if( !get_option< bool >( "SLEEP_DEPRIVATION" ) ) { - return 0; - } - return sleep_deprivation; } @@ -3913,18 +3929,17 @@ void Character::update_needs( int rate_multiplier ) int fatigue_roll = roll_remainder( rates.fatigue * rate_multiplier ); mod_fatigue( fatigue_roll ); - if( get_option< bool >( "SLEEP_DEPRIVATION" ) ) { - // Synaptic regen bionic stops SD while awake and boosts it while sleeping - if( !has_active_bionic( bio_synaptic_regen ) ) { - // fatigue_roll should be around 1 - so the counter increases by 1 every minute on average, - // but characters who need less sleep will also get less sleep deprived, and vice-versa. + // Synaptic regen bionic stops SD while awake and boosts it while sleeping + if( !has_active_bionic( bio_synaptic_regen ) ) { + // fatigue_roll should be around 1 - so the counter increases by 1 every minute on average, + // but characters who need less sleep will also get less sleep deprived, and vice-versa. - // Note: Since needs are updated in 5-minute increments, we have to multiply the roll again by - // 5. If rate_multiplier is > 1, fatigue_roll will be higher and this will work out. - mod_sleep_deprivation( fatigue_roll * 5 ); - } + // Note: Since needs are updated in 5-minute increments, we have to multiply the roll again by + // 5. If rate_multiplier is > 1, fatigue_roll will be higher and this will work out. + mod_sleep_deprivation( fatigue_roll * 5 ); } + if( npc_no_food && get_fatigue() > TIRED ) { set_fatigue( TIRED ); set_sleep_deprivation( 0 ); @@ -3942,41 +3957,40 @@ void Character::update_needs( int rate_multiplier ) recovered *= .5; } mod_fatigue( -recovered ); - if( get_option< bool >( "SLEEP_DEPRIVATION" ) ) { - // Sleeping on the ground, no bionic = 1x rest_modifier - // Sleeping on a bed, no bionic = 2x rest_modifier - // Sleeping on a comfy bed, no bionic= 3x rest_modifier - - // Sleeping on the ground, bionic = 3x rest_modifier - // Sleeping on a bed, bionic = 6x rest_modifier - // Sleeping on a comfy bed, bionic = 9x rest_modifier - float rest_modifier = ( has_active_bionic( bio_synaptic_regen ) ? 3 : 1 ); - // Melatonin supplements also add a flat bonus to recovery speed - if( has_effect( effect_melatonin_supplements ) ) { - rest_modifier += 1; - } + // Sleeping on the ground, no bionic = 1x rest_modifier + // Sleeping on a bed, no bionic = 2x rest_modifier + // Sleeping on a comfy bed, no bionic= 3x rest_modifier + + // Sleeping on the ground, bionic = 3x rest_modifier + // Sleeping on a bed, bionic = 6x rest_modifier + // Sleeping on a comfy bed, bionic = 9x rest_modifier + float rest_modifier = ( has_active_bionic( bio_synaptic_regen ) ? 3 : 1 ); + // Melatonin supplements also add a flat bonus to recovery speed + if( has_effect( effect_melatonin_supplements ) ) { + rest_modifier += 1; + } - comfort_level comfort = base_comfort_value( pos() ); + comfort_level comfort = base_comfort_value( pos() ); - if( comfort >= comfort_level::very_comfortable ) { - rest_modifier *= 3; - } else if( comfort >= comfort_level::comfortable ) { - rest_modifier *= 2.5; - } else if( comfort >= comfort_level::slightly_comfortable ) { - rest_modifier *= 2; - } - - // If we're just tired, we'll get a decent boost to our sleep quality. - // The opposite is true for very tired characters. - if( get_fatigue() < DEAD_TIRED ) { - rest_modifier += 2; - } else if( get_fatigue() >= EXHAUSTED ) { - rest_modifier = ( rest_modifier > 2 ) ? rest_modifier - 2 : 1; - } + if( comfort >= comfort_level::very_comfortable ) { + rest_modifier *= 3; + } else if( comfort >= comfort_level::comfortable ) { + rest_modifier *= 2.5; + } else if( comfort >= comfort_level::slightly_comfortable ) { + rest_modifier *= 2; + } - // Recovered is multiplied by 2 as well, since we spend 1/3 of the day sleeping - mod_sleep_deprivation( -rest_modifier * ( recovered * 2 ) ); + // If we're just tired, we'll get a decent boost to our sleep quality. + // The opposite is true for very tired characters. + if( get_fatigue() < DEAD_TIRED ) { + rest_modifier += 2; + } else if( get_fatigue() >= EXHAUSTED ) { + rest_modifier = ( rest_modifier > 2 ) ? rest_modifier - 2 : 1; } + + // Recovered is multiplied by 2 as well, since we spend 1/3 of the day sleeping + mod_sleep_deprivation( -rest_modifier * ( recovered * 2 ) ); + } } } diff --git a/src/character.h b/src/character.h index 7a5d3953ff265..c0ef21257dfef 100644 --- a/src/character.h +++ b/src/character.h @@ -1298,6 +1298,10 @@ class Character : public Creature, public visitable /** Returns the player's skill rust rate */ int rust_rate( bool return_stat_effect = true ) const; + // Mental skills and stats + /** Returns the player's reading speed */ + int read_speed( bool return_stat_effect = true ) const; + // --------------- Other Stuff --------------- /** return the calendar::turn the character expired */ diff --git a/src/editmap.cpp b/src/editmap.cpp index f574fbd9eb61d..622b95d34a317 100644 --- a/src/editmap.cpp +++ b/src/editmap.cpp @@ -222,7 +222,7 @@ void editmap_hilight::draw( editmap &em, bool update ) char t_sym = terrain.symbol(); nc_color t_col = terrain.color(); - if( g->m.furn( p ) > 0 ) { + if( g->m.furn( p ).to_i() > 0 ) { const furn_t &furniture_type = g->m.furn( p ).obj(); t_sym = furniture_type.symbol(); t_col = furniture_type.color(); @@ -568,7 +568,7 @@ void editmap::update_view_with_help( const std::string &txt, const std::string & terrain_type.movecost ); off++; // 2 - if( g->m.furn( target ) > 0 ) { + if( g->m.furn( target ).to_i() > 0 ) { mvwputch( w_info, point( 2, off ), furniture_type.color(), furniture_type.symbol() ); mvwprintw( w_info, point( 4, off ), _( "%d: %s; movecost %d movestr %d" ), g->m.furn( target ).to_i(), @@ -1011,13 +1011,13 @@ void editmap::update_fmenu_entry( uilist &fmenu, field &field, const field_type_ if( fld != nullptr ) { field_intensity = fld->get_field_intensity(); } - fmenu.entries[idx].txt = ftype.get_name( field_intensity - 1 ); + fmenu.entries[idx.to_i()].txt = ftype.get_name( field_intensity - 1 ); if( fld != nullptr ) { - fmenu.entries[idx].txt += " " + std::string( field_intensity, '*' ); + fmenu.entries[idx.to_i()].txt += " " + std::string( field_intensity, '*' ); } - fmenu.entries[idx].text_color = fld != nullptr ? c_cyan : fmenu.text_color; - fmenu.entries[idx].extratxt.color = ftype.get_color( field_intensity - 1 ); - fmenu.entries[idx].extratxt.txt = ftype.get_symbol( field_intensity - 1 ); + fmenu.entries[idx.to_i()].text_color = fld != nullptr ? c_cyan : fmenu.text_color; + fmenu.entries[idx.to_i()].extratxt.color = ftype.get_color( field_intensity - 1 ); + fmenu.entries[idx.to_i()].extratxt.txt = ftype.get_symbol( field_intensity - 1 ); } void editmap::setup_fmenu( uilist &fmenu ) @@ -1025,8 +1025,8 @@ void editmap::setup_fmenu( uilist &fmenu ) fmenu.entries.clear(); for( int i = 0; i < static_cast( field_type::count() ); i++ ) { const field_type_id fid = static_cast( i ); - fmenu.addentry( fid, true, -2, "" ); - fmenu.entries[fid].extratxt.left = 1; + fmenu.addentry( fid.to_i(), true, -2, "" ); + fmenu.entries[fid.to_i()].extratxt.left = 1; update_fmenu_entry( fmenu, g->m.get_field( target ), fid ); } if( sel_field >= 0 ) { diff --git a/src/game.cpp b/src/game.cpp index 8c48b3aecbcdb..fe1042ff603ca 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -8171,7 +8171,7 @@ void game::butcher() kmenu.addentry_col( MULTIDISASSEMBLE_ONE, true, 'D', _( "Disassemble everything once" ), to_string_clipped( time_duration::from_turns( time_to_disassemble / 100 ) ) ); - kmenu.addentry_col( MULTIDISASSEMBLE_ALL, true, 'd', _( "Disassemble everything" ), + kmenu.addentry_col( MULTIDISASSEMBLE_ALL, true, 'd', _( "Disassemble everything recursively" ), to_string_clipped( time_duration::from_turns( time_to_disassemble_all / 100 ) ) ); } if( salvage_iuse && salvageables.size() > 1 ) { diff --git a/src/generic_factory.h b/src/generic_factory.h index 20b080d997190..1600391b0e4b8 100644 --- a/src/generic_factory.h +++ b/src/generic_factory.h @@ -133,7 +133,7 @@ class generic_factory bool find_id( const string_id &id, int_id &result ) const { result = id.get_cid(); - if( is_valid( result ) && list[result].id == id ) { + if( is_valid( result ) && list[result.to_i()].id == id ) { return true; } const auto iter = map.find( id ); @@ -266,7 +266,7 @@ class generic_factory T &insert( const T &obj ) { const auto iter = map.find( obj.id ); if( iter != map.end() ) { - T &result = list[iter->second]; + T &result = list[iter->second.to_i()]; result = obj; result.id.set_cid( iter->second ); return result; @@ -341,7 +341,7 @@ class generic_factory debugmsg( "invalid %s id \"%d\"", type_name, id.to_i() ); return dummy_obj; } - return list[id]; + return list[id.to_i()]; } /** * Returns the object with the given id. @@ -356,14 +356,14 @@ class generic_factory debugmsg( "invalid %s id \"%s\"", type_name, id.c_str() ); return dummy_obj; } - return list[i_id]; + return list[i_id.to_i()]; } /** * Checks whether the factory contains an object with the given id. * This function can be used to implement @ref int_id::is_valid(). */ bool is_valid( const int_id &id ) const { - return static_cast( id ) < list.size(); + return static_cast( id.to_i() ) < list.size(); } /** * Checks whether the factory contains an object with the given id. diff --git a/src/int_id.h b/src/int_id.h index a3a5bfbae5464..d332c87abe586 100644 --- a/src/int_id.h +++ b/src/int_id.h @@ -30,7 +30,7 @@ class int_id } /** - * Prevent accidental construction from other int ids due to the non-explicit `operator int()`. + * Prevent accidental construction from other int ids. */ template < typename S, typename std::enable_if_t < !std::is_same::value, int > = 0 > int_id( const int_id &id ) = delete; @@ -86,12 +86,15 @@ class int_id } /** * Conversion to int as with the @ref to_i function. - * It is non-explicit to allow using int_id implicitly as indices etc */ - operator int() const { + explicit operator int() const { return _id; } + explicit operator bool() const { + return _id != 0; + } + // Those are optional, you need to implement them on your own if you want to use them. // If you don't implement them, but use them, you'll get a linker error. const string_id &id() const; diff --git a/src/item_factory.cpp b/src/item_factory.cpp index e68b9eb9176be..c62af69187322 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -803,7 +803,6 @@ void Item_factory::init() add_iuse( "WEED_CAKE", &iuse::weed_cake ); add_iuse( "XANAX", &iuse::xanax ); add_iuse( "BREAK_STICK", &iuse::break_stick ); - add_iuse( "MELATONIN_TABLET", &iuse::melatonin_tablet ); add_actor( std::make_unique() ); add_actor( std::make_unique() ); diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index 34fd35111e0a8..3866284cf3127 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -561,8 +561,13 @@ std::unique_ptr consume_drug_iuse::clone() const static effect_data load_effect_data( const JsonObject &e ) { - return effect_data( efftype_id( e.get_string( "id" ) ), - time_duration::from_turns( e.get_int( "duration", 0 ) ), + time_duration time; + if( e.has_string( "duration" ) ) { + time = read_from_json_string( *e.get_raw( "duration" ), time_duration::units ); + } else { + time = time_duration::from_turns( e.get_int( "duration", 0 ) ); + } + return effect_data( efftype_id( e.get_string( "id" ) ), time, get_body_part_token( e.get_string( "bp", "NUM_BP" ) ), e.get_bool( "permanent", false ) ); } diff --git a/src/map.cpp b/src/map.cpp index 55a5b8e260849..641155e2e383b 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1505,14 +1505,14 @@ bool map::ter_set( const tripoint &p, const ter_id &new_terrain ) // HACK: Hack around ledges in traplocs or else it gets NASTY in z-level mode if( old_t.trap != tr_null && old_t.trap != tr_ledge ) { - auto &traps = traplocs[old_t.trap]; + auto &traps = traplocs[old_t.trap.to_i()]; const auto iter = std::find( traps.begin(), traps.end(), p ); if( iter != traps.end() ) { traps.erase( iter ); } } if( new_t.trap != tr_null && new_t.trap != tr_ledge ) { - traplocs[new_t.trap].push_back( p ); + traplocs[new_t.trap.to_i()].push_back( p ); } if( old_t.transparent != new_t.transparent ) { @@ -5015,7 +5015,7 @@ void map::trap_set( const tripoint &p, const trap_id &type ) current_submap->set_trap( l, type ); if( type != tr_null ) { - traplocs[type].push_back( p ); + traplocs[type.to_i()].push_back( p ); } } @@ -5093,7 +5093,7 @@ void map::remove_trap( const tripoint &p ) } current_submap->set_trap( l, tr_null ); - auto &traps = traplocs[tid]; + auto &traps = traplocs[tid.to_i()]; const auto iter = std::find( traps.begin(), traps.end(), p ); if( iter != traps.end() ) { traps.erase( iter ); @@ -7034,11 +7034,11 @@ void map::actualize( const tripoint &grid ) const auto trap_here = tmpsub->get_trap( p ); if( trap_here != tr_null ) { - traplocs[trap_here].push_back( pnt ); + traplocs[trap_here.to_i()].push_back( pnt ); } const ter_t &ter = tmpsub->get_ter( p ).obj(); if( ter.trap != tr_null && ter.trap != tr_ledge ) { - traplocs[ter.trap].push_back( pnt ); + traplocs[ter.trap.to_i()].push_back( pnt ); } if( do_funnels ) { @@ -7353,7 +7353,7 @@ const std::vector &map::get_furn_field_locations() const const std::vector &map::trap_locations( const trap_id &type ) const { - return traplocs[type]; + return traplocs[type.to_i()]; } bool map::inbounds( const tripoint &p ) const diff --git a/src/mapgen.cpp b/src/mapgen.cpp index 409c9139810e7..619b6b77d8fa4 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -624,7 +624,7 @@ void mapgen_function_json_base::setup_setmap( const JsonArray &parray ) set_mapgen_defer( pjo, "id", "no such terrain" ); return; } - tmp_i.val = tid.id(); + tmp_i.val = tid.id().to_i(); } break; case JMAPGEN_SETMAP_FURN: { @@ -634,7 +634,7 @@ void mapgen_function_json_base::setup_setmap( const JsonArray &parray ) set_mapgen_defer( pjo, "id", "no such furniture" ); return; } - tmp_i.val = fid.id(); + tmp_i.val = fid.id().to_i(); } break; case JMAPGEN_SETMAP_TRAP: { @@ -4517,8 +4517,11 @@ void map::draw_temple( mapgendata &dat ) int x = rng( SEEX - 1, SEEX + 2 ), y = 2; std::vector path; // Path, from end to start while( x < SEEX - 1 || x > SEEX + 2 || y < SEEY * 2 - 2 ) { + static const std::vector terrains = { + t_floor_red, t_floor_green, t_floor_blue, + }; path.push_back( point( x, y ) ); - ter_set( point( x, y ), ter_id( rng( t_floor_red, t_floor_blue ) ) ); + ter_set( point( x, y ), random_entry( terrains ) ); if( y == SEEY * 2 - 2 ) { if( x < SEEX - 1 ) { x++; @@ -4570,7 +4573,11 @@ void map::draw_temple( mapgendata &dat ) for( int j = 2; j <= SEEY * 2 - 2; j++ ) { mtrap_set( this, i, j, tr_temple_toggle ); if( ter( point( i, j ) ) == t_rock_floor ) { - ter_set( point( i, j ), ter_id( rng( t_rock_red, t_floor_blue ) ) ); + static const std::vector terrains = { + t_rock_red, t_rock_green, t_rock_blue, + t_floor_red, t_floor_green, t_floor_blue, + }; + ter_set( point( i, j ), random_entry( terrains ) ); } } } diff --git a/src/mapgen_functions.cpp b/src/mapgen_functions.cpp index a5e1a9d6dd98e..cea4f8cf32ef8 100644 --- a/src/mapgen_functions.cpp +++ b/src/mapgen_functions.cpp @@ -3548,7 +3548,7 @@ static void stairs_debug_log( const map *const m, const std::string &msg, const << " tripoint: " << p << " terrain: " << p_ter.name() << " movecost: " << p_ter.movecost - << " furniture: " << m->furn( p ) + << " furniture: " << m->furn( p ).to_i() << " indoors: " << p_ter.has_flag( "INDOORS" ) << " flat: " << p_ter.has_flag( "FLAT" ) ; diff --git a/src/mission_companion.cpp b/src/mission_companion.cpp index 1db7e6b1ed35a..f134b69f85856 100644 --- a/src/mission_companion.cpp +++ b/src/mission_companion.cpp @@ -1253,9 +1253,12 @@ bool talk_function::scavenging_raid_return( npc &p ) } } //The loot value needs to be added to the faction - what the player is payed + tripoint loot_location = g->u.global_omt_location(); + // Only check at the ground floor. + loot_location.z = 0; for( int i = 0; i < rng( 2, 3 ); i++ ) { - const tripoint site = overmap_buffer.find_closest( g->u.global_omt_location(), "house", - 0, false ); + const tripoint site = overmap_buffer.find_closest( loot_location, "house", 0, false, + ot_match_type::prefix ); overmap_buffer.reveal( site, 2 ); loot_building( site ); } diff --git a/src/mission_util.cpp b/src/mission_util.cpp index 2dfafb855e82c..3d84e289cc4fd 100644 --- a/src/mission_util.cpp +++ b/src/mission_util.cpp @@ -115,7 +115,7 @@ static tripoint random_house_in_city( const city_reference &cref ) const tripoint city_center_omt = sm_to_omt_copy( cref.abs_sm_pos ); std::vector valid; for( const tripoint &p : points_in_radius( city_center_omt, cref.city->size ) ) { - if( overmap_buffer.check_ot( "house", ot_match_type::type, p ) ) { + if( overmap_buffer.check_ot( "house", ot_match_type::prefix, p ) ) { valid.push_back( p ); } } diff --git a/src/monfaction.cpp b/src/monfaction.cpp index d7204241188d7..b33de11c19a6e 100644 --- a/src/monfaction.cpp +++ b/src/monfaction.cpp @@ -95,7 +95,7 @@ static void apply_base_faction( mfaction_id base, mfaction_id faction_id ) { for( const auto &pair : base.obj().attitude_map ) { // Fill in values set in base faction, but not in derived one - auto &faction = faction_list[faction_id]; + auto &faction = faction_list[faction_id.to_i()]; if( faction.attitude_map.count( pair.first ) == 0 ) { faction.attitude_map.insert( pair ); } @@ -140,7 +140,7 @@ void monfactions::finalize() } // Point parent to children - if( faction.base_faction >= 0 ) { + if( faction.base_faction.to_i() >= 0 ) { child_map.insert( std::make_pair( faction.base_faction, faction.loadid ) ); } @@ -159,7 +159,7 @@ void monfactions::finalize() // If more than one root exists, use the first one. const auto root = queue.front(); for( auto &faction : faction_list ) { - if( faction.base_faction < 0 ) { + if( faction.base_faction.to_i() < 0 ) { faction.base_faction = root; // If it is the (new) root, connecting it to own parent (self) would create a cycle. // So only try to connect it to the parent if it isn't own parent. @@ -193,7 +193,7 @@ void monfactions::finalize() for( auto &fac : unloaded ) { names.append( fac.id().str() ); names.append( " " ); - auto &the_faction = faction_list[fac]; + auto &the_faction = faction_list[fac.to_i()]; the_faction.base_faction = root; } @@ -240,7 +240,7 @@ void monfactions::load_monster_faction( const JsonObject &jo ) std::string base_faction = jo.get_string( "base_faction", "" ); mfaction_id base_id = get_or_add_faction( mfaction_str_id( base_faction ) ); // Don't get the reference until here (to avoid vector reallocation messing it up) - monfaction &faction = faction_list[cur_id]; + monfaction &faction = faction_list[cur_id.to_i()]; faction.base_faction = base_id; add_to_attitude_map( by_mood, faction.attitude_map, MFA_BY_MOOD ); diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp index 1a620f77dcb08..3179fa6fc7005 100644 --- a/src/newcharacter.cpp +++ b/src/newcharacter.cpp @@ -2163,7 +2163,7 @@ tab_direction set_description( const catacurses::window &w, avatar &you, const b int offset = 0; for( const auto &loc : start_location::get_all() ) { if( g->scen->allowed_start( loc.ident() ) ) { - uilist_entry entry( loc.ident().get_cid(), true, -1, loc.name() ); + uilist_entry entry( loc.ident().get_cid().to_i(), true, -1, loc.name() ); select_location.entries.emplace_back( entry ); @@ -2400,7 +2400,7 @@ tab_direction set_description( const catacurses::window &w, avatar &you, const b select_location.query(); if( select_location.ret >= 0 ) { for( const auto &loc : start_location::get_all() ) { - if( loc.ident().get_cid() == select_location.ret ) { + if( loc.ident().get_cid().to_i() == select_location.ret ) { you.start_location = loc.ident(); break; } diff --git a/src/overmap.cpp b/src/overmap.cpp index f1ae86eefa7e7..932ccf174a185 100644 --- a/src/overmap.cpp +++ b/src/overmap.cpp @@ -971,7 +971,7 @@ void overmap_special::finalize() void overmap_special::check() const { - std::set invalid_terrains; + std::set invalid_terrains; std::set points; for( const auto &elem : terrains ) { diff --git a/src/overmap_connection.cpp b/src/overmap_connection.cpp index 2322ebfd23fd0..c7962f4baaa7b 100644 --- a/src/overmap_connection.cpp +++ b/src/overmap_connection.cpp @@ -71,7 +71,7 @@ const overmap_connection::subtype *overmap_connection::pick_subtype_for( return nullptr; } - const size_t cache_index = ground; + const size_t cache_index = ground.to_i(); assert( cache_index < cached_subtypes.size() ); if( cached_subtypes[cache_index] ) { diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index 63c4eb126afa3..d2c6cbe59ccca 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -1236,7 +1236,7 @@ static void place_ter_or_special( tripoint &curs, const tripoint &orig, const bo colorize( string_from_color( oter.get_color( true ) ), oter.get_color( true ) ), colorize( oter.get_name(), oter.get_color() ), colorize( oter.id.str(), c_white ) ); - pmenu.addentry( oter.id.id(), true, 0, entry_text ); + pmenu.addentry( oter.id.id().to_i(), true, 0, entry_text ); } } else { pmenu.title = _( "Select special to place:" ); diff --git a/src/player.cpp b/src/player.cpp index b70dd6907b0b6..c68b4c4100195 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -1178,26 +1178,6 @@ void player::search_surroundings() } } -int player::read_speed( bool return_stat_effect ) const -{ - // Stat window shows stat effects on based on current stat - const int intel = get_int(); - /** @EFFECT_INT increases reading speed */ - int ret = to_moves( 1_minutes ) - to_moves( 3_seconds ) * ( intel - 8 ); - - if( has_bionic( afs_bio_linguistic_coprocessor ) ) { // Aftershock - ret *= .85; - } - - ret *= mutation_value( "reading_speed_multiplier" ); - - if( ret < to_moves( 1_seconds ) ) { - ret = to_moves( 1_seconds ); - } - // return_stat_effect actually matters here - return return_stat_effect ? ret : ret / 10; -} - int player::talk_skill() const { /** @EFFECT_INT slightly increases talking skill */ diff --git a/src/player.h b/src/player.h index 6e0869214b666..d3c2e13f3b96f 100644 --- a/src/player.h +++ b/src/player.h @@ -442,8 +442,6 @@ class player : public Character const cata::optional &blind_throw_from_pos = cata::nullopt ); // Mental skills and stats - /** Returns the player's reading speed */ - int read_speed( bool return_stat_effect = true ) const; /** Returns a value used when attempting to convince NPC's of something */ int talk_skill() const; /** Returns a value used when attempting to intimidate NPC's */ diff --git a/tests/stomach_contents_test.cpp b/tests/stomach_contents_test.cpp index ee5a439a92519..8bca831c1d6e1 100644 --- a/tests/stomach_contents_test.cpp +++ b/tests/stomach_contents_test.cpp @@ -50,6 +50,8 @@ static time_duration time_until_hungry( player &p ) { unsigned int thirty_minutes = 0; do { + p.set_sleep_deprivation( 0 ); + p.set_fatigue( 0 ); pass_time( p, 30_minutes ); thirty_minutes++; } while( p.get_hunger() < 40 ); // hungry