Skip to content

Commit

Permalink
Kill vending machines vol 2 (#18)
Browse files Browse the repository at this point in the history
* Replace manually placed vending machines with vendingmachines syntax

* Lint

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

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
GuardianDll and github-actions[bot] authored Sep 13, 2024
1 parent 2473620 commit e20f07c
Show file tree
Hide file tree
Showing 46 changed files with 143 additions and 214 deletions.
6 changes: 2 additions & 4 deletions data/json/mapgen/Metalworker.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"_8__________+..kh..N|_8_",
"_8__________-b.kk.||||8_",
"_8________s_|b....|.t|8_",
"_8__|=====%||N....+.S|8_",
"_8__|=====%||n....+.S|8_",
"_8__|.....sLLR...|||||8_",
"_8__|..............q|<8_",
"_8__|..........Q...Y|_8_",
Expand Down Expand Up @@ -63,7 +63,6 @@
"L": "f_locker",
"R": "f_trashcan",
"Y": "f_forge_rock",
"N": "f_vending_c",
"Q": "f_rack",
"q": "f_crate_c",
"U": "f_dumpster",
Expand All @@ -72,11 +71,10 @@
"b": "f_bench"
},
"toilets": { "t": { } },
"vendingmachines": { "N": { "item_group": "vending_drink", "lootable": true }, "n": { "item_group": "vending_food", "lootable": true } },
"place_items": [
{ "item": "car_misc", "x": [ 15, 15 ], "y": [ 3, 5 ], "chance": 70, "repeat": [ 2, 10 ] },
{ "item": "car_misc", "x": [ 16, 16 ], "y": [ 5, 5 ], "chance": 70 },
{ "item": "vending_food_items", "x": [ 19, 19 ], "y": [ 4, 4 ], "chance": 70, "repeat": [ 4, 12 ] },
{ "item": "vending_drink_items", "x": [ 13, 13 ], "y": [ 7, 7 ], "chance": 70, "repeat": [ 4, 12 ] },
{ "item": "softdrugs", "x": [ 19, 20 ], "y": [ 6, 7 ], "chance": 20, "repeat": [ 2, 4 ] },
{ "item": "trash", "x": [ 13, 13 ], "y": [ 8, 8 ], "chance": 70 },
{ "item": "trash", "x": [ 3, 3 ], "y": [ 15, 16 ], "chance": 70 },
Expand Down
6 changes: 2 additions & 4 deletions data/json/mapgen/airport/s_airport_private.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"s______________________s#~d~~~+ ;;;E;;E; ##++##ss_______s+;;<;#s|QQQQQ|...____________________..",
"s______________________s#~d~~~# d;;h;;h; # l#.s_______s#I;;j#s|QQQQQ|..a&_______a..a&_______a.",
"sbbbbbb__________bbbbbbs#~e~~m# d;;h;;h;p# ;; o.s_______s#I;;j#s|QQQQQ|..aa======aa..aa======aa.",
"s______________________s#~e~~m# d;;h;;h;p# ;; #.sqq_____s###+##s||QQQ||..a&~~~~~~~a^.a&~~~~~~~a^",
"s______________________s#~e~~m# d;;h;;h;P# ;; #.sqq_____s###+##s||QQQ||..a&~~~~~~~a^.a&~~~~~~~a^",
"s______________________s#~d~mm# d;;h;;h; ;; #.sqq_____s^#;;;#s3|||||...a~~~~~~~fa..a~~~~~~~~a.",
"s______________________s#~ddddedd;;h;;h;;;;;; #.sqq_____s.#jjj#s3........a~~~~~~~fa..a~~~~~~~~a.",
"s______________________s#~~~~~# ;;;;;;;;;;;;; o.sss_____s.#####s3..|||...a~~~~~~~~a..a~~~~~~~~a.",
Expand Down Expand Up @@ -85,11 +85,11 @@
"l": "f_trashcan",
"E": "f_trashcan",
"m": "f_crate_c",
"p": "f_vending_c",
"t": "f_locker",
"u": "f_indoor_plant"
},
"gaspumps": { "1": { } },
"vendingmachines": { "p": { "item_group": "vending_drink", "lootable": true }, "P": { "item_group": "vending_food", "lootable": true } },
"place_loot": [
{ "group": "road", "chance": 50, "repeat": 4, "x": [ 1, 22 ], "y": [ 1, 19 ] },
{ "group": "allclothes", "chance": 80, "repeat": [ 10 ], "x": 29, "y": [ 5, 6 ] },
Expand All @@ -108,8 +108,6 @@
{ "group": "bar_trash", "chance": 50, "repeat": 5, "x": 35, "y": 3 },
{ "group": "bar_trash", "chance": 50, "repeat": 5, "x": 39, "y": 11 },
{ "group": "office", "chance": 50, "repeat": 5, "x": 33, "y": [ 10, 14 ] },
{ "group": "vending_food", "chance": 80, "repeat": 1, "x": 40, "y": 5 },
{ "group": "vending_drink", "chance": 80, "repeat": 1, "x": 40, "y": 6 },
{ "group": "road", "chance": 50, "repeat": 10, "x": [ 75, 80 ], "y": [ 7, 20 ] },
{ "group": "road", "chance": 50, "repeat": 10, "x": [ 87, 92 ], "y": [ 7, 20 ] },
{ "group": "avgas_barrel", "chance": 50, "repeat": 5, "x": [ 75, 80 ], "y": [ 7, 20 ] },
Expand Down
15 changes: 3 additions & 12 deletions data/json/mapgen/arcade.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
".ssssssssssssssssssssss.",
".ssssssssssssssssssssss.",
".ssssssssssssssssssssss.",
".ssssssssssssssssssllss.",
".sssssssssssssssssslmss.",
".|---++-OOO-++----|---|.",
".|F |S %|.",
".|F |-+-|.",
Expand Down Expand Up @@ -52,19 +52,10 @@
"4": "t_gutter_downspout",
"|": "t_wall_r"
},
"furniture": {
"#": "f_counter",
"F": "f_arcade_machine",
"S": "f_sink",
"B": "f_stool",
"T": "f_locker",
"l": "f_vending_c",
"x": "f_pinball_machine"
},
"furniture": { "#": "f_counter", "F": "f_arcade_machine", "S": "f_sink", "B": "f_stool", "T": "f_locker", "x": "f_pinball_machine" },
"toilets": { "%": { } },
"vendingmachines": { "l": { "item_group": "vending_drink", "lootable": true }, "m": { "item_group": "vending_food", "lootable": true } },
"place_items": [
{ "item": "vending_drink", "x": 19, "y": 8, "chance": 75 },
{ "item": "vending_food", "x": 20, "y": 8, "chance": 75 },
{ "item": "arcade_prizes", "x": 21, "y": [ 14, 18 ], "chance": 95 },
{ "item": "cash_register_random", "x": 18, "y": [ 14, 17 ], "chance": 100 }
],
Expand Down
2 changes: 1 addition & 1 deletion data/json/mapgen/boxing.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@
"i": "f_sink",
"L": "f_locker",
"S": "f_shower",
"V": "f_vending_c",
"X": "f_rack",
"Z": "f_bookcase",
"^": "f_indoor_plant",
"f": "f_trashcan"
},
"toilets": { "T": { } },
"vendingmachines": { "V": { "item_group": "vending_drink", "lootable": true } },
"place_items": [
{ "item": "boxing_clothes", "x": [ 3, 11 ], "y": [ 18, 18 ], "chance": 80, "repeat": [ 3, 5 ] },
{ "item": "boxing_clothes", "x": [ 3, 11 ], "y": [ 18, 18 ], "chance": 40, "repeat": [ 1, 2 ] },
Expand Down
15 changes: 2 additions & 13 deletions data/json/mapgen/cs_internet_cafe.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,17 @@
"C": "f_counter",
"t": "f_toilet",
"h": "f_chair",
"V": "f_vending_c",
"S": "f_sink",
"L": "f_locker"
},
"toilets": { "t": { "//": "no values needed here" } },
"vendingmachines": { "V": { "item_group": "ic_merch_vending", "lootable": true } },
"items": {
"c": { "item": "ic_merch", "chance": 20 },
"C": { "item": "cash_register_random", "chance": 100 },
"V": { "item": "ic_merch_vending", "chance": 100 },
"L": { "item": "cleaning", "chance": 100 }
},
"add": [ { "item": "mop", "x": [ 11, 12 ], "y": [ 17, 20 ], "chance": 2 } ],
"place_items": [
{ "item": "ic_merch_vending", "x": 3, "y": 7, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 7, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 7, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 7, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 8, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 8, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 8, "chance": 90 },
{ "item": "ic_merch_vending", "x": 3, "y": 8, "chance": 90 }
]
"add": [ { "item": "mop", "x": [ 11, 12 ], "y": [ 17, 20 ], "chance": 2 } ]
}
},
{
Expand Down
12 changes: 5 additions & 7 deletions data/json/mapgen/cs_tire_shop.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@
"S": "f_sink",
"r": "f_rack",
"m": "f_manual_tire_changer",
"v": "f_vending_c",
"V": "f_vending_c",
"t": "f_table",
"u": "f_dumpster",
"x": "f_recycle_bin"
},
"vendingmachines": {
"V": { "item_group": "vending_food_items", "lootable": true },
"v": { "item_group": "vending_drink_items", "lootable": true }
},
"place_vehicles": [ { "vehicle": "oa_vg_ts_vehicles", "x": 15, "y": 10, "rotation": 270, "chance": 50, "fuel": 10 } ],
"items": {
"h": { "item": "oa_discarded_news", "chance": 15, "repeat": [ 2, 8 ] },
Expand All @@ -75,11 +77,7 @@
"A": { "item": "tools_tire", "chance": 100, "repeat": [ 3, 7 ] },
"C": { "item": "oa_ig_ts_crates", "chance": 50 }
},
"place_loot": [
{ "group": "vending_food_items", "chance": 60, "repeat": [ 3, 12 ], "x": 13, "y": 18 },
{ "group": "vending_drink_items", "chance": 60, "repeat": [ 3, 12 ], "x": 14, "y": 18 },
{ "group": "cash_register_random", "x": 6, "y": 18 }
],
"place_loot": [ { "group": "cash_register_random", "x": 6, "y": 18 } ],
"add": [ { "item": "microwave", "x": 16, "y": 18, "chance": 2 }, { "item": "coffeemaker", "x": 16, "y": 19, "chance": 2 } ],
"toilets": { "T": { } },
"place_signs": [ { "signage": "Discount Tires", "x": 22, "y": 1 } ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"9": "f_console_broken",
"B": "f_bathtub",
"D": "f_dumpster",
"V": "f_vending_o",
"V": [ "f_vending_o", "f_vending_c_off" ],
"a": "f_counter",
"d": "f_chair",
"H": "f_chair",
Expand All @@ -90,9 +90,9 @@
"l": "f_locker",
"o": "f_oven",
"r": "f_rack",
"v": "f_vending_c",
"v": [ "f_vending_o", "f_vending_c_off" ],
"w": "f_wreckage",
"{": "f_vending_o",
"{": [ "f_vending_o", "f_vending_c_off" ],
"^": "f_desk",
"(": "f_makeshift_bed",
"T": "f_toilet",
Expand Down
16 changes: 10 additions & 6 deletions data/json/mapgen/gambling_hall.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"|||||||||.......||----||",
"|#.....^||-+-+-||#t##t#|",
"|..............v|#t##t#|",
"|#.pp..........v|......|",
"|#.pp..........V|......|",
"|..pp...66.....&|#t..#t|",
"|..pp...66......|#t..#t|",
"|....................#t|",
Expand Down Expand Up @@ -72,13 +72,15 @@
"p": "f_pool_table",
"r": "f_rack",
"t": "f_table",
"v": "f_vending_c",
"{": "f_locker",
"S": "f_sink"
},
"vendingmachines": {
"v": { "item_group": "vending_drink_items", "lootable": true },
"V": { "item_group": "vending_food_items", "lootable": true }
},
"place_items": [
{ "chance": 15, "item": "bags", "x": 5, "y": 9 },
{ "chance": 65, "item": "vending_drink_items", "x": 15, "y": 5 },
{ "chance": 45, "item": "dining", "x": 22, "y": 7 },
{ "chance": 45, "item": "dining", "x": 18, "y": 4 },
{ "chance": 55, "item": "fridge", "x": [ 21, 22 ], "y": 20 },
Expand All @@ -96,7 +98,6 @@
{ "chance": 65, "item": "cannedfood", "x": 14, "y": 19 },
{ "chance": 65, "item": "cannedfood", "x": 13, "y": 19 },
{ "chance": 65, "item": "kitchen", "x": [ 19, 20 ], "y": 17 },
{ "chance": 65, "item": "vending_food_items", "x": 15, "y": 4 },
{ "chance": 25, "item": "trash_cart", "x": 1, "y": 17 },
{ "chance": 25, "item": "trash_cart", "x": 8, "y": 15 },
{ "chance": 25, "item": "trash_cart", "x": 13, "y": 13 },
Expand Down Expand Up @@ -209,7 +210,7 @@
" |+-+| ",
" -...- 9999999999 ",
" |||...||||||||||||||| ",
" |a....{{.#t#....#.&^| ",
" |a....{}.#t#....#.&^| ",
" |^..................| ",
" |a.......#t#...ppp..| ",
" |&.............ppp..| ",
Expand Down Expand Up @@ -259,9 +260,12 @@
"l": "f_locker",
"p": "f_pool_table",
"t": "f_table",
"{": "f_vending_c",
"S": "f_sink"
},
"vendingmachines": {
"{": { "item_group": "vending_drink_items", "lootable": true },
"}": { "item_group": "vending_food_items", "lootable": true }
},
"place_items": [
{ "chance": 45, "item": "cubical_office", "x": 18, "y": 21 },
{ "chance": 45, "item": "jackets", "x": 18, "y": 20 },
Expand Down
9 changes: 3 additions & 6 deletions data/json/mapgen/garage_gas.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ss__________________________________________________________s...........",
"ss_________________________________________________________ss...........",
"ss_____________________ssssssssssssss__________s__________sss...........",
"ss___________|________ssssssssssssllse________sss________esssss.........",
"ss___________|________sssssssssssslLse________sss________esssss.........",
"ss___________&________sss|-www-www-|--========---========---|sssss......",
"ss___________|________ssswrrrr rrrr| e e |ssssss.....",
"ss___________s________sssw [ | r|---|ss.....",
Expand Down Expand Up @@ -50,6 +50,7 @@
"_": "t_pavement",
"e": "t_gates_mech_control",
"l": "t_sidewalk",
"L": "t_sidewalk",
"s": "t_sidewalk",
"&": "t_sidewalk",
"D": "t_sidewalk",
Expand All @@ -63,18 +64,14 @@
"c": "f_counter",
"h": "f_chair",
"k": "f_desk",
"l": "f_vending_c",
"o": "f_bookcase",
"r": "f_rack",
"z": "f_crate_c",
"S": "f_sink"
},
"gaspumps": { "&": { } },
"toilets": { "t": { } },
"place_vendingmachines": [
{ "item_group": "vending_food", "x": 31, "y": 6, "lootable": true },
{ "item_group": "vending_drink", "x": 32, "y": 6, "lootable": true }
],
"vendingmachines": { "L": { "item_group": "vending_drink", "lootable": true }, "l": { "item_group": "vending_food", "lootable": true } },
"place_loot": [
{ "group": "magazines", "x": 26, "y": 10, "chance": 80, "repeat": [ 4, 12 ] },
{ "group": "magazines", "x": 26, "y": 13, "chance": 80, "repeat": [ 4, 12 ] },
Expand Down
4 changes: 2 additions & 2 deletions data/json/mapgen/gym.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@
"!": [ "f_ergometer", "f_ergometer_mechanical" ],
"{": "f_bigmirror",
"#": "f_counter",
"H": "f_vending_c",
"&": "f_counter",
"*": "f_shower",
"@": [ "f_treadmill", "f_treadmill_mechanical" ],
Expand All @@ -192,12 +191,13 @@
"T": "f_toilet",
"t": "f_sink"
},
"vendingmachines": { "H": { "item_group": "vending_drink", "lootable": true } },
"place_monster": [
{ "group": "GROUP_SEARCH_FITNESS", "x": [ 0, 23 ], "y": [ 0, 15 ], "chance": 75, "repeat": [ 3, 8 ] },
{ "group": "GROUP_MAPGEN_POOL", "x": [ 12, 19 ], "y": [ 18, 21 ], "chance": 75, "repeat": [ 2, 5 ] }
],
"toilets": { "T": { } },
"items": { "O": { "item": "gym", "chance": 80 }, "H": { "item": "vending_drink", "chance": 75, "repeat": [ 4, 8 ] } },
"items": { "O": { "item": "gym", "chance": 80 } },
"place_loot": [ { "group": "cash_register_random", "x": [ 17, 19 ], "y": 2 } ]
}
},
Expand Down
3 changes: 1 addition & 2 deletions data/json/mapgen/homeimprovement_superstore_new.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"furniture": {
"$": "f_atm_off",
"x": "f_console_broken",
"V": "f_vending_c",
"h": "f_chair",
"C": "f_chair",
"T": "f_table",
Expand Down Expand Up @@ -206,7 +205,6 @@
"d": { "item": "office", "chance": 45, "repeat": [ 1, 2 ] },
"D": { "item": "hardware_trash", "chance": 40, "repeat": [ 1, 3 ] },
"Q": { "item": "bed", "chance": 65, "repeat": [ 1, 2 ] },
"V": { "item": "vending_drink_home_impr", "chance": 85, "repeat": [ 5, 12 ] },
"1": { "item": "paint", "chance": 80, "repeat": [ 1, 8 ] },
"2": { "item": "rug", "chance": 80, "repeat": [ 1, 8 ] },
"3": [
Expand Down Expand Up @@ -234,6 +232,7 @@
{ "item": "hardware_clothing", "chance": 55, "repeat": [ 1, 8 ] }
]
},
"vendingmachines": { "V": { "item_group": "vending_drink_home_impr", "lootable": true } },
"place_monster": [
{ "group": "GROUP_CIVILIAN", "x": [ 24, 45 ], "y": [ 2, 23 ], "repeat": [ 1, 3 ] },
{ "group": "GROUP_CIVILIAN", "x": [ 24, 45 ], "y": [ 24, 47 ], "repeat": [ 1, 3 ] },
Expand Down
13 changes: 6 additions & 7 deletions data/json/mapgen/lan_center.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
"C": "f_counter",
"H": "f_armchair",
"c": "f_chair",
"v": "f_vending_c",
"W": "f_vending_c",
"Y": "f_rack_coat",
"{": "f_fridge",
"I": "f_desk",
Expand All @@ -66,15 +64,17 @@
"@": "f_sofa"
},
"toilets": { "T": { } },
"vendingmachines": {
"v": { "item_group": "vending_drink_items", "lootable": true },
"W": { "item_group": "vending_food_items", "lootable": true }
},
"items": {
"Y": { "item": "coat_rack", "chance": 40, "repeat": 2 },
"I": { "item": "office", "chance": 30 },
"S": { "item": "office_paper", "chance": 30 },
"R": { "item": "softdrugs", "chance": 30 },
"U": { "item": "trash", "chance": 20, "repeat": [ 2, 4 ] },
"{": { "item": "fridge", "chance": 20, "repeat": [ 2, 4 ] },
"v": { "item": "vending_drink_items", "chance": 20, "repeat": [ 2, 4 ] },
"W": { "item": "vending_food_items", "chance": 20, "repeat": [ 2, 4 ] }
"{": { "item": "fridge", "chance": 20, "repeat": [ 2, 4 ] }
}
}
},
Expand Down Expand Up @@ -185,13 +185,12 @@
"f": "f_fridge",
"Y": "f_rack_coat",
"t": "f_toilet",
"v": "f_vending_c",
"{": "f_glass_fridge"
},
"vendingmachines": { "v": { "item_group": "vending_drink_items", "lootable": true } },
"items": { "Y": { "item": "coat_rack", "chance": 40, "repeat": 2 } },
"place_items": [
{ "chance": 45, "item": "fridge", "x": 20, "y": 20 },
{ "chance": 50, "item": "vending_food_items", "x": 14, "y": 20 },
{ "chance": 15, "repeat": [ 1, 3 ], "item": "trash", "x": 19, "y": 15 },
{ "chance": 50, "item": "vending_drink_items", "x": 15, "y": 20 },
{ "chance": 50, "item": "vending_drink_items", "x": 16, "y": 20 }
Expand Down
Loading

0 comments on commit e20f07c

Please sign in to comment.