diff --git a/data/json/furniture_and_terrain/furniture-eggs.json b/data/json/furniture_and_terrain/furniture-eggs.json index 3c93235d58e73..cbfd53ed08368 100644 --- a/data/json/furniture_and_terrain/furniture-eggs.json +++ b/data/json/furniture_and_terrain/furniture-eggs.json @@ -3,7 +3,7 @@ "type": "furniture", "id": "f_egg_sackbw", "name": "spider egg sack", - "description": "Much too large, off-white egg sack. Kind of icky. Something IS moving in there.", + "description": "A sizable, off-white sac of large eggs. Upon watching closer, you can see them moving slightly. Gross.", "symbol": "O", "color": "white", "move_cost_mod": 3, @@ -16,7 +16,7 @@ "type": "furniture", "id": "f_egg_sackcs", "name": "spider egg sack", - "description": "Bulbous mass of spider eggs. More than kind of icky. Something IS moving in there.", + "description": "A bulbous mass of off-white spider eggs. Upon watching closer, you can see them moving a bit. Really gross.", "symbol": "O", "color": "white", "move_cost_mod": 3, @@ -29,7 +29,7 @@ "type": "furniture", "id": "f_egg_sackws", "name": "spider egg sack", - "description": "A horrifyingly oversized egg sack. Something IS moving in there. If you're seeing this, you're already too close to it.", + "description": "A gigantic sac of spider's eggs, each one larger than your fist. They're definitely moving around. Really gross, just seeing it makes your skin crawl.", "symbol": "O", "color": "yellow", "move_cost_mod": 3, @@ -42,7 +42,7 @@ "type": "furniture", "id": "f_egg_sacke", "name": "ruptured egg sack", - "description": "Super icky. Spider stuff's spilling out.", + "description": "A disgusting ruptured sac of giant spider eggs. The thought of all those massive baby spiders pouring out of it is almost terrifying on its own.", "symbol": "X", "color": "white", "move_cost_mod": 3, diff --git a/data/json/mapgen/mall/mall_basement.json b/data/json/mapgen/mall/mall_basement.json new file mode 100644 index 0000000000000..3fa32164343a8 --- /dev/null +++ b/data/json/mapgen/mall/mall_basement.json @@ -0,0 +1,175 @@ +[ + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ + "mall_a_56_basement", + "mall_a_57_basement", + "mall_a_58_basement", + "mall_a_59_basement", + "mall_a_60_basement", + "mall_a_61_basement", + "mall_a_62_basement" + ] + ], + "object": { + "fill_ter": "t_thconc_floor", + "rows": [ + " |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||#####||||||#####||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ", + " |................................................................#<6<#......#<6<#..............................................................| ", + " |................................................................#666########666#..............................................................| ", + " |......................................................###########6#+#(*FF*)#+#6###########....................................................| ", + " |||......................................................#EEEE#EEEE#H#***,*,****#H#EEEE#EEEE#....................................................| ", + " |........................................................#EEEE#EEEE#****,*,*,*,***#EEEE#EEEE#....................................................| ", + " |......................................................###H++H#H++H#*,*,*,*,*,*,**#H++H#H++H###..................................................| ", + " |......................................................#******Ŋ*******,*,*,*,*,*,******Ŋ******#..................................................| ", + " |......................................................#*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,**#..................................................| ", + " |......................................................#**,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*#..................................................| ", + " |......................................................#F,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*F#..................................................| ", + " |......................................................#F*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,F#..................................................| ", + " |......................................................#F,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*F#..................................................| ", + " |......................................................#**,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*#..................................................| ", + " |......................................................#Y()**,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*()Y#..................................................| ", + " |......................................................####*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,**####..................................................| ", + " |.........................................................#**,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*#.....................................................| ", + " |.........................................................#*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,**#.....................................................| ", + " |.........................................................#F*,*,*,*,*,*,*}*,{,*,*,*,*,*,*,F#.....................................................| ", + " |.........................................................#F,*,*,*,*,*,*,{,*}*,*,*,*,*,*,*F#.....................................................| ", + " |.........................................................#F*,*,*,*,*,*,*}*,{,*,*,*,*,*,*,F#.....................................................| ", + " |.........................................................#Y,*,*,*,*,*,*,{,*}*,*,*,*,*,*,*Y#.....................................................| ", + " |.........................................................#**,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*#.....................................................| ", + " |.........................................................#*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,**#.....................................................| " + ], + "palettes": [ "mall_palette_basement" ], + "terrain": { + "#": "t_brick_wall", + "*": "t_linoleum_gray", + ",": "t_linoleum_white", + "6": "t_carpet_red", + ".": "t_rock", + "{": "t_linoleum_gray", + "Y": "t_linoleum_gray", + "}": "t_linoleum_white", + "(": "t_linoleum_gray", + ")": "t_linoleum_gray", + "F": "t_linoleum_gray" + }, + "furniture": { "{": "f_bench", "}": "f_bench", "Y": "f_trashcan" }, + "vendingmachines": { "(": { "item_group": "vending_drink" }, ")": { "item_group": "vending_food" } }, + "place_monsters": [ { "monster": "GROUP_MALL", "x": [ 72, 95 ], "y": [ 8, 23 ], "density": 0.4 } ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ + [ + "mall_a_65_basement", + "mall_a_66_basement", + "mall_a_67_basement", + "mall_a_68_basement", + "mall_a_69_basement", + "mall_a_70_basement", + "mall_a_71_basement" + ] + ], + "object": { + "fill_ter": "t_thconc_floor", + "rows": [ + " |.........................................................#{*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,{#.....................................................| ", + " |.........................................................#{,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*{#.....................................................| ", + " |.........................................................#{*,*,*,*,*,*,*}*,{,*,*,*,*,*,*,{#.....................................................| ", + " |.........................................................#Y,*,*,*,*,*,*,{,*}*,*,*,*,*,*,*Y#.....................................................| ", + " |.........................................................#{*,*,*,*,*,*,*}*,{,*,*,*,*,*,*,{#.....................................................| ", + " |.........................................................#{,*,*,*,*,*,*,{,*}*,*,*,*,*,*,*{#.....................................................|||| ", + " |.........................................................#{*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,{#........................................................| ", + " |.........................................................#*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,**#........................................................| ", + " |.........................................................#**,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*#.....................................................|||| ", + " |.........................................................#*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,**#.....................................................| ", + " |.........................................................#>*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,>#.....................................................| ", + " |....................................|||||||||||||........#>***Ŋ**********************Ŋ***>#.....................................................| ", + " |....................................| |........##+++########################+++##.....................................................| ", + " |||||||||||||||||||||||||||||||||||||| |||||||||||ŊEE||||||||||||||||||||||||ŊEE|||||||||||||||||||||||||||||||||||||||||||||||||||||||| ", + " |EEE| |EEE| ", + " |EEE| |EEE| ", + " ||||| ||||| ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ], + "palettes": [ "mall_palette_basement" ], + "terrain": { + "#": "t_brick_wall", + "*": "t_linoleum_gray", + ",": "t_linoleum_white", + ".": "t_rock", + "{": "t_linoleum_gray", + "Y": "t_linoleum_gray", + "}": "t_linoleum_white" + }, + "furniture": { "{": "f_bench", "}": "f_bench", "Y": "f_trashcan" }, + "place_vehicles": [ + { "vehicle": "food_cart", "x": 75, "y": 3, "chance": 100, "rotation": 270 }, + { "vehicle": "ice_cream_cart", "x": 93, "y": 3, "chance": 100, "rotation": 180 } + ], + "place_monsters": [ { "monster": "GROUP_MALL", "x": [ 72, 95 ], "y": [ 0, 9 ], "density": 0.5 } ] + } + }, + { + "type": "mapgen", + "method": "json", + "om_terrain": [ [ "mall_a_67_sub_basement", "mall_a_68_sub_basement", "mall_a_69_sub_basement" ] ], + "object": { + "fill_ter": "t_thconc_floor", + "rows": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ############ ", + " ########.{{.().{{.######## ", + " #####.,.,.,.,.,.,.,.,.,.,.,.,##### ", + " #<__#,.,.,.,.,.,.,.,.,.,.,.,.#__<# ", + " #<__θ.,.,.,.,.,.,.,.,.,.,.,.,θ__<# ", + " ######Ŋ,.,.,.,.,.,.,.,.,.,.Ŋ###### ", + " #EEŊ+..,.,.,.,.}{,.,.,.,.,.+ŊEE# ", + " #EEE+.,.,.,.,.,{}.,.,.,.,..+EEE# ", + " #EEE+..,.,.,.,.}{,.,.,.,.,.+EEE# ", + " #####.,.,.,.,.,.,.,.,.,.,..##### ", + " #.{{Y......................Y{{.# ", + " #______________________________# ", + " #______4%444%4;;;;4%444%4______# ", + " #__FF__-&---&-;;;;-&---&-__FF__# ", + " #__FF__4%444%4;;;;4%444%4__FF__# ", + " #__FF__-&---&-;;;;-&---&-__FF__# ", + " #______4%444%4;;;;4%444%4______# " + ], + "palettes": [ "mall_palette_2" ], + "terrain": { + "&": "t_railroad_track", + " ": "t_rock", + "#": "t_brick_wall", + "%": "t_railroad_track_on_tie", + ";": "t_rock_floor", + "4": "t_railroad_rubble", + "-": "t_railroad_tie_h", + "{": "t_linoleum_gray", + "Y": "t_linoleum_gray", + "}": "t_linoleum_white", + "(": "t_linoleum_gray", + ")": "t_linoleum_gray" + }, + "furniture": { "{": "f_bench", "}": "f_bench", "Y": "f_trashcan" }, + "vendingmachines": { "(": { "item_group": "vending_drink" }, ")": { "item_group": "vending_food" } }, + "place_monsters": [ { "monster": "GROUP_MALL", "x": [ 24, 47 ], "y": [ 10, 23 ], "density": 0.3 } ] + } + } +] diff --git a/data/json/mapgen/mall/mall_ground.json b/data/json/mapgen/mall/mall_ground.json index ececf31fd7f6e..a4edc5fab150b 100644 --- a/data/json/mapgen/mall/mall_ground.json +++ b/data/json/mapgen/mall/mall_ground.json @@ -1416,10 +1416,10 @@ "fill_ter": "t_floor", "rows": [ "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯЯЯɱ|__|;^^^^^^^^^J^A~|MH.,,,,.^^^^±^^m|Q^^QQ^^QQ^^QQ^^QQ^^^J^^~|z___|||||666666|||||||=|", - "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯЯЯɱ|__|;;;;^^^;;^J^^~|^|.,,,,.^^^^±^^m|Q^^QQ^^QQ^^QQ^^±±^^^?^^~|U__S|UUU|666666|UUU|___j", - "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯЯϻɱ|__||||||=|||||||||^H.,,,,.H±^^±^^m|Q^^QQ^^±±^^±±^^±±^^^J^^~|U__P|___|||==|||___|_t_0", - "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯɱɱɱ|__|PP_______|PP_&|MH.,,,,.H±^^±^^m|Q^^QQ^^±±^^±±^^^^^^|||||||||||P|=|%....%|=|_|||||", - "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯɱ|||__θ_____B__S|__B&|dH.,,,,.H±^^^^^m|Q^^^^^^^^^^^^^^^^^±|EEEE|EEEE|||..........|||EEEE", + "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯЯЯɱ|__|;;;;^^^;;^J^^~|^|.,,,,.^^^^±^^m|Q^^QQ^^QQ^^QQ^^±±^^^?^^~|U__S|>6>|666666|>6>|___j", + "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯЯϻɱ|__||||||=|||||||||^H.,,,,.H±^^±^^m|Q^^QQ^^±±^^±±^^±±^^^J^^~|U__P|666|||==|||666|_t_0", + "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯɱɱɱ|__|PP_______|PP_&|MH.,,,,.H±^^±^^m|Q^^QQ^^±±^^±±^^^^^^|||||||||||6|+|%....%|+|6|||||", + "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯɱ|||__θ_____B__S|__B&|dH.,,,,.H±^^^^^m|Q^^^^^^^^^^^^^^^^^±|EEEE|EEEE|H|..........|H|EEEE", "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯɱHy|__|U__a&&&_S|____θ^|%....%|^^mmm^^|Q^^^^^^^^^^^^±±±±±±|EEEE|EEEE|%............%|EEEE", "ւГɔɔɔɔɔɔɔ˽˽˽˽˽˽˽˽˽˽˽˽ɔɔɔɔɔɔɔГГɱϻɱHdθ__|||||||||||||=||||HH^^HH||||||||||HHH|HHH^^^HHH|HHH||H++H|H++H|..............|H++H", "ւГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽ГГɱЯɱHy|__θ^^^^^^^^J^^J^^^J^^^^^^^^yĦĦĦĦĦyH....FFF.....FFF.........Ŋ.......FFFF..FFFF.......", @@ -1559,7 +1559,7 @@ "|EEEE|||||7|||||7ɄɄɄ77777ɄH.,,,,,,.HB^BB^BB9999999999999^`|ɱЯЯϻЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", "|EEEE|ɄɄ7777ɄɄɄ|ɅɄɄɄɅ7777Ʉ|.,,,,,,%|^^^^^^^A```````````^^<|ɱЯЯЯЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", "|H++H|HHH|||HHH||HHH|7777||.,,,,,,F||||||||||||||||||||=|||ɱЯЯЯЯЯɱГГɔɔɔɔɔɔɔ˽˽˽˽˽˽˽˽˽˽˽˽ɔɔɔɔɔɔɔГւ", - ".........FFF................,,,,,,FFF%|.333Δ333*♥..*|I__zP|ɱЯЯϻЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", + "Ŋ........FFF................,,,,,,FFF%|.333Δ333*♥..*|I__zP|ɱЯЯϻЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.H.ŦŦŦ,ŦŦŦ.?,Ŧ.|I}_zP|ɱЯЯЯЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", ",,,,,,,,,,,,,,,,,,,,,,,,,...........,,+,,,,,,,,.♠..%|S___z|ɱЯЯЯЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", "³³³³³{{,,,,,{{³³³³³³³³³{{.,,,,,,,,,.,.H.ŦŦŦ,ŦŦŦ.||=||||θ|||ɱЯЯϻЯЯɱГГ˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽˽Гւ", diff --git a/data/json/mapgen_palettes/mall_palette.json b/data/json/mapgen_palettes/mall_palette.json index b28f74d58b913..6cb70de570762 100644 --- a/data/json/mapgen_palettes/mall_palette.json +++ b/data/json/mapgen_palettes/mall_palette.json @@ -248,5 +248,27 @@ "§": "t_water_pool_shallow_outdoors" }, "toilets": { "t": { } } + }, + { + "type": "palette", + "id": "mall_palette_basement", + "terrain": { + ".": "t_thconc_floor", + "N": "t_chainfence", + "T": "t_chaingate_c", + "0": "t_door_metal_pickable", + "1": "t_door_metal_locked", + "=": [ "t_door_c", "t_door_locked" ], + "|": "t_concrete_wall", + " ": "t_rock", + "3": "t_gates_control_brick", + "E": "t_elevator", + "<": "t_stairs_up", + ">": "t_stairs_down", + "Ŋ": "t_elevator_control_off", + "H": "t_laminated_glass", + "+": "t_laminated_door_glass_c" + }, + "furniture": { "z": [ [ "f_cardboard_box", 5 ], "f_crate_c" ], "F": "f_bench" } } ] diff --git a/data/json/overmap/multitile_city_buildings.json b/data/json/overmap/multitile_city_buildings.json index 8ae190d0c9f15..4a7f6ac375452 100644 --- a/data/json/overmap/multitile_city_buildings.json +++ b/data/json/overmap/multitile_city_buildings.json @@ -1949,47 +1949,64 @@ { "point": [ 7, 3, 0 ], "overmap": "mall_a_56_south" }, { "point": [ 7, 3, 1 ], "overmap": "mall_b_56_south" }, { "point": [ 7, 3, 2 ], "overmap": "mall_a_56_roof_south" }, + { "point": [ 7, 3, -1 ], "overmap": "mall_a_56_basement_south" }, { "point": [ 6, 3, 0 ], "overmap": "mall_a_57_south" }, { "point": [ 6, 3, 1 ], "overmap": "mall_b_57_south" }, { "point": [ 6, 3, 2 ], "overmap": "mall_a_57_roof_south" }, + { "point": [ 6, 3, -1 ], "overmap": "mall_a_57_basement_south" }, { "point": [ 5, 3, 0 ], "overmap": "mall_a_58_south" }, { "point": [ 5, 3, 1 ], "overmap": "mall_b_58_south" }, { "point": [ 5, 3, 2 ], "overmap": "mall_a_58_roof_south" }, + { "point": [ 5, 3, -1 ], "overmap": "mall_a_58_basement_south" }, { "point": [ 4, 3, 0 ], "overmap": "mall_a_59_south" }, { "point": [ 4, 3, 1 ], "overmap": "mall_b_59_south" }, { "point": [ 4, 3, 2 ], "overmap": "mall_a_59_roof_south" }, + { "point": [ 4, 3, -1 ], "overmap": "mall_a_59_basement_south" }, { "point": [ 3, 3, 0 ], "overmap": "mall_a_60_south" }, { "point": [ 3, 3, 1 ], "overmap": "mall_b_60_south" }, { "point": [ 3, 3, 2 ], "overmap": "mall_a_60_roof_south" }, + { "point": [ 3, 3, -1 ], "overmap": "mall_a_60_basement_south" }, { "point": [ 2, 3, 0 ], "overmap": "mall_a_61_south" }, { "point": [ 2, 3, 1 ], "overmap": "mall_b_61_south" }, { "point": [ 2, 3, 2 ], "overmap": "mall_a_61_roof_south" }, + { "point": [ 2, 3, -1 ], "overmap": "mall_a_61_basement_south" }, { "point": [ 1, 3, 0 ], "overmap": "mall_a_62_south" }, { "point": [ 1, 3, 1 ], "overmap": "mall_b_62_south" }, { "point": [ 1, 3, 2 ], "overmap": "mall_a_62_roof_south" }, + { "point": [ 1, 3, -1 ], "overmap": "mall_a_62_basement_south" }, { "point": [ 0, 3, 0 ], "overmap": "mall_a_63_south" }, { "point": [ 8, 2, 0 ], "overmap": "mall_a_64_south" }, { "point": [ 7, 2, 0 ], "overmap": "mall_a_65_south" }, { "point": [ 7, 2, 1 ], "overmap": "mall_b_65_south" }, { "point": [ 7, 2, 2 ], "overmap": "mall_a_65_roof_south" }, + { "point": [ 7, 2, -1 ], "overmap": "mall_a_65_basement_south" }, { "point": [ 6, 2, 0 ], "overmap": "mall_a_66_south" }, { "point": [ 6, 2, 1 ], "overmap": "mall_b_66_south" }, { "point": [ 6, 2, 2 ], "overmap": "mall_a_66_roof_south" }, + { "point": [ 6, 2, -1 ], "overmap": "mall_a_66_basement_south" }, { "point": [ 5, 2, 0 ], "overmap": "mall_a_67_south" }, { "point": [ 5, 2, 1 ], "overmap": "mall_b_67_south" }, { "point": [ 5, 2, 2 ], "overmap": "mall_a_67_roof_south" }, + { "point": [ 5, 2, -1 ], "overmap": "mall_a_67_basement_south" }, + { "point": [ 5, 2, -2 ], "overmap": "mall_a_67_sub_basement_south" }, { "point": [ 4, 2, 0 ], "overmap": "mall_a_68_south" }, { "point": [ 4, 2, 1 ], "overmap": "mall_b_68_south" }, { "point": [ 4, 2, 2 ], "overmap": "mall_a_68_roof_south" }, + { "point": [ 4, 2, -1 ], "overmap": "mall_a_68_basement_south" }, + { "point": [ 4, 2, -2 ], "overmap": "mall_a_68_sub_basement_south" }, { "point": [ 3, 2, 0 ], "overmap": "mall_a_69_south" }, { "point": [ 3, 2, 1 ], "overmap": "mall_b_69_south" }, { "point": [ 3, 2, 2 ], "overmap": "mall_a_69_roof_south" }, + { "point": [ 3, 2, -1 ], "overmap": "mall_a_69_basement_south" }, + { "point": [ 3, 2, -2 ], "overmap": "mall_a_69_sub_basement_south" }, { "point": [ 2, 2, 0 ], "overmap": "mall_a_70_south" }, { "point": [ 2, 2, 1 ], "overmap": "mall_b_70_south" }, { "point": [ 2, 2, 2 ], "overmap": "mall_a_70_roof_south" }, + { "point": [ 2, 2, -1 ], "overmap": "mall_a_70_basement_south" }, { "point": [ 1, 2, 0 ], "overmap": "mall_a_71_south" }, { "point": [ 1, 2, 1 ], "overmap": "mall_b_71_south" }, { "point": [ 1, 2, 2 ], "overmap": "mall_a_71_roof_south" }, + { "point": [ 1, 2, -1 ], "overmap": "mall_a_71_basement_south" }, { "point": [ 0, 2, 0 ], "overmap": "mall_a_72_south" }, { "point": [ 8, 1, 0 ], "overmap": "mall_a_73_south" }, { "point": [ 7, 1, 0 ], "overmap": "mall_a_74_south" }, diff --git a/data/json/overmap/overmap_terrain/overmap_terrain_mall.json b/data/json/overmap/overmap_terrain/overmap_terrain_mall.json index e689495872c4e..844d6c4cb9f80 100644 --- a/data/json/overmap/overmap_terrain/overmap_terrain_mall.json +++ b/data/json/overmap/overmap_terrain/overmap_terrain_mall.json @@ -9,6 +9,13 @@ "mondensity": 2, "flags": [ "SIDEWALK", "RISK_HIGH", "SOURCE_FOOD", "SOURCE_DRINK", "SOURCE_MEDICINE", "SOURCE_FABRICATION" ] }, + { + "type": "overmap_terrain", + "abstract": "generic_mall_basement", + "name": "mall", + "color": "dark_gray", + "sym": "0" + }, { "type": "overmap_terrain", "abstract": "generic_mall_road", @@ -295,5 +302,32 @@ "mall_upper_roof_51" ], "copy-from": "generic_mall" + }, + { + "type": "overmap_terrain", + "id": [ + "mall_a_56_basement", + "mall_a_57_basement", + "mall_a_58_basement", + "mall_a_59_basement", + "mall_a_60_basement", + "mall_a_61_basement", + "mall_a_62_basement", + "mall_a_65_basement", + "mall_a_66_basement", + "mall_a_67_basement", + "mall_a_69_basement", + "mall_a_70_basement", + "mall_a_71_basement" + ], + "copy-from": "generic_mall_basement", + "sym": "0" + }, + { + "type": "overmap_terrain", + "id": [ "mall_a_68_basement", "mall_a_67_sub_basement", "mall_a_68_sub_basement", "mall_a_69_sub_basement" ], + "copy-from": "generic_mall", + "name": "mall - subway station", + "color": "i_light_red" } ] diff --git a/data/mods/DinoMod/farm.json b/data/mods/DinoMod/farm.json new file mode 100644 index 0000000000000..394f18482329b --- /dev/null +++ b/data/mods/DinoMod/farm.json @@ -0,0 +1,54 @@ +[ + { + "type": "mapgen", + "method": "json", + "om_terrain": [ [ "farm_1" ] ], + "//": "Compy Coop", + "weight": 500, + "object": { + "fill_ter": "t_dirtfloor", + "rows": [ + " ", + " ", + " :::::::::########### ", + " : #_#_#_#_#_# ", + " : #_______7_# ", + " C +_______8_# ", + " C c__7______# ", + " : #_#_#_#_#_# ", + " : ########### ", + " : : ", + " : : ", + " : : ", + " :::::::::::::::::::: ", + " ", + " FFFFFFFFFFFFFFFFFFFFFF ", + " F F ", + " F DDDDDDDDDDDDDDDD F ", + " F F ", + " F DDDDDDDDDDDDDDDD F ", + " F F ", + " F DDDDDDDDDDDDDDDD F ", + " F F ", + " F DDDDDDDDDDDDDDDD F ", + "FF F " + ], + "monster": { "7": { "monster": "mon_compsognathus" }, "8": { "monster": "mon_compsognathus_hatchling" } }, + "place_item": [ + { "item": "straw_pile", "x": 12, "y": 3, "chance": 75 }, + { "item": "straw_pile", "x": 14, "y": 3, "chance": 75 }, + { "item": "straw_pile", "x": 16, "y": 3, "chance": 75 }, + { "item": "straw_pile", "x": 18, "y": 3, "chance": 75 }, + { "item": "straw_pile", "x": 20, "y": 3, "chance": 75 }, + { "item": "straw_pile", "x": 12, "y": 7, "chance": 75 }, + { "item": "straw_pile", "x": 14, "y": 7, "chance": 75 }, + { "item": "straw_pile", "x": 16, "y": 7, "chance": 75 }, + { "item": "straw_pile", "x": 18, "y": 7, "chance": 75 }, + { "item": "straw_pile", "x": 20, "y": 7, "chance": 75 }, + { "item": "catfood", "x": [ 3, 7 ], "y": [ 5, 11 ], "chance": 75, "repeat": [ 4, 7 ] }, + { "item": "straw_pile", "x": 20, "y": 7, "chance": 75 } + ], + "palettes": [ "farm" ] + } + } +] diff --git a/src/consumption.cpp b/src/consumption.cpp index ee7cf695312a3..415f9547d570e 100644 --- a/src/consumption.cpp +++ b/src/consumption.cpp @@ -1636,11 +1636,12 @@ time_duration Character::get_consume_time( const item &it ) time_duration time = time_duration::from_seconds( std::max( ( volume / 5 ), 1 ) ); //Default 5 mL (1 tablespoon) per second float consume_time_modifier = 1;//only for food and drinks - const bool eat_verb = it.has_flag( flag_USE_EAT_VERB ); - if( eat_verb || it.get_comestible()->comesttype == "FOOD" ) { + const bool eat_verb = it.has_flag( flag_USE_EAT_VERB ); + const std::string comest_type = it.get_comestible() ? it.get_comestible()->comesttype : ""; + if( eat_verb || comest_type == "FOOD" ) { time = time_duration::from_seconds( volume / 5 ); //Eat 5 mL (1 teaspoon) per second consume_time_modifier = mutation_value( "consume_time_modifier" ); - } else if( !eat_verb && it.get_comestible()->comesttype == "DRINK" ) { + } else if( !eat_verb && comest_type == "DRINK" ) { time = time_duration::from_seconds( volume / 15 ); //Drink 15 mL (1 tablespoon) per second consume_time_modifier = mutation_value( "consume_time_modifier" ); } else if( it.is_medication() ) { diff --git a/src/item.cpp b/src/item.cpp index 968c7a38e8b03..9a850e0ca7783 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -4685,6 +4685,9 @@ units::length item::length() const if( made_of( LIQUID ) || is_soft() ) { return 0_mm; } + if( is_corpse() ) { + return units::default_length_from_volume( corpse->volume ); + } return type->longest_side; } diff --git a/src/item_factory.cpp b/src/item_factory.cpp index a84b7fc2cbc30..972ac81ac9823 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -450,7 +450,9 @@ void Item_factory::finalize_pre( itype &obj ) } if( obj.longest_side == -1_mm ) { - obj.longest_side = units::cube_to_volume( obj.volume ); + units::volume effective_volume = obj.count_by_charges() ? + ( obj.volume / obj.stack_size ) : obj.volume; + obj.longest_side = units::default_length_from_volume( effective_volume ); } } diff --git a/src/item_pocket.cpp b/src/item_pocket.cpp index 678cb584d71d0..001632c507946 100644 --- a/src/item_pocket.cpp +++ b/src/item_pocket.cpp @@ -53,7 +53,7 @@ void pocket_data::load( const JsonObject &jo ) mandatory( jo, was_loaded, "max_contains_volume", volume_capacity, volume_reader() ); mandatory( jo, was_loaded, "max_contains_weight", max_contains_weight, mass_reader() ); optional( jo, was_loaded, "max_item_length", max_item_length, - units::cube_to_volume( volume_capacity ) * M_SQRT2 ); + units::default_length_from_volume( volume_capacity ) * M_SQRT2 ); } optional( jo, was_loaded, "spoil_multiplier", spoil_multiplier, 1.0f ); optional( jo, was_loaded, "weight_multiplier", weight_multiplier, 1.0f ); diff --git a/src/units.h b/src/units.h index 5a105d8c28b14..6634348d224a9 100644 --- a/src/units.h +++ b/src/units.h @@ -540,7 +540,7 @@ inline constexpr value_type to_kilometer( const quantity -inline constexpr quantity cube_to_volume( +inline constexpr quantity default_length_from_volume( const quantity &v ) { return units::from_centimeter( diff --git a/tests/item_test.cpp b/tests/item_test.cpp index 3707b5fe01fd0..6eb133a788652 100644 --- a/tests/item_test.cpp +++ b/tests/item_test.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -6,7 +7,9 @@ #include "catch/catch.hpp" #include "enums.h" #include "item.h" +#include "item_factory.h" #include "itype.h" +#include "monstergenerator.h" #include "ret_val.h" #include "units.h" #include "value_ptr.h" @@ -157,3 +160,46 @@ TEST_CASE( "stacking_over_time", "[item]" ) } } } + +static void assert_minimum_length_to_volume_ratio( const item &target ) +{ + if( target.type->get_id() == "null" ) { + return; + } + CAPTURE( target.type->get_id() ); + CAPTURE( target.volume() ); + CAPTURE( target.base_volume() ); + CAPTURE( target.type->volume ); + if( target.made_of( LIQUID ) || target.is_soft() ) { + CHECK( target.length() == 0_mm ); + return; + } + if( target.volume() == 0_ml ) { + CHECK( target.length() == -1_mm ); + return; + } + if( target.volume() == 1_ml ) { + CHECK( target.length() >= 0_mm ); + return; + } + // Minimum possible length is if the item is a sphere. + const float minimal_diameter = std::cbrt( ( 3.0 * units::to_milliliter( target.base_volume() ) ) / + ( 4.0 * M_PI ) ); + CHECK( units::to_millimeter( target.length() ) >= minimal_diameter * 10.0 ); +} + +TEST_CASE( "item length sanity check", "[item]" ) +{ + for( const itype *type : item_controller->all() ) { + const item sample( type, 0, item::solitary_tag {} ); + assert_minimum_length_to_volume_ratio( sample ); + } +} + +TEST_CASE( "corpse length sanity check", "[item]" ) +{ + for( const mtype &type : MonsterGenerator::generator().get_all_mtypes() ) { + const item sample = item::make_corpse( type.id ); + assert_minimum_length_to_volume_ratio( sample ); + } +}