Skip to content
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

Add overwrite functionality #74

Merged
merged 8 commits into from Jan 24, 2023
Merged

Add overwrite functionality #74

merged 8 commits into from Jan 24, 2023

Conversation

KANAjetzt
Copy link
Collaborator

Let mod authors create the overwrites.gd at the root of the mod folder

  • My current proposed solution on how to handle the overwrites
  • Mod authors create the overwrites.gd script and overwrites folder in there mod folder:
    image
  • We provide tooling to make the creation of the overwrites.gd script a one click thing
  • People ho don't want to use extra tooling can just write the overwrites.gd them self

overwrites.gd from example mod:

extends Node

func _init():
	var overwrite_0 = preload("res://mods-unpacked/KANA-OverwritesTest/overwrites/assets/images/GodotModded.png")
	overwrite_0.take_over_path("res://assets/images/GodotModded.png")

Example Mod with this setup:
KANA-OverwritesTest.zip

Testing Godot Project
( does not include the Mod Loader - pls use this PR to test )
ModdingTest.zip

closes #14

@KANAjetzt KANAjetzt added the enhancement New feature or request label Jan 22, 2023
@KANAjetzt KANAjetzt added this to the v4.2.0 milestone Jan 22, 2023
@KANAjetzt KANAjetzt requested a review from a team January 22, 2023 15:50
Copy link
Collaborator

@ithinkandicode ithinkandicode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some very minor things, borderline nitpicks 😁

addons/mod_loader/mod_loader.gd Outdated Show resolved Hide resolved
addons/mod_loader/mod_loader.gd Outdated Show resolved Hide resolved
@@ -222,6 +222,13 @@ static func get_json_string_as_dict(string: String) -> Dictionary:
return {}
return parsed.result

static func is_file_existing(path: String) -> bool:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could these funcs be renamed into something more semantic, ie. to be more human readable? The phrase "is file existing" isn't quite grammatically correct. Eg. would does_file_exist be ok for you?

Copy link
Collaborator Author

@KANAjetzt KANAjetzt Jan 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just use the build in function name?
file_exists

Copy link
Collaborator

@ithinkandicode ithinkandicode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin' good man! Looks like I'll need to re-approve once the merge conflicts are fixed but I'll approve here anyway 😁

@KANAjetzt KANAjetzt merged commit 1f1cbef into GodotModding:develop Jan 24, 2023
@KANAjetzt KANAjetzt deleted the 14-add-overwrite-functionality branch January 24, 2023 21:48
@KANAjetzt KANAjetzt mentioned this pull request Feb 15, 2023
This was referenced Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants