Skip to content

Commit

Permalink
Merge branch 'Development' into pr/SamaelGray/3345
Browse files Browse the repository at this point in the history
  • Loading branch information
N7Huntsman committed Aug 21, 2024
2 parents 639d3f7 + 4281cdf commit b0816ae
Show file tree
Hide file tree
Showing 139 changed files with 12,109 additions and 5,030 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/duplicates.yml
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
8 changes: 3 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ jobs:
rm -rf AssemblyPublicizer
git clone https://github.com/CombatExtended-Continued/AssemblyPublicizer
mkdir -p Assemblies
mkdir -p AssembliesCore
mkdir -p AssembliesCompat
mkdir -p ${{ runner.temp }}/downloads
- name: build loader
- name: remove loader
run: |
TEMP=${{ runner.temp }}/ python Make.py --csproj Source/Loader/Loader.csproj --output Assemblies/0CombatExtendedLoader.dll --download-libs --all-libs
rm Assemblies/CombatExtendedLoader.dll
- name: build core
run: |
Expand All @@ -33,7 +31,7 @@ jobs:
- name: package
run: |
mkdir CombatExtended
cp -r Source/ Assemblies/ AssembliesCore/ AssembliesCompat/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended
cp -r Source/ Assemblies/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended
zip -9 -r build.zip CombatExtended
- name: Upload to DO
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ jobs:
wget https://raw.githubusercontent.com/CombatExtended-Continued/CombatExtended/Development/Make.py -O Make.py
wget https://raw.githubusercontent.com/CombatExtended-Continued/CombatExtended/Development/BuildCompat.py -O BuildCompat.py
mkdir -p Assemblies
mkdir -p AssembliesCore
mkdir -p AssembliesCompat
mkdir -p ${{ runner.temp }}/downloads
rm -rf AssemblyPublicizer
git clone https://github.com/CombatExtended-Continued/AssemblyPublicizer
- name: build loader
- name: remove loader
run: |
TEMP=${{ runner.temp }}/ python Make.py --csproj Source/Loader/Loader.csproj --output Assemblies/0CombatExtendedLoader.dll --download-libs --all-libs
rm Assemblies/CombatExtendedLoader.dll
- name: build core
run: |
Expand All @@ -46,7 +44,7 @@ jobs:
- name: package
run: |
mkdir CombatExtended
cp -r Source/ Assemblies/ AssembliesCompat/ AssembliesCore/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended
cp -r Source/ Assemblies/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended
zip -9 -r build.zip CombatExtended
- name: Upload to DO
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
rm -rf AssemblyPublicizer
git clone https://github.com/CombatExtended-Continued/AssemblyPublicizer
mkdir -p Assemblies
mkdir -p AssembliesCore
mkdir -p AssembliesCompat
mkdir -p ${{ runner.temp }}/downloads
- name: build loader
- name: remove loader
run: |
TEMP=${{ runner.temp }}/ python Make.py --csproj Source/Loader/Loader.csproj --output Assemblies/0CombatExtendedLoader.dll --download-libs --all-libs
rm Assemblies/CombatExtendedLoader.dll
- name: build core
run: |
TEMP=${{ runner.temp }}/ python Make.py --csproj Source/CombatExtended/CombatExtended.csproj --output Assemblies/CombatExtended.dll --download-libs --all-libs --publicizer $PWD/AssemblyPublicizer
Expand All @@ -32,7 +30,7 @@ jobs:
- name: package
run: |
mkdir CombatExtended
cp -r Assemblies/ AssembliesCore/ AssembliesCompat/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended
cp -r Assemblies/ About/ Defs/ Languages/ Patches/ Royalty/ Ideology/ Biotech/ Anomaly/ Sounds/ Textures/ ModPatches/ LoadFolders.xml README.md SupportedThirdPartyMods.md CombatExtended
zip -9 -r CombatExtended.zip CombatExtended
- name: Upload Package
id: upload-package
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ UnityEngine.dll


.idea/
__pycache__
ModPatches/*/Assemblies/
1 change: 0 additions & 1 deletion About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
<li>AveryTheKitty.XenohumansAnthromorphs</li>
<li>PRF.Materials</li>
<li>Ryflamer.Rimcraft.Scenarios</li>
<li>DankPyon.Medieval.Overhaul</li>
<li>RimOfMadness.Vampires</li>
<li>sgc.moreutilitypacks</li>
<li>OskarPotocki.VFE.Pirates</li>
Expand Down
File renamed without changes.
Binary file removed Assemblies/0CombatExtendedLoader.dll
Binary file not shown.
Binary file added Assemblies/CombatExtendedLoader.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions Biotech/Patches/AbilityDefs/Abilities_Biotech.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<projectile Class="CombatExtended.ProjectilePropertiesCE">
<damageDef>RangedStab</damageDef>
<speed>30</speed>
<damageAmountBase>20</damageAmountBase>
<armorPenetrationSharp>6</armorPenetrationSharp>
<armorPenetrationBlunt>8</armorPenetrationBlunt>
<damageAmountBase>15</damageAmountBase>
<armorPenetrationSharp>14</armorPenetrationSharp>
<armorPenetrationBlunt>21</armorPenetrationBlunt>
</projectile>
</value>
</Operation>
Expand Down
15 changes: 14 additions & 1 deletion BuildCompat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from subprocess import Popen
import re
import sys
from xml.dom.minidom import parse as XMLOpen

tm = '-m' in sys.argv

Expand Down Expand Up @@ -37,8 +38,20 @@ def system(*cmd):
if tm and name not in sys.argv: continue
csproj = csproj.replace('\\', '/').split('/')
csproj = FilePath("Source").descendant(csproj)
print(f"Building {name}")
output = FilePath("AssembliesCompat").child(name+".dll")
with XMLOpen(csproj.path) as cpath:
op = cpath.getElementsByTagName("OutputPath")
if op:
op = op[0].firstChild.data
if 'ModPatches' in op:
op = op.rsplit("..\\ModPatches", 1)[-1].replace('\\', '/').split('/')
if op:
od = FilePath("ModPatches").descendant(op)
if not od.exists():
od.makedirs()
output = od.child(name+".dll")

print(f"Building {name}")
system("python3", "Make.py", "--csproj", csproj.path, "--output", output.path, DOWNLOAD_LIBS, "--all-libs", "--publicizer", PUBLICIZER, "--", "-r:Assemblies/CombatExtended.dll")

for t in tasks:
Expand Down
7 changes: 4 additions & 3 deletions Defs/Ammo/Rocket/84x246mmR.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<Mass>3.3</Mass>
<Bulk>8.35</Bulk>
</statBases>
<ammoClass>GrenadeHE</ammoClass>
<ammoClass>GrenadeHEDP</ammoClass>
<detonateProjectile>Bullet_84x246mmR_HEDP</detonateProjectile>
</ThingDef>

Expand Down Expand Up @@ -155,6 +155,7 @@
<Bulk>7.31</Bulk>
</statBases>
<ammoClass>BuckShot</ammoClass>
<generateAllowChance>0.5</generateAllowChance>
<comps>
<li Class="CompProperties_Explosive">
<damageAmountBase>20</damageAmountBase>
Expand Down Expand Up @@ -430,8 +431,8 @@
<!-- Originally 1100 flechettes are present, changed to 50 buffed projectile -->
<armorPenetrationSharp>5</armorPenetrationSharp>
<armorPenetrationBlunt>18</armorPenetrationBlunt>
<spreadMult>26.7</spreadMult>
<!-- x3 the normal spread -->
<spreadMult>17.8</spreadMult>
<!-- x2 the normal spread -->
</projectile>
</ThingDef>

Expand Down
50 changes: 50 additions & 0 deletions DupeFinder.py
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('&apos;', "'")
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)
14 changes: 10 additions & 4 deletions LoadFolders.xml
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@
<li IfModActive="Mlie.MedicalSupplements">ModPatches/Medicine Supplements (Continued)</li>
<li IfModActive="JoeDaly.MedMeds.MO">ModPatches/Medieval Medicines 1.4 Medieval Overhaul Edition</li>
<li IfModActive="DankPyon.Medieval.Overhaul">ModPatches/Medieval Overhaul</li>
<li IfModActive="pphhyy.BarbariansMOSubmod">ModPatches/Medieval Overhaul Barbarians</li>
<li IfModActive="DankPyon.Medieval.Overhaul.House.Roxmont">ModPatches/Medieval Overhaul House Roxmont</li>
<li IfModActive="Arisher.Medieval.Tailor">ModPatches/Medieval Tailor</li>
<li IfModActive="Spino.Megafauna">ModPatches/Megafauna</li>
<li IfModActive="co.uk.epicguru.meleeanimation">ModPatches/Melee Animation</li>
Expand Down Expand Up @@ -328,7 +330,6 @@
<li IfModActive="Ayameduki.HARNearmare">ModPatches/Nearmare Race</li>
<li IfModActive="Ayameduki.HARNeclose">ModPatches/Neclose Race</li>
<li IfModActive="Slashandz.MiniMiner">ModPatches/New Mech - Mini-Miner</li>
<li IfModActive="Solaris.RatkinRaceMod">ModPatches/NewRatkinPlus</li>
<li IfModActive="zerithos.NiHal">ModPatches/Nihal</li>
<li IfModActive="Aoba.Cannon, Mlie.NotOnlyJustACannon">ModPatches/Not Only Just A Cannon</li>
<li IfModActive="PrivateGER.Nukes.Shells">ModPatches/Nukes</li>
Expand Down Expand Up @@ -379,6 +380,7 @@
<li IfModActive="Rah.RBSE">ModPatches/RBSE</li>
<li IfModActive="RH.DOOM">ModPatches/RH2 DOOM</li>
<li IfModActive="RH2.Faction.Bounty.Hunters">ModPatches/RH2 Faction - Bounty Hunters</li>
<li IfModActive="RH2.Faction.Gruppa.Krovi">ModPatches/RH2 Faction - Gruppa Krovi</li>
<li IfModActive="RH2.Faction.Task.Force.141">ModPatches/RH2 Faction - Task Force 141</li>
<li IfModActive="RH2.Faction.Rangers">ModPatches/RH2 Faction - The Rangers</li>
<li IfModActive="RH2.Faction.Utilitarian">ModPatches/RH2 Faction - Utilitarian</li>
Expand Down Expand Up @@ -446,7 +448,6 @@
<li IfModActive="CP.RimmuNation.Security">ModPatches/Rimmu-Nation - Security</li>
<li IfModActive="CP.RimmuNation.Weapons">ModPatches/Rimmu-Nation - Weapons</li>
<li IfModActive="Rimsenal.Spacer">ModPatches/Rimsenal - Spacer Faction Pack</li>
<li IfModActive="Rimsenal.Spacer">ModPatches/Rimsenal - Spacer Faction Pack</li>
<li IfModActive="rimsenal.core">ModPatches/Rimsenal Core</li>
<li IfModActive="rimsenal.EVP">ModPatches/Rimsenal Enhanced Vanilla</li>
<li IfModActive="Bonible.rimsenalfactions">ModPatches/Rimsenal Factions</li>
Expand Down Expand Up @@ -501,6 +502,7 @@
<li IfModActive="Caninmyham.ThogsGun_sBrukkaReprimed">ModPatches/Thog's Guns - More Brukka Pack</li>
<li IfModActive="Arquebus.ThrumboPlushie">ModPatches/Thrumbo Plushie</li>
<li IfModActive="syrchalis.thrumkin">ModPatches/Thrumkin</li>
<li IfModActive="JAHV.SpacerVehiclesHAL.CONTINUED">Modpatches/Titan Vehicles</li>
<li IfModActive="Mlie.ToolmetricsRedux">ModPatches/Toolmetrics Redux</li>
<li IfModActive="RicoFox233.TouhouStyle.ScarletDevil">ModPatches/TouhouStyle</li>
<li IfModActive="Gunmar.TribalWarriorSet">ModPatches/Tribal Warrior Set</li>
Expand Down Expand Up @@ -554,6 +556,7 @@
<li IfModActive="vanillaracesexpanded.highmate">ModPatches/Vanilla Races Expanded - Highmate</li>
<li IfModActive="vanillaracesexpanded.hussar">ModPatches/Vanilla Races Expanded - Hussar</li>
<li IfModActive="vanillaracesexpanded.insector">ModPatches/Vanilla Races Expanded - Insector</li>
<li IfModActive="vanillaracesexpanded.lycanthrope">ModPatches/Vanilla Races Expanded - Lycanthrope</li>
<li IfModActive="vanillaracesexpanded.phytokin">ModPatches/Vanilla Races Expanded - Phytokin</li>
<li IfModActive="vanillaracesexpanded.sanguophage">ModPatches/Vanilla Races Expanded - Sanguophage</li>
<li IfModActive="vanillaracesexpanded.saurid">ModPatches/Vanilla Races Expanded - Saurid</li>
Expand All @@ -563,7 +566,7 @@
<li IfModActive="VanillaStorytellersExpanded.WinstonWave">ModPatches/Vanilla Storytellers Expanded - Winston Waves</li>
<li IfModActive="OskarPotocki.VanillaVehiclesExpanded">ModPatches/Vanilla Vehicles Expanded</li>
<li IfModActive="OskarPotocki.VanillaVehiclesExpandedTier3">ModPatches/Vanilla Vehicles Expanded - Tier 3</li>
<li IfModActive="OskarPotocki.VanillaVehiclesExpandedUpgrades">ModPatches/Vanilla Vehicles Expanded - Upgrades</li>
<li IfModActive="OskarPotocki.VanillaVehiclesExpandedUpgrades">ModPatches/Vanilla Vehicles Expanded - Upgrades</li>
<li IfModActive="VanillaExpanded.VWE">ModPatches/Vanilla Weapons Expanded</li>
<li IfModActive="VanillaExpanded.VWEC">ModPatches/Vanilla Weapons Expanded - Coilguns</li>
<li IfModActive="VanillaExpanded.VWEFT">ModPatches/Vanilla Weapons Expanded - Frontier</li>
Expand Down Expand Up @@ -607,5 +610,8 @@
<li IfModActive="pphhyy.ExpandedMechsScyther">ModPatches/pphhyy Expanded Scythers</li>
<li IfModActive="pphhyy.SanguinaryAnimals">ModPatches/pphhyy Sanguinary Animals</li>
<li IfModActive="pphhyy.LightlessEmpyrean">ModPatches/pphhyy's Lightless Empyrean</li>
<li IfModActive="SmashPhil.VehicleFramework">ModPatches/VehicleFramework</li>
<li IfModActive="rwmt.Multiplayer">ModPatches/Multiplayer</li>
<li IfModActive="smashphil.neceros.srtsexpanded">ModPatches/SRTS</li>
</v1.5>
</loadFolders>
</loadFolders>
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PUBLICIZER := /tmp/AssemblyPublicizer


all: Assemblies/0CombatExtendedLoader.dll Assemblies/CombatExtended.dll CompatAssemblies AssembliesCompat $(PUBLICIZER)
all: Assemblies/CombatExtended.dll CompatAssemblies AssembliesCompat $(PUBLICIZER)

$(PUBLICIZER):
git clone https://github.com/CombatExtended-Continued/AssemblyPublicizer --depth=1 $(PUBLICIZER)
Expand All @@ -12,10 +12,10 @@ $(PUBLICIZER):
AssembliesCompat: $(PUBLICIZER)
mkdir -p AssembliesCompat

Assemblies/0CombatExtendedLoader.dll: Source/Loader/Loader.csproj $(wildcard Source/Loader/Loader/*.cs) $(PUBLICIZER)
python3 Make.py --csproj Source/Loader/Loader.csproj --output Assemblies/0CombatExtendedLoader.dll --reference /tmp/rwreference --all-libs $(DOWNLOAD_LIBS)
Assemblies/CombatExtendedLoader.dll: Source/Loader/Loader.csproj $(wildcard Source/Loader/Loader/*.cs) $(PUBLICIZER)
python3 Make.py --csproj Source/Loader/Loader.csproj --output Assemblies/CombatExtendedLoader.dll --reference /tmp/rwreference --all-libs $(DOWNLOAD_LIBS)

Assemblies/CombatExtended.dll: Assemblies/0CombatExtendedLoader.dll Source/CombatExtended/CombatExtended.csproj $(wildcard Source/CombatExtended/*/*.cs) $(wildcard Source/CombatExtended/*/*/*.cs) $(PUBLICIZER)
Assemblies/CombatExtended.dll: Source/CombatExtended/CombatExtended.csproj $(wildcard Source/CombatExtended/*/*.cs) $(wildcard Source/CombatExtended/*/*/*.cs) $(PUBLICIZER)
python3 Make.py --csproj Source/CombatExtended/CombatExtended.csproj --output Assemblies/CombatExtended.dll --reference /tmp/rwreference --all-libs $(DOWNLOAD_LIBS) --publicizer $(PUBLICIZER)


Expand Down
Loading

0 comments on commit b0816ae

Please sign in to comment.