Commit Graph

558 Commits

Author SHA1 Message Date
Anuken
9a9e4611cd Logic jump PR cleanup 2025-02-10 15:51:02 -05:00
Anuken
7a6222aa18 Revert "Allow markers to be used as light sources (#9733)" (#10490)
This reverts commit 8626082068.
2025-02-10 14:24:46 -05:00
Redstonneur1256
8626082068 Allow markers to be used as light sources (#9733)
* Allow markers to be used as light sources

* Better light source markers

* Move PointMarker drawLight to LightMarker

* Add a rule for unit lights

* Optimize marker rendering

* Update core/assets/bundles/bundle.properties

---------

Co-authored-by: Anuken <arnukren@gmail.com>
2025-02-09 12:10:45 -05:00
Anuken
44cd05f8b6 Privileged read/write fix 2025-02-09 00:40:29 -05:00
Anuken
b0f27c94bc Merge branch 'master' into pr-readwrite 2025-02-09 00:38:18 -05:00
Anuken
ebaf88e80d Fixed logic IDs not loading / Accelerator animation tweaks 2025-02-08 16:04:04 -05:00
BlackDeluxeCat
108b101669 Logic sensor accesses more infos of payload (#8766)
* Added Logic Sense Payload

* Update UnitComp.java

---------

Co-authored-by: Anuken <arnukren@gmail.com>
2025-02-05 19:36:26 -05:00
router
9801dbdfd2 Add canGameOver to logic rules, fix trailing spaces (#10403) 2025-02-05 18:49:07 -05:00
Anuken
d01bc95c05 Allow team lookup 2025-02-05 11:54:07 -05:00
1ue999
c4e25e312f Printchar (#10451)
* Added PrintChar operation

* Added 1ue999 to contributors

* Added PrintChar description, and improved the design of it.

* Ok intellij, removing the int cast

* Added capability to print content icons (@flare or @router)
https://github.com/Anuken/Mindustry/pull/10451#discussion_r1941282280

* Formatting changes (hopefully all of them)

* Update core/src/mindustry/logic/LStatements.java

* Update core/src/mindustry/logic/LStatements.java

---------

Co-authored-by: Anuken <arnukren@gmail.com>
2025-02-04 19:39:33 -05:00
JeanJPNM
66b4c79f38 fix spawnwave ui when natural is a variable (#10307)
Previously you couldn't set the x and y parameters of the
spawnwave instruction if the value for the "natural"
parameter was not exactly "false", now you can set them
with "false" and any other variable name, except "true".
2025-02-04 13:58:44 -05:00
SomeonesShade
a2f196a50e Unit Mine Speed Game Rule Implementation and World Processor Set Rule for Unit Mine Speed (#10318)
* unitMineSpeedMultiplier Creation
added unitMineSpeedMultiplier
added unitMineSpeed(Team team)

* World Proccesor: SetRuleI unitMineSpeed Implemented

* World Processor: SetRuleI unitCrashDamage Implemented

* Revert "World Processor: SetRuleI unitCrashDamage Implemented"

This reverts commit 1b7187b046.

* Forgor to add, unitMineSpeedMultiplier is now editable per team
2025-02-04 13:52:25 -05:00
Anuken
d414a65cbb Fixed #10394 2025-01-12 10:16:04 -05:00
Anuken
7fbf4cacad Pruned server_v7.json to fix iOS server ping crash 2025-01-11 21:11:48 -05:00
Anuken
a24dfedb68 Tileable displays nobody asked for 2025-01-08 17:10:05 -05:00
Anuken
a91729aa27 Scaled logic explosions 2024-12-15 23:09:14 -05:00
Anuken
1dacb7989e Status apply statement cleanup 2024-12-11 14:14:08 -05:00
Cardillan
18955d6604 Properly rounding numbers for display - fix for negative numbers (#10355) 2024-11-30 10:09:15 -05:00
Cardillan
a3110fde21 Properly rounding numbers for display (#10354) 2024-11-29 11:59:17 -05:00
Anuken
84beffd3b0 Mobile search fixes 2024-11-09 13:12:18 -05:00
Anuken
e4aa633982 Instruction type search bar + add hotkeys in logic dialog 2024-11-09 13:11:12 -05:00
way-zer
116798e328 OC: fix slow of LCanvas 2024-09-23 22:38:36 +07:00
code-explorer786
a5de131711 Trapezoidal jumps
I haven't checked this yet, but it seems like it also reduces the
complexity (runtime) from ≈O(n^2) to ≈O(k^2 + n)
(n = number of jump curves)
(k = number of unique destinations)

The worst case, that is k = n, is still O(n^2) but generally it's much
more (scalably) performant.

Thanks Arkanic for suggesting this!
https://discord.com/channels/391020510269669376/663854113418641429/1256161815503704104

Co-authored-by: Arkanic <50847107+Arkanic@users.noreply.github.com>
2024-09-23 22:31:21 +07:00
Ilya246
c5b8133ff9 optimise jump colors and attempt to space them apart 2024-09-23 22:26:11 +07:00
code-explorer786
939f6939d0 Jump curve coloring
See #general-programming in the Mindustry Discord server:
https://discord.com/channels/391020510269669376/663854113418641429/1256146387834372106

Co-authored-by: Ilya246 <ilyukarno@gmail.com>
2024-09-23 22:26:06 +07:00
code-explorer786
89b67fc4b4 Transition jump heights
It looks good.
2024-09-23 22:26:03 +07:00
code-explorer786
282d21db05 Update jump heights only when necessary.
This method uses signaling (through a boolean) and I feel like it's
extremely hacky, but I tested this and it (kind of?) works.
Unfortunately I found this to potentially lag when resizing.

I am not sure if this is guaranteed to work (as in, produce correct
behaviour) or not, but to my understanding only LogicDialog uses LCanvas
(grep out "LCanvas\|canvas" and see) so it will most likely work?

I tested this and accidentally found an unrelated issue related to
LCanvas.maxJumpsDrawn, but I hope this will be fixed in the near future.
2024-09-23 21:04:45 +07:00
code-explorer786
26105a64f1 Use pools
It feels hacky, but it works regardless. The GC should be working as
hard as it was beforehand.
2024-09-23 21:04:42 +07:00
code-explorer786
b58a6bb8d6 wip: different heights for jump arrows
Note that this is very incomplete, for two different reasons:
- it's O(n^2) or potentially worse
- it makes the GC work hard (it invokes `new` in
  `LCanvas.DragLayout.layout()`)

For the second reason this does not clearly fit the criteria of
CONTRIBUTING.md, but I have yet to figure out ways to work around this
(or make the algorithm more efficient).
2024-09-23 21:01:54 +07:00
code-explorer786
b8c9a05963 LCanvas: jumps -> statements.jumps
Original canvas.jumps is now a reference to canvas.statements.jumps.
Please remove canvas.jumps in favour of canvas.statements.jumps in a
future release. Thanks!
2024-09-23 18:14:38 +07:00
Anuken
e1759adcfe Fixed #10173 2024-09-04 21:44:45 -04:00
Anuken
9f877c9f20 Fixed setblock not being synced 2024-08-31 08:44:23 -04:00
Anuken
493b9807ff Removed @solid remnants 2024-08-25 17:01:06 -04:00
Anuken
fc883ca2f3 Logic canvas cleanup 2024-08-25 09:02:13 -04:00
Anuken
6e3cc13a26 Fixed logic scroll bar glitch 2024-08-24 16:01:06 -04:00
Anuken
22bd8c634f Fixed counter displaying as null / Revert #10090 2024-08-24 14:08:04 -04:00
Anuken
b451b51e61 Fixed logic variables being 0 by default 2024-08-24 14:01:00 -04:00
Anuken
f5a75de872 Fetch player block fix 2024-08-23 04:09:06 -04:00
Anuken
55dfffa4bc Hide internal units from logic 2024-08-23 04:00:18 -04:00
Anuken
074684e935 Closes Anuken/Mindustry-Suggestions/issues/5184 2024-08-22 03:21:24 -04:00
camelStyleUser
8cb6348c12 real (#10130) 2024-08-21 03:27:57 -04:00
Anuken
e4b1bde974 Fixed #10132 2024-08-21 03:21:31 -04:00
Anuken
44ec8c5e0e Merge branch 'master' of https://github.com/Anuken/Mindustry 2024-08-16 16:00:51 -04:00
Anuken
8e8b99d421 Removed most usage of Scene#hit 2024-08-16 16:00:47 -04:00
camelStyleUser
f347dc4c84 Update LAssembler.java (#10126)
anook please dont forget
2024-08-16 15:35:36 -04:00
JeanJPNM
2ad38fc3b0 Fix the sfx selection gui for playsound (#10095)
* fix the index used to get the sfx substring

* handle cases where the sxf variable is not a built-in

This prevents a crash that happened whenever the sfx
variable's name had less than 5 characters (4 before this
pr), since the substring method was called regardless of
the name's size.
2024-08-06 20:27:25 -04:00
Mythril382
bace523de4 Allow PlaySound To Work Normally With High IPT World Processor (#10083)
* allow global sound to play more than once per frame

might need an arc pr for the positional

* carhash

* thing

* extra field

* change "check frame" to "limit"

* description

* Update core/assets/bundles/bundle.properties

---------

Co-authored-by: Anuken <arnukren@gmail.com>
2024-08-06 11:14:29 -04:00
WayZer
728cb2b3e3 Fix Lag in LCanvas.java (#10090) 2024-08-05 16:34:40 -04:00
Anuken
f0b931380a Fixed #10085 2024-08-04 22:20:20 -04:00
Anuken
27f20b7a36 Better implementation of #10047 2024-08-03 00:51:31 -04:00