Skip to content

Commit

Permalink
Dumpster and vehicle storage (#70184)
Browse files Browse the repository at this point in the history
* seat and storage stuff

* Seats hold bodies

* fixes

* desc

* Update furniture-storage.json

* Update data/json/recipes/other/parts.json

Co-authored-by: Karol1223 <[email protected]>

* Update data/json/recipes/other/parts.json

Co-authored-by: Karol1223 <[email protected]>

* cargo_passable

* hm

* block NPC

* Do it at character level

* hmm

* yeeeehaw

* adjustments

* Updates

* enum, clean up

* astyle

* linting

* linting2

* one last bugfix

* just kidding. Now it's ready.

* Update vehicle_parts.json

* make tests happy

* astyle

* Update src/character.cpp

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

* Update src/character.cpp

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

* Update src/monmove.cpp

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

* tests

* Update src/monster.cpp

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

* Update src/monster.cpp

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

---------

Co-authored-by: Karol1223 <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 22, 2023
1 parent c5cf8ed commit c390b86
Show file tree
Hide file tree
Showing 20 changed files with 459 additions and 79 deletions.
23 changes: 23 additions & 0 deletions data/json/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -4637,5 +4637,28 @@
],
"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
}
]
3 changes: 2 additions & 1 deletion data/json/furniture_and_terrain/furniture-storage.json
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,8 @@
"move_cost_mod": 3,
"coverage": 70,
"required_str": 16,
"flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT", "FIRE_CONTAINER" ],
"max_volume": "1500 L",
"flags": [ "CONTAINER", "PLACE_ITEM", "BLOCKSDOOR", "HIDE_PLACE", "NO_SIGHT", "FIRE_CONTAINER", "LIQUIDCONT" ],
"deconstruct": {
"items": [
{ "item": "frame", "count": [ 2, 3 ] },
Expand Down
34 changes: 30 additions & 4 deletions data/json/items/vehicle/seating.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
{
"type": "GENERIC",
"id": "seat",
"name": { "str": "seat" },
"name": { "str": "bucket seat" },
"description": "A soft car seat made from synthetic fabric.",
"weight": "9071 g",
"to_hit": -4,
"color": "red",
"symbol": "0",
"material": [ "cotton", "steel" ],
"material": [ "nylon", "steel" ],
"volume": "7500 ml",
"category": "veh_parts",
"price": 35000,
Expand All @@ -19,9 +19,35 @@
"type": "GENERIC",
"copy-from": "seat",
"id": "seat_leather",
"name": { "str": "leather seat" },
"name": { "str": "leather bucket seat" },
"description": "A soft car seat covered with leather.",
"material": [ "leather", "cotton", "steel" ],
"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" ],
"price": 60000,
"price_postapoc": 250
},
Expand Down
21 changes: 13 additions & 8 deletions data/json/npcs/talk_tags.json
Original file line number Diff line number Diff line change
Expand Up @@ -1015,18 +1015,23 @@
"category": "<cramped_vehicle>",
"//": "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 vehicle is too small.",
"Can I get out and walk? This spot is too cramped.",
"How about we make the next vehicle a convertible?",
"This vehicle is too small.",
"Argh, I don't fit!",
"I'm not a contortionist!",
"I can't fit in your tiny human vehicle.",
"This sucks. I'm too big.",
"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.",
"<swear>, I can barely move!",
"This space was not designed for big boned people.",
"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!'"
"I don't like being crammed in like this.",
"Getting awfully cramped in here."
]
},
{
Expand Down
52 changes: 50 additions & 2 deletions data/json/recipes/other/parts.json
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@
{ "proficiency": "prof_welding_basic", "skill_penalty": 0.5 },
{ "proficiency": "prof_welding" }
],
"components": [ [ [ "pipe", 4 ] ], [ [ "spring", 2 ] ], [ [ "cotton_patchwork", 20 ], [ "sheet", 1 ] ], [ [ "pipe_fittings", 4 ] ] ]
"components": [ [ [ "pipe", 4 ] ], [ [ "spring", 2 ] ], [ [ "nylon", 20 ], [ "sheet_nylon", 3 ] ], [ [ "pipe_fittings", 4 ] ] ]
},
{
"type": "recipe",
Expand All @@ -790,7 +790,55 @@
[ [ "spring", 2 ] ],
[ [ "leather", 12 ], [ "fur", 12 ], [ "tanned_hide", 3 ], [ "tanned_pelt", 3 ] ],
[ [ "pipe_fittings", 4 ] ],
[ [ "cotton_patchwork", 8 ] ]
[ [ "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 ] ]
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion data/json/vehicleparts/cargo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" ],
"flags": [ "UNMOUNT_ON_DAMAGE", "CARGO", "PROTRUSION", "COVERED", "BOARDABLE", "HUGE_OK" ],
"damage_reduction": { "all": 26 },
"variants": [ { "symbols": "=", "symbols_broken": "#" } ]
},
Expand Down
8 changes: 4 additions & 4 deletions data/json/vehicleparts/doors.json
Original file line number Diff line number Diff line change
Expand Up @@ -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", "OBSTACLE", "OPENABLE", "BOARDABLE", "WINDOW", "DOOR", "LOCKABLE_DOOR" ],
"flags": [ "CARGO", "CARGO_PASSABLE", "OBSTACLE", "OPENABLE", "BOARDABLE", "WINDOW", "DOOR", "LOCKABLE_DOOR", "HUGE_OK" ],
"item": "frame",
"location": "center",
"looks_like": "t_door_metal_c",
Expand Down Expand Up @@ -209,7 +209,7 @@
},
"breaks_into": [ { "item": "splinter", "count": [ 7, 9 ] } ],
"extend": { "flags": [ "SIMPLE_PART" ] },
"delete": { "flags": [ "CARGO" ] },
"delete": { "flags": [ "CARGO", "CARGO_PASSABLE" ] },
"damage_reduction": { "all": 8 }
},
{
Expand Down Expand Up @@ -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", "COVERED", "LOCKABLE_CARGO" ] }
"delete": { "flags": [ "CARGO", "CARGO_PASSABLE", "COVERED", "LOCKABLE_CARGO" ] }
},
{
"type": "vehicle_part",
Expand Down Expand Up @@ -272,7 +272,7 @@
},
"breaks_into": "ig_vp_sheet_metal",
"extend": { "flags": [ "OPAQUE", "SIMPLE_PART" ] },
"delete": { "flags": [ "CARGO", "COVERED", "LOCKABLE_CARGO", "WINDOW" ] },
"delete": { "flags": [ "CARGO", "CARGO_PASSABLE", "COVERED", "LOCKABLE_CARGO", "WINDOW" ] },
"damage_reduction": { "all": 7 }
},
{
Expand Down
38 changes: 19 additions & 19 deletions data/json/vehicleparts/seats.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"entries": [
{ "count": [ 2, 8 ], "item": "cotton_patchwork" },
{ "count": [ 2, 8 ], "item": "nylon" },
{ "count": [ 1, 3 ], "item": "pipe" },
{ "count": [ 0, 2 ], "item": "spring" },
{ "count": [ 3, 5 ], "item": "scrap" }
Expand All @@ -13,7 +13,7 @@
{
"entries": [
{ "count": [ 1, 5 ], "item": "leather" },
{ "count": [ 1, 3 ], "item": "cotton_patchwork" },
{ "count": [ 1, 3 ], "item": "nylon" },
{ "count": [ 1, 3 ], "item": "pipe" },
{ "count": [ 0, 2 ], "item": "spring" },
{ "count": [ 3, 5 ], "item": "scrap" }
Expand All @@ -31,15 +31,15 @@
"comfort": 2,
"damage_modifier": 60,
"damage_reduction": { "all": 2, "bash": 5 },
"description": "A place to sit, or sleep if you're desperate.",
"description": "A soft upholstered car seat, contoured to hold one person.",
"durability": 300,
"flags": [ "SEAT", "BOARDABLE", "CARGO", "BELTABLE" ],
"floor_bedding_warmth": 200,
"item": "seat",
"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": "seat" },
"name": { "str": "bucket 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 ] ] },
Expand All @@ -49,7 +49,7 @@
"using": [ [ "repair_welding_standard", 1 ], [ "sewing_standard", 8 ] ]
}
},
"size": "25 L",
"size": "80 L",
"type": "vehicle_part",
"variants_bases": [ { "id": "windshield", "label": "Windshield" }, { "id": "swivel_chair", "label": "Swivel Chair" } ],
"variants": [
Expand All @@ -67,19 +67,20 @@
"breaks_into": "ig_vp_seat_leather",
"copy-from": "seat",
"item": "seat_leather",
"name": { "str": "leather seat" },
"name": { "str": "leather bucket seat" },
"description": "A leather car seat for one.",
"type": "vehicle_part",
"variants_bases": [ { "id": "windshield", "label": "Windshield" } ]
},
{
"id": "reclining_seat",
"copy-from": "seat",
"comfort": 3,
"description": "A place to sit, with an adjustable backrest.",
"description": "A soft seat with an adjustable backrest, making it a reasonably comfortable place to sleep.",
"durability": 100,
"size": "84000 ml",
"floor_bedding_warmth": 350,
"name": { "str": "reclining seat" },
"size": "6250 ml",
"name": { "str": "reclining bucket seat" },
"extend": { "flags": [ "BED" ] },
"type": "vehicle_part",
"variants_bases": [ { "id": "windshield", "label": "Windshield" } ]
Expand All @@ -90,28 +91,28 @@
"copy-from": "reclining_seat",
"item": "seat_leather",
"looks_like": "seat_leather",
"name": { "str": "reclining leather seat" },
"name": { "str": "reclining leather bucket seat" },
"type": "vehicle_part",
"variants_bases": [ { "id": "windshield", "label": "Windshield" } ]
},
{
"id": "seat_back",
"copy-from": "seat",
"comfort": 4,
"description": "A benchlike seat. Mostly found in the second row, also known as the back or rear 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.",
"floor_bedding_warmth": 500,
"name": { "str": "back seat" },
"size": "30 L",
"item": "seat_bench",
"name": { "str": "bench seat" },
"extend": { "flags": [ "BED" ] },
"type": "vehicle_part"
},
{
"id": "seat_back_leather",
"copy-from": "seat_back",
"breaks_into": "ig_vp_seat_leather",
"item": "seat_leather",
"item": "seat_bench_leather",
"looks_like": "seat_leather",
"name": { "str": "leather back seat" },
"name": { "str": "leather bench seat" },
"type": "vehicle_part"
},
{
Expand Down Expand Up @@ -165,7 +166,7 @@
},
{
"id": "metal_bench",
"copy-from": "seat",
"copy-from": "seat_back",
"breaks_into": "ig_vp_prison_bench",
"comfort": 0,
"floor_bedding_warmth": 0,
Expand All @@ -179,8 +180,7 @@
"removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": "vehicle_weld_removal" },
"repair": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "repair_welding_standard", 2 ] ] }
},
"size": "0 ml",
"delete": { "flags": [ "CARGO" ] },
"size": "62500 ml",
"type": "vehicle_part"
}
]
Loading

0 comments on commit c390b86

Please sign in to comment.