-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Development' into pr/SamaelGray/3345
- Loading branch information
Showing
139 changed files
with
12,109 additions
and
5,030 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Check Patch Duplicates | ||
on: | ||
pull_request: | ||
branches: [ master, Development ] | ||
|
||
# Restrict the permissions of the ephemeral GitHub token used by this workflow | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Check for duplicate virtual file paths | ||
run: | | ||
python3 DupeFinder.py -c |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,3 +24,5 @@ UnityEngine.dll | |
|
||
|
||
.idea/ | ||
__pycache__ | ||
ModPatches/*/Assemblies/ |
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
File renamed without changes.
Binary file not shown.
Binary file not shown.
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
from xml.dom.minidom import parse as XMLOpen | ||
from twisted.python.filepath import FilePath | ||
import sys | ||
err = "-c" not in sys.argv | ||
|
||
used = {} | ||
mods = set() | ||
ContentRoot = FilePath(".") | ||
ec = 0 | ||
|
||
def process(node): | ||
global ec | ||
mod = c.getAttribute("IfModActive") | ||
if not mod: | ||
mod = "CETeam.CombatExtended" | ||
dp = c.firstChild.data.replace(''', "'") | ||
if (mod, dp) in mods: | ||
ec += 1 | ||
msg = f"Mod {mod} is listed in LoadFolders.xml twice, both pointing to {c.firstChild.data}" | ||
if err: | ||
raise RuntimeError(msg) | ||
else: | ||
print(msg) | ||
mods.add((mod, dp)) | ||
root = FilePath("./" + dp) | ||
if not ContentRoot in root.parents(): | ||
return | ||
for fd in root.walk(): | ||
if fd.isdir(): | ||
continue | ||
if not fd.basename().endswith(".xml"): | ||
continue | ||
relative = tuple(fd.segmentsFrom(root)) | ||
if relative in used: | ||
msg = f"""Relative paths collision found: {str.join("/", fd.segmentsFrom(ContentRoot))} overrides {str.join("/", used[relative].segmentsFrom(ContentRoot))}""" | ||
if err: | ||
raise RuntimeError(msg) | ||
else: | ||
ec += 1 | ||
print(msg) | ||
used[relative] = fd | ||
|
||
with XMLOpen("LoadFolders.xml") as x: | ||
v1_5 = x.getElementsByTagName("v1.5") | ||
for n in v1_5: | ||
for c in n.getElementsByTagName("li"): | ||
process(c) | ||
|
||
|
||
raise SystemExit(ec) |
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
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
Oops, something went wrong.