Skip to content

Commit

Permalink
Merge pull request #79097 from ShnitzelX2/e-files-extend-ebooks
Browse files Browse the repository at this point in the history
Electronic storage overhaul
  • Loading branch information
Maleclypse authored Jan 23, 2025
2 parents 813d680 + 672a2b7 commit 3e142e5
Show file tree
Hide file tree
Showing 71 changed files with 2,706 additions and 412 deletions.
6 changes: 3 additions & 3 deletions data/json/effects_on_condition/computer_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,20 @@
"effect": [
{
"if": { "compare_string": [ "read", { "npc_val": "map_cache" } ] },
"then": [ { "u_message": "You already noted everything map application on this phone can offer." } ]
"then": [ { "u_message": "You already noted everything this map cache can offer." } ]
},
{
"if": { "compare_string": [ "has", { "npc_val": "map_cache" } ] },
"then": [
{ "location_variable_adjust": { "npc_val": "spawn_location_omt" }, "z_adjust": 0, "z_override": true },
{ "reveal_map": { "npc_val": "spawn_location_omt" }, "radius": { "math": [ "rng(11, 36)" ] } },
{ "npc_add_var": "map_cache", "value": "read" },
{ "u_message": "You found some cached map in the map application, and noted it.", "type": "good" }
{ "u_message": "You found some useful data in the map cache and noted it.", "type": "good" }
]
},
{
"if": { "compare_string": [ "lack", { "npc_val": "map_cache" } ] },
"then": [ { "u_message": "Whoever used this phone didn't ever open their map application. Worthless." } ]
"then": [ { "u_message": "Whoever used this device didn't ever open their map application. Worthless." } ]
}
]
}
Expand Down
35 changes: 35 additions & 0 deletions data/json/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -2357,6 +2357,41 @@
"id": "ELECTRONIC",
"type": "json_flag"
},
{
"id": "E_FILE_DEVICE",
"type": "json_flag",
"//": "Any item that can handle electronic files"
},
{
"id": "E_STORABLE",
"type": "json_flag",
"//": "Any item that can be an electronic file"
},
{
"id": "E_COPIABLE",
"type": "json_flag",
"//": "Any item that can be electronically copied and scanned"
},
{
"id": "E_FILE_COLLECTION",
"type": "json_flag",
"//": "Any item that represents a collection of electronic files; this is to avoid making a file system for electronic devices"
},
{
"id": "E_FILE_DEVICE_UNREAD",
"type": "json_flag",
"//": "Any item that can handle electronic files but hasn't been read yet"
},
{
"id": "VIEW_RECIPES",
"type": "json_flag",
"//": "Any item that can display a list of contained recipes"
},
{
"id": "VIEW_PHOTOS",
"type": "json_flag",
"//": "Any item that can display a list of contained photos"
},
{
"id": "AFS_CS_LOCKER_CARD",
"type": "json_flag",
Expand Down
15 changes: 15 additions & 0 deletions data/json/item_actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,21 @@
"id": "ELECTRICSTORAGE",
"name": { "str": "Manage external storage" }
},
{
"type": "item_action",
"id": "E_FILE_DEVICE",
"name": { "str": "Manage files" }
},
{
"type": "item_action",
"id": "VIEW_RECIPES",
"name": { "str": "View recipes" }
},
{
"type": "item_action",
"id": "VIEW_PHOTOS",
"name": { "str": "View photos" }
},
{
"type": "item_action",
"id": "PURIFY_SMART",
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/Clothing_Gear/gear.json
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
[ "hammer_sledge_heavy", 1 ],
[ "shovel", 20 ],
{ "item": "cell_phone", "prob": 5, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 20, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 20, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
[ "airhorn", 5 ],
[ "boltcutters", 5 ],
[ "tacvest", 10 ],
Expand Down
8 changes: 4 additions & 4 deletions data/json/itemgroups/Clothing_Gear/gear_civilian.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"items": [
{ "group": "wallets", "prob": 1600 },
{ "item": "cell_phone", "prob": 26, "charges": [ 0, 300 ] },
{ "item": "smart_phone", "prob": 204, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 204, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
{ "prob": 250, "group": "cig_box_cigarette_1_20" },
{ "item": "lighter", "prob": 50, "charges": [ 0, -1 ] },
{ "item": "small_lighter", "prob": 25, "charges": [ 0, -1 ] },
Expand Down Expand Up @@ -44,9 +44,9 @@
{ "item": "camera_pro", "prob": 1, "charges": [ 0, 150 ] },
{ "item": "camera_pro", "container-item": "camera_bag", "prob": 4, "charges": [ 0, 150 ] },
[ "camera_bag", 10 ],
{ "item": "eink_tablet_pc", "prob": 30, "charges": [ 0, 100 ] },
{ "item": "laptop", "prob": 15, "charges": [ 0, 500 ] },
[ "memory_card_unread", 50 ],
{ "item": "eink_tablet_pc", "prob": 30, "charges": [ 0, 100 ], "contents-group": "civilian_einktablet_efiles" },
{ "item": "laptop", "prob": 15, "charges": [ 0, 500 ], "contents-group": "civilian_laptop_efiles" },
[ "memory_card", 50 ],
[ "usb_drive", 50 ],
{ "item": "mp3", "prob": 20, "charges": [ 0, 100 ] },
{ "item": "portable_game", "prob": 50, "charges": [ 0, 100 ] },
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/Labs/labs_common.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"distribution": [ { "item": "camera", "prob": 70, "charges": [ 0, 50 ] }, { "item": "camera_pro", "prob": 30, "charges": [ 0, 50 ] } ],
"prob": 10
},
{ "item": "memory_card_unread", "prob": 15, "count": [ 2, 8 ] },
{ "item": "memory_card", "prob": 15, "count": [ 2, 8 ] },
{ "item": "badge_doctor", "prob": 5, "count": [ 1, 2 ] },
{ "item": "wrapped_rad_badge", "prob": 7, "count": [ 1, 3 ] },
{ "item": "plastic_chunk", "prob": 30, "count": [ 1, 3 ] },
Expand Down
12 changes: 6 additions & 6 deletions data/json/itemgroups/Locations_MapExtras/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
{ "item": "mp3", "prob": 8, "charges": [ 0, 100 ] },
{ "item": "portable_game", "prob": 10, "charges": [ 0, 100 ] },
{ "item": "game_watch", "prob": 2, "charges": [ 0, 100 ] },
{ "item": "laptop", "prob": 5, "charges": [ 0, 500 ] },
{ "item": "laptop", "prob": 5, "charges": [ 0, 500 ], "contents-group": "civilian_laptop_efiles" },
[ "fish_bowl", 1 ],
{ "group": "box_of_contact_lens_any", "prob": 15 },
{ "item": "transition_contacts", "prob": 1, "count": 6 },
Expand Down Expand Up @@ -669,7 +669,7 @@
[ "receiver", 25 ],
[ "small_lcd_screen", 10 ],
[ "large_lcd_screen", 10 ],
[ "memory_card_unread", 80 ],
[ "memory_card", 80 ],
{ "item": "radiocontrol", "prob": 15, "charges": [ 0, 25 ] },
{ "item": "radio_car", "prob": 15, "charges": [ 0, 25 ] },
[ "RAM", 45 ],
Expand Down Expand Up @@ -932,7 +932,7 @@
{ "item": "laptop", "prob": 20, "charges": [ 0, 500 ] },
[ "atomic_light", 1 ],
{ "item": "eink_tablet_pc", "prob": 1, "charges": [ 0, 100 ] },
[ "memory_card_unread", 5 ],
[ "memory_card", 5 ],
{ "item": "cell_phone", "prob": 5, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 35, "charges": [ 0, -1 ] },
[ "cotton_patchwork", 1 ],
Expand Down Expand Up @@ -1940,7 +1940,7 @@
{ "item": "cell_phone", "prob": 7, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 54, "charges": [ 0, 150 ] },
{ "item": "eink_tablet_pc", "prob": 15, "charges": [ 0, 100 ] },
[ "memory_card_unread", 40 ],
[ "memory_card", 40 ],
[ "memory_card_science", 10 ],
[ "standard_template_construct", 5 ],
[ "standard_template_construct_combat_exoskeleton", 5 ],
Expand Down Expand Up @@ -2222,8 +2222,8 @@
[ "bubblewrap", 50 ],
[ "instant_coffee", 15 ],
[ "usb_drive", 5 ],
[ "software_useless", 10 ],
[ "software_electronics_reference", 2 ],
{ "item": "usb_drive", "contents-item": "software_useless", "prob": 10 },
{ "item": "usb_drive", "contents-item": "software_electronics_reference", "prob": 2 },
[ "umbrella", 5 ],
[ "teleumbrella", 2 ],
{ "item": "gum", "prob": 10, "count": [ 1, 10 ] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@
[ "pork_beans", 15 ],
[ "glazed_tenderloin", 5 ],
{ "item": "cell_phone", "prob": 1, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 3, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 3, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
[ "glass", 40 ],
[ "spoon", 25 ],
[ "fork", 25 ],
Expand Down Expand Up @@ -1830,10 +1830,10 @@
"items": [
[ "usb_drive", 65 ],
[ "memory_card", 95 ],
[ "software_math", 15 ],
[ "software_useless", 25 ],
[ "software_medical", 5 ],
[ "software_hacking", 1 ]
{ "item": "usb_drive", "contents-item": "software_useless", "prob": 25 },
{ "item": "usb_drive", "contents-item": "software_math", "prob": 15 },
{ "item": "usb_drive", "contents-item": "software_medical", "prob": 5 },
{ "item": "usb_drive", "contents-item": "software_hacking", "prob": 1 }
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
{ "item": "weed", "prob": 10, "count": [ 1, 5 ] },
[ "joint", 10 ],
{ "item": "cell_phone", "prob": 3, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 17, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 17, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
{ "item": "camera", "prob": 15, "charges": [ 0, 150 ] },
{ "item": "camera", "container-item": "camera_bag", "prob": 5, "charges": [ 0, 150 ] },
[ "camera_bag", 10 ],
Expand Down Expand Up @@ -214,7 +214,7 @@
{ "item": "weed", "prob": 10, "count": [ 1, 5 ] },
[ "joint", 10 ],
{ "item": "cell_phone", "prob": 6, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 44, "charges": [ 0, -1 ] }
{ "item": "smart_phone", "prob": 44, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" }
]
},
{
Expand Down Expand Up @@ -257,7 +257,7 @@
{ "item": "weed", "prob": 10, "count": [ 1, 5 ] },
[ "joint", 10 ],
{ "item": "cell_phone", "prob": 6, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 44, "charges": [ 0, -1 ] }
{ "item": "smart_phone", "prob": 44, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" }
]
}
]
2 changes: 1 addition & 1 deletion data/json/itemgroups/Locations_MapExtras/mansion.json
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@
{ "item": "mp3", "prob": 6, "charges": [ 0, 100 ] },
{ "item": "portable_game", "prob": 5, "charges": [ 0, 100 ] },
{ "item": "cell_phone", "prob": 1, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 5, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 5, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
[ "phonebook", 5 ],
[ "hairpin", 5 ],
{ "group": "tinware", "prob": 5 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@
{ "item": "transponder", "prob": 5 },
{ "item": "receiver", "prob": 10 },
{ "item": "antenna", "prob": 18 },
{ "item": "laptop", "prob": 20, "charges": [ 0, 500 ] },
{ "item": "eink_tablet_pc", "prob": 8, "charges": [ 0, 500 ] },
{ "item": "memory_card_unread", "prob": 5 },
{ "item": "laptop", "prob": 20, "charges": [ 0, 500 ], "contents-group": "civilian_laptop_efiles" },
{ "item": "eink_tablet_pc", "prob": 8, "charges": [ 0, 500 ], "contents-group": "civilian_einktablet_efiles" },
{ "item": "memory_card", "prob": 5 },
{ "item": "camera", "prob": 3, "charges": [ 0, 150 ] },
{ "item": "camera", "container-item": "camera_bag", "prob": 2, "charges": [ 0, 150 ] },
{ "item": "camera_pro", "prob": 1, "charges": [ 0, 150 ] },
Expand Down
2 changes: 1 addition & 1 deletion data/json/itemgroups/SUS/combos.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
[ "badge_doctor", 2 ],
[ "lanyard", 15 ],
{ "item": "smart_phone", "prob": 80, "charges": [ 0, 120 ] },
[ "memory_card_unread", 30 ],
[ "memory_card", 30 ],
[ "mask_dust", 30 ],
{ "group": "box_of_contact_lens_any", "prob": 16 },
{ "group": "clothing_glasses", "prob": 65 },
Expand Down
8 changes: 4 additions & 4 deletions data/json/itemgroups/SUS/office.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"//2": "This group is for an office desk containing documents and electronics for work and some desk clutter.",
"subtype": "collection",
"entries": [
{ "item": "eink_tablet_pc", "prob": 20, "charges": [ 0, 100 ] },
{ "item": "laptop", "prob": 60, "charges": [ 0, 500 ] },
{ "item": "eink_tablet_pc", "prob": 20, "charges": [ 0, 100 ], "contents-group": "edevice_work" },
{ "item": "laptop", "prob": 60, "charges": [ 0, 500 ], "contents-group": "edevice_work" },
{ "item": "battery_charger", "prob": 80 },
{ "item": "usb_drive", "prob": 50 },
{ "item": "memory_card_unread", "count": [ 1, 3 ], "prob": 30 },
{ "item": "memory_card", "count": [ 1, 3 ], "prob": 30 },
{ "item": "file", "count": [ 1, 8 ], "prob": 50 },
{ "item": "paper", "count": [ 2, 9 ], "prob": 60 },
{ "group": "pens", "count": [ 1, 10 ], "prob": 95, "charges": [ 0, 100 ] },
Expand All @@ -34,7 +34,7 @@
{ "item": "file", "count": [ 1, 15 ], "prob": 95 },
{ "item": "paper", "count": [ 2, 30 ], "prob": 80 },
{ "item": "book_binder", "prob": 80 },
{ "item": "memory_card_unread", "count": [ 1, 5 ], "prob": 30 }
{ "item": "memory_card", "count": [ 1, 5 ], "prob": 30 }
]
},
{
Expand Down
3 changes: 1 addition & 2 deletions data/json/itemgroups/books.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,7 @@
{ "item": "novel_crime", "prob": 20 },
{ "item": "novel_crime2", "prob": 20 },
{ "item": "novel_horror", "prob": 18 },
{ "item": "novel_tragedy", "prob": 8 },
{ "item": "survnote", "prob": 1 }
{ "item": "novel_tragedy", "prob": 8 }
]
},
{
Expand Down
18 changes: 9 additions & 9 deletions data/json/itemgroups/collections_domestic.json
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
{ "group": "glass_of_wine", "prob": 10 },
{ "item": "gummy_vitamins", "prob": 10, "count": [ 1, 10 ] },
{ "item": "cell_phone", "prob": 2, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 12, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 12, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
[ "eyedrops", 10 ],
[ "steroid_eyedrops", 5 ],
[ "holy_symbol", 5 ],
Expand Down Expand Up @@ -599,18 +599,18 @@
{ "item": "usb_drive", "prob": 15 },
{ "group": "alcohol", "prob": 163 },
{ "item": "cell_phone", "prob": 5, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 36, "charges": [ 0, -1 ] },
{ "item": "smart_phone", "prob": 36, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
{ "item": "waterproof_smart_phone_case", "prob": 5 },
{ "item": "wristwatch", "prob": 15 },
{ "item": "pocketwatch", "prob": 5 },
{ "item": "umbrella", "prob": 50 },
{ "item": "teleumbrella", "prob": 20 },
{ "item": "fish_bowl", "prob": 1 },
{ "item": "lsd", "prob": 1, "count": [ 1, 5 ] },
{ "item": "laptop", "prob": 10, "charges": [ 0, 500 ] },
{ "item": "laptop", "prob": 10, "charges": [ 0, 500 ], "contents-group": "civilian_laptop_efiles" },
{ "item": "file", "prob": 5 },
{ "item": "eink_tablet_pc", "prob": 2, "charges": [ 0, 100 ] },
{ "item": "memory_card_unread", "prob": 4 },
{ "item": "eink_tablet_pc", "prob": 2, "charges": [ 0, 100 ], "contents-group": "civilian_einktablet_efiles" },
{ "item": "memory_card", "prob": 4 },
{ "item": "camera", "prob": 1, "charges": [ 0, 150 ] },
{ "item": "camera", "container-item": "camera_bag", "prob": 2, "charges": [ 0, 150 ] },
{ "item": "camera_bag", "prob": 3 },
Expand Down Expand Up @@ -1130,14 +1130,14 @@
{ "group": "kids_books", "prob": 70 },
{ "item": "tailor_portfolio", "prob": 1 },
{ "item": "recipe_augs", "prob": 1 },
{ "item": "laptop", "prob": 10, "charges": [ 0, 500 ] },
{ "item": "laptop", "prob": 10, "charges": [ 0, 500 ], "contents-group": "civilian_laptop_efiles" },
{ "item": "atomic_light", "prob": 2 },
{ "item": "atomic_lamp", "prob": 2 },
{ "item": "cell_phone", "prob": 6, "charges": [ 0, 150 ] },
{ "item": "smart_phone", "prob": 40, "charges": [ 0, -1 ] },
{ "item": "eink_tablet_pc", "prob": 2, "charges": [ 0, 100 ] },
{ "item": "smart_phone", "prob": 40, "charges": [ 0, -1 ], "contents-group": "civilian_smartphone_efiles" },
{ "item": "eink_tablet_pc", "prob": 2, "charges": [ 0, 100 ], "contents-group": "civilian_einktablet_efiles" },
{ "item": "smart_lamp", "prob": 2, "charges": [ 0, 100 ] },
{ "item": "memory_card_unread", "prob": 4 },
{ "item": "memory_card", "prob": 4 },
{ "item": "lighter", "prob": 60, "charges": [ 0, 100 ] },
{ "item": "ref_lighter", "prob": 2, "charges": [ 0, 50 ] },
{ "item": "matches", "prob": 60, "charges": [ 1, 20 ] },
Expand Down
Loading

0 comments on commit 3e142e5

Please sign in to comment.