narc0tiq / LiquidUU

Minecraft mod for turning IC2's UU-matter into a Buildcraft-compatible liquid.
http://www.narc.ro/liquid-uu
Other
2 stars 2 forks source link

Made the electrolyzer actually do something #26

Closed viliml closed 11 years ago

viliml commented 11 years ago

I made it do almost what it's supposed to do. You can change whatever you want, or not implement it at all, I just did this when I had nothing better to do, and I think it might at least help you a bit when coding the real one. You don't have to accept the pull request, just look at the code, and maybe use a bit in your implementation.

narc0tiq commented 11 years ago

I probably won't pull this, but I appreciate the push for me to get back to work. Now, if you want to help greatly, I could really use some help with making the GUI -- it's fairly straightforward, but it needs doing.

If you want to do that, here's what I need: two tank gauges for water and electrolyzed water, one on the left of the GUI and one on the right. Two item slots for battery charging and discharging, to allow you to operate the machine without a connection to the EnergyNet. Finally, one indicator for showing the internal electric charge level, including text for it. Basically, a generator GUI with a couple of tanks on either side.

In doing this, you can probably pull the method the accelerator already uses for its UU tank gauge and make it its own class, and just instantiate a couple of them. The tooltip display on the tank should probably also be a property of this new class, with getGuiContainerForegroundLayer just passing the mouse position along when asking the tank gauge to draw itself, or something of the sort. It may help further to extract the gauge lines on the tank into their own separate texture, although just passing in texture coordinates when initializing the tank gauge object should work at least as well.

That's about all I can think of as far as "how" -- and you can, of course, choose to do it any other way, though in that case, I may not take the whole patch. I would greatly appreciate the work, though.

I'll leave the pull request open for the moment, to remind me I need to get back to work after I watch the Doctor Who Christmas special.

viliml commented 11 years ago

Sorry, I'm not that good at GUIs

narc0tiq commented 11 years ago

Bwah, neither am I, though happily I don't have to be. I'll make that the next part of development, I guess, including reading adjacent tanks like it's supposed to.

Have you compiled a copy of the new version yet? Like how I did machine face rotation? It was wonderfully elegant, I thought. Likewise the machine state packet -- though that one I admittedly just stole out of BeamMeUp and CleverRouting -- it's a good trope.

I can see why people make "library" mods now -- you occasionally make stuff like that ends up applying fairly generally. Like, when am I not going to want to have a TileEntity just have a state packet of some kind?

viliml commented 11 years ago

No, I already told you I can't possibly compile that without IC2's complete sources! It just errors like crazy! It would be much better if you would just use the API and Class.forName()! COMPILING IS IMPOSSIBLE!

narc0tiq commented 11 years ago

I must be doing the impossible, then. I mean, I do have IC2 source lying around, but it's nowhere near my compiling and packaging system.

...yes, I know what the problem is, I haven't really explained how to set up for compiling LiquidUU anywhere. I'll have to update the instructions I wrote for someone else for 1.4.6, and remove extraneous bits like the part about actually decompiling IC2.

Rest assured, however, that it's perfectly possible to recompile LiquidUU with nothing but the mod packages for IC2, Buildcraft, Forestry, Thermal Expansion and NEI.