Advanced Peripherals

Advanced Peripherals

29M Downloads

[Issue] Digital miner start() not functioning before player input

DJ-Yellowie opened this issue ยท 3 comments

commented

Describe

When you place down a Digital Miner and don't interact with it, so either a preconfigured miner or use a config card with data on it so the miner has something to mine. Then use a peripheral proxy on the bottom middle facing into the miner (as is described on the AP wiki.) Using either a script or the interactive Lua prompt trying to call start() or reset() then start() (doesnt every throw an error) doesn't begin the miner mining. Initially I tried just using start() and it wouldn't start the miner, so then I thought id try reset(), wait a bit then start() and still nothing. As soon as I click the start button in the miner UI then stop the miner, either stop it with the miner UI button or through a computer, I can then call start() and it starts it properly and the miner begins mining. If I then click reset with the miner running or not running, calling start() doesn't actually start the miner. It seems to be that the individual miner's config doesn't get loaded when calling start() and on loads when clicking by hand. Clicking reset or calling reset() seems to unload it. This could very well be attributed to mechanism and not AP given that the miner doesn't seem to load the config when placing it down, as I would expect it to, but nonetheless thought maybe there is a way you could initialize the miner's config on the back end when calling start. Similar to how the click the button works. Also after calling start() from Lua, the miner switches to saying running, but the 'To Mine:' stays 0 hence why I think the miner config isn't getting initialized. Also also, if i call start() then click the stop button in the miner UI then click the start button in the miner UI it gives exact same results as just calling start() initially. I have to reset the miner then click start to get it to start mining. (now yes a very obscure thing but I'm trying to make a machine that places miners down for me and what not so getting them to start with no prior player interaction is kind of key)

Reproduce

Steps to reproduce the behavior:

  1. Place down a digital miner, already configured or use a configured config card.
  2. Place a peripheral proxy in the appropriate place to interact with the miner.
  3. Attach computer and run 'lua' in the command prompt.
  4. In Lua create a wrap the peripheral proxy into a variable ('minerProxy' for example).
  5. call minerProxy.start() or minerProxy.reset() then minerProxy.start()

...

Screenshots/Videos
The miner and computer setup:
setup

Miner UI after calling reset() or clicking reset in the UI (both do the same):
UI after reset

Miner UI after calling start():
calling start

Miner UI after clicking start in the UI with the same miner configuration:
clicking start

Versions:

  • Forge version: 36.1.23
  • AdvancedPeripherals version: 0.6.7b

Crashlog/log (Use https://paste.gg or https://pastebin.com to upload your crashlog/log)
No crash log

commented

Moved to 0.7.2r

commented

Currently, this issue can't be fixed.
We could send a gui update package from mekanism to start the miner. But this would not work on a server because this is a client package.

commented

There is already a pull request(#95 ), but I will see, what I can do.