Commit Graph

88 Commits

Author SHA1 Message Date
Anuken
a11f6efe0a Rudimentary rendering 2020-02-05 23:04:48 -05:00
Anuken
dfecfa3964 . 2020-02-05 20:11:49 -05:00
Anuken
f6b1420103 c l e a n u p 2020-02-05 18:28:19 -05:00
Anuken
84748afc55 the errors are back 2020-02-05 15:00:35 -05:00
Anuken
eb0ea9030b ? 2020-02-05 13:08:48 -05:00
Anuken
da97aee8e4 it never ends 2020-02-05 13:03:22 -05:00
Anuken
a7b39e56bd Cleanup continues 2020-02-04 18:00:32 -05:00
Anuken
012421afcb Class ID mapping 2020-02-04 13:57:42 -05:00
Anuken
be50997f94 Merge branches '6.0' and 'splinterface-impl' of https://github.com/Anuken/Mindustry into splinterface-impl
# Conflicts:
#	core/assets/sprites/block_colors.png
#	core/assets/sprites/sprites.atlas
#	core/assets/sprites/sprites.png
#	core/assets/sprites/sprites3.png
#	core/assets/sprites/sprites5.png
#	core/src/mindustry/Vars.java
#	core/src/mindustry/entities/traits/SaveTrait.java
#	core/src/mindustry/maps/generators/MapGenerator.java
#	core/src/mindustry/ui/dialogs/DeployDialog.java
#	core/src/mindustry/world/blocks/Floor.java
#	desktop/src/mindustry/desktop/DesktopLauncher.java
#	gradle.properties
2020-02-04 12:25:18 -05:00
Anuken
36b9451e01 Read-only component fields / Removed get/set prefix 2020-02-04 12:14:09 -05:00
Anuken
006004fd70 Decal cleanup 2020-02-04 09:39:12 -05:00
Anuken
a07e275e11 Entity groups 2020-02-04 01:03:34 -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
a942ed2cad More cleanup 2020-02-03 20:24:49 -05:00
Anuken
141cf518a2 Refactoring 2020-02-03 14:07:06 -05:00
Anuken
f937cb30f0 More components, less entities 2020-02-02 23:38:16 -05:00
Anuken
f2f31120a0 Gradual component conversion 2020-02-02 20:17:22 -05:00
Anuken
89e1c5afc0 Conveyor tweaks 2020-01-28 00:21:05 -05:00
Anuken
ad6e0bcd0f Merge branches 'master' and 'mech-rework' of https://github.com/Anuken/Mindustry into mech-rework
# Conflicts:
#	android/src/mindustry/android/AndroidLauncher.java
#	annotations/src/main/java/mindustry/annotations/SerializeAnnotationProcessor.java
#	annotations/src/main/java/mindustry/annotations/impl/AssetsAnnotationProcessor.java
#	build.gradle
#	core/assets-raw/fontgen/config.json
#	core/assets/bundles/bundle_cs.properties
#	core/assets/bundles/bundle_it.properties
#	core/assets/fonts/font.ttf
#	core/assets/fonts/icon.ttf
#	core/assets/icons/icons.properties
#	core/assets/sprites/block_colors.png
#	core/assets/sprites/sprites.atlas
#	core/assets/sprites/sprites.png
#	core/assets/sprites/sprites3.png
#	core/assets/sprites/sprites5.png
#	core/src/mindustry/content/UnitTypes.java
#	core/src/mindustry/core/NetClient.java
#	core/src/mindustry/core/NetServer.java
#	core/src/mindustry/entities/bullet/BulletType.java
#	core/src/mindustry/entities/type/TileEntity.java
#	core/src/mindustry/maps/filters/FilterOption.java
#	core/src/mindustry/mod/Scripts.java
#	core/src/mindustry/ui/Fonts.java
#	core/src/mindustry/ui/dialogs/DeployDialog.java
#	core/src/mindustry/ui/fragments/HudFragment.java
#	core/src/mindustry/ui/fragments/MenuFragment.java
#	core/src/mindustry/world/blocks/production/Cultivator.java
#	core/src/mindustry/world/blocks/units/CommandCenter.java
#	gradle.properties
#	tools/src/mindustry/tools/FontGenerator.java
2020-01-27 15:51:02 -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
a61234d21e Minor tweaks 2020-01-26 21:50:55 -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
923d576a5f Fixed #1436 / Fixed crawlers not exploding 2020-01-24 23:21: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
b9876e267b Headless load fix 2020-01-24 12:31:34 -05:00
Anuken
99e51411d5 Implemented #1048 2020-01-24 11:24:35 -05:00
Anuken
a4e820f907 Added default ore flags for modded ores 2020-01-23 20:20:04 -05:00
Anuken
235142c869 Implemented #1093 2020-01-23 15:50:03 -05:00
Anuken
26676d60e1 Added underflow gates 2020-01-20 18:54:25 -05:00
Anuken
a4ac318c9e Changed deconstruct event to fire before tile removal 2020-01-20 15:00:38 -05:00
Anuken
d2bc2baefe Fixed #1401 2020-01-20 14:32:07 -05:00
Anuken
8aec6d24db Fixed #776 2020-01-20 14:28:18 -05:00
Anuken
27d6bf067e Added prototype planet sector land system 2020-01-20 12:05:26 -05:00
Anuken
85cf7e9d5c Added previously-missing icons 2020-01-19 18:45:25 -05:00
Anuken
c0844304a6 Merge 2020-01-19 11:10:14 -05:00
Anuken
f044f30829 Merge 2020-01-18 11:16:03 -05:00
Anuken
5328875ba5 nothing 2020-01-18 11:14:47 -05:00
Anuken
c3d2351b2d Various icon changes 2020-01-17 13:57:04 -05:00
Anuken
f7c4ea3e58 Weapon mount cleanup 2020-01-16 10:52:20 -05:00
Anuken
eaa86023f9 Visual tweaks 2020-01-14 17:07:39 -05:00
Anuken
68be77fa1d Added configurable block access validation 2020-01-14 10:32:52 -05:00
Anuken
bbf87df373 a revelation 2020-01-11 23:41:12 -05:00
Anuken
d6dec002c1 Added remote tile set/remove methods 2020-01-11 19:32:08 -05:00