Jump to content




[MC 1.7.10 | CC 1.65] OpenCCSensors

lua

1334 replies to this topic

#21 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 29 November 2012 - 10:45 PM

Nice to see activity around this at the moment - Cloudy has 3 pull requests waiting for him!

Latest changes:

- I've changed it so now the whole of buildcraft doesnt need to be included in the source. This'll hopefully make it easier for other people to get involved. Just include the one file (buildcraft.energy.IEngineProvider) if you want to get running but dont want to include buildcraft.

- I've added support for multiple sensor targets objects per entity. This wont mean much to you unless you're building a sensor.

- I've merged TheNietsnie's code for IC2 cable conductivity in

- Orwell is progressing with rendering and how that'll work, and I believe adding icons to the front of sensors to show what kind of sensor it currently is

- Cloudy has been fixing bugs and refactoring to tidy things up

- LeoVerto started on some german translations

Looks like we have a sample lua program in the pull request log too :)

#22 abihoooo

  • Members
  • 33 posts
  • LocationForge World

Posted 29 November 2012 - 11:03 PM

Quote

As in, the percentage gone for each individual piece of a stack? Or percentage through the entire stack?

If the former, then maybe - although you'd have to call that method constantly and it wouldn't be all that useful.

If the later, and you want to know how far you are through a stack, then I guess you could do that with the methods available already:


I had plans for a massive status screen for my machine shop, but thinking about it now it wouldn't help much for a macerator but it would be good for a mass fabricator.

#23 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 29 November 2012 - 11:51 PM

Unfortunately, unless I've missed it, there's no easy way for us to get stuff like progress information from the public API - and I'm reluctant to dig deeper than the public API because it's not an open source project.

I think the best available way of monitoring progress is to work around monitor stack sizes with the inventory sensor

#24 abihoooo

  • Members
  • 33 posts
  • LocationForge World

Posted 30 November 2012 - 12:22 AM

If that's the case, then I'll try measuring EU/t in the cable right before the mass fab and do math in order to get a reading, which will be sufficient enough for me.

#25 briarknit

  • New Members
  • 3 posts

Posted 30 November 2012 - 02:15 AM

Will this work for CC with 1.4.5?

#26 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 30 November 2012 - 02:33 AM

If you mean Minecraft 1.4.5 with ComputerCraft 1.47 . Then yes. :)

#27 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 30 November 2012 - 03:14 AM

If people are having trouble getting IC2/BC working but want to make another sensor type for another system (or work on other parts of the code...):

My latest commit tries to load each 'sensorpack' in individually. If it fails to load one in, it'll not break the game.

It DOES mean you'll still have your errors in eclipse, and a warning when you run the game, but it will at least work.

Hopefully this'll help :) I'll do a pull request for it to go into the master soon.

#28 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 30 November 2012 - 03:51 AM

Nice :) I've been waiting for this. I think this beats using reflection when it comes to efficiency. :) The error messages shown on runtime are printed by the mods themselves then?

#29 CoolisTheName007

  • Members
  • 304 posts

Posted 30 November 2012 - 07:37 AM

View PostOrwell, on 29 November 2012 - 12:49 PM, said:

snip
I misnamed the mod I was referring to; I meant ChickenBones wireless redstone. It has a satelite dish design for emitters; it's not important.
Also, about different icons for different sensor cards:
What about having a small icon, which would be more than a color, for:
-being the card item graphic;
-showing up in the sensors block when used there;
-showing up on the side of the turtle when used by the turtle;

#30 Cython

  • New Members
  • 1 posts

Posted 30 November 2012 - 03:43 PM

Impressive work, I really appreciate it!
Just a question, are you also going to implement BuildCraft liquid tanks (and waterproof pipes?) as sensor targets? Getting their capacity, contained LiquidStack amount and type would be nice for writing oil monitoring programs and such.
If you were going to implement it anyway, just forget my question. :rolleyes:

#31 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,452 posts

Posted 30 November 2012 - 07:15 PM

View PostMikeemoo, on 29 November 2012 - 10:45 PM, said:

Looks like we have a sample lua program in the pull request log too :)

Yep, I added the sensorview lua program! I'd just like to mention that there is a version of it that works out-of-the-box with the 0.01 version (current released version, at time of writing) of OCS, while the latest version of it in the github repo has an updated API call in it, so that it would not work with the 0.01 version.

#32 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 30 November 2012 - 08:18 PM

View PostCython, on 30 November 2012 - 03:43 PM, said:

Impressive work, I really appreciate it!
Just a question, are you also going to implement BuildCraft liquid tanks (and waterproof pipes?) as sensor targets? Getting their capacity, contained LiquidStack amount and type would be nice for writing oil monitoring programs and such.
If you were going to implement it anyway, just forget my question. :rolleyes:

Hi,

Yep, I'll look into doing that this weekend. There's a lot of mods that I rarely touch (although I play tekkit & ftb, I spend 99% of my time messing with computer craft), so I might need guidance for a few things to make sure I cover everything needed.

Industrial craft crops, for example! Although I've watched a few videos of them I've never bothered trying them out myself...

But yes - buildcraft tanks n'that this weekend. :)

View PostLyqyd, on 30 November 2012 - 07:15 PM, said:

View PostMikeemoo, on 29 November 2012 - 10:45 PM, said:

Looks like we have a sample lua program in the pull request log too :)

Yep, I added the sensorview lua program! I'd just like to mention that there is a version of it that works out-of-the-box with the 0.01 version (current released version, at time of writing) of OCS, while the latest version of it in the github repo has an updated API call in it, so that it would not work with the 0.01 version.

Yup, sorry - I'm to blame for that one. getTargetDetails() sounds better >.<

#33 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 30 November 2012 - 08:22 PM

Big update yesterday:

1) All sensor cards now share a single item ID.
2) If someone doesn't have a mod installed it should now not cause any issues when playing, it just won't load those sensor cards. Developers can also build if they don't have the relevant APIs installed, and although it'll throw errors/warnings, it'll still be playable/testable.

This was all merged into the master last night along with the start of some rendering code from Orwell.

#34 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,452 posts

Posted 30 November 2012 - 08:29 PM

View PostMikeemoo, on 30 November 2012 - 08:18 PM, said:

Yup, sorry - I'm to blame for that one. getTargetDetails() sounds better >.<

Oh, no worries at all! It certainly does make a better function call name! Thanks for updating sensorview to reflect that name change, by the way. If you or any of the other Java devs need any changes made in it, feel free to shoot me a note if you don't feel like picking through the lua yourself. :)

#35 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 30 November 2012 - 09:57 PM

I think I'll be adding a liquids sensor card, instead of having it as part of the buildcraft sensor card.

#36 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 01 December 2012 - 03:20 PM

I felt inclined to post an in-dev picture of the sensors. :) Each have a different card inserted. Clockwise from top: IC2, proximity, inventory and BC2 sensor card. (And yes, the dishes are spinning! :P)
Spoiler


#37 CoolisTheName007

  • Members
  • 304 posts

Posted 01 December 2012 - 04:10 PM

View PostOrwell, on 01 December 2012 - 03:20 PM, said:

snip
Completely non-constructive comment: UAU!!!!

#38 Perkins

  • New Members
  • 19 posts

Posted 02 December 2012 - 08:29 AM

So, it all looks really neat. And I can figure out the recipes for the sensor cards, by looking through the source. But I'm not finding the recipe for the sensor itself... Can someone tell me what I'm missing?

#39 Mikeemoo

  • Members
  • 732 posts
  • LocationLondon, UK

Posted 02 December 2012 - 10:02 AM

It may not have one yet! The recipes are also just placeholders until we decide how cheap/expensive to make them :)

#40 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 02 December 2012 - 10:10 AM

Yes, suggestions about that are always welcome. If you have any other question about the inner workings, fire away! :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users