MightyPirates / OpenComputers

Home of the OpenComputers mod for Minecraft.
https://oc.cil.li
Other
1.6k stars 434 forks source link

suggestion: Atmospheric sensor card #770

Closed morlanius closed 9 years ago

morlanius commented 9 years ago

An optional include of GalacticCraft that allows a drone, robot or computer (which would be pointless) to detect GC atmospheric settings; temp and oxygen.

I have been experimenting with drones with GC and Lanteacraft installed. This has been great fun, I have created a dialing computer (i didn't like the ones available) and creating a "iris" with RIM. I'm planning on creating a tablet to remotely lower the iris if I'm returning from off world. This is where the drones have come in to play. The work surprisingly well when you send them through a gate but you loose radio contact with it (note A) so you have to write the firmware to automate itself when it looses contact. It will try and veer back to relative cords when it goes through so you have to immediately make a move call so it doesn't race off into nowhere or try to get back to relative cords before the teleport.

I would like to be able to send a drone through that can sense the settings of a planet and send its signal back. Hence this proposition, also using linked cards has been tricky and obviously wireless looses signal right away, would it be possible for OC to treat any stargate block as a repeater to its connected block?

I have also suggested it to the lanteacraft people in case it can only be done on their end. It would make this much cooler and being able to use wireless through stargates and even normal portals would be amazing. Robots do not work with portals of course, can this change?

Ok, enough ranting. ~Morlanius

Vexatos commented 9 years ago

I have taken a quick look into the GC API and I am not sure whether it is possible to retrieve the atmospheric data easily as it is set in the localization file, there is nothing in the code to actually tell you as far as I have seen. Maybe I just overlooked something.

morlanius commented 9 years ago

its likely a world property

fnuecke commented 9 years ago

Added, making available some world properties that seemed reasonable: gravity, "wind level" (whatever that indicates), atmosphere composition and whether it's breathable, via getGavity, getWindLevel, isGasPresent and hasBreathableAtmosphere, respectively.

It's cool to hear dimensional travel works for drones, I honestly wouldn't have expected that to work (didn't try) :-P I also added a bit of code to reset the drone's target location to its current position after traveling to a different dimension, to avoid it zooming off to wherever.

morlanius commented 9 years ago

That is brilliant, thank you.

fnuecke commented 9 years ago

I assumed they'd have to stop in the portal anyway (like players when going to the nether). If this is not the case, I can change that, yeah.

morlanius commented 9 years ago

I just told mine to fly forwards a few blocks in front of the stargate, it just went right through, you can jump through them as a player so you dont need to wait from what I have seen. I'll try this out and get back to you. Thanks.