Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Modding Support #164

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Modding Support #164

wants to merge 4 commits into from

Conversation

jay20162016
Copy link
Contributor

No description provided.

Comment on lines +45 to +66
var path = "res://addons/"

var directory := Directory.new()
directory.make_dir(path)

if not directory.open(path) == OK:
print("Loader: failed to load ", path, ", return [] (open)")
return

if not directory.list_dir_begin(true, true) == OK:
print("Loader: failed to load ", path, ", return [] (list_dir_begin)")
return

while true:
var sub_path = directory.get_next()
print(sub_path)

if sub_path == "." or sub_path == ".." or sub_path.begins_with("_"):
continue

elif sub_path == "":
break
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be the exact same code as in _load_addons(path) further down in the file. Why is this duplicated?

Comment on lines +363 to +367
if (side.controller == Side.Controller.AI):
var ai = Data.AIs[side.ai].new()
add_child(ai)
ai.initialize(side)
AIs[side] = ai
Copy link
Contributor

Choose a reason for hiding this comment

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

These AI related changes should not be in the PR for mods.

@@ -29,6 +29,7 @@ static func _get_directory_data(path: String, directory_data: Array, extentions:
elif directory.current_is_dir():
directory_data = _get_directory_data(directory.get_current_dir() + "/" + sub_path, directory_data, extentions, load_resource)
else:
sub_path = sub_path.replace(".import", "")
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when exporting, the raw .pngs aren't kept, so this is a workaround.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants