Florian Nücke
3685c195fd
Renamed internal item names for buildroot hard disk and flash to be more generic.
2022-02-13 22:03:38 +01:00
Florian Nücke
516bd6ca73
Add config for default ethernet frame TLL. Closes #101 .
2022-02-13 21:11:23 +01:00
Florian Nücke
f0a06c8929
Send raw error message to client and add extra method to resolve error message.
...
Avoids powered-off computers showing "bus incomplete" after load.
2022-02-13 19:11:45 +01:00
Florian Nücke
a92ac07548
Pass a scan reason for scheduling bus scan, so we can immediately retry when errors may be fixed, but avoid ping-pong while errors persist.
2022-02-13 18:28:00 +01:00
Florian Nücke
b92152c593
Fix devices in unloaded chunks not being removed from element device list.
2022-02-13 17:36:16 +01:00
Florian Nücke
356cf1f5c0
Always store data, even if empty, to know device existed.
2022-02-13 17:26:06 +01:00
Florian Nücke
782217aa23
Another returned set to readonly and fix potential infinite recursion.
2022-02-13 17:12:43 +01:00
Florian Nücke
5f15146676
Handle edge case where devices get removed while element is unloaded, so we call dispose on the provider in that case.
...
Since dispose is only called through element now, delay this to after the device update, so adapters can call unmount first.
Also, assign a new ID to groups when they structurally change.
2022-02-13 17:01:36 +01:00
Florian Nücke
c0b35cd4f8
Trigger device update in controller when some devices may be unloaded now.
2022-02-13 16:57:34 +01:00
Florian Nücke
f98d457774
Paranoia: when removing cable/interface, ensure previously known devices are disposed via controller, even if they're currently in unloaded chunks.
2022-02-13 16:56:08 +01:00
Florian Nücke
3fdf49f3af
Make getter return readonly collection.
2022-02-13 16:54:49 +01:00
Florian Nücke
fad198e9d1
Split up controller scan logic into methods for readability, reduced number of add/removeController calls.
...
Also, extra paranoia, checking previously known elements for other controllers, too.
2022-02-13 16:54:31 +01:00
Florian Nücke
5f284bab15
Avoid controller scan scheduling ping-pong.
2022-02-13 16:42:22 +01:00
Florian Nücke
3615fd1f0c
Have adapters only unmount, not dispose devices.
2022-02-13 16:13:32 +01:00
Florian Nücke
61323fae80
Missed two isRemoved() -> isInvalid() conversions.
2022-02-13 16:12:47 +01:00
Florian Nücke
352af7d37a
Move dispose method to parent interface.
2022-02-13 16:12:32 +01:00
Florian Nücke
d84a674cb4
Renamed event for clarity, inlined public methods only used in event, anyway.
2022-02-13 16:09:47 +01:00
Florian Nücke
927f7f425a
Add utility method that also checks unloaded, not just removed for block entities.
2022-02-13 16:07:22 +01:00
Florian Nücke
0564ce614e
Consistency.
2022-02-13 16:05:33 +01:00
Florian Nücke
4688106a6d
Made capability access test-friendly.
2022-02-13 15:58:17 +01:00
Florian Nücke
07429bf39c
Made provider registry access test-friendly.
2022-02-13 15:57:21 +01:00
Florian Nücke
6094a275a4
Don't add synthetic devices (type names) when there are no other devices.
2022-02-09 17:35:40 +01:00
Florian Nücke
88c044203f
Fix block device entries not equaling.
2022-02-09 17:35:17 +01:00
Florian Nücke
479af156c5
Make Invalidatable properly implement equals and hashCode.
2022-02-09 17:34:49 +01:00
Florian Nücke
03f9216014
Use interface for mocking in tests.
2022-02-09 17:34:29 +01:00
Florian Nücke
24e837192a
One level of indirection for capabilities for tests.
2022-02-09 17:33:04 +01:00
Florian Nücke
024ee5881b
Add JEI provider for differently configured items.
...
Includes computers, robots, hard drives, flash memory.
2022-02-08 13:55:19 +01:00
Florian Nücke
d235669ff6
Allow breaking robots by attacking when in creative mode.
2022-02-08 13:34:21 +01:00
Florian Nücke
df62a63d60
Remove the double escape thing to close keyboard screen. Doesn't feel right.
2022-02-08 13:34:09 +01:00
Florian Nücke
3e6d62ec81
Upload textures for projectors immediately to avoid GL error before first frame arrives.
2022-02-07 22:55:20 +01:00
Florian Nücke
3056d55d10
Fix GL errors due to disposed textures still being bound after rendering multiple projectors at once.
2022-02-07 22:55:00 +01:00
Florian Nücke
9a8b278aa0
Send detailed projector state to client, show red lens when not powered.
2022-02-07 22:26:25 +01:00
Florian Nücke
96a3366031
Show projector energy consumption in tooltip.
...
Also show base energy consumption of computers in tooltip.
2022-02-07 20:36:09 +01:00
Florian Nücke
e1b6fc2618
Add JEI plugin to tell it about the sidebars in our computer/robot UIs.
2022-02-07 17:44:47 +01:00
Florian Nücke
2794002324
Moved lock leading to waits on main thread for encoding worker thread.
2022-02-07 13:34:06 +01:00
Florian Nücke
917a37999e
Only copy depth when will render projector. Flush other render layers that may write to depth when we do.
2022-02-07 12:06:07 +01:00
Florian Nücke
34d82e39d3
Make projector not break when some other mod enables stencil for the main render target.
2022-02-07 09:57:20 +01:00
Florian Nücke
95eb8997cb
Got rid of a mixin.
2022-02-06 23:41:31 +01:00
Florian Nücke
bf4425902d
Don't inject names when there's no other devices.
2022-02-06 21:38:25 +01:00
Florian Nücke
d8dc608e89
Fix potential (silent) NRE when no data is available after all.
2022-02-06 21:38:10 +01:00
Florian Nücke
7a4037eb61
Remove listener tracker when last listener is removed.
2022-02-06 21:37:43 +01:00
Florian Nücke
961f04a54c
Fixed ghost loading bug in projector.
2022-02-06 21:37:19 +01:00
Florian Nücke
e1f51118cd
Fixed chunk load/unload listeners only firing once.
2022-02-06 20:48:08 +01:00
Florian Nücke
fb8b9d4c9f
Fix projector watcher caching.
...
On write didn't do what I hoped it'd do in combination with computed get.
2022-02-06 20:33:57 +01:00
Florian Nücke
6d726de6ae
Fix updating boot error to clients.
...
Just always send it. Happens rarely and is a tiny packet. Could lead to incorrect client state, because sent value is computed and not the base error message (can be dynamically overridden by bus state).
2022-02-06 19:02:26 +01:00
Florian Nücke
b9f64e5de4
Fix computers adding their own devices without attached interface.
2022-02-06 19:01:13 +01:00
Florian Nücke
01c28eb6ad
Default new projectors to not be lit.
2022-02-06 19:00:53 +01:00
Florian Nücke
c926c3cd37
Only mark chunks as unsaved for tracked bus elements, not their neighbors.
...
Since data for managed devices is saved in the bus interfaces, this is enough. If blocks hold extra data for devices, it is their responsibility to set their chunk's dirty flag as necessary.
2022-02-06 14:35:45 +01:00
Florian Nücke
94f41f925a
Have bus interfaces track their neighbor chunks, if necessary.
...
Needed to properly react to block devices in neighbor chunk being unloaded/loaded. Since we detect devices independent of bus scan, to ensure we can detect removed devices without a bus scan, we need to track this here, too. We cannot rely on the bus controller telling us to re-scan devices once the bus is complete.
2022-02-06 14:00:52 +01:00
Florian Nücke
a40899d748
Block device queries have optional result now, empty indicating unloaded area.
...
Use this to properly handle missing neighbor in bus interfaces -- don't treat them as removed, just unload them, instead.
2022-02-06 13:59:24 +01:00