Wuzzy2 / MineClone2-Bugs

Bug tracker archive for MineClone 2 (no new posts allowed)
MIT License
7 stars 0 forks source link

Comparator implementation #381

Closed ex-bart closed 6 years ago

ex-bart commented 6 years ago

This is adapted from mesecons_delayer, with influence by mcl_hoppers. Comparator textures were taken from the Pixel Perfection V3.6 texture pack, side texture was adapted from mesecons_delayer.

This works:

This is TODO:


I'm not quite sure how to get the patch to you. Here is one generated with git format-patch -k: comparator.txt

See also: #353.

Wuzzy2 commented 6 years ago

Great! This is the kind of contribution I highly appreciate, even if it is still very incomplete. Good coding style, sane and simple implementation, use of existing APIs, no nonsene. Right to the point.

Sending me patches like this is fine. Just make sure to upload it anywhere where I can access it.

Complaints:

I have fixed the first 3 complains and included your mod as mcl_comparators almost verbatim into MCL2! Thank you! I want to personally handle the final complaint, too, after this item has become really useful. Because of the lack of power levels in MCL2, the use of this item is rather limited, so I marked it as “WIP” in-game.

Closing because your mod has been included.

Wuzzy2 commented 6 years ago

About “querying” the redstone output of other nodes: A first idea I have is to implement this in a way which is generic and extensible with no explicit handling code for specific node in mcl_comparators itself. Maybe with a _on_compare node callback. That way, the comparator mod does not have to “know” every node it support. mcl_dispensers is an example of what not to do (has currently WAY too many explicit checks, I plan to refactor this as soon I start working on redstone stuff seriously).

Note I do not want to bother too much about comparators for now, as MCL2 does not even get the redstone basics right (yet).