Added config file

This commit is contained in:
Fierelier 2020-10-04 13:14:48 +02:00
parent 31b8884f53
commit 676d749c08
2 changed files with 11 additions and 0 deletions

6
UniversalModloader.ini Normal file
View File

@ -0,0 +1,6 @@
[default]
# which method should be used for linking files?
# - hardlink: the default. simply links file from one point to another, imagine it like a shortcut, just that changes made also result in the original file getting changed. if you use this method, and you want to change a file inside the modded game, always duplicate it, delete the original (inside your modded game), and rename it to the original file. to stay safe, you should always mod files using the modloader.
# - reflink: this method uses a feature in certain copy-on-write file systems, like btrfs, which allows you to make a "link" of a file, similar to hardlinks, but you can edit it as well. only changes are saved additionally. note that btrfs and other filesystems that support this feature don't tend to be the default filesystem in many operating systems. this has implementations for linux, and btrfs on windows (https://github.com/maharmstone/btrfs)
# - copy: copy the files. this takes longer and requires more space, but also makes it possible for you to edit the files afterwards without the use of the modloader.
linkMethod = hardlink

View File

@ -29,6 +29,11 @@ pathMods = ""
stateModded = False
listLinked = []
listLinkedFolders = []
config = configparser.ConfigParser()
config["default"] = {
"linkMethod": "hardlink"
}
config.read(p(sp,os.path.splitext(os.path.basename(s))[0] + ".ini"))
def filterDd(text):
while text[-1] in ['"',"'"," ",os.path.sep]: text = text[:-1]