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

Fix for 1.3 compatibility #31

Open
KrunoSaho opened this issue Jul 21, 2021 · 2 comments
Open

Fix for 1.3 compatibility #31

KrunoSaho opened this issue Jul 21, 2021 · 2 comments
Labels

Comments

@KrunoSaho
Copy link

MoteMaker becomes FleckMaker.

Here are my modifications to MapComponent_Durabilty.cs:

public override void MapComponentTick()
        {
            foreach (KeyValuePair<CompBreakdownable, float> _dur in _durabilities)
            {
                if (comp?.parent?.Spawned ?? false)
                {
                    var parentDrawPos = comp.parent.DrawPos;

                    if (durability < .5 && (tick + comp.GetHashCode()) % _moteIntervalRequiresRepair == 0)
                    {
                        var scale = (1f - durability) * 1 / 2f;
                        FleckMaker.ThrowSmoke(parentDrawPos, map, scale);
                    }

                    if (durability < .25 && (tick + comp.GetHashCode()) % _moteIntervalRequiresCriticalRepair == 0)
                    {
                        FleckMaker.ThrowMicroSparks(parentDrawPos, map);
                    }
                }
            }
        }

The mod now works fine on my PC.

@KrunoSaho KrunoSaho added the bug label Jul 21, 2021
@KrunoSaho
Copy link
Author

I have made a compiled version available to just drop into your RimWorld mods folder:
https://mega.nz/file/WGQBVK4D#iG_GgD06bGIanTxMSoBtmwcZjXV9qXgqJ6oW6yuONdc

@davidmc971
Copy link

I have made a compiled version available to just drop into your RimWorld mods folder:
https://mega.nz/file/WGQBVK4D#iG_GgD06bGIanTxMSoBtmwcZjXV9qXgqJ6oW6yuONdc

Tried it in my game and it seems to work fine. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants