Skip to content

[Bug]: Royalty Defs overriding base game defs #4498

@Halicade

Description

@Halicade

Specifications

Rimworld version:
Combat Extended version: Combat Extended 16.7.2.0 (081873a-dev):
Combat Extended source:Github RC
Your operating system: Windows 11
Your mod list: Harmony, Rimworld, CE, no DLC

Description
In the loadfolders for Royalty, there is a def Gun_ChargeBlasterHeavyTurret as well as a patch for the same def. It looks like during the 1.6 update, the base games Gun_ChargeBlasterHeavyTurret got moved from Royalty to Core. After noticing this, I noticed that two of the Defs inside that file are overrides of base game content. The previously mentioned and Gun_InfernoCannonTurret.

Expected behavior
There shouldn't be any Def overrides

To reproduce
How I discovered this: Started CE (without Royalty) with the "Enable weapon autopatcher" setting activated.
received the below error:
Unhandled exception patching gun Gun_ChargeBlasterHeavyTurret from preset

Screenshots & log dumps
The log with initial error https://gist.github.com/HugsLibRecordKeeper/66800a276259f4ee0cc49958f9e551be
File with the Defs in question https://github.com/CombatExtended-Continued/CombatExtended/blob/Development/Royalty/Defs/ThingDefs_Buildings/Weapons_Turrets.xml
The first patch which is currently replacing Gun_ChargeBlasterHeavyTurret with itself and should ideally be in moved to Core patches

<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_AutoChargeBlaster"]/building/turretGunDef</xpath>
<value>
<turretGunDef>Gun_ChargeBlasterHeavyTurret</turretGunDef>
</value>
</Operation>

The secondpatch
<Operation Class="PatchOperationReplace">
<xpath>Defs/ThingDef[defName="Turret_AutoInferno"]/building/turretGunDef</xpath>
<value>
<turretGunDef>Gun_InfernoCannonTurret</turretGunDef>
</value>
</Operation>

Complete the following checklist
I hereby verify that I have done the following:

  • Confirmed that my game version and load order are correct.
  • Confirmed that I am running the appropriate and most updated version of Combat Extended and required compatibility patches.
  • Confirmed I am not running any mods with known incompatibilities with Combat Extended.
  • Disabled Combat Extended and attempted to reproduce the behavior without success.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions