kelmen Posted February 7, 2020 Share Posted February 7, 2020 I'm working on a code to get the temperature of solid material from a solid conduit/conveyor rail. I have done this over gas and liquid, when attempt to reuse that code for the solid material, it doesn't work and pop error. looking over other modder similar codes, it's due to the Flow Manager, solid is using different class SolidConduitFlow while gas/liquid is using ConduitFlow . when attempt to access the item at the input cell, the (IConduitFlow)FlowManager.GetContents both returning different class. Seems like I have to use SolidConduitFlow.RemovePickupable() which give Pickupable. Now I can't figure out how to get temperature from the Pickupable. Link to comment Share on other sites More sharing options...
Candide Posted February 7, 2020 Share Posted February 7, 2020 Looked into IceCooledFan.cs, as it needs to check the temperature of a solid to work. It uses this item_go.GetComponent<PrimaryElement>().Temperature; // where GameObject item_go = this.iceStorage.items[X]; So you simple need to get PrimaryElement which the class already uses "MyCmpReq" for. In other words, this should work: Pickupable yourItem = whereveryougetitfrom; float temperature = yourItem.PrimaryElement.Temperature; Link to comment Share on other sites More sharing options...
BlackAeronaut Posted February 12, 2020 Share Posted February 12, 2020 kelmen, hate to break it to you, but someone else has already beat you to the punch. Unless this actually is you? https://steamcommunity.com/sharedfiles/filedetails/?id=1905942092 Link to comment Share on other sites More sharing options...
kelmen Posted February 17, 2020 Author Share Posted February 17, 2020 On 2/12/2020 at 4:09 PM, BlackAeronaut said: kelmen, hate to break it to you, but someone else has already beat you to the punch. Unless this actually is you? https://steamcommunity.com/sharedfiles/filedetails/?id=1905942092 i just want a functional feature for my gameplay need, don't care whether i created the mod or not. i did used that mod, but it's not working as i expected which i believe is due to the game design not mod. the problem using the sensor to control the shutoff valve doesn't work for the 1st item triggered the sensor. when i setup a route to route cooler material, it won't work properly when 1st item which is typically damn hot (gold from gold geyser). this issue is reproducable for gas/liquid using sensor to control the shutoff. as when the sensor has no material in it, it's defaulted to coldest temp, the game seems to have somekind of lag to snap the routing when the condition triggered by 1st item expected to use the hot route. i attempted to reuse the gas/liquid filter for the solid material, but it looks like there is a visual bug about the 2nd output conduit is not showing. and as present, i have lost interest in this game, so i have stop my modding. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.