Commit Graph
47 Commits
Author SHA1 Message Date
Firenoo dbf3cab144 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.
2023-05-10 00:26:45 -07:00
firenooandGitHub GTNH Actions 1c1b9bda29 Update buildscript (#27)
* Update buildscript

* spotlessApply

---------

Co-authored-by: GitHub GTNH Actions <>
2023-05-06 08:40:23 +02:00
Firenoo cc182efd2c Change rename to commit on KEY_ENTER press 2023-04-25 11:56:02 -07:00
Firenoo fc3ebd9e7f Add additional checks for P2P selection
Attempts to fix ElementNotFound exception, which SHOULDN'T EVER HAPPEN.

Perhaps a new instance of PartP2PTunnel was created somehow.
2023-04-04 07:50:36 -07:00
Firenoo 4789b5938b Fix client accessing the server world when it shouldn't
Instead, the server now sends a packet with that information

In addition, fix P2P outlines being displayed when the player isn't in the same dimension
2023-03-28 09:47:31 -07:00
Firenoo 92a8e2b63f New GUI
- Use newly exposed AE2 P2P icons

- Move name up top, display info

- New icon for showing offline/unbound, tooltip for details

Cleanup some constants
2023-03-23 20:07:46 -07:00
Firenoo f3a35c4540 Move tessellator use to its own helper file
Because drawing a textured quad requires thinking and thinking is hard
2023-03-21 19:32:26 -07:00
Firenoo 0c61ee40aa Add a texture for the resize button.
Add CN localization for tooltip
2023-03-21 19:32:25 -07:00
Firenoo 887e8b2593 Adv. Mem Card: Add a "button" to resize the GUI.
Click on the black box to cycle through GUI scales.
Will need to add a texture in the future.

Also fixed some janky scrollbar behavior.
2023-03-21 19:32:24 -07:00
Firenoo 0809143b8e Adv. Memory Card: Add resizable GUI capability.
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.
2023-03-21 19:32:24 -07:00
Firenoo d35708c08b Add sorting tag usage info tooltip 2023-03-18 17:30:40 -07:00
Firenoo be08ab0047 Add ranked sorting for search results in Adv Mem Card
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.
2023-02-28 20:11:22 -08:00
Firenoo ae0d50a7b1 Add filter options to Advanced memory card search
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'.
2023-02-28 19:36:18 -08:00
Firenoo 72f7694367 Fix P2P interfaces not retaining settings + voiding inv. when rebinding w/ Adv. Mem card
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.
2023-02-27 12:07:12 -08:00
Firenoo 72a58213c2 Rework the Advanced Memory Card's internal mechanisms.
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.
2023-02-25 09:54:23 -08:00
Firenoo 9dad0d79e4 Fix disappearing bind button when renaming search
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.
2023-02-19 18:46:37 -08:00
Firenoo 38c36c2831 GuiAdvancedMemoryCard.kt: Fix sorting
For whatever reason chaining function calls breaks it the sorting...
2023-02-11 14:29:25 -08:00
Firenoo becb5f4b91 GuiAdvancedMemoryCard.kt: Filter out duplicates.
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.
2023-02-11 10:19:39 -08:00
Firenoo af5eecd613 ClientRefreshInfoHandler.kt: Respect search after refresh
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.
2023-02-09 00:09:24 -08:00
Firenoo b761737cdc IGuiTextField.java: Defer to super method for setting focus.
This allows users to enable repeated keyboard polling (so you can hold backspace)
when renaming P2P connections.
2023-02-08 11:31:58 -08:00
Jason Mitchell a59e54c09a [ci skip] spotlessApply with the new settings 2023-01-28 20:06:14 -08:00
GlodBlock de992b64ad name 2023-01-24 09:32:39 +08:00
GlodBlock 83d25de3a2 text shift 2023-01-21 19:55:00 +08:00
GlodBlock c6ba3ff033 display me p2p used channels 2023-01-21 19:32:10 +08:00
asdflj 96d89a2d2a keep search text 2022-09-13 11:13:41 +08:00
zy 39a9a4a66b fix NPE issues 2022-09-12 20:28:52 +08:00
zy b9aa3a15bc Update some features
1.click record to rename P2P Tunnel (Help player to build large ae network)
2.shift click record. Well be transport player to P2P Tunnel position (OP only)
2022-09-11 22:09:58 +08:00
GlodBlock 3621407fa8 gui improvement 2022-09-09 08:35:09 +08:00
asdflj dc0b3c9bfd Update GuiAdvancedMemoryCard.kt 2022-09-07 09:11:34 +08:00
asdflj 5e9690fb83 Optimize search method 2022-09-06 11:38:08 +08:00
GlodBlock 649c8b3daf fix noSuchMethod crash with latest ae2 2022-05-29 16:45:50 +08:00
GlodBlock b9b399c9a3 fix p2p dupe with security terminal 2022-05-22 10:30:26 +08:00
GlodBlock 165622512c sync custom name when binding 2022-03-15 13:36:40 +08:00
GlodBlock 90fcf8cd5c add search bar and custom name display 2022-03-14 17:40:45 +08:00
Yang Xizhi 9291407039 correctly null the list when it's invalid 2022-03-04 22:55:33 +08:00
Yang Xizhi 6dc083e897 fix npe from incorrectly loaded p2p 2022-03-04 21:15:30 +08:00
bombcar d8302fb282 errors 2022-02-11 22:27:45 -06:00
bombcar 30a54f139f clientsidded 2022-02-11 22:06:27 -06:00
bombcar bef04851aa fix version 2022-02-11 16:36:03 -06:00
bombcar 8e71631108 other minor fixes 2022-02-04 16:59:25 -06:00
bombcar 1ce9919fdc update buildscript to use tags 2022-02-04 16:58:46 -06:00
bombcar c15ab5ad2c migrate to buildscript 2022-02-03 14:52:50 -06:00
GlodBlock 1d37f1b0fd side data on gui 2022-01-30 19:09:01 +08:00
GlodBlock 40f28610ca fix forgedirection dismatch 2022-01-30 18:50:14 +08:00
GlodBlock 6cb24abad6 hex string for frequency 2022-01-30 16:45:34 +08:00
GlodBlock 7cd8c809ff fix null recipe 2022-01-30 15:16:06 +08:00
GlodBlock c6fb85c7f4 init 2022-01-30 14:36:19 +08:00