TeamPneumatic / pnc-repressurized

A port of PneumaticCraft to MC1.12+
Other
121 stars 49 forks source link

Feature Request: Drones protection from IE cable damage #309

Closed duncanwebb closed 5 years ago

duncanwebb commented 5 years ago

I'm playing a mod pack with pollutions of the realm in and would like to be able to break grass and flowers that the pollution makes.

I reckon that the simplest would to use a dig area or harvest puzzle pieces with filters attached.

Thanks, it's real fun playing this mod.

desht commented 5 years ago

Hi, glad you're enjoying it.

What you want can be done already using a Dig piece and the right item filters. I created a tiny program to test this which you can import from here (use the Pastebin button on the left of the programmer GUI): https://pastebin.com/EiL9pjYh

Notes:

Anyhow, let me know if that does what you need.

duncanwebb commented 5 years ago

Hi, that works just great. Many thanks.

I wonder what I was doing wrong, as I tried the dig piece and then became a little more complicated as shown. I reckon that I'd messed up the areas. I don't yet fully understand the flow control, it there a detailed description how this works?

image

desht commented 5 years ago

Not sure which version of PNC you have, and if Patchouli is in the pack, but if you install the latest version (0.9.3) and add Patchouli, you'll get a detailed guidebook including a section on programming which includes an entry detailing how flow control works. If it's not feasible to do that, you can always take a look at the JSON source for the entry at https://github.com/TeamPneumatic/pnc-repressurized/blob/master/src/main/resources/assets/pneumaticcraft/patchouli_books/book/en_us/entries/programming/flow_control.json

The program you have there looks OK although I can't tell for 100% certain without it loaded into a local programmer.

duncanwebb commented 5 years ago

I playing https://minecraft.curseforge.com/projects/real-tech and has version 1.12.2-0.9.3-324. Doen't have patchouli but I will add it. I did some more testing with your program, adding picking up putting into a chest, putting the drone in sleep mode and bonemealing some more grass it worked great as I expect.

It might be the selection of grass, in this case I used ore dictionary but has used other types, a lot of test cases so I can't remember which was used. https://pastebin.com/Q0p0wkQd.

I hope the drones don't despawn as they some fly into immersive engineering HV cable and die.

desht commented 5 years ago

Hmm, HV cables would be a danger, and the drones will despawn like any other item after 5 minutes. I could raise that, though - losing a fully-programmed drone would not be much fun.

Does the HV zap instakill them or just hurt them? If the latter, I'd recommend sticking some Item Life upgrades (up to 10) in your drone - then they'll repair any damage they take.

duncanwebb commented 5 years ago

Not 100% sure but I think they don't die instantly. six hearts of damage per hit and I'm usually not fast enough to realize what happened, and blitz myself :-).

I'll add the life upgrades and see what happens. Many thanks for the tip.

As you join my channel, a big welcome, next episode is about logistic drones and you see one get zapped at the beginning.

desht commented 5 years ago

I'll have a look and see if it's possible to make drones avoid IE cables. Not sure how easy/difficult that'll be since I don't know how IE implements them. Time for a bit of source code browsing :)

Or it might be easier just to make drones invulnerable to IE wire damage...

duncanwebb commented 5 years ago

It might be the selection of grass, in this case I used ore dictionary but has used other types, a lot of test cases so I can't remember which was used. https://pastebin.com/Q0p0wkQd.

I hadn't fully understood what you meant by match by block and metadata unticked until now now it's clear.

duncanwebb commented 5 years ago

Flying around wires that sag more that a block would indeed be tricky. Invulnerability would would be nice as I guess that they are intended to take an route that avoids obstacles.

Of course I could run the HV cables underground to the compressor.

desht commented 5 years ago

I have a plan for IE cable protection: adding a Security Upgrade to a Drone will prevent electrical damage from cables, but will cost some air, proportional to the damage. For LV, that cost will be trivial, but for HV protection it will be quite significant (in current testing, it will take a drone from 10 bar to 1 bar in under 20 seconds if it doesn't move away from a HV cable).

Similarly, a Security Upgrade in the Pneumatic Chestplate will protect players from electrical damage, at the same air cost.

I'm thinking there should still be some knockback, though.

duncanwebb commented 5 years ago

These ideas sound great, a knockback would good, it should push the drone away so it can take another path.

In the chestplate sounds just great, I cannot say how many times HV wires have killed me, with leggings speed it is really easy to catch a wire, get knocked back and walk straight back into the wire, it all happens very fast.

desht commented 5 years ago

Added in 0.10.4 release.