Closed SokyranTheDragon closed 2 months ago
@Zetrith if you'd prefer me to change something here or use a different approach to patching this let me know.
Looks fine though it conflicts with latest merges
Yup, I'll handle it tomorrow (or the day after, depending if I'll have the time).
I've rebased the branch, so it should now be safe to merge to master.
Info on
UndercaveMapComponent:MapComponentTick
and why it needs patching:TriggerCollapseFX
does have an effect on simulation by spawning collapsed mountain roofFixing RNG is easy by just pushing/popping the state.
Fixing the collapsed mountain roof is more complex. Possible solutions:
TriggerCollapseFX
and call it in a deterministic way (used in this PR)Information about the patch:
Rand.MTBEventOccurs
always fail, making soTriggerCollapseFX
is never calledTriggerCollapseFX
in a deterministic way0
as both arguments to prevent additional effects from triggeringGen.HashCombineInt(Find.TickManager.TicksGame, __instance.map.uniqueID)
if we care about having a seed hereRemaining issues with
UndercaveMapComponent
/Pit Gate: