Skip to content

Commit

Permalink
2.0.13: the cli arg update
Browse files Browse the repository at this point in the history
  • Loading branch information
NotNite committed Nov 1, 2024
1 parent 397234f commit 9921d56
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GDWeave/GDWeave.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Version>2.0.12.0</Version>
<Version>2.0.13.0</Version>

<!-- required for loader -->
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
Expand Down
12 changes: 12 additions & 0 deletions loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ pub enum LoaderError {
}

fn init() -> Result<(), LoaderError> {
let args = std::env::args().collect::<Vec<_>>();
if args.iter().any(|s| s == "--gdweave-disable") {
return Ok(());
}
if let Some(i) = args
.iter()
.position(|s| s.starts_with("--gdweave-folder-override="))
{
let path = args[i].split('=').nth(1).unwrap();
std::env::set_var("GDWEAVE_FOLDER_OVERRIDE", path);
}

let dir = std::env::var("GDWEAVE_FOLDER_OVERRIDE")
.map(|s| std::path::PathBuf::from(s))
.unwrap_or_else(|_| {
Expand Down
2 changes: 1 addition & 1 deletion thunderstore/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GDWeave",
"version_number": "2.0.12",
"version_number": "2.0.13",
"website_url": "https://github.com/NotNite/GDWeave",
"description": "Mod loader & runtime script patching for Godot",
"dependencies": []
Expand Down

0 comments on commit 9921d56

Please sign in to comment.