Commit Graph

194 Commits

Author SHA1 Message Date
Arkanic
ff06a005a0 become exist 2020-02-05 00:53:15 +00:00
Arkanic
fd500f5405 heh make branch 2020-02-05 13:27:36 +13:00
Anuken
67106abb9b Updated arc 2020-02-03 20:30:18 -05:00
InvalidError404
ea6490cf9f Improved ItemModule::take() behavior (#1495)
* Improved ItemModule::take() behavior

The original take() behavior spams items in whatever order they appear in the items list until each index is depleted, which is problematic when non-specific unloaders are competing against dedicated unloaders for a low-index resources.

My modification makes the take() loop persistent so take() will do complete laps around the item list starting from wherever the previous call returned from, never repeating the same item twice in a row unless there is nothing else to return. A significant improvement IMO.

How is this an improvement? With the original behavior, if you converge a bunch of belts on a storage block or launcher, want to unload a few belts of specific resources (ex.: copper, lead, silicon and titanium for surge alloy) and pass everything else including overflows along using non-specific unloaders, you are out of luck when the resources you want are at the top of the list since most of those will get swept away by non-specific unloaders. With the rotating take(), non-specific unloaders are equal-opportunity across all available resources, which gives single-resource unloaders that many more chances to unload more of their resources before non-specific unloaders get to them. It also reduces the rate at which items further down the list that may hardly ever get touched by the existing implementation will race toward the storage block's cap. The even drain across all items will help prevent things like mass driver stalls due to receivers filling up with an excess resource that isn't getting cleared.

It would be even nicer if dedicated unloaders had priority over non-specific ones (non-specific unloaders don't touch resources with dedicated unloaders unless the dedicated unloaders are overflowing), though that would require a rework beyond my current "getting the stupid IDE and tool chains to work" level of familiarity with Java development.

To sum it up: trivial change, big impact for people who like mixing belts and sorting them out with unloaders.

* Update core/src/mindustry/world/modules/ItemModule.java

Co-Authored-By: Patrick 'Quezler' Mounier <Quezler@me.com>

* Update core/src/mindustry/world/modules/ItemModule.java

Co-Authored-By: Patrick 'Quezler' Mounier <Quezler@me.com>

* Formatting

* Anuken's take() rotator.

Co-authored-by: Patrick 'Quezler' Mounier <Quezler@me.com>
2020-02-03 20:27:25 -05:00
Anuken
ad84329688 Abstract component method support 2020-02-02 17:21:35 -05:00
Anuken
ae6d33cad1 Bugfixes 2020-02-02 16:44:51 -05:00
Anuken
ad9dd83032 Better entity code generation + minor refactoring 2020-02-02 16:13:25 -05:00
Anuken
382ca09f6e Merge branches 'master' and 'splinterface' of https://github.com/Anuken/Mindustry 2020-02-02 13:59:41 -05:00
Anuken
c978410cb3 Scale cleanup / Name cleanup 2020-02-02 13:59:24 -05:00
Anuken
5eb3f0f3de Interface + base component support 2020-02-02 12:25:46 -05:00
Anuken
acb3438cc8 More entity processor features 2020-02-02 11:51:58 -05:00
Patrick 'Quezler' Mounier
4c369dd17c Hide drop zone warning if you're part of the wave team (#1492) 2020-02-02 10:41:09 -05:00
Anuken
7ddfcbfabd Utility method copying 2020-02-02 00:39:29 -05:00
Anuken
da2aee7d31 Entity components based on code generation - experiment 2020-02-01 23:54:41 -05:00
Anuken
62179233ef Bugfixes 2020-02-01 17:17:03 -05:00
Anuken
eabebcefc7 Disabled data folder button due to terrible file manager support 2020-01-31 23:09:21 -05:00
Anuken
63d84bead3 Cleanup 2020-01-31 20:10:21 -05:00
Anuken
51b4824c92 Fixed #1484 2020-01-31 11:07:25 -05:00
Anuken
2721aa550d Implemented #1444 2020-01-30 22:56:17 -05:00
Anuken
f92b91c17b Switched to arc bloom 2020-01-30 17:50:35 -05:00
Anuken
221b28c153 Merge remote-tracking branch 'origin/master' 2020-01-30 17:43:48 -05:00
Anuken
7c2541afa2 Fixed bloom black screen on iOS/Android 2020-01-30 17:43:36 -05:00
Vam-Jam
36782a2454 [Fix] lastMessage doesnt change if prevented by antispam (#1471)
Fixes issue #1470
2020-01-29 11:32:41 -05:00
Anuken
867a642859 Fixed #1460 2020-01-28 13:44:06 -05:00
Anuken
89e1c5afc0 Conveyor tweaks 2020-01-28 00:21:05 -05:00
Anuken
a2933e030a More severe votekick 2020-01-27 15:43:17 -05:00
Anuken
5ad0193a86 Fixed reduced conveyor edge throughput 2020-01-27 13:15:12 -05:00
Anuken
65211a6021 Fixed #1447 2020-01-27 11:01:48 -05:00
Anuken
b7e1adb8b1 Fixed 103 network compatibility 2020-01-27 10:19:18 -05:00
Anuken
b9e8694e68 Added synced server label + effect methods 2020-01-27 00:25:32 -05:00
Anuken
cd1ed97e52 Merge branch 'master' of https://github.com/Anuken/Mindustry 2020-01-27 00:11:24 -05:00
Anuken
a61234d21e Minor tweaks 2020-01-26 21:50:55 -05:00
키에르
9499b9dfaf Add custom text on screen (#1448) 2020-01-26 17:56:11 -05:00
Anuken
9baaacc8ac Crash fix 2020-01-26 16:55:24 -05:00
Anuken
621233a5b3 More optimization 2020-01-26 16:12:11 -05:00
Anuken
9a3245c23e Clamp 2020-01-26 15:13:55 -05:00
Anuken
6fe2697185 2x faster conveyor optimization 2020-01-26 15:04:00 -05:00
Anuken
adbfb15932 Cleanup 2020-01-26 13:13:01 -05:00
Anuken
93cada6a16 Conveyor benchmark test 2020-01-26 11:40:09 -05:00
Anuken
0d5dd146ef Fixed #1451 2020-01-26 10:58:14 -05:00
Anuken
e14a36a97e Fixed #1445 2020-01-25 17:50:59 -05:00
Anuken
923d576a5f Fixed #1436 / Fixed crawlers not exploding 2020-01-24 23:21:23 -05:00
Anuken
69711151a5 Bugfixes 2020-01-24 18:48:26 -05:00
Anuken
83f44abb5a Suppress d/c messages when necessary 2020-01-24 14:27:23 -05:00
Anuken
f2bc3e78d7 Fixed #1429 2020-01-24 14:00:06 -05:00
Anuken
2fe6a3525b Added null check for attribute 2020-01-24 13:37:23 -05:00
Anuken
78fb427120 Minor fixes 2020-01-24 13:02:03 -05:00
Anuken
b9876e267b Headless load fix 2020-01-24 12:31:34 -05:00
Anuken
4c1459c47e Fixed page limits in /help 2020-01-24 11:50:51 -05:00
Anuken
8141361a30 Fix script whitelist 2020-01-24 11:27:47 -05:00