Commit Graph
98 Commits
Author SHA1 Message Date
chill ba1a67afd0 semicolon not needed 2023-05-16 17:28:46 +02:00
chill 04a83644d8 enum constructors are private by design
See https://stackoverflow.com/questions/36286178/java-enum-constructors-private
2023-05-16 17:28:46 +02:00
chill 56c4082246 nested enums are implicitly static
See https://stackoverflow.com/questions/663834/in-java-are-enum-types-inside-a-class-static
2023-05-16 17:28:46 +02:00
chill 99fd22f95e simplify bit shift 2023-05-16 17:28:46 +02:00
chill 394edec04a address gradle warning about insecure connection 2023-05-16 17:28:46 +02:00
chill 1ddde450fb update buildscript 2023-05-16 17:28:46 +02:00
firenoo f5a23d1a3b Completely overhaul the Advanced Memory Card (#29)
* 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]>
1.1.13
2023-05-15 17:29:14 +02:00
firenooandGitHub GTNH Actions 1c1b9bda29 Update buildscript (#27)
* Update buildscript

* spotlessApply

---------

Co-authored-by: GitHub GTNH Actions <>
1.1.10
2023-05-06 08:40:23 +02:00
Martin Robertz a96e4428bc Merge pull request #26 from GTNewHorizons/key_fix
Change rename to commit on KEY_ENTER press
1.1.9
2023-04-26 21:32:43 +02:00
Firenoo cc182efd2c Change rename to commit on KEY_ENTER press 1.1.8-pre 2023-04-25 11:56:02 -07:00
Martin Robertz 486a73b791 Merge pull request #25 from GTNewHorizons/fix_element_not_found
Add additional checks for P2P selection
1.1.6 1.1.7
2023-04-04 18:07:57 +02: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
Martin Robertz 025b1a1dca Merge pull request #24 from GTNewHorizons/fix_client_server_code
Fix client accessing the server world when it shouldn't
1.1.5
2023-04-01 14:26:53 +02: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
1.1.4-pre
2023-03-28 09:47:31 -07:00
Connor-Colenso e0128df957 Merge pull request #23 from firenoo/dev/firenoo/newgui
New GUI
1.1.3
2023-03-24 09:19:57 +00: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 c37e355e1e Update dependencies.gradle
Update AE to latest (beta-179)
2023-03-21 19:32:26 -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
Martin Robertz 6d7bb23b80 Merge pull request #20 from firenoo/dev/firenoo/filter
New Filtering System for Text Search
1.1.0
2023-03-19 10:25:51 +01: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
Martin Robertz 1d04f271b1 Merge pull request #19 from firenoo/master
Fix P2P interface voiding/not saving settings on Adv. Mem. Card rebind
1.0.23
2023-02-28 06:43:12 +01: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 6c0ffb96a4 Update dependencies.gradle
Use AE2 beta-160
2023-02-27 12:07:03 -08:00
Martin Robertz 0da7fef202 Merge pull request #18 from firenoo/dev/firenoo/p2pmap
Rework the Advanced Memory Card's internal mechanisms.
2023-02-27 20:48:56 +01: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.
1.0.21-pre
2023-02-25 09:54:23 -08:00
Yang Xizhi e4bcaaf9fe Merge pull request #17 from firenoo/master
Fix disappearing bind button when renaming search
1.0.19
2023-02-23 12:25:12 +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
Martin Robertz 74422c75f6 Merge pull request #16 from firenoo/master
Remove duplicate P2P Tunnel entries
1.0.18
2023-02-12 08:36:38 +01:00
Firenoo 38c36c2831 GuiAdvancedMemoryCard.kt: Fix sorting
For whatever reason chaining function calls breaks it the sorting...
1.0.17-pre
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
Martin Robertz 994106fd74 Merge pull request #15 from firenoo/master
IGuiTextField.java: Defer to super method for setting focus.
1.0.16
2023-02-08 21:05:24 +01: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
Raven Szewczyk f78ac330f3 [ci skip] upgraded build system 2023-01-31 09:51:17 +00:00
Jason Mitchell 0eb66dbb32 [ci skip] Add missing files 2023-01-29 09:19:22 -08:00
Jason Mitchell 46937ffa70 [ci skip] Add git-blame-ignore-revs for spotlessApply 2023-01-28 20:06:14 -08:00
Jason Mitchell a59e54c09a [ci skip] spotlessApply with the new settings 2023-01-28 20:06:14 -08:00
Jason Mitchell 274f51356c [ci skip] Update buildscript to RetroFuturaGradle 2023-01-28 20:05:31 -08:00
Martin Robertz cf2805c442 Merge pull request #14 from GTNewHorizons/extradata
display me p2p used channels
1.0.15
2023-01-24 10:13:17 +01:00
GlodBlock de992b64ad name 2023-01-24 09:32:39 +08:00
GlodBlock 83d25de3a2 text shift 1.0.14-pre 2023-01-21 19:55:00 +08:00
Martin Robertz 951564be8f Update build.gradle 1.0.13-pre 2023-01-21 12:42:46 +01:00
GlodBlock c6ba3ff033 display me p2p used channels 2023-01-21 19:32:10 +08:00
Martin Robertz 057c4fecc3 Merge pull request #13 from asdflj/master
keep search text
1.0.12
2022-09-13 13:26:05 +02:00
asdflj 96d89a2d2a keep search text 2022-09-13 11:13:41 +08:00