Commit Graph

511 Commits

Author SHA1 Message Date
Fingercomp
98dea7bbaf Unify item factory and recoverer registries 2023-06-11 06:05:31 +07:00
Fingercomp
208a042afb Switch to nicer ContextMenuEntry constructor
Really out of scope for this MR, but since I've started doing it, I may
as well convert the rest of the code.

Also, we really should set up scalafmt to enforce code style.
2023-06-11 03:10:00 +07:00
Fingercomp
d6ebe8120e Reimplement item loading in terms of exceptions
Apparently this is easier to comprehend for @LeshaInc.

(Alas, I do see his point. Inclined to agree, even.)
2023-06-11 02:50:48 +07:00
Fingercomp
40d5c3f1ba Merge Item and ItemFactory definitions 2023-06-11 02:26:24 +07:00
Fingercomp
b5a923550a Make the source type of ItemRecoverer a type parameter 2023-06-11 02:00:04 +07:00
Fingercomp
bb8d7ec8f4 Replace makeTooltipContents with fillTooltipBody 2023-06-11 01:50:20 +07:00
Fingercomp
6371ce039e Add more documentation for inventory-related classes 2023-06-11 00:47:19 +07:00
Fingercomp
74c51053e2 I think I prefer two-level menus after all 2023-06-10 23:30:28 +07:00
Fingercomp
861c752fb8 Remove the old slot implementation
Yahoo.
2023-06-10 23:27:49 +07:00
Fingercomp
82dead6b9b Reimplement insertItems (aka refitSlots) 2023-06-10 23:17:51 +07:00
Fingercomp
5d645973d5 Add more info to disk tooltips 2023-06-10 22:16:34 +07:00
Fingercomp
4eed74c4dc Show disk labels 2023-06-10 22:02:50 +07:00
Fingercomp
237c2edf99 Fix HDD deserialization 2023-06-10 21:16:36 +07:00
Fingercomp
b05eb8380d Add RMB menus 2023-06-10 19:49:06 +07:00
Fingercomp
a334bef777 Add tooltips 2023-06-10 18:01:20 +07:00
Fingercomp
61be7a397a Add inventory sync fuel to guard against stack overflows
Also fix an infinite recursion if the sync is initiated by the brain.
2023-06-10 15:47:53 +07:00
Fingercomp
42aae02855 Subscribe to inventory events, use the new slot in DiskDriveNode
Closes #54
2023-06-10 15:07:54 +07:00
Fingercomp
9581ee6c03 Use the new implementation for ComputerNode
Also merge branch 'develop' into refactor/inventory (accidentally...)
2023-06-10 05:14:07 +07:00
Fingercomp
927c37a82b Add an ItemChooser 2023-06-10 04:20:36 +07:00
Fingercomp
4e861c98fc Add a PersistedInventory that doesn't deal with ocelot-brain 2023-06-09 23:41:34 +07:00
Fingercomp
5caa92860f Fix compilation errors
I hate this
2023-06-09 20:57:29 +07:00
Fingercomp
aff5e31352 Implement SyncedInventory persistence 2023-06-09 20:48:06 +07:00
Fingercomp
e57cdb3a38 Add specific slot types 2023-06-09 19:27:09 +07:00
Fingercomp
8e32f5d265 Add a reimplementation of SlotWidget
With an interim name of NewSlotWidget. Very original, I know.

I'm planning on revisiting certain aspects of it later, after I'm done
with specific slots.

Also, hey, garbage-collectable observers!
2023-06-09 03:11:47 +07:00
Fingercomp
7f3a018680 Search for recoverers in the linearization order 2023-06-09 01:31:26 +07:00
Fingercomp
4eb8829885 Add the ability to force the Swing file chooser via a config option 2023-06-08 23:09:20 +07:00
Fingercomp
29e91df8a9 Add SyncedInventory 2023-06-08 22:11:30 +07:00
Fingercomp
a942525ce8 Allow to disable the audio subsystem for good via a config option 2023-06-08 20:21:27 +07:00
Fingercomp
97d0b2edeb Fix insane window geometry 2023-06-08 19:54:27 +07:00
Fingercomp
2bce403c62 Implement ItemRecoverer for all items 2023-06-08 19:27:30 +07:00
Fingercomp
09454d99ab Add more graphics debug options 2023-06-08 14:27:19 +07:00
Fingercomp
5128718534 Add an Inventory trait
Planning to subclass it for brain Inventory sync
2023-06-08 14:04:34 +07:00
Fingercomp
0a42947781 Add the rest of the items 2023-06-08 12:17:08 +07:00
Fingercomp
2469dae11d Add Item, ItemFactory, and their implementations for cards
We'll see how it goes...
2023-06-07 18:54:21 +07:00
Fingercomp
d5009248ad Raise the framerate cap to 144 fps
Closes #67
2023-06-07 15:10:34 +07:00
Fingercomp
6eb0d2d88e Expose the hpm floppy and Cyan BIOS 2023-06-06 23:48:10 +07:00
Fingercomp
c3781bf34c Use Using for automatic resource management 2023-06-06 23:06:29 +07:00
Fingercomp
a7c80006ba Synchronize the computer noise with its state
Closes #82
2023-06-06 22:23:54 +07:00
Fingercomp
d9439b47cf Show a confirmation dialog before opening a new workspace 2023-06-06 22:01:19 +07:00
Fingercomp
e59701b0ab Close resources and remove temporary files 2023-06-06 19:38:48 +07:00
Fingercomp
fdbd74bbac DyeColor.{LIME -> Lime} 2023-06-06 18:35:30 +07:00
Fingercomp
332f4c6e27 Use the tier of the entry, not the card slot 2023-06-06 01:24:43 +07:00
Fingercomp
a659cd7a2c Make Tier an Enumeration
See cc-ru/ocelot/ocelot-brain#24
2023-06-06 00:42:03 +07:00
Fingercomp
8a5b3ec874 Use the conventional naming convention for dye colors 2023-06-05 20:39:17 +07:00
Fingercomp
02efef9a89 Change the type of children to ArraySeq
Closes #79
2023-06-05 20:26:30 +07:00
Fingercomp
aefbc9b872 Move all IconDefs to graphics.Icons 2023-06-05 18:55:23 +07:00
Fingercomp
35404a6974 Merge branch 'refactor/settings-refl' into develop 2023-06-05 17:10:45 +07:00
Fingercomp
bbfd85395a Disable the apply button if the input is invalid 2023-06-05 17:02:46 +07:00
Fingercomp
5516ca4e7d Reimplement SettingsData.updateWith via reflection 2023-06-05 11:41:56 +07:00
Fingercomp
a65c683529 Fix style issues I happened to come across 2023-06-05 10:11:31 +07:00