* Move mode change button to the side.
- Mode change now on the side w/ resize button
- Some code cleanup
- New description (en only for now), texture.
* Update ae2 to beta-204
* Add OC/Pneumaticraft support
* Create a proxy for client/server
Mostly for convenience of getting icons and other GUI elements.
* Large refactor to make way for "refresh" functionality
Features:
- New "refresh" capability (no button available yet) so the
client can have an updated GUI.
- The player can now control which types to be queried/displayed.
A great number of changes were made to allow this to happen to the mod
internally, as started from the last commit.
- P2PCache has been revisited. Instead of being a one-time instantiation,
the cache can now be queried from the client many times.
- Network has changed. Instead of sending an ItemStack (as previously), we
keep that info locally and send a byte only instead, so that should save
some network traffic.
- New packet for sending the refresh signal has been made. Other packets
send a "type" discriminator to make way for the typing feature.
Because I was lazy and didn't separate the commits, here are some other
changes made:
- Cleaned up a bit of the code to make it easier to read. This includes
code I've written before...
- Some name refactors. Some of the names were (mine) were quite frankly,
bad.
Signed-off-by: Firenoo <[email protected]>
* More cleanup + texture for type change
Some more code cleanup (spacing and labels)
* Disable ability to use copy outputs when output selected
Because it doesn't work, and has strange behavior, this is being disabled
for now (possibly forever).
* Remove unused method + remove unused imports
* Add unbinding mode
+ tooltip explanation
* Add type to filter options
* Add enUS localization
* Add refresh button, and prevent excessive packet spam.
Packets are sent only once every 250 ms to avoid DDOSing someone.
Accomplishes this by adding a new scheduled executor.
* Add the ability to change P2P types from the GUI
* tooltip was actually lying, now it's lying less
* Fix CME from resizing GUI, and add patterns to drops when changing P2P interface type
CME caused by iterating over the button list. Clicking on resize button forces
the GUI to reset, so the button list changes and causes the CME.
P2P interfaces now drop their items if changing their type from the GUI.
* Make the refresh icon look a little less like MSPaint
Also minor change to tooltip when changing types.
---------
Signed-off-by: Firenoo <[email protected]>
Part 0 of GUI overhaul.
Adds a way to resize the Advanced Memory Card's GUI. 4 modes:
- Small: 4 entries
- Normal: 6 entries
- Large: 10 entries
- Dynamic (default): As many entries as the screen can fit
So far only Dynamic is used with no way to switch to the others.
When searching through the advanced memory card, P2P entries are now sorted in
a ranking heuristic that puts the most "relevant" results up top. Entries are
scored based on the number of matching words w/ the search, followed by the
entry name's length (longer names go below shorter names).
Hopefully this addresses the problem of not getting what you searched for.
New way to filter P2P tunnels through the search bar via "tags". A tag
starts with '@' and filters based off some set of criteria. Tags are
space separated. You can still search based on the name, but the name
search is based off of string tokens rather than a complete match. If
for whatever reason a tunnel is named '@...', you can wrap the query
in double quotes '"' to force it to search as a name.
Tags added: '@in', '@out', '@b', '@u'.
Define some behavior for previously undefined behavior when
binding P2P interfaces with the Advanced memory card.
- Retain all upgrades, items in storage, and settings
- Input -> Input: Retain all patterns.
- Input -> Output: Drop all patterns in the world.
Changes how the advanced memory card internally stores P2P Tunnel information:
- Now uses its own custom class. No more sortedInfos/infos discrepency; you
can now access the sorted and filtered fields only. The master map cannot
be accessed directly.
- P2PInfo now uses a hash, which removes AE2 P2P tunnel dupes. It depends
on the coordinates, facing, and dimension information.
- Corresponding equals() function implemented for P2PInfo.
- Send the entire P2P list when binding. A new packet type is likely in order, though.
- The rest of the changes is to fit this new data structure into the existing
infrastructure.
Hopefully this makes the mod more resilient to crashes.
GuiAdvancedMemoryCard: When the rename field is used, it filters out
every P2P tunnel that does not match the name, including the currently
selected P2P tunnel, from an internal list. This internal list is used
to determine whether the bind button should be shown, and if there is
no selected P2P tunnel, they are not shown. Since we removed the P2P
tunnel from the internal list, they are not shown. :(
Fix by using the master list instead of the filtered list.
Remove dupe P2P tunnel entries caused by P2P tunnels adding itself to
the list of P2P machine set twice if on the same network.
Some small optimizations too.
Currently, after receiving a refresh response from the server, the GUI for the advanced memory card resets and does not respect the current search term.
Commit fixes it.