Recommended Posts

Courageous    0


In ConduitDispenser.cs, Dispense(), there is line that looks like this:

                Trigger(-1697596308, primaryElement.gameObject);

I've been able to trace this to the event system, and in the GameHashes.cs file found the OnStorageChange event.

I get the idea of eventing, but what is the game using such events for? For example, if I were writing my own custom dispenser, and were to leave the Trigger out, what would the consequence be?

Thank you.


Share this post

Link to post
Share on other sites
Candide    19

If you leave out the trigger, it will simply not execute code which is subscribed to that event. What that means in practise depends on the object and what components work with it.

This is speculative, but I could imagine that not updating OnStorageChange breaks the resource list or has weird effects on the Dupes e.g. transporting material to it even though it's full. If you want to be sure, you would need to reverse engineer the events used in your case. Although I cannot see why you would want to. Just use the trigger.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now