Courageous

  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Courageous

  • Rank
    Junior Member
  1. Hi, 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.
  2. Hello, I've been tweaking various ONI mods from source, know how to compile, decompile, and have read various files from Assembly, and Assembly-firstpass. I have made a couple for my own entertainment, but they are all very basic. I have a specific mod in mind: I would like to make a heat exchanger that works in the space biome in lieue of the ridiculous drop of liquid techniques. While I'm open to other suggestions, what I am thinking is something that goes to the background layer (like a thermal shift plate), but is active, and has two plumbing connections (it would be a liquid cooling block). I would then make the heat exchanger aware of objects "in front of it," and exchange heat with them directly (the idea is the exchanger is "attached" to things in front of it). What I am looking for is the best/most efficient way of placing an object on the backplane, running coolant through it, and having that object exchange heat with other objects and the coolant. I was actually thinking of starting with a resized version of the liquid reservoir code, and adding sufficient glue to give it the behaviors I need. Any advice on the best appoach here? Is there some way to do this without generating my own ticks? Or should I generate my own ticks, periodically query the adjacent objects, and just recalc new temperatures and call it a day? If so, can you point me to some basic concepts and code to check out in the core, or some mod that has some code that would show me how to to invoke the API calls? Thank you in advance... EDIT: Update for the search farms, as I had to work this out myself. Answer to 2 questions: Q, what';s a good way to tick? A: Derive a class from ISim100ms (or variant), and implement Sim1000ms method, and then in your ConfigureBuildingTemplate for your building, do GameObject.AddOrGet<>, with the argument being the name of your class. Q, what's a good way to find an object you may be behind? A: Something like this: private GameObject AttachedBuilding() { var thisCell = Grid.PosToCell(this); return Grid.Objects[thisCell, (int) ObjectLayer.Building]; } My next little project is to figure out how to make the liquid reservoir only dispense when full... I know how to do that with a automation components in the game, but I really want a modified liquid reservoir with a built in feature to only begin letting liquid out once full or something. Still experimenting.
  3. Hi, I got overly ambitious in attempting to specify a new world with a bunch of new biomes and features, and I am confronted with a dreaded NullReferenceException in Klei.YamlIO.LoadFile. Yeah, okay. That's me. Any tips on isolating which file might be bad? I already know the start over and build up more slowly method, but I am hoping there is some flag I can throw that makes ONI print file names before it attempts to load them. I guess I could also do a Prefix Harmony patch to the LoadFile routine and force the print myself. Does anyone have a preferred method here? TY