-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Electronic storage overhaul demo #79097
Draft
ShnitzelX2
wants to merge
12
commits into
CleverRaven:master
Choose a base branch
from
ShnitzelX2:e-files-extend-ebooks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
<Documentation>
Design documents, internal info, guides and help.
Info / User Interface
Game - player communication, menus, etc.
[JSON]
Changes (can be) made in JSON
Map / Mapgen
Overmap, Mapgen, Map extras, Map display
Spawn
Creatures, items, vehicles, locations appearing on map
Code: Tests
Measurement, self-control, statistics, balancing.
[C++]
Changes (can be) made in C++. Previously named `Code`
Monsters
Monsters both friendly and unfriendly.
[Markdown]
Markdown issues and PRs
Items: Containers
Things that hold other things
EOC: Effects On Condition
Anything concerning Effects On Condition
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
astyled
astyled PR, label is assigned by github actions
labels
Jan 12, 2025
I want to say I love this design. No real complaints from me |
Also big fan of this piece of content being finally mainstreamed, instead of books using one pocket, usb apps using another pocket, map and snippets using eoc, and photos and music using some totally hardcoded thingy |
E_STORABLE, E_COPIABLE, E_FILE_STORAGE, E_FILE_DEVICE, units::ememory, recipes/photos actions, docs
rename bad time names not astyled, not sure if needed
ShnitzelX2
force-pushed
the
e-files-extend-ebooks
branch
from
January 17, 2025 05:36
4c47e6d
to
06647c5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Code: Tests
Measurement, self-control, statistics, balancing.
<Documentation>
Design documents, internal info, guides and help.
EOC: Effects On Condition
Anything concerning Effects On Condition
Info / User Interface
Game - player communication, menus, etc.
Items: Containers
Things that hold other things
[JSON]
Changes (can be) made in JSON
Map / Mapgen
Overmap, Mapgen, Map extras, Map display
[Markdown]
Markdown issues and PRs
Monsters
Monsters both friendly and unfriendly.
Spawn
Creatures, items, vehicles, locations appearing on map
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "electronic storage overhaul"
Purpose of change
This is a demo for the implementation of #78043. It should not be merged or undrafted and will be submitted later as several separate PRs. It contains some known bugs, astyle/json formatting not guaranteed, this is a rough draft.
The main goal here is to generalize
EBOOK
storage to be more usable, visible, and convenient. Additionally, general e-file handling allows for future content.The existing actions that substitute for the lack of general electronic storage are separately implemented and therefore can't be mass-processed, which means that a lot of the time they -- maps, lore bits, e-books, software, everything on memory cards, etc. -- are ignored for convenience's sake.
And that's bad. E-devices being ignored isn't realistic in our modern world, nor in the Cataclysm, where they should be treasure troves of useful information as opposed to the current method of learning: primarily physical books.
Describe the solution
How does this work?
An e-file is simply an item inside a
E_FILE_STORAGE
pocket, identically to how theEBOOK
pocket acts. While in the pocket, e-files take upememory_size
, up toememory_max
for the pocket. Each usable e-device (smartphone, laptop, e-ink tablet) now has anE_FILE_STORAGE
pocket, and removable media devices do as well (USB drive, memory card, cameras, and the new portable hard drive).This means that e-devices can be spawned with contents: items and/or item groups.
The following file operations are available to the player via the new
E_FILE_DEVICE
use_action and relatedefile_activity_actor
:Browse
reveals the contents of nearby e-devices, allowing for further operations. This is currently equivalent to powering on an e-device then going through its contents, picking out important files, and wiping the rest.Read (from external devices)
activates the iuse function for an e-file.Move onto/off
moves files to a single e-device or from multiple e-devices.Copy onto/off
copies only eligible files to a single e-device or from multiple e-devices. Currently, the only files capable of being copied are manuals. If copies of selected files already exist, they are skipped.Wipe
deletes files.Browse + move
is a combo call for convenience.What's reworked?
memory card (unread)
and related functions have been generalized:memory_card
are now stored in arecipe catalog
, which auto-combines with other recipe catalogs. Recipe catalogs will be loot on e-devices. Reading a recipe catalog will list its recipes.memory_card
are now stored in aphoto gallery
, which auto-combines with other photo galleries. Reading a photo gallery will view its photos, identically to a camera.The use_actions for smartphones' map application and local files are now e-files:
map cache
andquestionable media file
. They work identically and will be loot on e-devices.Cameras now are e-storage and still take pictures, but can only view contained photos. You can move photos off of them with the new actions.
Obsoletes
ELECTRICSTORAGE
,EINKTABLETPC
,EBOOKREAD
use_actionsDescribe alternatives you've considered
Lots! I've iterated over the design a few times on and off for the past month, and this is the result.
But I leave critique up to the community. Merge this for yourself and play around with it, look through the code, etc, and let me know what you think. There's lots of polishing left to do, and lots of things that could be done differently.
Testing
Outside of manual testing, none yet. I'm not writing tests until we've settled on a final design.
SUS/OFFICE has some test e-devices with files on them, so use e.g. light_industry for testing
Additional context
Various screenshots
Yet to-dos:
Planned follow-ups: