-
Notifications
You must be signed in to change notification settings - Fork 35
Floodlights, technical additions, and bugfixes #359
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
base: main
Are you sure you want to change the base?
Floodlights, technical additions, and bugfixes #359
Conversation
…h when placing motorized floodlight, add English translations for floodlight names, implement temporary item textures (slightly modified versions of existing texture in model folder), adjust animations (remove sharp jump back to 0 in X)
…h when placing motorized floodlight, add English translations for floodlight names, implement temporary item textures (slightly modified versions of existing texture in model folder), adjust animations (remove sharp jump back to 0 in X)
| super.addInformation(itemStack, entityPlayer, list, par4) | ||
| list.add(tr("Technology: %1$", type)) | ||
| list.add(tr("Range: %1$ blocks", (nominalLight * 15).toInt())) | ||
| // TODO: Convert all lamp ranges (instead of brightnesses) to be dependent upon bulb type (future lighting code overhaul) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should make an issue for this one
| } | ||
|
|
||
| /** | ||
| * DO NOT TOUCH THIS FUNCTION!!!!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol
|
I didn't finish. Not sure why you needed to make the hybrid transparent node but I suspect rotating the connection hitbox is hard without it. |
|
Yeah, without some sort of concrete reference direction I really had no idea how to keep the block connections lined up properly. The existing Direction and LRDU code didn’t really allow for what I was looking for, and I didn’t want to break everything that depended on those, so I just rewrote them specifically for the floodlights. Maybe one day someone can go through and update the rest of the codebase to use the new hybrid node stuff. |
Adds floodlights, halogen bulbs, and horizontal GUI trackbars; implements a custom block rotation system; and fixes some minor bugs.
Additions:
BasicandMotorizedfloodlights to the game.Basicfloodlights use trackbars in the GUI to control light beam projection, whileMotorizedfloodlights use signal inputs around the base.Technical Features:
HybridNodeDirectionandHybridNodeLRDUclasses to support multi-directional rotation and connectivity ofTransparentNodeblocks. These classes introduce the concepts of a rotational axis and a facing direction for a block, both defined by how the block is placed by a player. These characteristics, in turn, allow for easily defining different rotations of the block while maintaining the proper arrangement ofSixNodeelectrical connections.GuiHorizontalTrackBarclass. This allows for the use of horizontal trackbars in GUIs with the same set of features as vertical trackbars.Bugfixes:
transparentNodedescriptorrenamed totransparentNodeDescriptorin all places it appears.LinkedHashMapinstead ofHashMapto list channels in WAILA. This fixes the channels always being listed out of order.LampSocketType. This primarily prevents floodlight bulbs from being used in regular lamp sockets, and vice-versa.Notes: