Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into dev #29

Merged
merged 141 commits into from
Oct 28, 2022
Merged

Merge master into dev #29

merged 141 commits into from
Oct 28, 2022

Conversation

jecrell
Copy link
Owner

@jecrell jecrell commented Oct 28, 2022

No description provided.

The removed Manifest.xml fields are loadAfter/loadBefore, which are obsolete in RW 1.1 and causes lots of warnings to be logged.
Although they are still relevant for RW 1.0, it's currently not possible to multi-version About files like Manifest.xml,
and it's not worth supporting the few remaining RW 1.0 users that are still using Mod Manager to build new mod lists.
…Deflector

1) Remove unnecessary "optimization" check that reduce performance due to reflection usage
2) Reorder some checks so that expensive ones go later
3) Cache GetComp and reflection usage
4) Use cached reflection delegates
5) Use Harmony's instance field patch parameter feature to avoid some reflection
6) Clean up some dead code
1) Use cached delegates and FieldRef for reflection wherever possible
2) Use GetComp instead of TryGetComp whereever possible
3) Clean up some obsolete commented-out code
1) Use cached delegate for reflection
2) Use Harmony's instance field patch parameter feature to avoid some reflection
3) Better GetComp vs TryGetComp usage
4) Remove unused/useless code
1) Use Harmony's instance field patch parameter feature to avoid some reflection
2) Better GetComp vs TryGetComp usage
3) Convert DEBUGMODE flag into [Conditional]/#define to avoid unnecessary log string formatting
…pt the defunct CompVehicle)

1) Eliminate unnecessary null checks for objects that shouldn't ever be null
2) Eliminate unnecessary list empty checks before list iteration
3) Better null/empty checks (NullOrEmpty() vs Count vs Count() vs Any() vs null vs .? vs pattern matching) usage
4) Better GetComp vs TryGetComp vs AllComps (and FirstOrDefault/FindAll) usage
5) Some reordering of checks and moving shared operations out of loops to improve performance and other misc optimizations
6) Address most code warnings
7) Use nameof intead of string literals and foreach instead of manual enumeration wherever possible
8) Misc code cleanup including removing unused Harmony patch method parameters
Also comment out more effectively useless code in Caravan_JobTracker
…s again

Specifically fixes the "Failed to find RimWorld.StatDef named Deflect chance" and "System.FormatException: Input string was not in a correct format" errors.
1) Use Harmony's instance field patch parameter feature to avoid some reflection, use cached reflection delegates
2) Better GetComp vs TryGetComp usage, better null/empty checks (?. vs null vs pattern matching) usage
3) Misc code cleanup
1) Fixed pawn's shield melee and ranged block chance base value having only 1/100 effect (big buff)
2) Shield's melee and ranged block factors now applied in pawn's block chance before post-process curve (slight nerf)
3) Pawn's shield melee and ranged block chance now show 0% when no shield equipped
4) Pawn's shield stats now have hyperlink to equipped shield
5) Shield info now shows hit point auto-discard threshold and damage to fatigue factor "stats"
6) Each shield stat now shows 0% when corresponding flag "enabling" that stat is toggled off (e.g. melee block factor shows 0% if canBlockMelee=false)
7) Harmony patches related to stat offsets from shields are updated/rewritten for RW 1.1
8) Various label and description improvements, including new CompShield.xml language file
…en incapable of manipulation or entering casket
…e with stale bundled versions of it in other mods
…e consistent with calculation

Fixes:
- Fix reflection accuracy using deflectRatePerSkillPoint rather than reflectRatePerSkillPoint.
- Fix reflection skill (melee skill by default) not increasing when reflecting and the skill level is 0.
Deflection chance stat display:
- Uses same calculation as actual deflection chance.
- Refactoring of CompDeflector to allow this and a not-yet-implemented reflection accuracy stat display.
- Has link to the equipped deflector (e.g. lightsaber).
- Uses translations, which have been updated (using google translate for new entries).
Misc:
- Log potential NREs.
- Some code style changes and TODOs.
jecrell and others added 29 commits July 24, 2021 15:04
Fix regression in RW 1.1 & 1.2 by using separate defs for 1.1+1.2 and 1.3
Added support for Carny Senpai's Enable Oversized Weapons mod.
Reverts back to previous changes. Removes changes related to Carny Senpai's Enable Oversized Weapons. There are compatibility issues that need to be reviewed.
…y of CompOversizedWeapon that's loaded before ours: have CompActivatableEffect not reference new code in our version of CompOversizedWeapon
Workaround for mod lists that contain other mods with an outdated copy of CompOversizedWeapon that's loaded before ours
Fixed a bug that caused damageTypesToExclude rules to be ignored
Fixed a bug that caused damageTypesToExclude rules to be ignored
- Add "grappling pet" translation in Keyed Grapple.xml.
Ensures 1.3 assemblies are correct in advance of the 1.4 update
Pull request: Update Japanese Translation on 24 Aug, 2022
Added Proxyer's Grapple Japanese text to 1.4
Avoid hardcoding Version.txt folder, parity with DoorsExpanded
@jecrell jecrell merged commit 6d5abeb into dev Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants