diff --git a/data/json/itemgroups/Food/food.json b/data/json/itemgroups/Food/food.json index a328f8ee360d1..a167d2ba77adf 100644 --- a/data/json/itemgroups/Food/food.json +++ b/data/json/itemgroups/Food/food.json @@ -498,6 +498,7 @@ { "item": "yoghurt", "prob": 40 }, { "item": "pudding", "prob": 50 }, { "item": "V8", "prob": 15 }, + { "item": "foodplace_food", "prob": 8 }, { "item": "sandwich_t", "prob": 30 }, { "item": "sandwich_pb", "prob": 30 }, { "item": "sandwich_pbj", "prob": 30 }, @@ -760,6 +761,7 @@ { "item": "cheeseburger", "prob": 35 }, { "item": "hotdogs_frozen", "prob": 12 }, { "item": "hotdogs_cooked", "prob": 35 }, + { "item": "foodplace_food", "prob": 8 }, { "item": "chili", "prob": 20 }, { "item": "chilidogs", "prob": 20 }, { "item": "fries", "prob": 80 }, diff --git a/data/json/itemgroups/food_service.json b/data/json/itemgroups/food_service.json index 53945d2d7ce61..1e9ea8e49fdb1 100644 --- a/data/json/itemgroups/food_service.json +++ b/data/json/itemgroups/food_service.json @@ -760,6 +760,7 @@ [ "currywurst", 5 ], [ "macaroni_cooked", 5 ], [ "lasagne", 5 ], + [ "foodplace_food", 2 ], [ "spaghetti_pesto", 5 ], [ "glazed_tenderloin", 5 ] ] @@ -781,6 +782,7 @@ [ "tomato", 20 ], [ "lettuce", 15 ], [ "zucchini", 15 ], + [ "foodplace_food", 20 ], [ "onion", 15 ], [ "chili_pepper", 15 ], [ "carrot", 15 ], @@ -842,6 +844,7 @@ [ "spaghetti_raw", 20 ], [ "lasagne_raw", 20 ], [ "macaroni_raw", 20 ], + [ "foodplace_food", 5 ], [ "knife_butcher", 10 ] ] }, diff --git a/data/json/items/comestibles/other.json b/data/json/items/comestibles/other.json index e0226d1711ac3..c6d0aa66fd9fc 100644 --- a/data/json/items/comestibles/other.json +++ b/data/json/items/comestibles/other.json @@ -449,6 +449,26 @@ "vitamins": [ [ "calcium", 4 ], [ "iron", 47 ], [ "vitC", 7 ] ], "fun": -10 }, + { + "type": "COMESTIBLE", + "id": "foodplace_food", + "name": { "str": "Foodplace's delicious food™", "str_pl": "Foodplace's delicious food™" }, + "weight": "500 g", + "color": "magenta", + "comestible_type": "FOOD", + "container": "box_small", + "symbol": "f", + "calories": 500, + "description": "The best-seller from Foodplace, delicious food™, is made with real foodstuff and is guaranteed 100% edible!", + "price": 500, + "price_postapoc": 1000, + "material": "foodplace_foodstuff", + "volume": "500 ml", + "flags": [ "EDIBLE_FROZEN", "IRREPLACEABLE_CONSUMABLE" ], + "addiction_potential": 1, + "charges": 4, + "fun": 2 + }, { "type": "COMESTIBLE", "id": "lentils_cooked", diff --git a/data/json/materials.json b/data/json/materials.json index 697d047ddb351..8629d0093d122 100644 --- a/data/json/materials.json +++ b/data/json/materials.json @@ -666,6 +666,12 @@ "cut_dmg_verb": "cut", "burn_data": [ { "fuel": 1, "smoke": 1, "burn": 1 }, { "fuel": 1, "smoke": 1, "burn": 2 }, { "fuel": 1, "smoke": 1, "burn": 3 } ] }, + { + "type": "material", + "ident": "foodplace_foodstuff", + "name": "Foodplace'delicious foodstuff", + "copy-from": "junk" + }, { "type": "material", "ident": "kevlar", diff --git a/data/json/npcs/missiondef.json b/data/json/npcs/missiondef.json index 22c4b44ea25a2..2263ca9447a49 100644 --- a/data/json/npcs/missiondef.json +++ b/data/json/npcs/missiondef.json @@ -577,6 +577,17 @@ "start": "find_safety", "origins": [ "ORIGIN_NULL" ] }, + { + "id": "MISSION_LAST_DELIVERY", + "type": "mission_definition", + "name": { "str": "Reach The Mansion And Finish This Delivery" }, + "goal": "MGOAL_GO_TO_TYPE", + "destination": "mansion_c3_north", + "difficulty": 1, + "value": 0, + "start": { "assign_mission_target": { "om_terrain": "mansion_c3", "om_special": "Mansion_Wild", "search_range": 200 } }, + "origins": [ "ORIGIN_GAME_START" ] + }, { "id": "MISSION_RECOVER_PRIEST_DIARY", "type": "mission_definition", diff --git a/data/json/overmap/overmap_special/specials.json b/data/json/overmap/overmap_special/specials.json index 1eeb706c27fe7..cc3bc54184d03 100644 --- a/data/json/overmap/overmap_special/specials.json +++ b/data/json/overmap/overmap_special/specials.json @@ -221,8 +221,8 @@ ], "connections": [ { "point": [ 0, -1, 0 ], "terrain": "road", "existing": true } ], "locations": [ "land", "swamp" ], - "city_distance": [ 10, 200 ], - "city_sizes": [ 1, 3 ], + "city_distance": [ 20, -1 ], + "city_sizes": [ 1, 8 ], "occurrences": [ 0, 2 ], "flags": [ "CLASSIC", "WILDERNESS" ] }, diff --git a/data/json/scenarios.json b/data/json/scenarios.json index 89c6ad32e1018..a0312f178ec3f 100644 --- a/data/json/scenarios.json +++ b/data/json/scenarios.json @@ -418,12 +418,25 @@ "ident": "foodplace", "name": "The Mascot Rises", "points": 0, - "description": "You just finished your shift and got back in the break room when you heard the alarms and the security door shutting down behind you. There's a lot of customers out there and you're not sure Foodplace delicious food is going to be enough for them.", + "description": "You just finished your shift and got back in the break room when you heard the alarms and the security door shutting down behind you. There's a lot of customers out there and you're not sure Foodplace's delicious food™ is going to be enough for them.", "allowed_locs": [ "sloc_restaraunt_foodplace_break_room" ], "professions": [ "true_foodperson", "unemployed" ], "start_name": "Foodplace Break Room", "flags": [ "CITY_START" ] }, + { + "type": "scenario", + "ident": "last_delivery", + "name": "The Last Delivery", + "points": 2, + "description": "While the world was falling apart someone called to order some of Foodplace's delicious food™ and they sent you to do the delivery. You're not sure about much, but one thing is certain: that delicious food™ is going to get delivered even if that's the last thing you do!", + "vehicle": "food_truck_delivery_mission", + "professions": [ "true_foodperson", "unemployed" ], + "start_name": "A Stop On The Road", + "allowed_locs": [ "sloc_gas_station" ], + "missions": [ "MISSION_LAST_DELIVERY" ], + "flags": [ "LONE_START" ] + }, { "type": "scenario", "ident": "wilderness", diff --git a/data/json/start_locations.json b/data/json/start_locations.json index 84a946d34e701..a1055c362b678 100644 --- a/data/json/start_locations.json +++ b/data/json/start_locations.json @@ -393,6 +393,12 @@ "name": "Lake Cabin", "terrain": [ "cabin_lake" ] }, + { + "type": "start_location", + "id": "sloc_gas_station", + "name": "Gas Station", + "terrain": [ "s_gas_rural" ] + }, { "type": "start_location", "id": "sloc_lighthouse_ground", diff --git a/data/json/vehicle_groups.json b/data/json/vehicle_groups.json index a55f56f691d4a..efd1459fe5a36 100644 --- a/data/json/vehicle_groups.json +++ b/data/json/vehicle_groups.json @@ -54,6 +54,7 @@ [ "humvee", 150 ], [ "humvee_gl", 50 ], [ "icecream_truck", 50 ], + [ "food_truck", 50 ], [ "wienermobile", 5 ], [ "tatra_truck", 100 ], [ "4x4_car", 500 ] @@ -236,6 +237,7 @@ [ "motorcycle_sidecart", 300 ], [ "shopping_cart", 1000 ], [ "icecream_truck", 50 ], + [ "food_truck", 20 ], [ "wienermobile", 5 ], [ "portable_generator", 50 ], [ "4x4_car", 200 ] diff --git a/data/json/vehicles/vans_busses.json b/data/json/vehicles/vans_busses.json index 8b2145ac30338..148dafb054178 100644 --- a/data/json/vehicles/vans_busses.json +++ b/data/json/vehicles/vans_busses.json @@ -689,6 +689,345 @@ { "x": -1, "y": 0, "chance": 15, "items": [ "money_bundle" ] } ] }, + { + "id": "food_truck", + "type": "vehicle", + "name": "Food Truck", + "blueprint": [ + [ " o " ], + [ "O---+-O" ], + [ "|&&H#'|" ], + [ "+===='>" ], + [ "|o==#'|" ], + [ "O-#-+-O" ], + [ " o " ] + ], + "parts": [ + { "x": 0, "y": 0, "part": "frame_vertical_2" }, + { "x": 0, "y": 0, "part": "seat" }, + { "x": 0, "y": 0, "part": "seatbelt" }, + { "x": 0, "y": 0, "part": "controls" }, + { "x": 0, "y": 0, "part": "dashboard" }, + { "x": 0, "y": 0, "part": "vehicle_clock" }, + { "x": 0, "y": 0, "part": "vehicle_alarm" }, + { "x": 0, "y": 0, "part": "horn_car" }, + { "x": 0, "y": 0, "part": "roof" }, + { "x": 0, "y": -1, "part": "frame_vertical" }, + { "x": 0, "y": -1, "part": "door" }, + { "x": 0, "y": -1, "part": "roof" }, + { "x": 0, "y": 1, "part": "frame_vertical_2" }, + { "x": 0, "y": 1, "part": "aisle_vertical" }, + { "x": 0, "y": 1, "part": "roof" }, + { "x": 0, "y": 2, "part": "frame_vertical_2" }, + { "x": 0, "y": 2, "part": "seat" }, + { "x": 0, "y": 2, "part": "seatbelt" }, + { "x": 0, "y": 2, "part": "roof" }, + { "x": 0, "y": 3, "part": "frame_vertical" }, + { "x": 0, "y": 3, "part": "door" }, + { "x": 0, "y": 3, "part": "roof" }, + { "x": 1, "y": 0, "part": "frame_vertical_2" }, + { "x": 1, "y": 0, "part": "windshield" }, + { "x": 1, "y": -1, "part": "frame_vertical" }, + { "x": 1, "y": -1, "part": "windshield" }, + { "x": 1, "y": -2, "part": "wing_mirror" }, + { "x": 1, "y": 1, "part": "frame_vertical_2" }, + { "x": 1, "y": 1, "part": "windshield" }, + { "x": 1, "y": 2, "part": "frame_vertical_2" }, + { "x": 1, "y": 2, "part": "windshield" }, + { "x": 1, "y": 3, "part": "frame_vertical" }, + { "x": 1, "y": 3, "part": "windshield" }, + { "x": 1, "y": 4, "part": "wing_mirror" }, + { "x": 2, "y": 0, "part": "frame_horizontal" }, + { "x": 2, "y": 0, "part": "halfboard_horizontal" }, + { "x": 2, "y": -1, "part": "frame_nw" }, + { "x": 2, "y": -1, "part": "halfboard_nw" }, + { "x": 2, "y": -1, "part": "headlight" }, + { "x": 2, "y": -1, "parts": [ "wheel_mount_medium_steerable", "wheel" ] }, + { "x": 2, "y": 1, "part": "frame_cover" }, + { "x": 2, "y": 1, "part": "halfboard_cover" }, + { "x": 2, "y": 1, "part": "engine_v6" }, + { "x": 2, "y": 1, "part": "alternator_truck" }, + { "x": 2, "y": 1, "part": "battery_car" }, + { "x": 2, "y": 2, "part": "frame_horizontal" }, + { "x": 2, "y": 2, "part": "halfboard_horizontal" }, + { "x": 2, "y": 3, "part": "frame_ne" }, + { "x": 2, "y": 3, "part": "halfboard_ne" }, + { "x": 2, "y": 3, "part": "headlight" }, + { "x": 2, "y": 3, "parts": [ "wheel_mount_medium_steerable", "wheel" ] }, + { "x": -1, "y": 0, "part": "frame_vertical_2" }, + { "x": -1, "y": 0, "part": "minifridge" }, + { "x": -1, "y": 0, "part": "roof" }, + { "x": -1, "y": -1, "part": "frame_vertical" }, + { "x": -1, "y": -1, "part": "board_vertical" }, + { "x": -1, "y": -1, "part": "tank", "fuel": "gasoline" }, + { "x": -1, "y": 1, "part": "frame_vertical_2" }, + { "x": -1, "y": 1, "part": "aisle_vertical" }, + { "x": -1, "y": 1, "part": "roof" }, + { "x": -1, "y": 2, "part": "frame_vertical_2" }, + { "x": -1, "y": 2, "part": "aisle_vertical" }, + { "x": -1, "y": 2, "part": "roof" }, + { "x": -1, "y": 3, "part": "frame_vertical" }, + { "x": -1, "y": 3, "part": "board_vertical" }, + { "x": -2, "y": 0, "part": "frame_vertical_2" }, + { "x": -2, "y": 0, "part": "kitchen_unit" }, + { "x": -2, "y": 0, "part": "roof" }, + { "x": -2, "y": -1, "part": "frame_vertical" }, + { "x": -2, "y": -1, "part": "board_vertical" }, + { "x": -2, "y": 1, "part": "frame_vertical_2" }, + { "x": -2, "y": 1, "part": "aisle_vertical" }, + { "x": -2, "y": 1, "part": "roof" }, + { "x": -2, "y": 2, "part": "frame_vertical_2" }, + { "x": -2, "y": 2, "part": "aisle_vertical" }, + { "x": -2, "y": 2, "part": "roof" }, + { "x": -2, "y": 3, "part": "frame_vertical" }, + { "x": -2, "y": 3, "part": "windshield" }, + { "x": -3, "y": 0, "part": "frame_vertical_2" }, + { "x": -3, "y": 0, "part": "minifreezer" }, + { "x": -3, "y": 0, "part": "roof" }, + { "x": -3, "y": -1, "part": "frame_vertical" }, + { "x": -3, "y": -1, "part": "board_vertical" }, + { "x": -3, "y": 1, "part": "frame_vertical_2" }, + { "x": -3, "y": 1, "part": "aisle_vertical" }, + { "x": -3, "y": 1, "part": "roof" }, + { "x": -3, "y": 2, "part": "frame_vertical_2" }, + { "x": -3, "y": 2, "part": "storage_battery" }, + { "x": -3, "y": 2, "part": "box" }, + { "x": -3, "y": 2, "part": "roof" }, + { "x": -3, "y": 3, "part": "frame_vertical" }, + { "x": -3, "y": 3, "part": "board_vertical" }, + { "x": -4, "y": 0, "part": "frame_horizontal" }, + { "x": -4, "y": 0, "part": "board_horizontal" }, + { "x": -4, "y": 0, "part": "muffler" }, + { "x": -4, "y": 0, "part": "roof" }, + { "x": -4, "y": -1, "part": "frame_sw" }, + { "x": -4, "y": -1, "part": "board_sw" }, + { "x": -4, "y": -1, "parts": [ "wheel_mount_medium", "wheel" ] }, + { "x": -4, "y": -1, "part": "roof" }, + { "x": -4, "y": 1, "part": "frame_horizontal" }, + { "x": -4, "y": 1, "part": "door" }, + { "x": -4, "y": 1, "part": "roof" }, + { "x": -4, "y": 2, "part": "frame_horizontal" }, + { "x": -4, "y": 2, "part": "board_horizontal" }, + { "x": -4, "y": 2, "part": "beeper" }, + { "x": -4, "y": 2, "part": "roof" }, + { "x": -4, "y": 3, "part": "frame_se" }, + { "x": -4, "y": 3, "part": "board_se" }, + { "x": -4, "y": 3, "parts": [ "wheel_mount_medium", "wheel" ] }, + { "x": -4, "y": 3, "part": "roof" } + ], + "items": [ + { "x": -3, "y": 0, "chance": 70, "item_groups": [ "fridgesnacks" ] }, + { "x": -3, "y": 0, "chance": 20, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 20, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 60, "item_groups": [ "fridgesnacks" ] }, + { "x": -3, "y": 0, "chance": 50, "item_groups": [ "fridgesnacks" ] }, + { "x": -3, "y": 0, "chance": 30, "item_groups": [ "fridgesnacks" ] }, + { "x": -1, "y": 0, "chance": 60, "item_groups": [ "fridgesnacks" ] }, + { "x": -1, "y": 0, "chance": 60, "item_groups": [ "fridgesnacks" ] }, + { "x": -1, "y": 0, "chance": 60, "item_groups": [ "fridgesnacks" ] }, + { "x": -1, "y": 0, "chance": 20, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 20, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 60, "item_groups": [ "fridgesnacks" ] }, + { "x": -1, "y": 0, "chance": 70, "item_groups": [ "fast_fridge" ] }, + { "x": -1, "y": 0, "chance": 70, "item_groups": [ "fast_fridge" ] }, + { "x": -1, "y": 0, "chance": 70, "item_groups": [ "fast_fridge" ] }, + { "x": -1, "y": 0, "chance": 70, "item_groups": [ "fast_fridge" ] }, + { "x": -1, "y": 0, "chance": 30, "item_groups": [ "fridgesnacks" ] }, + { "x": -3, "y": 2, "chance": 60, "item_groups": [ "snacks" ] }, + { "x": -3, "y": 2, "chance": 70, "item_groups": [ "snacks" ] }, + { "x": -3, "y": 2, "chance": 30, "item_groups": [ "snacks" ] }, + { "x": -3, "y": 2, "chance": 20, "item_groups": [ "coffee_counter" ] }, + { "x": -3, "y": 2, "chance": 40, "items": [ "ketchup" ] }, + { "x": -3, "y": 2, "chance": 40, "items": [ "mustard" ] }, + { "x": -3, "y": 2, "chance": 40, "items": [ "mayonnaise" ] }, + { "x": 0, "y": 2, "chance": 15, "items": [ "money_bundle" ] }, + { "x": 0, "y": 2, "chance": 100, "items": [ "flyer" ] }, + { "x": 0, "y": 2, "chance": 100, "items": [ "months_old_newspaper" ] }, + { "x": 0, "y": 2, "chance": 50, "items": [ "flyer" ] }, + { "x": 0, "y": 2, "chance": 50, "items": [ "months_old_newspaper" ] }, + { "x": 0, "y": 2, "chance": 30, "items": [ "flyer" ] }, + { "x": 0, "y": 2, "chance": 50, "items": [ "roadmap" ] }, + { "x": 0, "y": 2, "chance": 30, "items": [ "months_old_newspaper" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "foodperson_mask" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "cape_fp" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "chestguard_hard" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "legguard_hard" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "armguard_hard" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "gloves_rubber" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "boots_rubber" ] }, + { "x": -3, "y": 2, "chance": 20, "items": [ "medium_disposable_cell" ] } + ] + }, + { + "//": "This is a duplicate used for the last delivery starting scenario", + "id": "food_truck_delivery_mission", + "type": "vehicle", + "name": "Food Truck", + "blueprint": [ + [ " o " ], + [ "O---+-O" ], + [ "|&&H#'|" ], + [ "+===='>" ], + [ "|o==#'|" ], + [ "O-#-+-O" ], + [ " o " ] + ], + "parts": [ + { "x": 0, "y": 0, "part": "frame_vertical_2" }, + { "x": 0, "y": 0, "part": "seat" }, + { "x": 0, "y": 0, "part": "seatbelt" }, + { "x": 0, "y": 0, "part": "controls" }, + { "x": 0, "y": 0, "part": "dashboard" }, + { "x": 0, "y": 0, "part": "vehicle_clock" }, + { "x": 0, "y": 0, "part": "vehicle_alarm" }, + { "x": 0, "y": 0, "part": "horn_car" }, + { "x": 0, "y": 0, "part": "roof" }, + { "x": 0, "y": -1, "part": "frame_vertical" }, + { "x": 0, "y": -1, "part": "door" }, + { "x": 0, "y": -1, "part": "roof" }, + { "x": 0, "y": 1, "part": "frame_vertical_2" }, + { "x": 0, "y": 1, "part": "aisle_vertical" }, + { "x": 0, "y": 1, "part": "roof" }, + { "x": 0, "y": 2, "part": "frame_vertical_2" }, + { "x": 0, "y": 2, "part": "seat" }, + { "x": 0, "y": 2, "part": "seatbelt" }, + { "x": 0, "y": 2, "part": "roof" }, + { "x": 0, "y": 3, "part": "frame_vertical" }, + { "x": 0, "y": 3, "part": "door" }, + { "x": 0, "y": 3, "part": "roof" }, + { "x": 1, "y": 0, "part": "frame_vertical_2" }, + { "x": 1, "y": 0, "part": "windshield" }, + { "x": 1, "y": -1, "part": "frame_vertical" }, + { "x": 1, "y": -1, "part": "windshield" }, + { "x": 1, "y": -2, "part": "wing_mirror" }, + { "x": 1, "y": 1, "part": "frame_vertical_2" }, + { "x": 1, "y": 1, "part": "windshield" }, + { "x": 1, "y": 2, "part": "frame_vertical_2" }, + { "x": 1, "y": 2, "part": "windshield" }, + { "x": 1, "y": 3, "part": "frame_vertical" }, + { "x": 1, "y": 3, "part": "windshield" }, + { "x": 1, "y": 4, "part": "wing_mirror" }, + { "x": 2, "y": 0, "part": "frame_horizontal" }, + { "x": 2, "y": 0, "part": "halfboard_horizontal" }, + { "x": 2, "y": -1, "part": "frame_nw" }, + { "x": 2, "y": -1, "part": "halfboard_nw" }, + { "x": 2, "y": -1, "part": "headlight" }, + { "x": 2, "y": -1, "parts": [ "wheel_mount_medium_steerable", "wheel" ] }, + { "x": 2, "y": 1, "part": "frame_cover" }, + { "x": 2, "y": 1, "part": "halfboard_cover" }, + { "x": 2, "y": 1, "part": "engine_v6" }, + { "x": 2, "y": 1, "part": "alternator_truck" }, + { "x": 2, "y": 1, "part": "battery_car" }, + { "x": 2, "y": 2, "part": "frame_horizontal" }, + { "x": 2, "y": 2, "part": "halfboard_horizontal" }, + { "x": 2, "y": 3, "part": "frame_ne" }, + { "x": 2, "y": 3, "part": "halfboard_ne" }, + { "x": 2, "y": 3, "part": "headlight" }, + { "x": 2, "y": 3, "parts": [ "wheel_mount_medium_steerable", "wheel" ] }, + { "x": -1, "y": 0, "part": "frame_vertical_2" }, + { "x": -1, "y": 0, "part": "minifridge" }, + { "x": -1, "y": 0, "part": "roof" }, + { "x": -1, "y": -1, "part": "frame_vertical" }, + { "x": -1, "y": -1, "part": "board_vertical" }, + { "x": -1, "y": -1, "part": "tank", "fuel": "gasoline" }, + { "x": -1, "y": 1, "part": "frame_vertical_2" }, + { "x": -1, "y": 1, "part": "aisle_vertical" }, + { "x": -1, "y": 1, "part": "roof" }, + { "x": -1, "y": 2, "part": "frame_vertical_2" }, + { "x": -1, "y": 2, "part": "aisle_vertical" }, + { "x": -1, "y": 2, "part": "roof" }, + { "x": -1, "y": 3, "part": "frame_vertical" }, + { "x": -1, "y": 3, "part": "board_vertical" }, + { "x": -2, "y": 0, "part": "frame_vertical_2" }, + { "x": -2, "y": 0, "part": "kitchen_unit" }, + { "x": -2, "y": 0, "part": "roof" }, + { "x": -2, "y": -1, "part": "frame_vertical" }, + { "x": -2, "y": -1, "part": "board_vertical" }, + { "x": -2, "y": 1, "part": "frame_vertical_2" }, + { "x": -2, "y": 1, "part": "aisle_vertical" }, + { "x": -2, "y": 1, "part": "roof" }, + { "x": -2, "y": 2, "part": "frame_vertical_2" }, + { "x": -2, "y": 2, "part": "aisle_vertical" }, + { "x": -2, "y": 2, "part": "roof" }, + { "x": -2, "y": 3, "part": "frame_vertical" }, + { "x": -2, "y": 3, "part": "windshield" }, + { "x": -3, "y": 0, "part": "frame_vertical_2" }, + { "x": -3, "y": 0, "part": "minifreezer" }, + { "x": -3, "y": 0, "part": "roof" }, + { "x": -3, "y": -1, "part": "frame_vertical" }, + { "x": -3, "y": -1, "part": "board_vertical" }, + { "x": -3, "y": 1, "part": "frame_vertical_2" }, + { "x": -3, "y": 1, "part": "aisle_vertical" }, + { "x": -3, "y": 1, "part": "roof" }, + { "x": -3, "y": 2, "part": "frame_vertical_2" }, + { "x": -3, "y": 2, "part": "storage_battery" }, + { "x": -3, "y": 2, "part": "box" }, + { "x": -3, "y": 2, "part": "roof" }, + { "x": -3, "y": 3, "part": "frame_vertical" }, + { "x": -3, "y": 3, "part": "board_vertical" }, + { "x": -4, "y": 0, "part": "frame_horizontal" }, + { "x": -4, "y": 0, "part": "board_horizontal" }, + { "x": -4, "y": 0, "part": "muffler" }, + { "x": -4, "y": 0, "part": "roof" }, + { "x": -4, "y": -1, "part": "frame_sw" }, + { "x": -4, "y": -1, "part": "board_sw" }, + { "x": -4, "y": -1, "parts": [ "wheel_mount_medium", "wheel" ] }, + { "x": -4, "y": -1, "part": "roof" }, + { "x": -4, "y": 1, "part": "frame_horizontal" }, + { "x": -4, "y": 1, "part": "door" }, + { "x": -4, "y": 1, "part": "roof" }, + { "x": -4, "y": 2, "part": "frame_horizontal" }, + { "x": -4, "y": 2, "part": "board_horizontal" }, + { "x": -4, "y": 2, "part": "beeper" }, + { "x": -4, "y": 2, "part": "roof" }, + { "x": -4, "y": 3, "part": "frame_se" }, + { "x": -4, "y": 3, "part": "board_se" }, + { "x": -4, "y": 3, "parts": [ "wheel_mount_medium", "wheel" ] }, + { "x": -4, "y": 3, "part": "roof" } + ], + "items": [ + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -1, "y": 0, "chance": 100, "items": [ "foodplace_food" ] }, + { "x": -3, "y": 2, "chance": 20, "item_groups": [ "snacks" ] }, + { "x": -3, "y": 2, "chance": 50, "item_groups": [ "snacks" ] }, + { "x": -3, "y": 2, "chance": 30, "item_groups": [ "snacks" ] }, + { "x": -3, "y": 2, "chance": 20, "item_groups": [ "coffee_counter" ] }, + { "x": 0, "y": 2, "chance": 100, "items": [ "flyer" ] }, + { "x": 0, "y": 2, "chance": 100, "items": [ "months_old_newspaper" ] }, + { "x": 0, "y": 2, "chance": 50, "items": [ "flyer" ] }, + { "x": 0, "y": 2, "chance": 50, "items": [ "months_old_newspaper" ] }, + { "x": 0, "y": 2, "chance": 30, "items": [ "flyer" ] }, + { "x": 0, "y": 2, "chance": 70, "items": [ "roadmap" ] }, + { "x": 0, "y": 2, "chance": 30, "items": [ "months_old_newspaper" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "foodperson_mask" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "cape_fp" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "chestguard_hard" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "legguard_hard" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "armguard_hard" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "gloves_rubber" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "boots_rubber" ] }, + { "x": -3, "y": 2, "chance": 100, "items": [ "medium_disposable_cell" ] } + ] + }, { "id": "lux_rv", "type": "vehicle", diff --git a/src/newcharacter.cpp b/src/newcharacter.cpp index ca4f3fba1a071..17fc51d16ca89 100644 --- a/src/newcharacter.cpp +++ b/src/newcharacter.cpp @@ -531,7 +531,13 @@ bool avatar::create( character_type type, const std::string &tempname ) for( mtype_id elem : prof->pets() ) { starting_pets.push_back( elem ); } - starting_vehicle = prof->vehicle(); + + if( g->scen->vehicle() != vproto_id::NULL_ID() ) { + starting_vehicle = g->scen->vehicle(); + } else { + starting_vehicle = prof->vehicle(); + } + std::list prof_items = prof->items( male, get_mutations() ); for( item &it : prof_items ) { @@ -1935,6 +1941,7 @@ tab_direction set_scenario( avatar &u, points_left &points, catacurses::window w_sorting; catacurses::window w_profession; catacurses::window w_location; + catacurses::window w_vehicle; catacurses::window w_flags; const auto init_windows = [&]( ui_adaptor & ui ) { iContentHeight = TERMY - 10; @@ -1943,9 +1950,10 @@ tab_direction set_scenario( avatar &u, points_left &points, w_sorting = catacurses::newwin( 2, ( TERMX / 2 ) - 1, point( TERMX / 2, 5 ) ); w_profession = catacurses::newwin( 4, ( TERMX / 2 ) - 1, point( TERMX / 2, 7 ) ); w_location = catacurses::newwin( 3, ( TERMX / 2 ) - 1, point( TERMX / 2, 11 ) ); - // 9 = 2 + 4 + 3, so we use rest of space for flags - w_flags = catacurses::newwin( iContentHeight - 9, ( TERMX / 2 ) - 1, - point( TERMX / 2, 14 ) ); + w_vehicle = catacurses::newwin( 3, ( TERMX / 2 ) - 1, point( TERMX / 2, 14 ) ); + // 11 = 2 + 4 + 3 + 3, so we use rest of space for flags + w_flags = catacurses::newwin( iContentHeight - 14, ( TERMX / 2 ) - 1, + point( TERMX / 2, 17 ) ); ui.position_from_window( w ); }; init_windows( ui ); @@ -2069,6 +2077,7 @@ tab_direction set_scenario( avatar &u, points_left &points, werase( w_sorting ); werase( w_profession ); werase( w_location ); + werase( w_vehicle ); werase( w_flags ); if( cur_id_is_valid ) { @@ -2100,6 +2109,12 @@ tab_direction set_scenario( avatar &u, points_left &points, sorted_scens[cur_id]->start_location_count(), sorted_scens[cur_id]->start_location_targets_count() ) ); + mvwprintz( w_vehicle, point_zero, COL_HEADER, _( "Scenario Vehicle:" ) ); + wprintz( w_vehicle, c_light_gray, ( "\n" ) ); + if( sorted_scens[cur_id]->vehicle() ) { + wprintz( w_vehicle, c_light_gray, sorted_scens[cur_id]->vehicle()->name ); + } + mvwprintz( w_flags, point_zero, COL_HEADER, _( "Scenario Flags:" ) ); wprintz( w_flags, c_light_gray, ( "\n" ) ); @@ -2153,6 +2168,7 @@ tab_direction set_scenario( avatar &u, points_left &points, wrefresh( w_sorting ); wrefresh( w_profession ); wrefresh( w_location ); + wrefresh( w_vehicle ); wrefresh( w_flags ); } ); @@ -2286,6 +2302,7 @@ tab_direction set_description( avatar &you, const bool allow_reroll, catacurses::window w_name; catacurses::window w_gender; catacurses::window w_location; + catacurses::window w_vehicle; catacurses::window w_stats; catacurses::window w_traits; catacurses::window w_scenario; @@ -2299,6 +2316,7 @@ tab_direction set_description( avatar &you, const bool allow_reroll, w_name = catacurses::newwin( 3, 42, point( 2, 5 ) ); w_gender = catacurses::newwin( 2, 33, point( 46, 5 ) ); w_location = catacurses::newwin( 2, 60, point( 100, 5 ) ); + w_vehicle = catacurses::newwin( 2, 60, point( 160, 5 ) ); w_stats = catacurses::newwin( 6, 20, point( 2, 9 ) ); w_traits = catacurses::newwin( TERMY - 10, 24, point( 22, 9 ) ); w_scenario = catacurses::newwin( 1, TERMX - 47, point( 46, 9 ) ); @@ -2525,6 +2543,17 @@ tab_direction set_description( avatar &you, const bool allow_reroll, you.start_location.obj().targets_count() ) ); wrefresh( w_location ); + werase( w_vehicle ); + mvwprintz( w_vehicle, point_zero, c_light_gray, _( "Starting Vehicle: " ) ); + const vproto_id scen_veh = g->scen->vehicle(); + const vproto_id prof_veh = you.prof->vehicle(); + if( scen_veh ) { + wprintz( w_vehicle, c_light_green, scen_veh->name ); + } else if( prof_veh ) { + wprintz( w_vehicle, c_light_green, prof_veh->name ); + } + wrefresh( w_vehicle ); + werase( w_scenario ); mvwprintz( w_scenario, point_zero, COL_HEADER, _( "Scenario: " ) ); wprintz( w_scenario, c_light_gray, g->scen->gender_appropriate_name( you.male ) ); diff --git a/src/scenario.cpp b/src/scenario.cpp index 33a3d61dd2e59..45385f768a2e7 100644 --- a/src/scenario.cpp +++ b/src/scenario.cpp @@ -90,6 +90,10 @@ void scenario::load( const JsonObject &jo, const std::string & ) optional( jo, was_loaded, "flags", flags, auto_flags_reader<> {} ); optional( jo, was_loaded, "map_extra", _map_extra, "mx_null" ); optional( jo, was_loaded, "missions", _missions, auto_flags_reader {} ); + + if( jo.has_string( "vehicle" ) ) { + _starting_vehicle = vproto_id( jo.get_string( "vehicle" ) ); + } } const scenario *scenario::generic() @@ -186,6 +190,11 @@ void scenario::check_definition() const m.c_str(), id.c_str() ); } } + + if( _starting_vehicle && !_starting_vehicle.is_valid() ) { + debugmsg( "vehicle prototype %s for profession %s does not exist", _starting_vehicle.c_str(), + id.c_str() ); + } } const string_id &scenario::ident() const @@ -401,6 +410,11 @@ int scenario::start_location_targets_count() const return cnt; } +vproto_id scenario::vehicle() const +{ + return _starting_vehicle; +} + bool scenario::traitquery( const trait_id &trait ) const { return _allowed_traits.count( trait ) != 0 || is_locked_trait( trait ) || diff --git a/src/scenario.h b/src/scenario.h index 6abeaa95ce939..5319982710ab0 100644 --- a/src/scenario.h +++ b/src/scenario.h @@ -50,6 +50,8 @@ class scenario std::string _map_extra; std::vector _missions; + vproto_id _starting_vehicle = vproto_id::NULL_ID(); + void load( const JsonObject &jo, const std::string &src ); bool scenario_traits_conflict_with_profession_traits( const profession &p ) const; @@ -80,6 +82,8 @@ class scenario int start_location_count() const; int start_location_targets_count() const; + vproto_id vehicle() const; + const profession *weighted_random_profession() const; std::vector> permitted_professions() const;