-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Project directories #2677
Closed
Closed
Project directories #2677
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
ohlidalp
force-pushed
the
project-directories-2021
branch
from
February 9, 2021 12:20
01b0c83
to
89e3155
Compare
no more dependencies please 😆 |
ohlidalp
force-pushed
the
project-directories-2021
branch
2 times, most recently
from
February 21, 2021 06:39
a82a8dc
to
8ea184c
Compare
ohlidalp
force-pushed
the
project-directories-2021
branch
from
February 27, 2021 00:55
3c9be45
to
aa21aa1
Compare
Added directory ROR_HOME/projects. Each subdir contains 'project.json', resources (meshes, materials, textures) and one or more truckfiles. The ingame top menubar contains 'Projects' menu to spawn modified truckfiles and to import existing ones.
presets: `set_beam/node_defaults` and `set_default_minimass`
Status: import/export for nodes and beams Added option to accept all ; as ;grp:
Parser: added *_set flags for all optional args Spawner: respect *_set flags for all optional args Serializer: don't write out un*_set flags
This fixes linux build by removing msvc-specific forward-declaration of enum, see EditorGroup
With this I abandon the 'RigDef' terminology.
This unifies fragmented code from CacheSystem.h/cpp, ContentManager.h/cpp and ActorEditor.h/cpp Added message category 'PROJECT' to console (wrench icon).
Code changes: * PlatformUtils: factored out CopyResourceFile() from CacheSystem * CacheSystem.h: project contants moved to ProjectManager.h
Keep it simple! * removed struct ProjectTruck, just truck file names suffice. * removed project JSON, no practical use ActorManager::FetchActorDef() now properly reloads project resources on spawn.
Null pointer `m_active_project->prj_trucks` in ImportTruckToProject()
... because 'file' sounds like an open file on disk which it isn't. Inspired by rapidjson::Document. also: Truck::File::Module became Truck::Module, added typedef ModulePtr. Truck::File::EditorGroup became Truck::EditorGroup. ActorManager: FetchActorDef became FetchTruckDocument, LoadActorDef became LoadTruckDocument.
also unified delimiters to ',' - no effect on functionality
all node-index variables now use NodeIdx_t and check against node_t::INVALID_IDX Additional change: exhaust_t, flare_t, cparticle_t moved from SimData.h to GfxData.h and renamed to Exhaust/Flare/CParticle
Added CVar 'edi_file_watch_respawn'. Renamed 'diag_import_grp_loose' to 'edi_import_grp_loose'.
`struct Project` moved to file "Project.h", instances are now managed by std::shared_ptr.
GameContext::ModifyActor() - fixed access to invalidated pointer GameContext::DeleteActor() - prune msg queue to remove dangling actor pointers. ProjectManager::ProjectManager::handleFileAction() - don't try to check a directory that was deleted. ProjectManager::HandleFileSystemEvent() - respect cvar 'edi_file_watch_respawn' again, fixed NULL actor pointer in all RELOAD requests
Double iterator advance.
ohlidalp
force-pushed
the
project-directories-2021
branch
from
March 7, 2021 23:47
bfd85ba
to
52d24ad
Compare
Closing in favor of #2709 - this branch became messy and heavyweight. I'll keep the branch and create separate PR for the parser fixes. If there's interest, I'll reintroduce the file monitoring and projects menu features in different PRs. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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.
Until now, RoR wasn't very friendly to editing truck files. You had to manually unzip the mod, and even then, only the modified truck file would load, not added/edited resources.
This PR adds a new menu in top menubar: 'Projects'. From there, you can import existing mods for editing by one click. Projects are created in "MyDocuments\MyGames\RigsOfRods\projects" as subdirectories, each containing project JSON and truckfiles. Unlike regular mods, all resources within a project are always fully reloaded from disk, allowing modder to add/remove/change meshes/textures/other resources on the go.
FEATURES:
TBD LATER: Make Ulteq's N/B tool (#2298) modify the project.