From cd362c12b8ad5ed3a78002e680ce4b7d026e8e63 Mon Sep 17 00:00:00 2001 From: Kevin Granade Date: Tue, 11 Jun 2024 14:04:04 -0700 Subject: [PATCH] Revert "Dumpster and vehicle storage (#70184)" This reverts commit c390b8633454a4c1a9c8540c8eaaf9c733d71f44. --- data/json/effects.json | 23 --- .../furniture-storage.json | 3 +- data/json/items/vehicle/seating.json | 34 +---- data/json/npcs/talk_tags.json | 21 ++- data/json/recipes/other/parts.json | 52 +------ data/json/vehicleparts/cargo.json | 2 +- data/json/vehicleparts/doors.json | 8 +- data/json/vehicleparts/seats.json | 38 ++--- data/json/vehicleparts/vehicle_parts.json | 43 ++---- data/json/vehicleparts/vp_flags.json | 10 -- src/character.cpp | 135 +++--------------- src/character.h | 3 - src/game.cpp | 4 - src/monmove.cpp | 66 +-------- src/monster.cpp | 55 ------- src/monster.h | 2 - src/npc.cpp | 5 +- src/npcmove.cpp | 28 +--- src/veh_type.cpp | 4 +- src/veh_type.h | 2 - 20 files changed, 79 insertions(+), 459 deletions(-) diff --git a/data/json/effects.json b/data/json/effects.json index fb08b9c0515f3..90aea3e59b2ed 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -4689,28 +4689,5 @@ ], "max_intensity": 4, "rating": "neutral" - }, - { - "type": "effect_type", - "id": "cramped_space", - "name": [ "Cramped Space" ], - "desc": [ "You are painfully crammed into a space too small for your body." ], - "miss_messages": [ [ "You don't have any room to move!", 1 ] ], - "apply_message": "You are squeezed uncomfortably into the cramped space.", - "remove_message": "It feels good having room to move again.", - "rating": "bad", - "resist_traits": [ "BENDY1", "BENDY2", "BENDY3" ], - "resist_effects": [ "incorporeal" ], - "pain_sizing": true, - "hurt_sizing": true, - "base_mods": { - "dex_mod": [ -2 ], - "str_mod": [ -2 ], - "speed_mod": [ -20 ], - "pain_min": [ 2 ], - "pain_chance": [ 100, 500 ], - "pain_max_val": [ 35 ] - }, - "show_in_info": true } ] diff --git a/data/json/furniture_and_terrain/furniture-storage.json b/data/json/furniture_and_terrain/furniture-storage.json index 0d6528114093e..6dee0739cbb13 100644 --- a/data/json/furniture_and_terrain/furniture-storage.json +++ b/data/json/furniture_and_terrain/furniture-storage.json @@ -1402,8 +1402,7 @@ "move_cost_mod": 3, "coverage": 70, "required_str": 16, - "max_volume": "1500 L", - "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT", "FIRE_CONTAINER", "LIQUIDCONT" ], + "flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT", "FIRE_CONTAINER" ], "deconstruct": { "items": [ { "item": "frame", "count": [ 2, 3 ] }, diff --git a/data/json/items/vehicle/seating.json b/data/json/items/vehicle/seating.json index f76391117e365..04d053c75af91 100644 --- a/data/json/items/vehicle/seating.json +++ b/data/json/items/vehicle/seating.json @@ -2,13 +2,13 @@ { "type": "GENERIC", "id": "seat", - "name": { "str": "bucket seat" }, + "name": { "str": "seat" }, "description": "A soft car seat made from synthetic fabric.", "weight": "9071 g", "to_hit": -4, "color": "red", "symbol": "0", - "material": [ "nylon", "steel" ], + "material": [ "cotton", "steel" ], "volume": "7500 ml", "category": "veh_parts", "price": 35000, @@ -19,35 +19,9 @@ "type": "GENERIC", "copy-from": "seat", "id": "seat_leather", - "name": { "str": "leather bucket seat" }, + "name": { "str": "leather seat" }, "description": "A soft car seat covered with leather.", - "material": [ "leather", "nylon", "steel" ], - "price": 60000, - "price_postapoc": 250 - }, - { - "type": "GENERIC", - "id": "seat_bench", - "name": { "str": "bench seat" }, - "description": "A wide, flat seat like you'd find in the back of a sedan, upholstered with soft nylon.", - "weight": "9071 g", - "to_hit": -4, - "color": "red", - "symbol": "0", - "material": [ "nylon", "steel" ], - "volume": "7500 ml", - "category": "veh_parts", - "price": 35000, - "price_postapoc": 100, - "melee_damage": { "bash": 4 } - }, - { - "type": "GENERIC", - "copy-from": "seat", - "id": "seat_bench_leather", - "name": { "str": "leather bench seat" }, - "description": "A wide, flat seat like you'd find in the back of a sedan, upholstered with leather.", - "material": [ "leather", "nylon", "steel" ], + "material": [ "leather", "cotton", "steel" ], "price": 60000, "price_postapoc": 250 }, diff --git a/data/json/npcs/talk_tags.json b/data/json/npcs/talk_tags.json index b60b504c54d12..111e9088b7e95 100644 --- a/data/json/npcs/talk_tags.json +++ b/data/json/npcs/talk_tags.json @@ -1015,23 +1015,18 @@ "category": "", "//": "NPC complaint if a HUGE NPC is taking pain from being inside a vehicle. Key points are that the NPC is HUGE and they're in a confined vehicle, along with some hints on how to resolve it.", "text": [ - "Can I get out and walk? This spot is too cramped.", + "Can I get out and walk? This vehicle is too small.", "How about we make the next vehicle a convertible?", "This vehicle is too small.", - "Argh, I don't fit!", "I'm not a contortionist!", - "There's not enough room for me here.", - "This spot is squeezing the life out of me.", - "I can hardly breathe, crammed in like this.", - "I'm like a sardine over here!.", - "Ugh, I'm getting squashed.", - "How about we stop and stretch our legs?", - "I could use a break from being wedged in like this.", - "This is like being in a trash compactor.", - ", I can barely move!", + "I can't fit in your tiny human vehicle.", + "This sucks. I'm too big.", "This space was not designed for big boned people.", - "I don't like being crammed in like this.", - "Getting awfully cramped in here." + "So the fact I am huge isn't an issue to you? As it is to me.", + "I don't like being a mutant crammed into your tiny little vehicle.", + "Getting awfully cramped in here.", + "I don't think this vehicle was designed for someone like me.", + "It's tighter than a nun's cunt in here!'" ] }, { diff --git a/data/json/recipes/other/parts.json b/data/json/recipes/other/parts.json index 71b63ae53ccc2..b763008be05c6 100644 --- a/data/json/recipes/other/parts.json +++ b/data/json/recipes/other/parts.json @@ -763,7 +763,7 @@ { "proficiency": "prof_welding_basic", "skill_penalty": 0.5 }, { "proficiency": "prof_welding" } ], - "components": [ [ [ "pipe", 4 ] ], [ [ "spring", 2 ] ], [ [ "nylon", 20 ], [ "sheet_nylon", 3 ] ], [ [ "pipe_fittings", 4 ] ] ] + "components": [ [ [ "pipe", 4 ] ], [ [ "spring", 2 ] ], [ [ "cotton_patchwork", 20 ], [ "sheet", 1 ] ], [ [ "pipe_fittings", 4 ] ] ] }, { "type": "recipe", @@ -790,55 +790,7 @@ [ [ "spring", 2 ] ], [ [ "leather", 12 ], [ "fur", 12 ], [ "tanned_hide", 3 ], [ "tanned_pelt", 3 ] ], [ [ "pipe_fittings", 4 ] ], - [ [ "nylon", 8 ] ] - ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "seat_bench", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "2 h", - "reversible": { "time": "20 m" }, - "autolearn": true, - "//": "20cm weld", - "using": [ [ "sewing_standard", 50 ], [ "welding_standard", 20 ] ], - "proficiencies": [ - { "proficiency": "prof_metalworking" }, - { "proficiency": "prof_welding_basic", "skill_penalty": 0.5 }, - { "proficiency": "prof_welding" } - ], - "components": [ [ [ "pipe", 4 ] ], [ [ "spring", 2 ] ], [ [ "nylon", 20 ], [ "sheet_nylon", 3 ] ], [ [ "pipe_fittings", 4 ] ] ] - }, - { - "type": "recipe", - "activity_level": "MODERATE_EXERCISE", - "result": "seat_bench_leather", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 1, - "time": "6 h", - "reversible": { "time": "20 m" }, - "autolearn": true, - "//": "20cm weld", - "using": [ [ "sewing_standard", 50 ], [ "welding_standard", 20 ] ], - "proficiencies": [ - { "proficiency": "prof_metalworking" }, - { "proficiency": "prof_welding_basic", "skill_penalty": 0.5 }, - { "proficiency": "prof_welding" }, - { "proficiency": "prof_leatherworking_basic" }, - { "proficiency": "prof_leatherworking" } - ], - "components": [ - [ [ "pipe", 4 ] ], - [ [ "spring", 2 ] ], - [ [ "leather", 12 ], [ "fur", 12 ], [ "tanned_hide", 3 ], [ "tanned_pelt", 3 ] ], - [ [ "pipe_fittings", 4 ] ], - [ [ "nylon", 8 ] ] + [ [ "cotton_patchwork", 8 ] ] ] }, { diff --git a/data/json/vehicleparts/cargo.json b/data/json/vehicleparts/cargo.json index a5db7d6d5981e..fef17d9acd507 100644 --- a/data/json/vehicleparts/cargo.json +++ b/data/json/vehicleparts/cargo.json @@ -225,7 +225,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 4 ] ], "time": "6 m", "using": [ [ "repair_welding_standard", 5 ] ] } }, - "flags": [ "UNMOUNT_ON_DAMAGE", "CARGO", "PROTRUSION", "COVERED", "BOARDABLE", "HUGE_OK" ], + "flags": [ "UNMOUNT_ON_DAMAGE", "CARGO", "PROTRUSION", "COVERED", "BOARDABLE" ], "damage_reduction": { "all": 26 }, "variants": [ { "symbols": "=", "symbols_broken": "#" } ] }, diff --git a/data/json/vehicleparts/doors.json b/data/json/vehicleparts/doors.json index fe60b76c8c5ca..c6e67a23586e4 100644 --- a/data/json/vehicleparts/doors.json +++ b/data/json/vehicleparts/doors.json @@ -9,7 +9,7 @@ "damage_reduction": { "all": 20 }, "description": "A door. Has a window so you can see out of it, even when closed.", "durability": 225, - "flags": [ "CARGO", "CARGO_PASSABLE", "OBSTACLE", "OPENABLE", "BOARDABLE", "WINDOW", "DOOR", "LOCKABLE_DOOR", "HUGE_OK" ], + "flags": [ "CARGO", "OBSTACLE", "OPENABLE", "BOARDABLE", "WINDOW", "DOOR", "LOCKABLE_DOOR" ], "item": "frame", "location": "center", "looks_like": "t_door_metal_c", @@ -209,7 +209,7 @@ }, "breaks_into": [ { "item": "splinter", "count": [ 7, 9 ] } ], "extend": { "flags": [ "SIMPLE_PART" ] }, - "delete": { "flags": [ "CARGO", "CARGO_PASSABLE" ] }, + "delete": { "flags": [ "CARGO" ] }, "damage_reduction": { "all": 8 } }, { @@ -237,7 +237,7 @@ "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "60 m", "using": [ [ "repair_welding_standard", 2 ] ] } }, "extend": { "flags": [ "LOW_FINAL_AIR_DRAG", "SIMPLE_PART", "NO_ROOF_NEEDED" ] }, - "delete": { "flags": [ "CARGO", "CARGO_PASSABLE", "COVERED", "LOCKABLE_CARGO" ] } + "delete": { "flags": [ "CARGO", "COVERED", "LOCKABLE_CARGO" ] } }, { "type": "vehicle_part", @@ -272,7 +272,7 @@ }, "breaks_into": "ig_vp_sheet_metal", "extend": { "flags": [ "OPAQUE", "SIMPLE_PART" ] }, - "delete": { "flags": [ "CARGO", "CARGO_PASSABLE", "COVERED", "LOCKABLE_CARGO", "WINDOW" ] }, + "delete": { "flags": [ "CARGO", "COVERED", "LOCKABLE_CARGO", "WINDOW" ] }, "damage_reduction": { "all": 7 } }, { diff --git a/data/json/vehicleparts/seats.json b/data/json/vehicleparts/seats.json index 567a9288cc744..de27e4385a2b5 100644 --- a/data/json/vehicleparts/seats.json +++ b/data/json/vehicleparts/seats.json @@ -1,7 +1,7 @@ [ { "entries": [ - { "count": [ 2, 8 ], "item": "nylon" }, + { "count": [ 2, 8 ], "item": "cotton_patchwork" }, { "count": [ 1, 3 ], "item": "pipe" }, { "count": [ 0, 2 ], "item": "spring" }, { "count": [ 3, 5 ], "item": "scrap" } @@ -13,7 +13,7 @@ { "entries": [ { "count": [ 1, 5 ], "item": "leather" }, - { "count": [ 1, 3 ], "item": "nylon" }, + { "count": [ 1, 3 ], "item": "cotton_patchwork" }, { "count": [ 1, 3 ], "item": "pipe" }, { "count": [ 0, 2 ], "item": "spring" }, { "count": [ 3, 5 ], "item": "scrap" } @@ -31,7 +31,7 @@ "comfort": 2, "damage_modifier": 60, "damage_reduction": { "all": 2, "bash": 5 }, - "description": "A soft upholstered car seat, contoured to hold one person.", + "description": "A place to sit, or sleep if you're desperate.", "durability": 300, "flags": [ "SEAT", "BOARDABLE", "CARGO", "BELTABLE" ], "floor_bedding_warmth": 200, @@ -39,7 +39,7 @@ "location": "center", "looks_like": "reclining_seat", "//": "weld repairs would mostly be the frame and springs of the seat, so low 6cm cost per quadrant", - "name": { "str": "bucket seat" }, + "name": { "str": "seat" }, "requirements": { "install": { "skills": [ [ "mechanics", 1 ] ], "time": "30 m", "using": [ [ "vehicle_wrench_2", 1 ] ] }, "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "vehicle_wrench_2", 1 ] ] }, @@ -49,7 +49,7 @@ "using": [ [ "repair_welding_standard", 1 ], [ "sewing_standard", 8 ] ] } }, - "size": "80 L", + "size": "25 L", "type": "vehicle_part", "variants_bases": [ { "id": "windshield", "label": "Windshield" }, { "id": "swivel_chair", "label": "Swivel Chair" } ], "variants": [ @@ -67,8 +67,7 @@ "breaks_into": "ig_vp_seat_leather", "copy-from": "seat", "item": "seat_leather", - "name": { "str": "leather bucket seat" }, - "description": "A leather car seat for one.", + "name": { "str": "leather seat" }, "type": "vehicle_part", "variants_bases": [ { "id": "windshield", "label": "Windshield" } ] }, @@ -76,11 +75,11 @@ "id": "reclining_seat", "copy-from": "seat", "comfort": 3, - "description": "A soft seat with an adjustable backrest, making it a reasonably comfortable place to sleep.", + "description": "A place to sit, with an adjustable backrest.", "durability": 100, - "size": "84000 ml", "floor_bedding_warmth": 350, - "name": { "str": "reclining bucket seat" }, + "name": { "str": "reclining seat" }, + "size": "6250 ml", "extend": { "flags": [ "BED" ] }, "type": "vehicle_part", "variants_bases": [ { "id": "windshield", "label": "Windshield" } ] @@ -91,18 +90,18 @@ "copy-from": "reclining_seat", "item": "seat_leather", "looks_like": "seat_leather", - "name": { "str": "reclining leather bucket seat" }, + "name": { "str": "reclining leather seat" }, "type": "vehicle_part", "variants_bases": [ { "id": "windshield", "label": "Windshield" } ] }, { "id": "seat_back", "copy-from": "seat", - "comfort": 3, - "description": "A soft, wide seat with a high back, the kind often used in back seats or older cars. It might be a decent place to sleep.", + "comfort": 4, + "description": "A benchlike seat. Mostly found in the second row, also known as the back or rear seat.", "floor_bedding_warmth": 500, - "item": "seat_bench", - "name": { "str": "bench seat" }, + "name": { "str": "back seat" }, + "size": "30 L", "extend": { "flags": [ "BED" ] }, "type": "vehicle_part" }, @@ -110,9 +109,9 @@ "id": "seat_back_leather", "copy-from": "seat_back", "breaks_into": "ig_vp_seat_leather", - "item": "seat_bench_leather", + "item": "seat_leather", "looks_like": "seat_leather", - "name": { "str": "leather bench seat" }, + "name": { "str": "leather back seat" }, "type": "vehicle_part" }, { @@ -166,7 +165,7 @@ }, { "id": "metal_bench", - "copy-from": "seat_back", + "copy-from": "seat", "breaks_into": "ig_vp_prison_bench", "comfort": 0, "floor_bedding_warmth": 0, @@ -180,7 +179,8 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": "vehicle_weld_removal" }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "repair_welding_standard", 2 ] ] } }, - "size": "62500 ml", + "size": "0 ml", + "delete": { "flags": [ "CARGO" ] }, "type": "vehicle_part" } ] diff --git a/data/json/vehicleparts/vehicle_parts.json b/data/json/vehicleparts/vehicle_parts.json index fc66af13eb98a..68f433948604f 100644 --- a/data/json/vehicleparts/vehicle_parts.json +++ b/data/json/vehicleparts/vehicle_parts.json @@ -121,8 +121,7 @@ "STEERABLE", "UNMOUNT_ON_DAMAGE", "UNSTABLE_WHEEL", - "WHEEL", - "HUGE_OK" + "WHEEL" ], "damage_reduction": { "all": 2 }, "variants": [ { "symbols": "H", "symbols_broken": "M" } ] @@ -161,8 +160,7 @@ "STEERABLE", "UNMOUNT_ON_DAMAGE", "UNSTABLE_WHEEL", - "WHEEL", - "HUGE_OK" + "WHEEL" ], "damage_reduction": { "all": 20 }, "variants": [ { "symbols": "H", "symbols_broken": "M" } ] @@ -189,16 +187,7 @@ "repair": { "skills": [ [ "fabrication", 1 ] ], "time": "5 m", "using": [ [ "repair_welding_standard", 1 ] ] } }, "breaks_into": [ { "item": "scrap", "count": [ 4, 6 ] } ], - "flags": [ - "ENGINE", - "BOARDABLE", - "E_STARTS_INSTANTLY", - "ANIMAL_CTRL", - "HARNESS_human", - "STEERABLE", - "UNMOUNT_ON_DAMAGE", - "HUGE_OK" - ], + "flags": [ "ENGINE", "BOARDABLE", "E_STARTS_INSTANTLY", "ANIMAL_CTRL", "HARNESS_human", "STEERABLE", "UNMOUNT_ON_DAMAGE" ], "damage_reduction": { "all": 2 }, "variants": [ { "symbols": "-", "symbols_broken": "~" } ] }, @@ -213,7 +202,7 @@ "damage_modifier": 60, "durability": 95, "description": "A small but comfortable bed.", - "size": "100 L", + "size": "50 L", "item": "mattress", "comfort": 4, "floor_bedding_warmth": 700, @@ -309,7 +298,6 @@ "color": "white", "durability": 400, "description": "An aisle.", - "size": "100 L", "item": "sheet_metal", "location": "center", "//": "1m square sheet of metal, likely affixed with bolts in places, assume 200cm weld to install and 50cm weld to repair", @@ -326,7 +314,7 @@ }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "6 m", "using": [ [ "repair_welding_standard", 5 ] ] } }, - "flags": [ "AISLE", "BOARDABLE", "CARGO" ], + "flags": [ "AISLE", "BOARDABLE" ], "breaks_into": "ig_vp_sheet_metal", "damage_reduction": { "all": 28 }, "variants": [ @@ -360,7 +348,7 @@ "description": "A collapsible aisle.", "folded_volume": "12500 ml", "item": "foldwoodframe", - "flags": [ "AISLE", "BOARDABLE", "CARGO" ] + "flags": [ "AISLE", "BOARDABLE" ] }, { "type": "vehicle_part", @@ -370,7 +358,7 @@ "categories": [ "cargo" ], "color": "white", "durability": 400, - "description": "An aisle. A hatch lets you access a cargo space beneath it, keeping items stored here out of the way.", + "description": "An aisle. A hatch lets you access a cargo space beneath it.", "size": "87500 ml", "item": "cargo_aisle", "location": "center", @@ -388,7 +376,7 @@ }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "10 m", "using": [ [ "repair_welding_standard", 6 ] ] } }, - "flags": [ "AISLE", "BOARDABLE", "CARGO", "CARGO_PASSABLE", "LOCKABLE_CARGO", "COVERED" ], + "flags": [ "AISLE", "BOARDABLE", "CARGO", "LOCKABLE_CARGO", "COVERED" ], "breaks_into": "ig_vp_sheet_metal", "damage_reduction": { "all": 28 }, "variants": [ { "symbols": "=", "symbols_broken": "#" } ] @@ -875,7 +863,7 @@ "size": "75 L", "item": "frame_wood_light", "location": "center", - "flags": [ "CARGO", "BOARDABLE", "COVERED", "HUGE_OK" ], + "flags": [ "CARGO", "BOARDABLE", "COVERED" ], "breaks_into": [ { "item": "splinter", "count": [ 3, 5 ] }, { "item": "string_36", "count": [ 10, 15 ] } ], "requirements": { "install": { "time": "10 m", "using": [ [ "rope_natural_short", 1 ] ] }, @@ -2217,7 +2205,7 @@ }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "20 m", "using": [ [ "repair_welding_standard", 12 ] ] } }, - "flags": [ "BOARDABLE", "CARGO", "COVERED", "HUGE_OK" ], + "flags": [ "BOARDABLE", "CARGO", "COVERED" ], "breaks_into": [ { "item": "steel_lump", "count": [ 6, 8 ] }, { "item": "steel_chunk", "count": [ 6, 8 ] }, @@ -2236,8 +2224,7 @@ "durability": 250, "description": "A cargo space for carrying livestock. 'e'xamine it to capture an animal next to you, or to release the animal currently contained. When selecting an animal to capture, choose its tile relative to you, not the part.", "//1": "240cm weld to install, 60cm per damage quadrant to repair", - "size": "300 L", - "comfort": 2, + "size": "200 L", "item": "livestock_carrier", "location": "center", "requirements": { @@ -2253,7 +2240,7 @@ }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "20 m", "using": [ [ "repair_welding_standard", 12 ] ] } }, - "flags": [ "BOARDABLE", "CARGO", "COVERED", "CAPTURE_MONSTER_VEH", "HUGE_OK", "BED", "BELTABLE" ], + "flags": [ "BOARDABLE", "CARGO", "COVERED", "CAPTURE_MONSTER_VEH" ], "breaks_into": [ { "item": "steel_lump", "count": [ 6, 8 ] }, { "item": "steel_chunk", "count": [ 6, 8 ] }, @@ -2484,7 +2471,7 @@ "broken_color": "brown", "damage_modifier": 20, "durability": 75, - "description": "A place to sit, barely.", + "description": "A place to sit.", "item": "frame_wood_light", "location": "center", "requirements": { @@ -2508,16 +2495,14 @@ "damage_modifier": 60, "durability": 125, "description": "A place to sit.", - "comfort": 1, "item": "frame_wood", "location": "center", - "size": "62500 ml", "requirements": { "install": { "skills": [ [ "mechanics", 1 ] ], "time": "30 m", "using": [ [ "vehicle_nail_install", 1 ] ] }, "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "vehicle_nail_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "adhesive", 2 ] ] } }, - "flags": [ "SEAT", "BOARDABLE", "BELTABLE", "CARGO" ], + "flags": [ "SEAT", "BOARDABLE", "BELTABLE" ], "breaks_into": [ { "item": "splinter", "count": [ 7, 9 ] } ], "damage_reduction": { "all": 8 }, "variants": [ { "symbols": "#", "symbols_broken": "*" } ] diff --git a/data/json/vehicleparts/vp_flags.json b/data/json/vehicleparts/vp_flags.json index 9a06d4cb567a4..2b1a728c467e0 100644 --- a/data/json/vehicleparts/vp_flags.json +++ b/data/json/vehicleparts/vp_flags.json @@ -666,15 +666,5 @@ "id": "NEEDS_WHEEL_MOUNT_SKATEBOARD", "type": "json_flag", "requires_flag": "WHEEL_MOUNT_SKATEBOARD" - }, - { - "id": "CARGO_PASSABLE", - "type": "json_flag", - "info": "Items stored here won't get in the way of any passengers." - }, - { - "id": "HUGE_OK", - "type": "json_flag", - "info": "Even when roofed, this part is roomy enough to comfortably admit very large creatures, like cows and horses." } ] diff --git a/src/character.cpp b/src/character.cpp index 9049c1c41f208..2d05f9c39afcf 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -223,7 +223,6 @@ static const efftype_id effect_contacts( "contacts" ); static const efftype_id effect_controlled( "controlled" ); static const efftype_id effect_corroding( "corroding" ); static const efftype_id effect_cough_suppress( "cough_suppress" ); -static const efftype_id effect_cramped_space( "cramped_space" ); static const efftype_id effect_darkness( "darkness" ); static const efftype_id effect_deaf( "deaf" ); static const efftype_id effect_dermatik( "dermatik" ); @@ -5130,8 +5129,24 @@ void Character::update_needs( int rate_multiplier ) modify_respiration_effect_mod( std::min( -get_respiration_effect_mod(), rate_multiplier ) ); } -} + // Huge folks take penalties for cramming themselves in vehicles + if( in_vehicle && get_size() == creature_size::huge && + !( has_flag( json_flag_PAIN_IMMUNE ) || has_effect( effect_narcosis ) ) ) { + vehicle *veh = veh_pointer_or_null( get_map().veh_at( pos() ) ); + // it's painful to work the controls, but passengers in open topped vehicles are fine + if( veh && ( veh->enclosed_at( pos() ) || veh->player_in_control( *this ) ) ) { + add_msg_if_player( m_bad, + _( "You're cramping up from stuffing yourself in this vehicle." ) ); + if( is_npc() ) { + npc &as_npc = dynamic_cast( *this ); + as_npc.complain_about( "cramped_vehicle", 1_hours, "", false ); + } + mod_pain( rng( 4, 6 ) ); + mod_focus( -1 ); + } + } +} needs_rates Character::calc_needs_rates() const { const effect &sleep = get_effect( effect_sleep ); @@ -5623,7 +5638,7 @@ Character::comfort_response_t Character::base_comfort_value( const tripoint &p ) } else { comfort -= here.move_cost( p ); } - if( has_effect( effect_cramped_space ) ) { + if( vp->vehicle().enclosed_at( p ) && get_size() == creature_size::huge ) { comfort = static_cast( comfort_level::impossible ); } } @@ -8004,61 +8019,6 @@ std::string Character::weapname_ammo() const } } -// Tests to see if a character has room to enter a vehicle tile. -bool Character::move_in_vehicle( Creature *c, const tripoint &dest_loc ) const -{ - map &m = get_map(); - const optional_vpart_position vp_there = m.veh_at( dest_loc ); - if( vp_there ) { - vehicle &veh = vp_there->vehicle(); - units::volume capacity = 0_ml; - units::volume free_cargo = 0_ml; - auto cargo_parts = veh.get_parts_at( dest_loc, "CARGO", part_status_flag::any ); - for( vehicle_part *&part : cargo_parts ) { - vehicle_stack contents = veh.get_items( *part ); - const vpart_info &vpinfo = part->info(); - const optional_vpart_position vp = m.veh_at( dest_loc ); - if( !vp.part_with_feature( "CARGO_PASSABLE", true ) ) { - capacity += vpinfo.size; - free_cargo += contents.free_volume(); - } - } - if( capacity > 0_ml ) { - // First, we'll try to squeeze in. Open-topped vehicle parts have more room for us. - if( !veh.enclosed_at( dest_loc ) ) { - free_cargo *= 1.2; - } - const creature_size size = get_size(); - if( ( size == creature_size::tiny && free_cargo < 15625_ml ) || - ( size == creature_size::small && free_cargo < 31250_ml ) || - ( size == creature_size::medium && free_cargo < 62500_ml ) || - ( size == creature_size::large && free_cargo < 125000_ml ) || - ( size == creature_size::huge && free_cargo < 250000_ml ) ) { - if( ( size == creature_size::tiny && free_cargo < 11719_ml ) || - ( size == creature_size::small && free_cargo < 23438_ml ) || - ( size == creature_size::medium && free_cargo < 46875_ml ) || - ( size == creature_size::large && free_cargo < 93750_ml ) || - ( size == creature_size::huge && free_cargo < 187500_ml ) ) { - add_msg_if_player( m_warning, _( "There's not enough room for you to fit there." ) ); - return false; // Even if we squeeze, there's no room. - } - c->add_effect( effect_cramped_space, 2_turns, true ); - return true; - } - } - const optional_vpart_position vp = m.veh_at( dest_loc ); - // Sufficiently gigantic characters aren't comfortable in stock seats, roof or no. - if( in_vehicle && get_size() == creature_size::huge && !vp.part_with_feature( "AISLE", true ) && - !vp.part_with_feature( "HUGE_OK", true ) && !has_effect( effect_cramped_space ) ) { - add_msg_if_player( m_warning, _( "You barely fit in this tiny human vehicle." ) ); - add_msg_if_npc( m_warning, _( "%s has to really cram their huge body to fit." ), c->disp_name() ); - c->add_effect( effect_cramped_space, 2_turns, true ); - return true; - } - } - return true; -} - void Character::on_hit( Creature *source, bodypart_id bp_hit, float /*difficulty*/, dealt_projectile_attack const *const proj ) { @@ -10974,65 +10934,6 @@ void Character::process_effects() terminating_effects.pop(); } - // Being stuck in tight spaces sucks. TODO: could be expanded to apply to non-vehicle conditions. - if( has_effect( effect_cramped_space ) && !in_vehicle ) { - remove_effect( effect_cramped_space ); - } - // Check all of this here to ensure the player can't sit in a comfortable seat and then drop 50 liters of junk in their own lap. - if( in_vehicle ) { - map &here = get_map(); - const tripoint your_pos = pos(); - if( is_npc() && !has_effect( effect_narcosis ) && has_effect( effect_cramped_space ) ) { - npc &as_npc = dynamic_cast( *this ); - as_npc.complain_about( "cramped_vehicle", 1_hours, "", false ); - } - const optional_vpart_position vp_there = here.veh_at( your_pos ); - bool is_cramped_space = false; - if( vp_there ) { - vehicle &veh = vp_there->vehicle(); - units::volume capacity = 0_ml; - units::volume free_cargo = 0_ml; - auto cargo_parts = veh.get_parts_at( your_pos, "CARGO", part_status_flag::any ); - for( vehicle_part *&part : cargo_parts ) { - vehicle_stack contents = veh.get_items( *part ); - const vpart_info &vpinfo = part->info(); - const optional_vpart_position vp = here.veh_at( your_pos ); - if( !vp.part_with_feature( "CARGO_PASSABLE", true ) ) { - capacity += vpinfo.size; - free_cargo += contents.free_volume(); - } - } - const creature_size size = get_size(); - if( capacity > 0_ml ) { - // Open-topped vehicle parts have more room. - if( !veh.enclosed_at( your_pos ) ) { - free_cargo *= 1.2; - } - if( ( size == creature_size::tiny && free_cargo < 15625_ml ) || - ( size == creature_size::small && free_cargo < 31250_ml ) || - ( size == creature_size::medium && free_cargo < 62500_ml ) || - ( size == creature_size::large && free_cargo < 125000_ml ) || - ( size == creature_size::huge && free_cargo < 250000_ml ) ) { - if( !has_effect( effect_cramped_space ) ) { - add_effect( effect_cramped_space, 2_turns, true ); - } - is_cramped_space = true; - } - } - const optional_vpart_position vp = here.veh_at( your_pos ); - if( get_size() == creature_size::huge && !vp.part_with_feature( "AISLE", true ) && - !vp.part_with_feature( "HUGE_OK", true ) ) { - if( !has_effect( effect_cramped_space ) ) { - add_effect( effect_cramped_space, 2_turns, true ); - } - is_cramped_space = true; - } - } - if( !is_cramped_space ) { - remove_effect( effect_cramped_space ); - } - } - if( has_effect( effect_boomered ) && ( is_avatar() || is_npc() ) && one_in( 10 ) && !has_trait( trait_COMPOUND_EYES ) && !has_effect( effect_pre_conjunctivitis_bacterial ) && !has_effect( effect_pre_conjunctivitis_viral ) && !has_effect( effect_conjunctivitis_bacterial ) && diff --git a/src/character.h b/src/character.h index 53d16afef47be..8732fea966ae5 100644 --- a/src/character.h +++ b/src/character.h @@ -1386,9 +1386,6 @@ class Character : public Creature, public visitable void dismount(); void forced_dismount(); - /** Attempt to enter a tile in a vehicle */ - bool move_in_vehicle( Creature *c, const tripoint &dest_loc ) const; - bool is_deaf() const; bool is_mute() const; // Get the specified limb score. If bp is defined, only the scores from that body part type are summed. diff --git a/src/game.cpp b/src/game.cpp index dc2b4703d9c9f..5b485c96b7620 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -10433,10 +10433,6 @@ bool game::walk_move( const tripoint &dest_loc, const bool via_ramp, const bool } u.set_underwater( false ); - if( vp_there && !u.move_in_vehicle( static_cast( &u ), dest_loc ) ) { - return false; - } - if( !shifting_furniture && !pushing && is_dangerous_tile( dest_loc ) ) { std::vector harmful_stuff = get_dangerous_tile( dest_loc ); if( harmful_stuff.size() == 1 && harmful_stuff[0] == "ledge" ) { diff --git a/src/monmove.cpp b/src/monmove.cpp index 80ccd75778e86..1a2b519a63d5c 100644 --- a/src/monmove.cpp +++ b/src/monmove.cpp @@ -49,7 +49,6 @@ #include "translations.h" #include "trap.h" #include "units.h" -#include "veh_type.h" #include "vehicle.h" #include "viewer.h" #include "vpart_position.h" @@ -58,7 +57,6 @@ static const damage_type_id damage_cut( "cut" ); static const efftype_id effect_bouldering( "bouldering" ); static const efftype_id effect_countdown( "countdown" ); -static const efftype_id effect_cramped_space( "cramped_space" ); static const efftype_id effect_docile( "docile" ); static const efftype_id effect_downed( "downed" ); static const efftype_id effect_dragging( "dragging" ); @@ -127,64 +125,6 @@ static bool z_is_valid( int z ) return z >= -OVERMAP_DEPTH && z <= OVERMAP_HEIGHT; } -bool monster::monster_move_in_vehicle( const tripoint &p ) const -{ - map &m = get_map(); - monster critter = *this; - const optional_vpart_position vp = m.veh_at( p ); - if( vp.has_value() ) { - vehicle &veh = vp->vehicle(); - units::volume capacity = 0_ml; - units::volume free_cargo = 0_ml; - auto cargo_parts = veh.get_parts_at( p, "CARGO", part_status_flag::any ); - for( vehicle_part *&part : cargo_parts ) { - vehicle_stack contents = veh.get_items( *part ); - const vpart_info &vpinfo = part->info(); - if( !vp.part_with_feature( "CARGO_PASSABLE", true ) ) { - capacity += vpinfo.size; - free_cargo += contents.free_volume(); - } - } - if( capacity > 0_ml ) { - // First, we'll try to squeeze in. Open-topped vehicle parts have more room to step over cargo. - if( !veh.enclosed_at( p ) ) { - free_cargo *= 1.2; - } - if( !veh.enclosed_at( p ) && flies() ) { - return true; // No amount of cargo will block a flying monster if there's no roof. - } - const creature_size size = get_size(); - if( ( size == creature_size::tiny && free_cargo < 15625_ml ) || - ( size == creature_size::small && free_cargo < 31250_ml ) || - ( size == creature_size::medium && free_cargo < 62500_ml ) || - ( size == creature_size::large && free_cargo < 125000_ml ) || - ( size == creature_size::huge && free_cargo < 250000_ml ) ) { - if( ( size == creature_size::tiny && free_cargo < 11719_ml ) || - ( size == creature_size::small && free_cargo < 23438_ml ) || - ( size == creature_size::medium && free_cargo < 46875_ml ) || - ( size == creature_size::large && free_cargo < 93750_ml ) || - ( size == creature_size::huge && free_cargo < 187500_ml ) || - ( get_volume() > 850000_ml && !vp.part_with_feature( "HUGE_OK", true ) ) ) { - return false; // Return false if there's just no room whatsoever. Anything over 850 liters will simply never fit in a vehicle part that isn't specifically made for it. - // I'm sorry but you can't let a kaiju ride shotgun. - } - if( ( type->bodytype == "snake" || type->bodytype == "blob" || type->bodytype == "fish" || - has_flag( mon_flag_PLASTIC ) || has_flag( mon_flag_SMALL_HIDER ) ) ) { - return true; // Return true if we're wiggly enough to be fine with cramped space. - } - critter.add_effect( effect_cramped_space, 2_turns, true ); - return true; // Otherwise we add the effect and return true. - } - if( size == creature_size::huge && !vp.part_with_feature( "AISLE", true ) && - !vp.part_with_feature( "HUGE_OK", true ) ) { - critter.add_effect( effect_cramped_space, 2_turns, true ); - return true; // Sufficiently gigantic creatures have trouble in stock seats, roof or no. - } - } - } - return true; -} - bool monster::will_move_to( const tripoint &p ) const { map &here = get_map(); @@ -199,15 +139,11 @@ bool monster::will_move_to( const tripoint &p ) const } if( !here.has_vehicle_floor( p ) ) { - if( !can_submerge() && !flies() && here.has_flag( ter_furn_flag::TFLAG_DEEP_WATER, p ) ) { + if( ( !can_submerge() && !flies() ) && here.has_flag( ter_furn_flag::TFLAG_DEEP_WATER, p ) ) { return false; } } - if( here.veh_at( p ).part_with_feature( VPFLAG_CARGO, true ) && !monster_move_in_vehicle( p ) ) { - return false; - } - if( digs() && !here.has_flag( ter_furn_flag::TFLAG_DIGGABLE, p ) && !here.has_flag( ter_furn_flag::TFLAG_BURROWABLE, p ) ) { return false; diff --git a/src/monster.cpp b/src/monster.cpp index c7ad09426368b..7498f9e0ba198 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -64,9 +64,6 @@ #include "trap.h" #include "type_id.h" #include "units.h" -#include "veh_type.h" -#include "vehicle.h" -#include "vpart_position.h" #include "viewer.h" #include "weakpoint.h" #include "weather.h" @@ -85,7 +82,6 @@ static const efftype_id effect_beartrap( "beartrap" ); static const efftype_id effect_bleed( "bleed" ); static const efftype_id effect_blind( "blind" ); static const efftype_id effect_bouldering( "bouldering" ); -static const efftype_id effect_cramped_space( "cramped_space" ); static const efftype_id effect_critter_underfed( "critter_underfed" ); static const efftype_id effect_critter_well_fed( "critter_well_fed" ); static const efftype_id effect_crushed( "crushed" ); @@ -3294,57 +3290,6 @@ void monster::process_effects() } } - // Apply or remove the cramped_space effect, which needs specific information about the monster's surroundings. - map &here = get_map(); - const tripoint z_pos = pos(); - const optional_vpart_position vp = here.veh_at( z_pos ); - if( has_effect( effect_cramped_space ) && !vp.has_value() ) { - remove_effect( effect_cramped_space ); - } - if( vp.has_value() ) { - vehicle &veh = vp->vehicle(); - units::volume capacity = 0_ml; - units::volume free_cargo = 0_ml; - auto cargo_parts = veh.get_parts_at( z_pos, "CARGO", part_status_flag::any ); - for( vehicle_part *&part : cargo_parts ) { - vehicle_stack contents = veh.get_items( *part ); - const vpart_info &vpinfo = part->info(); - if( !vp.part_with_feature( "CARGO_PASSABLE", true ) ) { - capacity += vpinfo.size; - free_cargo += contents.free_volume(); - } - } - const creature_size size = get_size(); - if( capacity > 0_ml ) { - // Open-topped vehicle parts have more room, and are always free space for fliers. - if( !veh.enclosed_at( z_pos ) ) { - free_cargo *= 1.2; - if( flies() ) { - remove_effect( effect_cramped_space ); - return; - } - } - if( ( size == creature_size::tiny && free_cargo < 15625_ml ) || - ( size == creature_size::small && free_cargo < 31250_ml ) || - ( size == creature_size::medium && free_cargo < 62500_ml ) || - ( size == creature_size::large && free_cargo < 125000_ml ) || - ( size == creature_size::huge && free_cargo < 250000_ml ) ) { - if( !has_effect( effect_cramped_space ) ) { - add_effect( effect_cramped_space, 2_turns, true ); - } - return; - } - } - if( get_size() == creature_size::huge && !vp.part_with_feature( "AISLE", true ) && - !vp.part_with_feature( "HUGE_OK", true ) ) { - if( !has_effect( effect_cramped_space ) ) { - add_effect( effect_cramped_space, 2_turns, true ); - } - return; - } - remove_effect( effect_cramped_space ); - } - Creature::process_effects(); } diff --git a/src/monster.h b/src/monster.h index 9ce22b73e6559..fe4f7648f43d8 100644 --- a/src/monster.h +++ b/src/monster.h @@ -213,8 +213,6 @@ class monster : public Creature bool will_move_to( const tripoint &p ) const; bool know_danger_at( const tripoint &p ) const; - bool monster_move_in_vehicle( const tripoint &p ) const; - bool will_reach( const point &p ); // Do we have plans to get to (x, y)? int turns_to_reach( const point &p ); // How long will it take? diff --git a/src/npc.cpp b/src/npc.cpp index bbe55458d4e03..4428a4be629c5 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -3269,9 +3269,8 @@ std::unordered_set npc::get_path_avoid() const } } - for( const tripoint &p : here.points_in_radius( pos(), 6 ) ) { - if( sees_dangerous_field( p ) || ( here.veh_at( p ).part_with_feature( VPFLAG_CARGO, true ) && - !move_in_vehicle( const_cast( this ), p ) ) ) { + for( const tripoint &p : here.points_in_radius( pos(), 5 ) ) { + if( sees_dangerous_field( p ) ) { ret.insert( p ); } } diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 81b696a8e5a8e..097648162c88a 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -419,9 +419,6 @@ bool npc::could_move_onto( const tripoint &p ) const if( !here.passable( p ) ) { return false; } - if( !move_in_vehicle( const_cast( this ), p ) ) { - return false; - } if( !sees_dangerous_field( p ) ) { return true; @@ -1787,6 +1784,7 @@ void npc::execute_action( npc_action action ) case npc_follow_embarked: { const optional_vpart_position vp = here.veh_at( player_character.pos() ); + if( !vp ) { debugmsg( "Following an embarked player with no vehicle at their location?" ); // TODO: change to wait? - for now pause @@ -1811,15 +1809,12 @@ void npc::execute_action( npc_action action ) if( passenger != this && passenger != nullptr ) { continue; } - // A seat is available if we can move there and it's either unassigned or assigned to us + + // a seat is available if either unassigned or assigned to us auto available_seat = [&]( const vehicle_part & pt ) { - tripoint target = veh->global_part_pos3( pt ); if( !pt.is_seat() ) { return false; } - if( !could_move_onto( target ) ) { - return false; - } const npc *who = pt.crew(); return !who || who->getID() == getID(); }; @@ -2848,7 +2843,6 @@ bool npc::can_open_door( const tripoint &p, const bool inside ) const bool npc::can_move_to( const tripoint &p, bool no_bashing ) const { map &here = get_map(); - // Allow moving into any bashable spots, but penalize them during pathing // Doors are not passable for hallucinations return( rl_dist( pos(), p ) <= 1 && here.has_floor_or_water( p ) && !g->is_dangerous_tile( p ) && @@ -2876,20 +2870,6 @@ void npc::move_to( const tripoint &pt, bool no_bashing, std::set *nomo } } - if( here.veh_at( p ).part_with_feature( VPFLAG_CARGO, true ) && !move_in_vehicle( this, p ) ) { - auto other_points = here.get_dir_circle( pos(), p ); - for( const tripoint &ot : other_points ) { - if( could_move_onto( ot ) && ( nomove == nullptr || nomove->find( ot ) == nomove->end() ) ) { - p = ot; - break; - } else { - path.clear(); - move_pause(); - return; - } - } - } - recoil = MAX_RECOIL; if( has_effect( effect_stunned ) || has_effect( effect_psi_stunned ) ) { @@ -3117,12 +3097,12 @@ void npc::move_to( const tripoint &pt, bool no_bashing, std::set *nomo if( here.veh_at( p ).part_with_feature( VPFLAG_BOARDABLE, true ) ) { here.board_vehicle( p, this ); } + here.creature_on_trap( *this ); here.creature_in_field( *this ); } } - void npc::move_to_next() { while( !path.empty() && pos() == path[0] ) { diff --git a/src/veh_type.cpp b/src/veh_type.cpp index 22cfb24c0cd68..1dc955f6988b9 100644 --- a/src/veh_type.cpp +++ b/src/veh_type.cpp @@ -117,7 +117,6 @@ static const std::unordered_map vpart_bitflag_map = { "WINDOW", VPFLAG_WINDOW }, { "CURTAIN", VPFLAG_CURTAIN }, { "CARGO", VPFLAG_CARGO }, - { "CARGO_PASSABLE", VPFLAG_CARGO_PASSABLE }, { "INTERNAL", VPFLAG_INTERNAL }, { "SOLAR_PANEL", VPFLAG_SOLAR_PANEL }, { "WIND_TURBINE", VPFLAG_WIND_TURBINE }, @@ -138,8 +137,7 @@ static const std::unordered_map vpart_bitflag_map = { "ROOF", VPFLAG_ROOF }, { "CABLE_PORTS", VPFLAG_CABLE_PORTS }, { "BATTERY", VPFLAG_BATTERY }, - { "POWER_TRANSFER", VPFLAG_POWER_TRANSFER }, - { "HUGE_OK", VPFLAG_HUGE_OK } + { "POWER_TRANSFER", VPFLAG_POWER_TRANSFER } }; static std::map vpart_migrations; diff --git a/src/veh_type.h b/src/veh_type.h index 82552a0d8a0e4..8ca09d8995715 100644 --- a/src/veh_type.h +++ b/src/veh_type.h @@ -92,7 +92,6 @@ enum vpart_bitflags : int { VPFLAG_WINDOW, VPFLAG_CURTAIN, VPFLAG_CARGO, - VPFLAG_CARGO_PASSABLE, VPFLAG_INTERNAL, VPFLAG_SOLAR_PANEL, VPFLAG_WATER_WHEEL, @@ -111,7 +110,6 @@ enum vpart_bitflags : int { VPFLAG_CABLE_PORTS, VPFLAG_BATTERY, VPFLAG_POWER_TRANSFER, - VPFLAG_HUGE_OK, NUM_VPFLAGS };