Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add theoneprobe provider for panels [wip] #29

Merged
merged 16 commits into from
Mar 28, 2021
Merged

Conversation

lublak
Copy link
Contributor

@lublak lublak commented Mar 24, 2021

also fixes: #32

@dannydjdk dannydjdk marked this pull request as ready for review March 25, 2021 00:33
@dannydjdk
Copy link
Owner

Oops! I didn't mean to mark it ready to review.

@dannydjdk dannydjdk marked this pull request as draft March 25, 2021 00:34
@dannydjdk
Copy link
Owner

Looks great so far!

I think I'm going to work on something like the vanilla BlockPos class for cell positions. There are many instances in my code where I'm doing things like this:
int row = Math.round((float) (x * 8f) - 0.5f);
int cell = Math.round((float) (z * 8f) - 0.5f);
int cellIndex = (row * 8) + cell;
Probably doesn't need to change the direction you're going right now, but something to possibly consider for the future.

@lublak
Copy link
Contributor Author

lublak commented Mar 25, 2021

I also had the idea for a PanelCellPos class.
But I didn't feel like adding it yesterday, after all I have to get up early in the morning to go to work.

A few things still need to be done, though. Well actually only add a addProbeInfo method to each component class.
And here and there a little tidy up.
Basically I would design it like TOP standard methods for redstone circuits.

@lublak
Copy link
Contributor Author

lublak commented Mar 25, 2021

it goes ahead
grafik
grafik

@lublak
Copy link
Contributor Author

lublak commented Mar 25, 2021

some notes for me:

grafik

  • fix it!
  • fix left click
  • merge latest commit: 4b73e0e
  • something like: PanelCellHitPos or PosInPanelCell or Naming problem
  • make PosInPanelCell precalculate direction coordinates
  • clean up

@dannydjdk
Copy link
Owner

Hopefully, my last commit doesn't mess with you too much. I tried to avoid changes that would conflict with what you're doing.
My next commit will involve circuit covers which may require a small change regarding One Probe support. Basically, we would be disabling the custom info when a cover is installed.

@lublak
Copy link
Contributor Author

lublak commented Mar 26, 2021

@dannydjdk
It was fine, just a conflict file with 6 errors that I had to correct manually. It's just always confusing.
And yes, when cover is installed, no more info should be displayed. (except of course the standard information)

@dannydjdk
Copy link
Owner

How difficult would it be to put the PanelCellPos code in a separate pull request? One feature I want to look into soon is vertical placement, and that feature will be quite useful. I can try to extract it myself if you want to stay focused on moving forward with TOP.

@lublak
Copy link
Contributor Author

lublak commented Mar 26, 2021

@dannydjdk i can do it tomorow. No problem.
Additional i would add the PosInPanelCell class.
Today I had longer work (because next week I'm on holiday) and also evening studies.
So today I just did the merge.
I just don't know how to do it with the current pull request.
There will probably be conflicts again

@dannydjdk
Copy link
Owner

No rush. I won't have a lot of time weekend.

@lublak
Copy link
Contributor Author

lublak commented Mar 27, 2021

@dannydjdk I think I can even have everything ready tomorrow. Then you can merge the complete pull request if you like.
Is just a "is from the top" fix and a bit of clean up.

@lublak
Copy link
Contributor Author

lublak commented Mar 27, 2021

@dannydjdk is there anything else you'd like to have in there?

@dannydjdk
Copy link
Owner

How well does it perform? Have you noticed any lag when quickly scanning over a lot of components? If so, it might be a good idea to only show the component details if you have a wrench or component in your hand. That's how Chisels & Bits works. If there's no performance issues, then I think it would be nicer if it just showed all the time.

@lublak
Copy link
Contributor Author

lublak commented Mar 27, 2021

@dannydjdk
I don't notice any drop in performance myself, but I also have a relatively powerful PC.
I can add a config option, then everyone can decide for themselves. But generally I would realise it via tags in addition to config:
tinyredstone:items/measuring_device

Config options could be:
Normal (as it currently works)
Extended (only if you press shift)
Device (only if you hold an item in the measuring_device tag)

@dannydjdk
Copy link
Owner

If you think it's something you could do fairly quickly, you could use this request. Otherwise, a second request could be nice. I'll leave it up to you.

@lublak
Copy link
Contributor Author

lublak commented Mar 27, 2021

Is actually already almost done xD.
Has only a mistake crept in.
Thought it was more complicated.
My last commit includes it.
Means: Just clean up and test a bit.

@lublak lublak marked this pull request as ready for review March 28, 2021 01:02
@lublak
Copy link
Contributor Author

lublak commented Mar 28, 2021

I think the code can be tweaked here and there, but for now it should be okay.
I have also fixed the bug with raytracing.

@dannydjdk dannydjdk merged commit acfbacc into dannydjdk:master Mar 28, 2021
@dannydjdk
Copy link
Owner

Very nice!
How do you use debug mode? That information could be really useful!

@lublak
Copy link
Contributor Author

lublak commented Mar 28, 2021

you can use the creative probe.

@dannydjdk
Copy link
Owner

I swear I tried the creative probe and it didn't work, but it works now. 🤓

@lublak
Copy link
Contributor Author

lublak commented Mar 31, 2021

What can be is that you have disabled the trial support in the settings. Currently it does not show any debug information. But would perhaps make sense that I change that in debug mode the data are displayed. Possibly also that the cover is ignored. But I prefer to wait xD. Let's see what you still change everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug] panel interactive from behind
2 participants