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

Microwave Overhaul, or: death to user << browse #7180

Merged
merged 22 commits into from Nov 15, 2019

Conversation

@JohnWildkins
Copy link
Contributor

JohnWildkins commented Oct 16, 2019

The microwave code is old enough to be starting fifth grade this year. Many UI frameworks have come and gone since its construction, and procs such as proc/wzhzhzh confound many a coder to this day. As I dream of a 21st century kitchen, I think of a better tomorrow, of UIs made after the development of any form of web standard.

With that, I bring you the Microwave Overhaul. What's done so far (to be updated):

  • Anything to do with the HTML-based UI has been completely gutted. In its place, a Vue UI that hopefully looks the part and functions to exact feature parity with the old UI.
  • Eject() verb, the cause of more than one issue, has been removed in place of a new Abort function.
  • Abort() and Stop() have been merged as their usage was essentially identical.
  • Individual non-reagent ingredients can now be ejected at-will.
  • Reagents can now be ejected into a held container.
  • Microwave cook time is now displayed as a progress bar on the UI.
  • Reagent containers now proc UI updates when pouring onto an object with active UIs (code reviewers, please, if you can find a better way to accomplish what I'm doing here, please do. I hate to do this)
  • proc/wzhzhzh now has an actual name befitting its purpose. A memorial comment was placed in remembrance.

What still needs to be done:

  • Microwave upgrade parts (per #7174) should have a benefit (cook time, power usage, etc.).
  • More rigorous bug testing, especially of edge cases w/ the UI, emptying into beakers, etc.
  • Look into better methods for both catching reagent adding and emptying reagents into beakers
  • UX tweaks to the microwave interface per feedback
  • Tearing apart the main cook() loop in-depth and making it make any kind of actual sense.
  • Murdering useless procs, replacing them with slightly less useless ones.
  • Refactor cook() again so it's actually sensible - fixes #6728.

Previews:

@JohnWildkins

This comment has been minimized.

Copy link
Contributor Author

JohnWildkins commented Oct 16, 2019

!wip

@BotBOREALIS BotBOREALIS added the WIP label Oct 16, 2019
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
Copy link
Contributor

Karolis2011 left a comment

Great job at UI so far. Has many issues that should be addressed some time, but It's a good start. I did review UI related code only. I am surprised this was done without poking me.

code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/modules/reagents/reagent_containers.dm Outdated Show resolved Hide resolved
vueui/src/components/view/cooking/microwave.vue Outdated Show resolved Hide resolved
vueui/src/components/view/cooking/microwave.vue Outdated Show resolved Hide resolved
vueui/src/components/view/cooking/microwave.vue Outdated Show resolved Hide resolved
Copy link
Contributor

Karolis2011 left a comment

push-state is still there :'(

code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Show resolved Hide resolved
vueui/src/components/view/cooking/microwave.vue Outdated Show resolved Hide resolved
code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
@Karolis2011

This comment has been minimized.

Copy link
Contributor

Karolis2011 commented Oct 18, 2019

Please also note, world.time and wtime is in deciseconds. Aka 20 in wtime is 2s.

Also Client side $root.$data.wtime is tracked on client side, and it means that progress bar will progress smootly.

@JohnWildkins

This comment has been minimized.

Copy link
Contributor Author

JohnWildkins commented Oct 18, 2019

Alright. Barring any other issues I cause myself, I think that's it for me adding to the UI side of things. Now I'll just be waiting for #7174 so I can rebase and add the upgrade parts, and I think that's it feature-wise. Going to give it another look-over tonight when I wake up, though.

@JohnWildkins JohnWildkins requested a review from Karolis2011 Oct 18, 2019
@JohnWildkins JohnWildkins force-pushed the JohnWildkins:microwave-ui branch from 23df32d to 06b1fd8 Oct 21, 2019
@JohnWildkins

This comment has been minimized.

Copy link
Contributor Author

JohnWildkins commented Oct 21, 2019

Rebase successful with minor spaghetti. Now just to make part upgrades actually matter, find a way to properly black-hole upgrade parts and still give them back on deconstruction, and we should be more or less golden.

@JohnWildkins

This comment has been minimized.

Copy link
Contributor Author

JohnWildkins commented Oct 21, 2019

okay well either I've murdered travis with the worst code on earth or it's just broken but I think this is ready to ship more or less

@JohnWildkins

This comment has been minimized.

Copy link
Contributor Author

JohnWildkins commented Oct 21, 2019

!review

@BotBOREALIS BotBOREALIS added Review Required and removed WIP labels Oct 21, 2019
@JohnWildkins JohnWildkins requested a review from Karolis2011 Oct 21, 2019
Copy link
Contributor

MarinaGryphon left a comment

RIP wzhzhzh(), you will be missed.

@alsoandanswer alsoandanswer requested review from Arrow768 and skull132 Oct 24, 2019
@alsoandanswer

This comment has been minimized.

Copy link
Contributor

alsoandanswer commented Oct 25, 2019

!review

code/game/machinery/kitchen/microwave.dm Outdated Show resolved Hide resolved
@Karolis2011

This comment has been minimized.

Copy link
Contributor

Karolis2011 commented on vueui/src/components/vui/progress.vue in b34183a Nov 3, 2019

Might better just do max(this.min, min(this.max, this.value)) instead of this.value this would actually be better because it make it cap from bottom and from top. And might be faster than its.

@JohnWildkins

This comment has been minimized.

Copy link
Contributor Author

JohnWildkins commented Nov 3, 2019

Might better just do max(this.min, min(this.max, this.value)) instead of this.value this would actually be better because it make it cap from bottom and from top. And might be faster than its.

Yeah, that looks better. Let me know if that looks good or if there's anything else.

@Arrow768 Arrow768 merged commit 129cf25 into Aurorastation:master Nov 15, 2019
4 checks passed
4 checks passed
Diffs - Pull Request #7180 No Modified Icons
Details
Map Diff Renders - Pull Request #7180 No Modified Maps
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
countinous-integration/Aurora Checks passed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.