APercy / automobiles_pck

automobiles mod for minetest
MIT License
14 stars 8 forks source link

Painter redesign #10

Closed MrRar closed 2 years ago

MrRar commented 2 years ago

This PR redisgns the automobile painter to have a better UI and update the automobile color directly. Punch an automobile and and the painter formspec comes up initialized with the automobile's color. Move the sliders or manually enter a hex code. Press set color and the automobile's color is updated. Only the owner can paint an automobile.

painter
APercy commented 2 years ago

The problem is that will do not work with the airplanes, as it turned specific for the cars. And I want to keep painting my planes with more interesting colors :)

MrRar commented 2 years ago

@APercy I will try adding _on_paint hooks to everything later.

MrRar commented 2 years ago

@APercy I changed the painter so it can work with any entity that has a _change_color hook. I made PRs to add this hook to a bunch of your airplanes. Hopefully I got all of them.

APercy commented 2 years ago

perfect! I added the same code to the trike and it worked like a charm

MrRar commented 2 years ago

Oops! I guess I forgot to make a PR for the trike. I even forked and modified it.

APercy commented 2 years ago

relax, I did it myself yesterday :)