Compare commits

...

71 Commits

Author SHA1 Message Date
Anuken
6ab96e2787 Fixed #3987 2020-12-15 14:15:06 -05:00
Anuken
659c481c83 cleanup 2020-12-15 11:15:39 -05:00
Anuken
a18e1854ab Null checks & cleanup of upgrade pathing 2020-12-15 10:58:03 -05:00
Anuken
6c67dc1266 Merge branch 'master' of https://github.com/Anuken/Mindustry 2020-12-15 10:52:38 -05:00
Slava0135
0c581c520f Conveyor upgrade system (#3912)
* conveyor/conduit upgrading system

* style
2020-12-15 10:52:20 -05:00
Anuken
c6c18696c0 Cleanup 2020-12-15 10:28:12 -05:00
Somka000
4b1c55b876 Update server (#3984) 2020-12-15 09:59:46 -05:00
Anuken
5ab090f28d Merge remote-tracking branch 'origin/master' 2020-12-14 22:56:06 -05:00
Anuken
8a5bd7571e 121.3 2020-12-14 22:55:58 -05:00
Fernando
3cb0cc9a3c Brazil is under maintenance (#3898)
We will be back later
2020-12-14 20:07:02 -05:00
Anuken
ff93c21269 Merge remote-tracking branch 'origin/master' 2020-12-14 16:31:01 -05:00
Anuken
0512e54df5 Merge remote-tracking branch 'origin/master' 2020-12-14 13:42:52 -05:00
Anuken
cec1eb5608 Fixed jitpack build error 2020-12-14 13:42:48 -05:00
L0615T1C5-216AC-9437
1c6ebd3f6a retire CN from v5 Mindustry (#3977) 2020-12-14 13:31:41 -05:00
Anuken
16f7a8e9d2 Merge remote-tracking branch 'origin/master' 2020-12-14 13:29:59 -05:00
Anuken
889c53dc1b Update SERVERLIST.md 2020-12-14 13:26:42 -05:00
Anuken
f4d0dfd0da Less junction capacity (again) 2020-12-14 10:36:37 -05:00
Skat
aee5d46dfa Code formatting (#3904) 2020-12-13 23:56:13 -05:00
alex
6286b0b275 Add ALEX v6 servers to servers_v6.json (#3927) 2020-12-13 23:52:15 -05:00
Sharlotte
5223a89bf1 Update bundle_ko.properties (#3953)
fix some miss-translation
add translated values
2020-12-13 23:47:00 -05:00
YellOw139
5b11dbc085 [Bundle][RO] Translation Update (#3957)
This PR was tested in-game and is _**ready to merge at any time**_ (unless marked as draft).

Changelog:
- New strings/changes up to commit 98c4ee6e74
- Typo fixes & various other improvements
2020-12-13 23:46:50 -05:00
GamyGamer
df1f8b8bb4 Update bundle_pl.properties (#3964)
Added missing lines and fixed typo
2020-12-13 23:46:39 -05:00
DeltaNedas
ffa7256e5a add ContentInitEvent (#3951)
* add ContentInit(ialized)Event

* a

* a
2020-12-13 23:43:27 -05:00
Anuken
bbf84185cc Fixed #3973 2020-12-13 23:40:06 -05:00
Anuken
901c23f295 Fixed #3969 2020-12-13 18:01:22 -05:00
Anuken
1c8d368d3b Merge remote-tracking branch 'origin/master' 2020-12-13 16:28:32 -05:00
Anuken
37ebae20d7 Removed tools.jar 2020-12-13 16:28:29 -05:00
Anuken
e25f0c6ae2 Merge pull request #3967 from DeltaNedas/version
disallow descriptions after mod version
2020-12-13 16:26:23 -05:00
Anuken
484b480076 Fixed #3968 2020-12-13 16:25:36 -05:00
DeltaNedas
926497ba77 disallow descriptions after mod version 2020-12-13 19:30:21 +00:00
Anuken
ddd9f2259c Fixed #3960 2020-12-13 10:27:44 -05:00
Anuken
d6546a38c0 #3830 2020-12-12 18:49:24 -05:00
Anuken
d171048004 Merge pull request #3950 from Auswaschbar/master
Fix units aiming sidewards missing their aim
2020-12-12 16:47:01 -05:00
Karl-Robert Ernst
4aebba0a0c fix units aiming sidewards missing their aim 2020-12-12 22:11:19 +01:00
Anuken
8afb6006ce Merge pull request #3941 from DeltaNedas/public
make some proc stuff public
2020-12-12 13:27:22 -05:00
Anuken
d117eb249e Merge remote-tracking branch 'origin/master' 2020-12-12 13:26:34 -05:00
Anuken
768d14088a Fixed #3943 2020-12-12 13:26:30 -05:00
Anuken
86f16bfc94 Merge pull request #3934 from LottieVixen/fix-issue
fixed an error in global.js
2020-12-12 11:31:36 -05:00
Anuken
8fa6b76bf9 Fixed #3936 2020-12-12 11:14:17 -05:00
DeltaNedas
19af1a0cc8 make some proc stuff public 2020-12-12 15:57:43 +00:00
Charlotte Lily-Llaitchee Vixen
409d27e3df found more occurances of the error 2020-12-12 07:23:23 +00:00
Charlotte Lily-Llaitchee Vixen
d47abd4f83 fixed an error in global.js 2020-12-12 07:15:24 +00:00
Anuken
e6c4a6cf69 Fixed #3932 2020-12-11 23:52:43 -05:00
Anuken
7c80af85e3 Property cleanup 2020-12-11 19:28:03 -05:00
Anuken
6983f57459 circleTarget unit AI parameter 2020-12-11 18:54:03 -05:00
Anuken
adeeaa6e27 Merge remote-tracking branch 'origin/master' 2020-12-11 12:56:10 -05:00
Anuken
075e7cf5d8 Disabled poly spawns 2020-12-11 12:56:07 -05:00
Anuken
98c4ee6e74 Merge pull request #3855 from AFFalcons/patch-1
[QOL] Ability to Disable Weather Effects
2020-12-11 12:52:07 -05:00
Anuken
87f9a077ac Increase wave spacing by 10sec every sector defeat 2020-12-11 12:43:43 -05:00
Anuken
bc26d3ba7b Merge remote-tracking branch 'origin/master' 2020-12-11 11:48:27 -05:00
Anuken
daaea591e4 Implemented #3486 with some minor changes 2020-12-11 11:48:20 -05:00
Anuken
175d66ad72 Merge pull request #3843 from Nikolass1000/patch-6
Update achievements.vdf [PL]
2020-12-11 11:13:54 -05:00
Anuken
c444cbf623 Merge pull request #3908 from buthed010203/patch-2
Delete old bleeding edge builds on update
2020-12-11 10:52:19 -05:00
Anuken
c54f398063 Fixed Parallax not moving players serverside 2020-12-10 18:21:39 -05:00
Anuken
2d6db1583b Improved approach behavior in formations/logic 2020-12-10 12:51:07 -05:00
buthed010203
b3beb92557 fixed 2020-12-10 12:18:11 -05:00
buthed010203
0f8304674f now 100% less readable 2020-12-10 11:54:47 -05:00
buthed010203
3b3daf0e25 Delete old bleeding edge builds on update 2020-12-10 11:41:50 -05:00
Anuken
28e18332a0 Decreased junction item capacity 2020-12-10 09:58:09 -05:00
Anuken
dcc4764914 Merge remote-tracking branch 'origin/master' 2020-12-10 09:50:12 -05:00
Anuken
ee4ace1146 Fixed #3902 2020-12-10 09:50:06 -05:00
Anuken
1faffadcab Merge pull request #3905 from Quezler/patch-81
Prevent accelerator from blending with conveyors
2020-12-10 09:35:33 -05:00
Patrick 'Quezler' Mounier
2da7afc081 Update Accelerator.java 2020-12-10 12:15:29 +01:00
Patrick 'Quezler' Mounier
e5b341c63e Prevent accelerator from blending with conveyors 2020-12-10 12:14:57 +01:00
Anuken
a544888f16 cleanup 2020-12-09 20:20:22 -05:00
Anuken
57ad1d5366 Fixed #3899 2020-12-09 20:19:54 -05:00
Anuken
42d66d1136 Sector item system cleanup 2020-12-09 16:26:50 -05:00
Anuken
999cc9c651 Fixed #3890 2020-12-09 14:02:38 -05:00
Matthew
881491d151 Requested Changes 2020-12-08 09:10:30 -06:00
Matthew
863159a5fe Init 2020-12-07 18:14:58 -06:00
Nikolass1000
81b593c031 Update achievements.vdf 2020-12-07 14:30:08 +01:00
78 changed files with 373 additions and 180 deletions

View File

@@ -1,7 +1,7 @@
### Adding a server to the list ### Adding a server to the list
Mindustry now has a public list of servers that everyone can see and connect to. Mindustry now has a public list of servers that everyone can see and connect to.
This is done by letting clients `GET` a [JSON list of servers](https://github.com/Anuken/Mindustry/blob/master/servers.json) in this repository. This is done by letting clients `GET` a [JSON list of servers](https://github.com/Anuken/Mindustry/blob/master/servers_v6.json) in this repository.
You may want to add your server to this list. The steps for getting this done are as follows: You may want to add your server to this list. The steps for getting this done are as follows:
@@ -16,7 +16,7 @@ You'll need to either hire some moderators, or make use of (currently non-existe
3. **Get some good maps.** *(optional, but highly recommended)*. Add some maps to your server and set the map rotation to custom-only. You can get maps from the Steam workshop by subscribing and exporting them; using the `#maps` channel on Discord is also an option. 3. **Get some good maps.** *(optional, but highly recommended)*. Add some maps to your server and set the map rotation to custom-only. You can get maps from the Steam workshop by subscribing and exporting them; using the `#maps` channel on Discord is also an option.
4. **Check your server configuration.** *(optional)* I would recommend adding a message rate limit of 1 second (`config messageRateLimit 1`), and disabling connect/disconnect messages to reduce spam (`config showConnectMessages false`). 4. **Check your server configuration.** *(optional)* I would recommend adding a message rate limit of 1 second (`config messageRateLimit 1`), and disabling connect/disconnect messages to reduce spam (`config showConnectMessages false`).
5. Finally, **submit a pull request** to add your server's IP to the list. 5. Finally, **submit a pull request** to add your server's IP to the list.
This should be fairly straightforward: Press the edit button on the [server file](https://github.com/Anuken/Mindustry/blob/master/servers.json), then add a JSON object with a single key, indicating your server address. This should be fairly straightforward: Press the edit button on the [server file](https://github.com/Anuken/Mindustry/blob/master/servers_v6.json), then add a JSON object with a single key, indicating your server address.
For example, if your server address is `google.com`, you would add a comma after the last entry and insert: For example, if your server address is `google.com`, you would add a comma after the last entry and insert:
```json ```json
{ {

View File

@@ -383,7 +383,6 @@ project(":annotations"){
dependencies{ dependencies{
implementation 'com.squareup:javapoet:1.12.1' implementation 'com.squareup:javapoet:1.12.1'
implementation "com.github.Anuken.Arc:arc-core:$arcHash" implementation "com.github.Anuken.Arc:arc-core:$arcHash"
implementation files("${System.getProperty('java.home')}/../lib/tools.jar")
} }
} }

View File

@@ -13,6 +13,7 @@ link.google-play.description = Google Play store listing
link.f-droid.description = F-Droid listing link.f-droid.description = F-Droid listing
link.wiki.description = Official Mindustry wiki link.wiki.description = Official Mindustry wiki
link.suggestions.description = Suggest new features link.suggestions.description = Suggest new features
link.bug.description = Found one? Report it here
linkfail = Failed to open link!\nThe URL has been copied to your clipboard. linkfail = Failed to open link!\nThe URL has been copied to your clipboard.
screenshot = Screenshot saved to {0} screenshot = Screenshot saved to {0}
screenshot.invalid = Map too large, potentially not enough memory for screenshot. screenshot.invalid = Map too large, potentially not enough memory for screenshot.
@@ -832,6 +833,7 @@ setting.chatopacity.name = Chat Opacity
setting.lasersopacity.name = Power Laser Opacity setting.lasersopacity.name = Power Laser Opacity
setting.bridgeopacity.name = Bridge Opacity setting.bridgeopacity.name = Bridge Opacity
setting.playerchat.name = Display Player Bubble Chat setting.playerchat.name = Display Player Bubble Chat
setting.showweather.name = Show Weather Graphics
public.confirm = Do you want to make your game public?\n[accent]Anyone will be able to join your games.\n[lightgray]This can be changed later in Settings->Game->Public Game Visibility. public.confirm = Do you want to make your game public?\n[accent]Anyone will be able to join your games.\n[lightgray]This can be changed later in Settings->Game->Public Game Visibility.
public.beta = Note that beta versions of the game cannot make public lobbies. public.beta = Note that beta versions of the game cannot make public lobbies.
uiscale.reset = UI scale has been changed.\nPress "OK" to confirm this scale.\n[scarlet]Reverting and exiting in[accent] {0}[] seconds... uiscale.reset = UI scale has been changed.\nPress "OK" to confirm this scale.\n[scarlet]Reverting and exiting in[accent] {0}[] seconds...

View File

@@ -13,6 +13,7 @@ link.google-play.description = Google Play 스토어 목록
link.f-droid.description = F-Droid 카탈로그 목록 link.f-droid.description = F-Droid 카탈로그 목록
link.wiki.description = 공식 Mindustry 위키 link.wiki.description = 공식 Mindustry 위키
link.suggestions.description = 새 기능 제안하기 link.suggestions.description = 새 기능 제안하기
link.bug.description = 버그 제보하기
linkfail = 링크를 열지 못했습니다!\nURL이 클립보드에 복사되었습니다. linkfail = 링크를 열지 못했습니다!\nURL이 클립보드에 복사되었습니다.
screenshot = 스크린 캡처가 {0} 에 저장되었습니다. screenshot = 스크린 캡처가 {0} 에 저장되었습니다.
screenshot.invalid = 맵이 너무 커서 스크린 캡처에 사용될 메모리가 부족합니다. screenshot.invalid = 맵이 너무 커서 스크린 캡처에 사용될 메모리가 부족합니다.
@@ -299,7 +300,7 @@ cancelbuilding = [accent][[{0}][] 를 눌러 건설 계획을 초기화
selectschematic = [accent][[{0}][] 를 눌러 선택+복사 selectschematic = [accent][[{0}][] 를 눌러 선택+복사
pausebuilding = [accent][[{0}][] 를 눌러 건설을 일시중지 pausebuilding = [accent][[{0}][] 를 눌러 건설을 일시중지
resumebuilding = [scarlet][[{0}][] 를 눌러 건설을 재개 resumebuilding = [scarlet][[{0}][] 를 눌러 건설을 재개
showui = UI를 .\n[accent][[{0}][] 키를 눌러 UI를 활성화 showui = [accent][[{0}][] 키를 눌러 UI를 활성화
wave = [accent]{0} 단계 wave = [accent]{0} 단계
wave.cap = [accent]단계 {0}/{1} wave.cap = [accent]단계 {0}/{1}
wave.waiting = 다음 단계까지[lightgray] {0}초 wave.waiting = 다음 단계까지[lightgray] {0}초
@@ -832,6 +833,7 @@ setting.chatopacity.name = 채팅창 투명도
setting.lasersopacity.name = 전선 투명도 setting.lasersopacity.name = 전선 투명도
setting.bridgeopacity.name = 터널 투명도 setting.bridgeopacity.name = 터널 투명도
setting.playerchat.name = 채팅 말풍선 표시 setting.playerchat.name = 채팅 말풍선 표시
setting.showweather.name = 날씨 그래픽 표시
public.confirm = 게임을 모두에게 공개하시겠습니까?\n[accent]모든 플레이어가 게임에 참여할 수 있습니다.\n[lightgray]설정->게임->멀티플레이 공용 서버로 표시에서 나중에 변경할 수 있습니다.\n\n[sky]번역자 추가[]\n[accent]친구끼리 하려고 이 기능을 활성화 한 뒤에, 친구 외에 다른 플레이어가 들어왔을 때\n해당 플레이어를 차단하는 행위는 비매너를 넘어서는 얌체 행위 그 자체입니다.\n정말로 [scarlet]많은 다른 플레이어들이 오길 원한다[]면 확인하세요. public.confirm = 게임을 모두에게 공개하시겠습니까?\n[accent]모든 플레이어가 게임에 참여할 수 있습니다.\n[lightgray]설정->게임->멀티플레이 공용 서버로 표시에서 나중에 변경할 수 있습니다.\n\n[sky]번역자 추가[]\n[accent]친구끼리 하려고 이 기능을 활성화 한 뒤에, 친구 외에 다른 플레이어가 들어왔을 때\n해당 플레이어를 차단하는 행위는 비매너를 넘어서는 얌체 행위 그 자체입니다.\n정말로 [scarlet]많은 다른 플레이어들이 오길 원한다[]면 확인하세요.
public.beta = 베타 버전의 게임은 공개 서버를 만들 수 없습니다. public.beta = 베타 버전의 게임은 공개 서버를 만들 수 없습니다.
uiscale.reset = UI 스케일이 변경되었습니다.\n"확인"버튼을 눌러 저장하세요.\n[accent] {0}[][scarlet]초 후에 예전 설정으로 되돌리고 게임을 종료합니다... uiscale.reset = UI 스케일이 변경되었습니다.\n"확인"버튼을 눌러 저장하세요.\n[accent] {0}[][scarlet]초 후에 예전 설정으로 되돌리고 게임을 종료합니다...

View File

@@ -13,6 +13,7 @@ link.google-play.description = Strona w sklepie Google Play
link.f-droid.description = Wykaz Katalogu F-Droid link.f-droid.description = Wykaz Katalogu F-Droid
link.wiki.description = Oficjana Wiki Mindustry link.wiki.description = Oficjana Wiki Mindustry
link.suggestions.description = Zaproponuj nowe funkcje link.suggestions.description = Zaproponuj nowe funkcje
link.bug.description = Znalazłeś błąd? Zgłoś go tutaj
linkfail = Nie udało się otworzyć linku!\nURL został skopiowany. linkfail = Nie udało się otworzyć linku!\nURL został skopiowany.
screenshot = Zapisano zrzut ekranu w {0} screenshot = Zapisano zrzut ekranu w {0}
screenshot.invalid = Zrzut ekranu jest zbyt duży. Najprawdopodobniej brakuje miejsca w pamięci urządzenia. screenshot.invalid = Zrzut ekranu jest zbyt duży. Najprawdopodobniej brakuje miejsca w pamięci urządzenia.
@@ -511,7 +512,7 @@ resources = Zasoby
bannedblocks = Zabronione bloki bannedblocks = Zabronione bloki
addall = Dodaj wszystkie addall = Dodaj wszystkie
launch.from = Wstrzelony Z: [accent]{0} launch.from = Wstrzelony Z: [accent]{0}
launch.destination = Cell: {0} launch.destination = Cel: {0}
configure.invalid = Ilość musi być liczbą pomiędzy 0 a {0}. configure.invalid = Ilość musi być liczbą pomiędzy 0 a {0}.
add = Dodaj... add = Dodaj...
boss.health = Zdrowie Strażnika boss.health = Zdrowie Strażnika
@@ -832,6 +833,7 @@ setting.chatopacity.name = Przezroczystość czatu
setting.lasersopacity.name = Przezroczystość laserów zasilających setting.lasersopacity.name = Przezroczystość laserów zasilających
setting.bridgeopacity.name = Przezroczystość mostów setting.bridgeopacity.name = Przezroczystość mostów
setting.playerchat.name = Wyświetlaj czat w grze setting.playerchat.name = Wyświetlaj czat w grze
setting.showweather.name = Pokaż pogodę
public.confirm = Czy chcesz ustawić swoją grę jako publiczną?\n[accent]Każdy będzie mógł dołączyć do Twojej gry.\n[lightgray]Można to później zmienić w Ustawienia->Gra->Widoczność Gry Publicznej. public.confirm = Czy chcesz ustawić swoją grę jako publiczną?\n[accent]Każdy będzie mógł dołączyć do Twojej gry.\n[lightgray]Można to później zmienić w Ustawienia->Gra->Widoczność Gry Publicznej.
public.beta = Wersje beta gry nie mogą tworzyć publicznych pokoi. public.beta = Wersje beta gry nie mogą tworzyć publicznych pokoi.
uiscale.reset = Skala interfejsu uległa zmianie.\nNaciśnij "OK" by potwierdzić zmiany.\n[scarlet]Cofanie zmian i wyjście z gry za[accent] {0}[] uiscale.reset = Skala interfejsu uległa zmianie.\nNaciśnij "OK" by potwierdzić zmiany.\n[scarlet]Cofanie zmian i wyjście z gry za[accent] {0}[]

View File

@@ -13,6 +13,7 @@ link.google-play.description = Google Play
link.f-droid.description = Catalogul F-Droid link.f-droid.description = Catalogul F-Droid
link.wiki.description = Wikiul oficial al Mindustry link.wiki.description = Wikiul oficial al Mindustry
link.suggestions.description = Sugerează noi funcții link.suggestions.description = Sugerează noi funcții
link.bug.description = Ai găsit vreunul? Raportează-l aici
linkfail = Linkul nu a putut fi deschis!\nAdresa URL a fost copiată. linkfail = Linkul nu a putut fi deschis!\nAdresa URL a fost copiată.
screenshot = Captură de ecran salvată la {0} screenshot = Captură de ecran salvată la {0}
screenshot.invalid = Harta e prea mare. Se poate să nu existe suficientă memorie pentru captura de ecran. screenshot.invalid = Harta e prea mare. Se poate să nu existe suficientă memorie pentru captura de ecran.
@@ -832,6 +833,7 @@ setting.chatopacity.name = Opacitate Chat
setting.lasersopacity.name = Opacitate Laser Electric setting.lasersopacity.name = Opacitate Laser Electric
setting.bridgeopacity.name = Opacitate Poduri setting.bridgeopacity.name = Opacitate Poduri
setting.playerchat.name = Vezi Chat Temporar setting.playerchat.name = Vezi Chat Temporar
setting.showweather.name = Vezi Vremea
public.confirm = Vrei să îți faci jocul public?\n[accent]Oricine va putea intra în jocurile tale.\n[lightgray]Asta se poate schimba mai târziu în Setări->Joc->Vizibilitatea Jocurilor Publice. public.confirm = Vrei să îți faci jocul public?\n[accent]Oricine va putea intra în jocurile tale.\n[lightgray]Asta se poate schimba mai târziu în Setări->Joc->Vizibilitatea Jocurilor Publice.
public.beta = De reținut că versiunile beta ale jocului nu poate face servere publice. public.beta = De reținut că versiunile beta ale jocului nu poate face servere publice.
uiscale.reset = Scara interfeței a fost schimbată.\nApasă "OK" pt a confirma această scară.\n[scarlet]Revin setările și se iese în [accent] {0}[] secunde... uiscale.reset = Scara interfeței a fost schimbată.\nApasă "OK" pt a confirma această scară.\n[scarlet]Revin setările și se iese în [accent] {0}[] secunde...

Binary file not shown.

View File

@@ -50,5 +50,5 @@ const cons = method => new Cons(){get: method}
const prov = method => new Prov(){get: method} const prov = method => new Prov(){get: method}
const func = method => new Func(){get: method} const func = method => new Func(){get: method}
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer})) const newEffect = (lifetime, renderer) => new Effect.Effect(lifetime, new Effect.EffectRenderer({render: renderer}))
Call = Packages.mindustry.gen.Call Call = Packages.mindustry.gen.Call

View File

@@ -52,7 +52,7 @@ const cons = method => new Cons(){get: method}
const prov = method => new Prov(){get: method} const prov = method => new Prov(){get: method}
const func = method => new Func(){get: method} const func = method => new Func(){get: method}
const newEffect = (lifetime, renderer) => new Effects.Effect(lifetime, new Effects.EffectRenderer({render: renderer})) const newEffect = (lifetime, renderer) => new Effect.Effect(lifetime, new Effect.EffectRenderer({render: renderer}))
Call = Packages.mindustry.gen.Call Call = Packages.mindustry.gen.Call
importPackage(Packages.arc) importPackage(Packages.arc)
@@ -165,6 +165,7 @@ const SectorInvasionEvent = Packages.mindustry.game.EventType.SectorInvasionEven
const SectorLoseEvent = Packages.mindustry.game.EventType.SectorLoseEvent const SectorLoseEvent = Packages.mindustry.game.EventType.SectorLoseEvent
const WorldLoadEvent = Packages.mindustry.game.EventType.WorldLoadEvent const WorldLoadEvent = Packages.mindustry.game.EventType.WorldLoadEvent
const ClientLoadEvent = Packages.mindustry.game.EventType.ClientLoadEvent const ClientLoadEvent = Packages.mindustry.game.EventType.ClientLoadEvent
const ContentInitEvent = Packages.mindustry.game.EventType.ContentInitEvent
const BlockInfoEvent = Packages.mindustry.game.EventType.BlockInfoEvent const BlockInfoEvent = Packages.mindustry.game.EventType.BlockInfoEvent
const CoreItemDeliverEvent = Packages.mindustry.game.EventType.CoreItemDeliverEvent const CoreItemDeliverEvent = Packages.mindustry.game.EventType.CoreItemDeliverEvent
const TurretAmmoDeliverEvent = Packages.mindustry.game.EventType.TurretAmmoDeliverEvent const TurretAmmoDeliverEvent = Packages.mindustry.game.EventType.TurretAmmoDeliverEvent

View File

@@ -130,6 +130,6 @@ public class BuilderAI extends AIController{
@Override @Override
public boolean shouldShoot(){ public boolean shouldShoot(){
return !((Builderc)unit).isBuilding(); return !unit.isBuilding();
} }
} }

View File

@@ -12,7 +12,7 @@ public class FlyingAI extends AIController{
@Override @Override
public void updateMovement(){ public void updateMovement(){
if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){ if(target != null && unit.hasWeapons() && command() == UnitCommand.attack){
if(unit.type.weapons.first().rotate){ if(!unit.type.circleTarget){
moveTo(target, unit.range() * 0.8f); moveTo(target, unit.range() * 0.8f);
unit.lookAt(target); unit.lookAt(target);
}else{ }else{

View File

@@ -33,11 +33,10 @@ public class FormationAI extends AIController implements FormationMember{
} }
if(unit.type.canBoost){ if(unit.type.canBoost){
unit.elevation = Mathf.approachDelta(unit.elevation, !unit.canPassOn() ? 1f : leader.type.canBoost ? leader.elevation : 0f, 0.08f); unit.elevation = Mathf.approachDelta(unit.elevation, unit.onSolid() ? 1f : leader.type.canBoost ? leader.elevation : 0f, 0.08f);
} }
unit.controlWeapons(true, leader.isShooting); unit.controlWeapons(true, leader.isShooting);
// unit.moveAt(Tmp.v1.set(deltaX, deltaY).limit(unit.type().speed));
unit.aim(leader.aimX(), leader.aimY()); unit.aim(leader.aimX(), leader.aimY());
@@ -47,17 +46,10 @@ public class FormationAI extends AIController implements FormationMember{
unit.lookAt(unit.vel.angle()); unit.lookAt(unit.vel.angle());
} }
Vec2 realtarget = vec.set(target); Vec2 realtarget = vec.set(target).add(leader.vel.x, leader.vel.y);
float margin = 4f; float speed = unit.realSpeed() * unit.floorSpeedMultiplier();
unit.approach(Mathf.arrive(unit.x, unit.y, realtarget.x, realtarget.y, unit.vel, 0f, 0.01f, speed, 1f));
float speed = unit.realSpeed();
if(unit.dst(realtarget) <= margin){
//unit.vel.approachDelta(Vec2.ZERO, speed * type.accel / 2f);
}else{
unit.moveAt(realtarget.sub(unit).limit(speed));
}
if(unit.canMine() && leader.canMine()){ if(unit.canMine() && leader.canMine()){
if(leader.mineTile != null && unit.validMine(leader.mineTile)){ if(leader.mineTile != null && unit.validMine(leader.mineTile)){

View File

@@ -1,6 +1,7 @@
package mindustry.ai.types; package mindustry.ai.types;
import arc.math.*; import arc.math.*;
import arc.math.geom.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.ai.*; import mindustry.ai.*;
@@ -67,7 +68,7 @@ public class LogicAI extends AIController{
moveTo(Tmp.v1.set(moveX, moveY), 1f, 30f); moveTo(Tmp.v1.set(moveX, moveY), 1f, 30f);
} }
case approach -> { case approach -> {
moveTo(Tmp.v1.set(moveX, moveY), moveRad - 8f, 8f); moveTo(Tmp.v1.set(moveX, moveY), moveRad - 7f, 7);
} }
case pathfind -> { case pathfind -> {
Building core = unit.closestEnemyCore(); Building core = unit.closestEnemyCore();
@@ -112,6 +113,24 @@ public class LogicAI extends AIController{
return radars.add(radar); return radars.add(radar);
} }
@Override
protected void moveTo(Position target, float circleLength, float smooth){
if(target == null) return;
vec.set(target).sub(unit);
float length = circleLength <= 0.001f ? 1f : Mathf.clamp((unit.dst(target) - circleLength) / smooth, -1f, 1f);
vec.setLength(unit.realSpeed() * length);
if(length < -0.5f){
vec.rotate(180f);
}else if(length < 0){
vec.setZero();
}
unit.approach(vec);
}
//always retarget //always retarget
@Override @Override
protected boolean retarget(){ protected boolean retarget(){

View File

@@ -983,7 +983,7 @@ public class Blocks implements ContentList{
junction = new Junction("junction"){{ junction = new Junction("junction"){{
requirements(Category.distribution, with(Items.copper, 2), true); requirements(Category.distribution, with(Items.copper, 2), true);
speed = 26; speed = 26;
capacity = 12; capacity = 6;
health = 30; health = 30;
buildCostMultiplier = 6f; buildCostMultiplier = 6f;
}}; }};

View File

@@ -32,6 +32,7 @@ public class Items implements ContentList{
sand = new Item("sand", Color.valueOf("f7cba4")){{ sand = new Item("sand", Color.valueOf("f7cba4")){{
alwaysUnlocked = true; alwaysUnlocked = true;
lowPriority = true;
}}; }};
coal = new Item("coal", Color.valueOf("272727")){{ coal = new Item("coal", Color.valueOf("272727")){{

View File

@@ -25,10 +25,10 @@ public class StatusEffects implements ContentList{
effect = Fx.burning; effect = Fx.burning;
init(() -> { init(() -> {
opposite(wet,freezing); opposite(wet, freezing);
trans(tarred, ((unit, time, newTime, result) -> { trans(tarred, ((unit, time, newTime, result) -> {
unit.damagePierce(8f); unit.damagePierce(8f);
Fx.burning.at(unit.x() + Mathf.range(unit.bounds() / 2f), unit.y() + Mathf.range(unit.bounds() / 2f)); Fx.burning.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
result.set(this, Math.min(time + newTime, 300f)); result.set(this, Math.min(time + newTime, 300f));
})); }));
}); });
@@ -93,8 +93,12 @@ public class StatusEffects implements ContentList{
effect = Fx.melting; effect = Fx.melting;
init(() -> { init(() -> {
trans(tarred, ((unit, time, newTime, result) -> result.set(this, Math.min(time + newTime / 2f, 140f))));
opposite(wet, freezing); opposite(wet, freezing);
trans(tarred, ((unit, time, newTime, result) -> {
unit.damagePierce(8f);
Fx.burning.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
result.set(this, Math.min(time + newTime, 200f));
}));
}); });
}}; }};
@@ -119,7 +123,7 @@ public class StatusEffects implements ContentList{
effect = Fx.oily; effect = Fx.oily;
init(() -> { init(() -> {
trans(melting, ((unit, time, newTime, result) -> result.set(burning, newTime + time))); trans(melting, ((unit, time, newTime, result) -> result.set(melting, newTime + time)));
trans(burning, ((unit, time, newTime, result) -> result.set(burning, newTime + time))); trans(burning, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
}); });
}}; }};

View File

@@ -760,7 +760,7 @@ public class UnitTypes implements ContentList{
ejectEffect = Fx.casing1; ejectEffect = Fx.casing1;
shootSound = Sounds.artillery; shootSound = Sounds.artillery;
rotate = true; rotate = true;
occlusion = 8f; shadow = 8f;
recoil = 3f; recoil = 3f;
bullet = new ArtilleryBulletType(2f, 12){{ bullet = new ArtilleryBulletType(2f, 12){{
@@ -827,7 +827,7 @@ public class UnitTypes implements ContentList{
ejectEffect = Fx.casing1; ejectEffect = Fx.casing1;
shootSound = Sounds.shootBig; shootSound = Sounds.shootBig;
rotate = true; rotate = true;
occlusion = 12f; shadow = 12f;
recoil = 3f; recoil = 3f;
shots = 2; shots = 2;
spacing = 17f; spacing = 17f;
@@ -859,7 +859,7 @@ public class UnitTypes implements ContentList{
ejectEffect = Fx.casing3; ejectEffect = Fx.casing3;
shootSound = Sounds.artillery; shootSound = Sounds.artillery;
rotate = true; rotate = true;
occlusion = 30f; shadow = 30f;
bullet = new ArtilleryBulletType(3f, 50){{ bullet = new ArtilleryBulletType(3f, 50){{
hitEffect = Fx.sapExplosion; hitEffect = Fx.sapExplosion;
@@ -918,6 +918,7 @@ public class UnitTypes implements ContentList{
range = 140f; range = 140f;
targetAir = false; targetAir = false;
commandLimit = 4; commandLimit = 4;
circleTarget = true;
weapons.add(new Weapon(){{ weapons.add(new Weapon(){{
y = 0f; y = 0f;
@@ -950,6 +951,7 @@ public class UnitTypes implements ContentList{
armor = 3f; armor = 3f;
targetFlag = BlockFlag.factory; targetFlag = BlockFlag.factory;
commandLimit = 5; commandLimit = 5;
circleTarget = true;
weapons.add(new Weapon(){{ weapons.add(new Weapon(){{
minShootVelocity = 0.75f; minShootVelocity = 0.75f;
@@ -1059,7 +1061,7 @@ public class UnitTypes implements ContentList{
bullet = missiles; bullet = missiles;
shootSound = Sounds.missile; shootSound = Sounds.missile;
rotate = true; rotate = true;
occlusion = 6f; shadow = 6f;
}}, }},
new Weapon("missiles-mount"){{ new Weapon("missiles-mount"){{
y = -8f; y = -8f;
@@ -1070,7 +1072,7 @@ public class UnitTypes implements ContentList{
bullet = missiles; bullet = missiles;
shootSound = Sounds.missile; shootSound = Sounds.missile;
rotate = true; rotate = true;
occlusion = 6f; shadow = 6f;
}}, }},
new Weapon("large-bullet-mount"){{ new Weapon("large-bullet-mount"){{
y = 2f; y = 2f;
@@ -1082,7 +1084,7 @@ public class UnitTypes implements ContentList{
ejectEffect = Fx.casing1; ejectEffect = Fx.casing1;
shootSound = Sounds.shootBig; shootSound = Sounds.shootBig;
rotate = true; rotate = true;
occlusion = 8f; shadow = 8f;
bullet = new BasicBulletType(7f, 50){{ bullet = new BasicBulletType(7f, 50){{
width = 12f; width = 12f;
height = 18f; height = 18f;
@@ -1130,7 +1132,7 @@ public class UnitTypes implements ContentList{
reload = 45f; reload = 45f;
recoil = 4f; recoil = 4f;
shootSound = Sounds.laser; shootSound = Sounds.laser;
occlusion = 20f; shadow = 20f;
rotate = true; rotate = true;
bullet = new LaserBulletType(){{ bullet = new LaserBulletType(){{
@@ -1150,7 +1152,7 @@ public class UnitTypes implements ContentList{
rotateSpeed = 2f; rotateSpeed = 2f;
reload = 9f; reload = 9f;
shootSound = Sounds.shoot; shootSound = Sounds.shoot;
occlusion = 7f; shadow = 7f;
rotate = true; rotate = true;
recoil = 0.5f; recoil = 0.5f;
@@ -1165,7 +1167,7 @@ public class UnitTypes implements ContentList{
shake = 1f; shake = 1f;
shootSound = Sounds.shoot; shootSound = Sounds.shoot;
rotate = true; rotate = true;
occlusion = 12f; shadow = 12f;
bullet = fragBullet; bullet = fragBullet;
}}); }});
}}; }};
@@ -1517,7 +1519,7 @@ public class UnitTypes implements ContentList{
shootY = 7f; shootY = 7f;
shake = 5f; shake = 5f;
recoil = 4f; recoil = 4f;
occlusion = 12f; shadow = 12f;
shots = 1; shots = 1;
inaccuracy = 3f; inaccuracy = 3f;
@@ -1553,7 +1555,7 @@ public class UnitTypes implements ContentList{
x = 8.5f; x = 8.5f;
y = -9f; y = -9f;
occlusion = 6f; shadow = 6f;
rotateSpeed = 4f; rotateSpeed = 4f;
rotate = true; rotate = true;
@@ -1609,7 +1611,7 @@ public class UnitTypes implements ContentList{
rotateSpeed = 4f; rotateSpeed = 4f;
mirror = false; mirror = false;
occlusion = 20f; shadow = 20f;
shootY = 2f; shootY = 2f;
recoil = 4f; recoil = 4f;
@@ -1655,7 +1657,7 @@ public class UnitTypes implements ContentList{
shootY = 7f; shootY = 7f;
shake = 2f; shake = 2f;
recoil = 3f; recoil = 3f;
occlusion = 12f; shadow = 12f;
ejectEffect = Fx.casing3; ejectEffect = Fx.casing3;
shootSound = Sounds.shootBig; shootSound = Sounds.shootBig;
@@ -1701,7 +1703,7 @@ public class UnitTypes implements ContentList{
shootY = 23f; shootY = 23f;
shake = 6f; shake = 6f;
recoil = 10.5f; recoil = 10.5f;
occlusion = 50f; shadow = 50f;
shootSound = Sounds.railgun; shootSound = Sounds.railgun;
shots = 1; shots = 1;

View File

@@ -1,5 +1,6 @@
package mindustry.core; package mindustry.core;
import arc.*;
import arc.files.*; import arc.files.*;
import arc.func.*; import arc.func.*;
import arc.graphics.*; import arc.graphics.*;
@@ -7,8 +8,10 @@ import arc.struct.*;
import arc.util.*; import arc.util.*;
import mindustry.content.*; import mindustry.content.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.game.EventType.*;
import mindustry.entities.bullet.*; import mindustry.entities.bullet.*;
import mindustry.mod.Mods.*; import mindustry.mod.Mods.*;
import mindustry.net.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
@@ -97,6 +100,7 @@ public class ContentLoader{
public void init(){ public void init(){
initialize(Content::init); initialize(Content::init);
if(constants != null) constants.init(); if(constants != null) constants.init();
Events.fire(new ContentInitEvent());
} }
/** Calls Content#load() on everything. Use only after all modules have been created on the client.*/ /** Calls Content#load() on everything. Use only after all modules have been created on the client.*/

View File

@@ -341,7 +341,7 @@ public class Control implements ApplicationListener, Loadable{
state.rules.waves = true; state.rules.waves = true;
//reset win wave?? //reset win wave??
state.rules.winWave = state.rules.attackMode ? -1 : sector.preset != null && sector.preset.captureWave > 0 ? sector.preset.captureWave : state.rules.winWave > state.wave ? state.rules.winWave : 40; state.rules.winWave = state.rules.attackMode ? -1 : sector.preset != null && sector.preset.captureWave > 0 ? sector.preset.captureWave : state.rules.winWave > state.wave ? state.rules.winWave : 30;
//if there's still an enemy base left, fix it //if there's still an enemy base left, fix it
if(state.rules.attackMode){ if(state.rules.attackMode){
@@ -424,7 +424,7 @@ public class Control implements ApplicationListener, Loadable{
net.dispose(); net.dispose();
Musics.dispose(); Musics.dispose();
Sounds.dispose(); Sounds.dispose();
ui.editor.dispose(); if(ui != null && ui.editor != null) ui.editor.dispose();
} }
@Override @Override

View File

@@ -284,7 +284,7 @@ public class NetServer implements ApplicationListener{
} }
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
result.append(Strings.format("[orange]-- Commands Page[lightgray] @[gray]/[lightgray]@[orange] --\n\n", (page+1), pages)); result.append(Strings.format("[orange]-- Commands Page[lightgray] @[gray]/[lightgray]@[orange] --\n\n", (page + 1), pages));
for(int i = commandsPerPage * page; i < Math.min(commandsPerPage * (page + 1), clientCommands.getCommandList().size); i++){ for(int i = commandsPerPage * page; i < Math.min(commandsPerPage * (page + 1), clientCommands.getCommandList().size); i++){
Command command = clientCommands.getCommandList().get(i); Command command = clientCommands.getCommandList().get(i);
@@ -347,8 +347,8 @@ public class NetServer implements ApplicationListener{
boolean checkPass(){ boolean checkPass(){
if(votes >= votesRequired()){ if(votes >= votesRequired()){
Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] @[orange] will be banned from the server for @ minutes.", target.name, (kickDuration/60))); Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] @[orange] will be banned from the server for @ minutes.", target.name, (kickDuration / 60)));
target.getInfo().lastKicked = Time.millis() + kickDuration*1000; target.getInfo().lastKicked = Time.millis() + kickDuration * 1000;
Groups.player.each(p -> p.uuid().equals(target.uuid()), p -> p.kick(KickReason.vote)); Groups.player.each(p -> p.uuid().equals(target.uuid()), p -> p.kick(KickReason.vote));
map[0] = null; map[0] = null;
task.cancel(); task.cancel();

View File

@@ -22,8 +22,8 @@ public interface Platform{
/** Dynamically loads a jar file. */ /** Dynamically loads a jar file. */
default Class<?> loadJar(Fi jar, String mainClass) throws Exception{ default Class<?> loadJar(Fi jar, String mainClass) throws Exception{
URLClassLoader classLoader = new URLClassLoader(new URL[]{jar.file().toURI().toURL()}, ClassLoader.getSystemClassLoader()); URLClassLoader classLoader = new URLClassLoader(new URL[]{jar.file().toURI().toURL()}, getClass().getClassLoader());
return classLoader.loadClass(mainClass); return Class.forName(mainClass, true, classLoader);
} }
/** Steam: Update lobby visibility.*/ /** Steam: Update lobby visibility.*/

View File

@@ -66,7 +66,7 @@ public class Renderer implements ApplicationListener{
float dest = Mathf.round(targetscale, 0.5f); float dest = Mathf.round(targetscale, 0.5f);
camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f); camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f);
if(Mathf.within(camerascale, dest, 0.001f)) camerascale = dest; if(Mathf.equal(camerascale, dest, 0.001f)) camerascale = dest;
laserOpacity = Core.settings.getInt("lasersopacity") / 100f; laserOpacity = Core.settings.getInt("lasersopacity") / 100f;
if(landTime > 0){ if(landTime > 0){
@@ -111,7 +111,10 @@ public class Renderer implements ApplicationListener{
minimap.dispose(); minimap.dispose();
effectBuffer.dispose(); effectBuffer.dispose();
blocks.dispose(); blocks.dispose();
planets.dispose(); if(planets != null){
planets.dispose();
planets = null;
}
if(bloom != null){ if(bloom != null){
bloom.dispose(); bloom.dispose();
bloom = null; bloom = null;

View File

@@ -186,14 +186,14 @@ public class World{
/** /**
* Call to signify the beginning of map loading. * Call to signify the beginning of map loading.
* BuildinghangeEvents will not be fired until endMapLoad(). * TileEvents will not be fired until endMapLoad().
*/ */
public void beginMapLoad(){ public void beginMapLoad(){
generating = true; generating = true;
} }
/** /**
* Call to signify the end of map loading. Updates tile occlusions and sets up physics for the world. * Call to signify the end of map loading. Updates tile proximities and sets up physics for the world.
* A WorldLoadEvent will be fire. * A WorldLoadEvent will be fire.
*/ */
public void endMapLoad(){ public void endMapLoad(){

View File

@@ -23,7 +23,7 @@ public class Damage{
private static Tile furthest; private static Tile furthest;
private static Rect rect = new Rect(); private static Rect rect = new Rect();
private static Rect hitrect = new Rect(); private static Rect hitrect = new Rect();
private static Vec2 tr = new Vec2(); private static Vec2 tr = new Vec2(), seg1 = new Vec2(), seg2 = new Vec2();
private static Seq<Unit> units = new Seq<>(); private static Seq<Unit> units = new Seq<>();
private static GridBits bits = new GridBits(30, 30); private static GridBits bits = new GridBits(30, 30);
private static IntQueue propagation = new IntQueue(); private static IntQueue propagation = new IntQueue();
@@ -120,6 +120,7 @@ public class Damage{
collidedBlocks.clear(); collidedBlocks.clear();
tr.trns(angle, length); tr.trns(angle, length);
Intc2 collider = (cx, cy) -> { Intc2 collider = (cx, cy) -> {
Building tile = world.build(cx, cy); Building tile = world.build(cx, cy);
boolean collide = tile != null && collidedBlocks.add(tile.pos()); boolean collide = tile != null && collidedBlocks.add(tile.pos());
@@ -131,17 +132,21 @@ public class Damage{
} }
//try to heal the tile //try to heal the tile
if(collide && hitter.type.collides(hitter, tile)){ if(collide && hitter.type.testCollision(hitter, tile)){
hitter.type.hitTile(hitter, tile, tile.health, false); hitter.type.hitTile(hitter, tile, tile.health, false);
} }
} }
}; };
if(hitter.type.collidesGround){ if(hitter.type.collidesGround){
world.raycastEachWorld(x, y, x + tr.x, y + tr.y, (cx, cy) -> { seg1.set(x, y);
seg2.set(seg1).add(tr);
world.raycastEachWorld(x, y, seg2.x, seg2.y, (cx, cy) -> {
collider.get(cx, cy); collider.get(cx, cy);
if(large){
for(Point2 p : Geometry.d4){ for(Point2 p : Geometry.d4){
Tile other = world.tile(p.x + cx, p.y + cy);
if(other != null && (large || Intersector.intersectSegmentRectangle(seg1, seg2, other.getBounds(Tmp.r1)))){
collider.get(cx + p.x, cy + p.y); collider.get(cx + p.x, cy + p.y);
} }
} }

View File

@@ -58,8 +58,8 @@ public class Predict{
ddy += h.deltaY(); ddy += h.deltaY();
} }
if(src instanceof Hitboxc h){ if(src instanceof Hitboxc h){
ddx -= h.deltaX()/(Time.delta); ddx -= h.deltaX();
ddy -= h.deltaY()/(Time.delta); ddy -= h.deltaY();
} }
return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), ddx, ddy, v); return intercept(src.getX(), src.getY(), dst.getX(), dst.getY(), ddx, ddy, v);
} }

View File

@@ -14,12 +14,12 @@ public class Puddles{
public static final float maxLiquid = 70f; public static final float maxLiquid = 70f;
/** Deposists a Puddle between tile and source. */ /** Deposits a Puddle between tile and source. */
public static void deposit(Tile tile, Tile source, Liquid liquid, float amount){ public static void deposit(Tile tile, Tile source, Liquid liquid, float amount){
deposit(tile, source, liquid, amount, 0); deposit(tile, source, liquid, amount, 0);
} }
/** Deposists a Puddle at a tile. */ /** Deposits a Puddle at a tile. */
public static void deposit(Tile tile, Liquid liquid, float amount){ public static void deposit(Tile tile, Liquid liquid, float amount){
deposit(tile, tile, liquid, amount, 0); deposit(tile, tile, liquid, amount, 0);
} }
@@ -38,9 +38,9 @@ public class Puddles{
Puddle p = map.get(tile.pos()); Puddle p = map.get(tile.pos());
if(generation == 0 && p != null && p.lastRipple() <= Time.time - 40f){ if(generation == 0 && p != null && p.lastRipple <= Time.time - 40f){
Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, tile.floor().liquidDrop.color); Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, tile.floor().liquidDrop.color);
p.lastRipple(Time.time); p.lastRipple = Time.time;
} }
return; return;
} }
@@ -62,9 +62,9 @@ public class Puddles{
}else if(p.liquid() == liquid){ }else if(p.liquid() == liquid){
p.accepting(Math.max(amount, p.accepting())); p.accepting(Math.max(amount, p.accepting()));
if(generation == 0 && p.lastRipple() <= Time.time - 40f && p.amount() >= maxLiquid / 2f){ if(generation == 0 && p.lastRipple <= Time.time - 40f && p.amount() >= maxLiquid / 2f){
Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, p.liquid().color); Fx.ripple.at((tile.worldx() + source.worldx()) / 2f, (tile.worldy() + source.worldy()) / 2f, 1f, p.liquid().color);
p.lastRipple(Time.time); p.lastRipple = Time.time;
} }
}else{ }else{
p.amount(p.amount() + reactPuddle(p.liquid(), liquid, amount, p.tile(), (p.x() + source.worldx())/2f, (p.y() + source.worldy())/2f)); p.amount(p.amount() + reactPuddle(p.liquid(), liquid, amount, p.tile(), (p.x() + source.worldx())/2f, (p.y() + source.worldy())/2f));

View File

@@ -157,7 +157,7 @@ public abstract class BulletType extends Content{
return Math.max(speed * lifetime * (1f - drag), maxRange); return Math.max(speed * lifetime * (1f - drag), maxRange);
} }
public boolean collides(Bullet bullet, Building tile){ public boolean testCollision(Bullet bullet, Building tile){
return healPercent <= 0.001f || tile.team != bullet.team || tile.healthf() < 1f; return healPercent <= 0.001f || tile.team != bullet.team || tile.healthf() < 1f;
} }

View File

@@ -78,7 +78,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
if(!(tile.block() instanceof ConstructBlock)){ if(!(tile.block() instanceof ConstructBlock)){
if(!current.initialized && !current.breaking && Build.validPlace(current.block, team, current.x, current.y, current.rotation)){ if(!current.initialized && !current.breaking && Build.validPlace(current.block, team, current.x, current.y, current.rotation)){
boolean hasAll = infinite || !Structs.contains(current.block.requirements, i -> core != null && !core.items.has(i.item)); boolean hasAll = infinite || current.isRotation(team) || !Structs.contains(current.block.requirements, i -> core != null && !core.items.has(i.item));
if(hasAll){ if(hasAll){
Call.beginPlace(self(), current.block, team, current.x, current.y, current.rotation); Call.beginPlace(self(), current.block, team, current.x, current.y, current.rotation);
@@ -138,7 +138,8 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
/** @return whether this request should be skipped, in favor of the next one. */ /** @return whether this request should be skipped, in favor of the next one. */
boolean shouldSkip(BuildPlan request, @Nullable Building core){ boolean shouldSkip(BuildPlan request, @Nullable Building core){
//requests that you have at least *started* are considered //requests that you have at least *started* are considered
if(state.rules.infiniteResources || team.rules().infiniteResources || request.breaking || core == null) return false; if(state.rules.infiniteResources || team.rules().infiniteResources || request.breaking || core == null || request.isRotation(team)) return false;
return (request.stuck && !core.items.has(request.block.requirements)) || (Structs.contains(request.block.requirements, i -> !core.items.has(i.item) && Mathf.round(i.amount * state.rules.buildCostMultiplier) > 0) && !request.initialized); return (request.stuck && !core.items.has(request.block.requirements)) || (Structs.contains(request.block.requirements, i -> !core.items.has(i.item) && Mathf.round(i.amount * state.rules.buildCostMultiplier) > 0) && !request.initialized);
} }

View File

@@ -125,7 +125,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
Building tile = world.build(x, y); Building tile = world.build(x, y);
if(tile == null || !isAdded()) return false; if(tile == null || !isAdded()) return false;
if(tile.collide(self()) && type.collides(self(), tile) && !tile.dead() && (type.collidesTeam || tile.team != team) && !(type.pierceBuilding && collided.contains(tile.id))){ if(tile.collide(self()) && type.testCollision(self(), tile) && !tile.dead() && (type.collidesTeam || tile.team != team) && !(type.pierceBuilding && collided.contains(tile.id))){
boolean remove = false; boolean remove = false;
float health = tile.health; float health = tile.health;

View File

@@ -68,7 +68,7 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
if(isFlying() != wasFlying){ if(isFlying() != wasFlying){
if(wasFlying){ if(wasFlying){
if(tileOn() != null){ if(tileOn() != null){
Fx.unitLand.at(x, y, floorOn().isLiquid ? 1f : 0.5f, floorOn().mapColor); Fx.unitLand.at(x, y, floorOn().isLiquid ? 1f : 0.5f, tileOn().floor().mapColor);
} }
} }

View File

@@ -83,4 +83,12 @@ abstract class MechComp implements Posc, Flyingc, Hitboxc, Unitc, Mechc, Elevati
walked = true; walked = true;
} }
} }
@Override
public void approach(Vec2 vector){
if(!vector.isZero(0.09f)){
//mark walking state when moving in a controlled manner
walked = true;
}
}
} }

View File

@@ -29,4 +29,15 @@ abstract class PhysicsComp implements Velc, Hitboxc, Flyingc{
void impulse(Vec2 v){ void impulse(Vec2 v){
impulse(v.x, v.y); impulse(v.x, v.y);
} }
void impulseNet(Vec2 v){
impulse(v.x, v.y);
//manually move units to simulate velocity for remote players
if(isRemote()){
float mass = mass();
move(v.x / mass, v.y / mass);
}
}
} }

View File

@@ -22,8 +22,7 @@ import static mindustry.entities.Puddles.*;
abstract class PuddleComp implements Posc, Puddlec, Drawc{ abstract class PuddleComp implements Posc, Puddlec, Drawc{
private static final int maxGeneration = 2; private static final int maxGeneration = 2;
private static final Color tmp = new Color(); private static final Color tmp = new Color();
private static final Rect rect = new Rect(); private static final Rect rect = new Rect(), rect2 = new Rect();
private static final Rect rect2 = new Rect();
private static int seeds; private static int seeds;
@Import float x, y; @Import float x, y;
@@ -44,7 +43,6 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
float addSpeed = accepting > 0 ? 3f : 0f; float addSpeed = accepting > 0 ? 3f : 0f;
amount -= Time.delta * (1f - liquid.viscosity) / (5f + addSpeed); amount -= Time.delta * (1f - liquid.viscosity) / (5f + addSpeed);
amount += accepting; amount += accepting;
accepting = 0f; accepting = 0f;
@@ -54,7 +52,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
Tile other = world.tile(tile.x + point.x, tile.y + point.y); Tile other = world.tile(tile.x + point.x, tile.y + point.y);
if(other != null && other.block() == Blocks.air){ if(other != null && other.block() == Blocks.air){
Puddles.deposit(other, tile, liquid, deposited, generation + 1); Puddles.deposit(other, tile, liquid, deposited, generation + 1);
amount -= deposited / 2f; //tweak to speed up/slow down Puddlec propagation amount -= deposited / 2f; //tweak to speed up/slow down Puddle propagation
} }
} }
} }

View File

@@ -38,6 +38,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Import Team team; @Import Team team;
@Import int id; @Import int id;
@Import @Nullable Tile mineTile; @Import @Nullable Tile mineTile;
@Import Vec2 vel;
private UnitController controller; private UnitController controller;
UnitType type; UnitType type;
@@ -51,6 +52,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
moveAt(vector, type.accel); moveAt(vector, type.accel);
} }
public void approach(Vec2 vector){
vel.approachDelta(vector, type.accel * realSpeed() * floorSpeedMultiplier());
}
public void aimLook(Position pos){ public void aimLook(Position pos){
aim(pos); aim(pos);
lookAt(pos); lookAt(pos);
@@ -397,6 +402,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
/** Actually destroys the unit, removing it and creating explosions. **/ /** Actually destroys the unit, removing it and creating explosions. **/
public void destroy(){ public void destroy(){
if(!isAdded()) return;
float explosiveness = 2f + item().explosiveness * stack().amount * 1.53f; float explosiveness = 2f + item().explosiveness * stack().amount * 1.53f;
float flammability = item().flammability * stack().amount / 1.9f; float flammability = item().flammability * stack().amount / 1.9f;

View File

@@ -3,6 +3,7 @@ package mindustry.entities.units;
import arc.func.*; import arc.func.*;
import arc.math.geom.*; import arc.math.geom.*;
import arc.util.*; import arc.util.*;
import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.world.*; import mindustry.world.*;
@@ -61,6 +62,12 @@ public class BuildPlan implements Position{
} }
public boolean isRotation(Team team){
if(breaking) return false;
Tile tile = tile();
return tile != null && tile.team() == team && tile.block() == block && tile.build != null && tile.build.rotation != rotation;
}
public boolean samePos(BuildPlan other){ public boolean samePos(BuildPlan other){
return x == other.x && y == other.y; return x == other.x && y == other.y;
} }

View File

@@ -64,6 +64,8 @@ public class EventType{
public static class CoreItemDeliverEvent{} public static class CoreItemDeliverEvent{}
/** Called when the player opens info for a specific block.*/ /** Called when the player opens info for a specific block.*/
public static class BlockInfoEvent{} public static class BlockInfoEvent{}
/** Called *after* all content has been initialized. */
public static class ContentInitEvent{}
/** Called when the client game is first loaded. */ /** Called when the client game is first loaded. */
public static class ClientLoadEvent{} public static class ClientLoadEvent{}
/** Called when a game begins and the world is loaded. */ /** Called when a game begins and the world is loaded. */

View File

@@ -32,6 +32,7 @@ import mindustry.ui.fragments.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.*; import mindustry.world.blocks.*;
import mindustry.world.blocks.ConstructBlock.*; import mindustry.world.blocks.ConstructBlock.*;
import mindustry.world.blocks.distribution.*;
import mindustry.world.blocks.payloads.*; import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.power.*; import mindustry.world.blocks.power.*;
import mindustry.world.blocks.storage.CoreBlock.*; import mindustry.world.blocks.storage.CoreBlock.*;
@@ -1161,7 +1162,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
} }
if(diagonal){ if(diagonal){
points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY); var start = world.build(startX, startY);
var end = world.build(endX, endY);
if(block != null && start instanceof ChainedBuilding && end instanceof ChainedBuilding
&& block.canReplace(end.block) && block.canReplace(start.block)){
points = Placement.upgradeLine(startX, startY, endX, endY);
}else{
points = Placement.pathfindLine(block != null && block.conveyorPlacement, startX, startY, endX, endY);
}
}else{ }else{
points = Placement.normalizeLine(startX, startY, endX, endY); points = Placement.normalizeLine(startX, startY, endX, endY);
} }

View File

@@ -6,6 +6,7 @@ import arc.math.geom.*;
import arc.struct.*; import arc.struct.*;
import arc.util.pooling.*; import arc.util.pooling.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.distribution.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
@@ -23,7 +24,6 @@ public class Placement{
/** Normalize a diagonal line into points. */ /** Normalize a diagonal line into points. */
public static Seq<Point2> pathfindLine(boolean conveyors, int startX, int startY, int endX, int endY){ public static Seq<Point2> pathfindLine(boolean conveyors, int startX, int startY, int endX, int endY){
Pools.freeAll(points); Pools.freeAll(points);
points.clear(); points.clear();
if(conveyors && Core.settings.getBool("conveyorpathfinding")){ if(conveyors && Core.settings.getBool("conveyorpathfinding")){
if(astar(startX, startY, endX, endY)){ if(astar(startX, startY, endX, endY)){
@@ -54,6 +54,19 @@ public class Placement{
return points; return points;
} }
public static Seq<Point2> upgradeLine(int startX, int startY, int endX, int endY){
Pools.freeAll(points);
points.clear();
var build = world.build(startX, startY);
points.add(Pools.obtain(Point2.class, Point2::new).set(startX, startY));
while(build instanceof ChainedBuilding chain && (build.tile.x != endX || build.tile.y != endY)){
if(chain.next() == null) return pathfindLine(true, startX, startY, endX, endY);
build = chain.next();
points.add(Pools.obtain(Point2.class, Point2::new).set(build.tile.x, build.tile.y));
}
return points;
}
private static float tileHeuristic(Tile tile, Tile other){ private static float tileHeuristic(Tile tile, Tile other){
Block block = control.input.block; Block block = control.input.block;

View File

@@ -778,7 +778,7 @@ public class LExecutor{
Var va = exec.var(a); Var va = exec.var(a);
Var vb = exec.var(b); Var vb = exec.var(b);
if(op.objFunction2 != null && (va.isobj || vb.isobj)){ if(op.objFunction2 != null && va.isobj && vb.isobj){
//use object function if provided, and one of the variables is an object //use object function if provided, and one of the variables is an object
exec.setnum(dest, op.objFunction2.get(exec.obj(a), exec.obj(b))); exec.setnum(dest, op.objFunction2.get(exec.obj(a), exec.obj(b)));
}else{ }else{

View File

@@ -23,7 +23,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
float scl = 5f; float scl = 5f;
float waterOffset = 0.07f; float waterOffset = 0.07f;
//TODO fix sand near snow (sector 173)
Block[][] arr = Block[][] arr =
{ {
{Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone}, {Blocks.water, Blocks.darksandWater, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.darksand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.darksandTaintedWater, Blocks.stone, Blocks.stone},
@@ -55,7 +54,6 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
float water = 2f / arr[0].length; float water = 2f / arr[0].length;
float rawHeight(Vec3 position){ float rawHeight(Vec3 position){
position = Tmp.v33.set(position).scl(scl); position = Tmp.v33.set(position).scl(scl);
return (Mathf.pow((float)noise.octaveNoise3D(7, 0.5f, 1f/3f, position.x, position.y, position.z), 2.3f) + waterOffset) / (1f + waterOffset); return (Mathf.pow((float)noise.octaveNoise3D(7, 0.5f, 1f/3f, position.x, position.y, position.z), 2.3f) + waterOffset) / (1f + waterOffset);
@@ -340,11 +338,12 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
} }
}else if(floor != Blocks.basalt && floor != Blocks.ice && floor.asFloor().hasSurface()){ }else if(floor != Blocks.basalt && floor != Blocks.ice && floor.asFloor().hasSurface()){
float noise = noise(x + 782, y, 5, 0.75f, 260f, 1f); float noise = noise(x + 782, y, 5, 0.75f, 260f, 1f);
if(noise > 0.72f){ if(noise > 0.67f && !enemies.contains(e -> Mathf.within(x, y, e.x, e.y, 8))){
floor = noise > 0.78f ? Blocks.taintedWater : (floor == Blocks.sand ? Blocks.sandWater : Blocks.darksandTaintedWater); if(noise > 0.72f){
ore = Blocks.air; floor = noise > 0.78f ? Blocks.taintedWater : (floor == Blocks.sand ? Blocks.sandWater : Blocks.darksandTaintedWater);
}else if(noise > 0.67f){ }else{
floor = (floor == Blocks.sand ? floor : Blocks.darksand); floor = (floor == Blocks.sand ? floor : Blocks.darksand);
}
ore = Blocks.air; ore = Blocks.air;
} }
} }

View File

@@ -647,6 +647,14 @@ public class Mods implements Loadable{
meta.hidden = true; meta.hidden = true;
} }
//disallow putting a description after the version
if(meta.version != null){
int line = meta.version.indexOf('\n');
if(line != -1){
meta.version = meta.version.substring(0, line);
}
}
if(!headless){ if(!headless){
Log.info("Loaded mod '@' in @ms", meta.name, Time.elapsed()); Log.info("Loaded mod '@' in @ms", meta.name, Time.elapsed());
} }

View File

@@ -50,6 +50,8 @@ public class BeControl{
Fi dest = Fi.get(System.getProperty("becopy")); Fi dest = Fi.get(System.getProperty("becopy"));
Fi self = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()); Fi self = Fi.get(BeControl.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
for(Fi file : self.parent().findAll(f -> !f.equals(self))) file.delete();
self.copyTo(dest); self.copyTo(dest);
}catch(Throwable e){ }catch(Throwable e){
e.printStackTrace(); e.printStackTrace();

View File

@@ -24,6 +24,8 @@ public class Item extends UnlockableContent{
* 1 cost = 1 tick added to build time * 1 cost = 1 tick added to build time
*/ */
public float cost = 1f; public float cost = 1f;
/** if true, this item is of lowest priority to drills. */
public boolean lowPriority;
public Item(String name, Color color){ public Item(String name, Color color){
super(name); super(name);

View File

@@ -152,10 +152,6 @@ public class Sector{
return res % 2 == 0 ? res : res + 1; return res % 2 == 0 ? res : res + 1;
} }
public void addItem(Item item, int amount){
removeItem(item, -amount);
}
public void removeItems(ItemSeq items){ public void removeItems(ItemSeq items){
ItemSeq copy = items.copy(); ItemSeq copy = items.copy();
copy.each((i, a) -> copy.set(i, -a)); copy.each((i, a) -> copy.set(i, -a));
@@ -169,7 +165,6 @@ public class Sector{
} }
public void addItems(ItemSeq items){ public void addItems(ItemSeq items){
if(net.client()) return;
if(isBeingPlayed()){ if(isBeingPlayed()){
if(state.rules.defaultTeam.core() != null){ if(state.rules.defaultTeam.core() != null){

View File

@@ -46,7 +46,7 @@ public class UnitType extends UnlockableContent{
public float health = 200f, range = -1, armor = 0f, maxRange = -1f; public float health = 200f, range = -1, armor = 0f, maxRange = -1f;
public float crashDamageMultiplier = 1f; public float crashDamageMultiplier = 1f;
public boolean targetAir = true, targetGround = true; public boolean targetAir = true, targetGround = true;
public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false; public boolean faceTarget = true, rotateShooting = true, isCounted = true, lowAltitude = false, circleTarget = false;
public boolean canBoost = false; public boolean canBoost = false;
public boolean destructibleWreck = true; public boolean destructibleWreck = true;
public float groundLayer = Layer.groundUnit; public float groundLayer = Layer.groundUnit;
@@ -106,7 +106,7 @@ public class UnitType extends UnlockableContent{
public Seq<Weapon> weapons = new Seq<>(); public Seq<Weapon> weapons = new Seq<>();
public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion, public TextureRegion baseRegion, legRegion, region, shadowRegion, cellRegion,
occlusionRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion; softShadowRegion, jointRegion, footRegion, legBaseRegion, baseJointRegion, outlineRegion;
public TextureRegion[] wreckRegions; public TextureRegion[] wreckRegions;
protected @Nullable ItemStack[] cachedRequirements; protected @Nullable ItemStack[] cachedRequirements;
@@ -351,7 +351,7 @@ public class UnitType extends UnlockableContent{
legBaseRegion = Core.atlas.find(name + "-leg-base", name + "-leg"); legBaseRegion = Core.atlas.find(name + "-leg-base", name + "-leg");
baseRegion = Core.atlas.find(name + "-base"); baseRegion = Core.atlas.find(name + "-base");
cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell")); cellRegion = Core.atlas.find(name + "-cell", Core.atlas.find("power-cell"));
occlusionRegion = Core.atlas.find("circle-shadow"); softShadowRegion = Core.atlas.find("circle-shadow");
outlineRegion = Core.atlas.find(name + "-outline"); outlineRegion = Core.atlas.find(name + "-outline");
shadowRegion = icon(Cicon.full); shadowRegion = icon(Cicon.full);
@@ -439,7 +439,7 @@ public class UnitType extends UnlockableContent{
drawPayload((Unit & Payloadc)unit); drawPayload((Unit & Payloadc)unit);
} }
drawOcclusion(unit); drawSoftShadow(unit);
Draw.z(z - outlineSpace); Draw.z(z - outlineSpace);
@@ -501,11 +501,11 @@ public class UnitType extends UnlockableContent{
Draw.color(); Draw.color();
} }
public void drawOcclusion(Unit unit){ public void drawSoftShadow(Unit unit){
Draw.color(0, 0, 0, 0.4f); Draw.color(0, 0, 0, 0.4f);
float rad = 1.6f; float rad = 1.6f;
float size = Math.max(region.width, region.height) * Draw.scl; float size = Math.max(region.width, region.height) * Draw.scl;
Draw.rect(occlusionRegion, unit, size * rad, size * rad); Draw.rect(softShadowRegion, unit, size * rad, size * rad);
Draw.color(); Draw.color();
} }
@@ -580,8 +580,8 @@ public class UnitType extends UnlockableContent{
float wx = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil), float wx = unit.x + Angles.trnsx(rotation, weapon.x, weapon.y) + Angles.trnsx(weaponRotation, 0, recoil),
wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil); wy = unit.y + Angles.trnsy(rotation, weapon.x, weapon.y) + Angles.trnsy(weaponRotation, 0, recoil);
if(weapon.occlusion > 0){ if(weapon.shadow > 0){
Drawf.shadow(wx, wy, weapon.occlusion); Drawf.shadow(wx, wy, weapon.shadow);
} }
if(weapon.outlineRegion.found()){ if(weapon.outlineRegion.found()){

View File

@@ -50,8 +50,8 @@ public class Weapon{
public float x = 5f, y = 0f; public float x = 5f, y = 0f;
/** random spread on the X axis */ /** random spread on the X axis */
public float xRand = 0f; public float xRand = 0f;
/** radius of occlusion drawn under the weapon; <0 to disable */ /** radius of shadow drawn under the weapon; <0 to disable */
public float occlusion = -1f; public float shadow = -1f;
/** fraction of velocity that is random */ /** fraction of velocity that is random */
public float velocityRnd = 0f; public float velocityRnd = 0f;
/** delay in ticks between shots */ /** delay in ticks between shots */

View File

@@ -314,7 +314,7 @@ public class Weather extends UnlockableContent{
@Override @Override
public void draw(){ public void draw(){
if(renderer.weatherAlpha() > 0.0001f){ if(renderer.weatherAlpha() > 0.0001f && Core.settings.getBool("showweather")){
Draw.draw(Layer.weather, () -> { Draw.draw(Layer.weather, () -> {
weather.rand.setSeed(0); weather.rand.setSeed(0);
Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier); Draw.alpha(renderer.weatherAlpha() * opacity * weather.opacityMultiplier);

View File

@@ -4,25 +4,29 @@ import arc.*;
import arc.graphics.*; import arc.graphics.*;
import arc.scene.style.*; import arc.scene.style.*;
import arc.util.*; import arc.util.*;
import mindustry.*;
import mindustry.core.*;
import mindustry.gen.*; import mindustry.gen.*;
import mindustry.graphics.*; import mindustry.graphics.*;
import mindustry.mod.Mods.*;
public class Links{ public class Links{
private static LinkEntry[] links; private static LinkEntry[] links;
private static void createLinks(){ private static void createLinks(){
links = new LinkEntry[]{ links = new LinkEntry[]{
new LinkEntry("discord", "https://discord.gg/mindustry", Icon.discord, Color.valueOf("7289da")), new LinkEntry("discord", "https://discord.gg/mindustry", Icon.discord, Color.valueOf("7289da")),
new LinkEntry("changelog", "https://github.com/Anuken/Mindustry/releases", Icon.list, Pal.accent.cpy()), new LinkEntry("changelog", "https://github.com/Anuken/Mindustry/releases", Icon.list, Pal.accent.cpy()),
new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Icon.trello, Color.valueOf("026aa7")), new LinkEntry("trello", "https://trello.com/b/aE2tcUwF", Icon.trello, Color.valueOf("026aa7")),
new LinkEntry("wiki", "https://mindustrygame.github.io/wiki/", Icon.book, Color.valueOf("0f142f")), new LinkEntry("wiki", "https://mindustrygame.github.io/wiki/", Icon.book, Color.valueOf("0f142f")),
new LinkEntry("suggestions", "https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose/", Icon.add, Color.valueOf("ebebeb")), new LinkEntry("suggestions", "https://github.com/Anuken/Mindustry-Suggestions/issues/new/choose/", Icon.add, Color.valueOf("ebebeb")),
new LinkEntry("reddit", "https://www.reddit.com/r/Mindustry/", Icon.redditAlien, Color.valueOf("ee593b")), new LinkEntry("reddit", "https://www.reddit.com/r/Mindustry/", Icon.redditAlien, Color.valueOf("ee593b")),
new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Icon.itchio, Color.valueOf("fa5c5c")), new LinkEntry("itch.io", "https://anuke.itch.io/mindustry", Icon.itchio, Color.valueOf("fa5c5c")),
new LinkEntry("google-play", "https://play.google.com/store/apps/details?id=io.anuke.mindustry", Icon.googleplay, Color.valueOf("689f38")), new LinkEntry("google-play", "https://play.google.com/store/apps/details?id=io.anuke.mindustry", Icon.googleplay, Color.valueOf("689f38")),
new LinkEntry("f-droid", "https://f-droid.org/packages/io.anuke.mindustry/", Icon.android, Color.valueOf("026aa7")), new LinkEntry("f-droid", "https://f-droid.org/packages/io.anuke.mindustry/", Icon.android, Color.valueOf("026aa7")),
new LinkEntry("github", "https://github.com/Anuken/Mindustry/", Icon.github, Color.valueOf("24292e")), new LinkEntry("github", "https://github.com/Anuken/Mindustry/", Icon.github, Color.valueOf("24292e")),
new LinkEntry("dev-builds", "https://github.com/Anuken/MindustryBuilds", Icon.githubSquare, Color.valueOf("fafbfc")) new LinkEntry("dev-builds", "https://github.com/Anuken/MindustryBuilds", Icon.githubSquare, Color.valueOf("fafbfc")),
new LinkEntry("bug", report(), Icon.wrench, Color.valueOf("cbd97f"))
}; };
} }
@@ -48,4 +52,23 @@ public class Links{
this.title = Core.bundle.get("link." + name + ".title", Strings.capitalize(name.replace("-", " "))); this.title = Core.bundle.get("link." + name + ".title", Strings.capitalize(name.replace("-", " ")));
} }
} }
private static String report(){
return "https://github.com/Anuken/Mindustry/issues/new?assignees=&labels=bug&body=" +
Strings.encode(Strings.format(
"**Platform**: `@`\n" +
"\n**Build**: `@`\n" +
"\n**Issue**: *Explain your issue in detail.*\n" +
"\n**Steps to reproduce**: *How you happened across the issue, and what exactly you did to make the bug happen.*\n" +
"\n**Link(s) to mod(s) used**: `@`\n" +
"\n**Save file**: *The (zipped) save file you were playing on when the bug happened. THIS IS REQUIRED FOR ANY ISSUE HAPPENING IN-GAME, REGARDLESS OF WHETHER YOU THINK IT HAPPENS EVERYWHERE. DO NOT DELETE OR OMIT THIS LINE UNLESS YOU ARE SURE THAT THE ISSUE DOES NOT HAPPEN IN-GAME.*\n" +
"\n**Crash report**: *The contents of relevant crash report files. REQUIRED if you are reporting a crash.*\n" +
"\n---\n" +
"\n*Place an X (no spaces) between the brackets to confirm that you have read the line below.*" +
"\n- [ ] **I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.**" +
"\n- [ ] **I have searched the closed and open issues to make sure that this problem has not already been reported.**",
OS.isAndroid ? "Android " + Core.app.getVersion() : (System.getProperty("os.name") + (OS.is64Bit ? " x64" : " x32")),
Version.combined(),
Vars.mods.list().any() ? Vars.mods.list().select(LoadedMod::enabled).map(l -> l.meta.author + "/" + l.name + ":" + l.meta.version) : "none"));
}
} }

View File

@@ -413,7 +413,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
public void tap(InputEvent event, float x, float y, int count, KeyCode button){ public void tap(InputEvent event, float x, float y, int count, KeyCode button){
if(showing()) return; if(showing()) return;
if(selected == hovered && count == 2){ if(hovered != null && selected == hovered && count == 2){
playSelected(); playSelected();
} }
@@ -766,9 +766,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
sector.isBeingPlayed() ? "@sectors.resume" : sector.isBeingPlayed() ? "@sectors.resume" :
sector.hasBase() ? "@sectors.go" : sector.hasBase() ? "@sectors.go" :
locked ? "@locked" : "@sectors.launch", locked ? "@locked" : "@sectors.launch",
locked ? Icon.lock : Icon.play, () -> { locked ? Icon.lock : Icon.play, this::playSelected).growX().height(54f).minWidth(170f).padTop(4).disabled(locked);
playSelected();
}).growX().height(54f).minWidth(170f).padTop(4).disabled(locked);
} }
stable.pack(); stable.pack();
@@ -795,6 +793,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
} }
void playSelected(){ void playSelected(){
if(selected == null) return;
Sector sector = selected; Sector sector = selected;
if(sector.isBeingPlayed()){ if(sector.isBeingPlayed()){

View File

@@ -404,6 +404,7 @@ public class SettingsMenuDialog extends SettingsDialog{
graphics.checkPref("fps", false); graphics.checkPref("fps", false);
graphics.checkPref("playerindicators", true); graphics.checkPref("playerindicators", true);
graphics.checkPref("indicators", true); graphics.checkPref("indicators", true);
graphics.checkPref("showweather", true);
graphics.checkPref("animatedwater", true); graphics.checkPref("animatedwater", true);
if(Shaders.shield != null){ if(Shaders.shield != null){
graphics.checkPref("animatedshields", !mobile); graphics.checkPref("animatedshields", !mobile);

View File

@@ -145,7 +145,7 @@ public class PlacementFragment extends Fragment{
break; break;
} }
} }
}else if(blockSelectEnd || Time.timeSinceMillis(blockSelectSeqMillis) > 750){ //1st number of combo, select category }else if(blockSelectEnd || Time.timeSinceMillis(blockSelectSeqMillis) > 400){ //1st number of combo, select category
//select only visible categories //select only visible categories
if(!getUnlockedByCategory(Category.all[i]).isEmpty()){ if(!getUnlockedByCategory(Category.all[i]).isEmpty()){
currentCategory = Category.all[i]; currentCategory = Category.all[i];

View File

@@ -377,7 +377,8 @@ public class Block extends UnlockableContent{
public boolean canReplace(Block other){ public boolean canReplace(Block other){
if(other.alwaysReplace) return true; if(other.alwaysReplace) return true;
return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && (size == other.size || (size >= other.size && subclass != null && subclass == other.subclass)); return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group &&
(size == other.size || (size >= other.size && ((subclass != null && subclass == other.subclass) || group.anyReplace)));
} }
/** @return a possible replacement for this block when placed in a line by the player. */ /** @return a possible replacement for this block when placed in a line by the player. */

View File

@@ -441,6 +441,10 @@ public class Tile implements Position, QuadTreeObject, Displayable{
return rect.setCentered(drawx(), drawy(), block.size * tilesize, block.size * tilesize); return rect.setCentered(drawx(), drawy(), block.size * tilesize, block.size * tilesize);
} }
public Rect getBounds(Rect rect){
return rect.set(x * tilesize - tilesize/2f, y * tilesize - tilesize/2f, tilesize, tilesize);
}
@Override @Override
public void hitbox(Rect rect){ public void hitbox(Rect rect){
getHitbox(rect); getHitbox(rect);

View File

@@ -44,6 +44,11 @@ public class Accelerator extends Block{
super.init(); super.init();
} }
@Override
public boolean outputsItems(){
return false;
}
public class AcceleratorBuild extends Building{ public class AcceleratorBuild extends Building{
@Override @Override

View File

@@ -69,12 +69,6 @@ public class Wall extends Block{
return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")}; return new TextureRegion[]{Core.atlas.find(Core.atlas.has(name) ? name : name + "1")};
} }
@Override
public boolean canReplace(Block other){
if(other.alwaysReplace) return true;
return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && other != this && size >= other.size;
}
public class WallBuild extends Building{ public class WallBuild extends Building{
public float hit; public float hit;

View File

@@ -147,7 +147,7 @@ public class LiquidTurret extends Turret{
public boolean acceptLiquid(Building source, Liquid liquid){ public boolean acceptLiquid(Building source, Liquid liquid){
return ammoTypes.get(liquid) != null return ammoTypes.get(liquid) != null
&& (liquids.current() == liquid || (ammoTypes.containsKey(liquid) && (liquids.current() == liquid || (ammoTypes.containsKey(liquid)
&& liquids.get(liquids.current()) <= 1f / ammoTypes.get(liquids.current()).ammoMultiplier + 0.001f)); && (!ammoTypes.containsKey(liquids.current()) || liquids.get(liquids.current()) <= 1f / ammoTypes.get(liquids.current()).ammoMultiplier + 0.001f)));
} }
} }
} }

View File

@@ -118,7 +118,7 @@ public class TractorBeamTurret extends BaseTurret{
} }
any = true; any = true;
target.impulse(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale)); target.impulseNet(Tmp.v1.set(this).sub(target).limit((force + (1f - target.dst(this) / range) * scaledForce) * efficiency() * timeScale));
} }
}else{ }else{
strength = Mathf.lerpDelta(strength, 0, 0.1f); strength = Mathf.lerpDelta(strength, 0, 0.1f);

View File

@@ -0,0 +1,7 @@
package mindustry.world.blocks.distribution;
import mindustry.gen.*;
public interface ChainedBuilding{
Building next();
}

View File

@@ -91,7 +91,7 @@ public class Conveyor extends Block implements Autotiler{
Mathf.mod(req.tile().build.rotation - req.rotation, 2) == 1 ? Blocks.junction : this; Mathf.mod(req.tile().build.rotation - req.rotation, 2) == 1 ? Blocks.junction : this;
} }
public class ConveyorBuild extends Building{ public class ConveyorBuild extends Building implements ChainedBuilding{
//parallel array data //parallel array data
public Item[] ids = new Item[capacity]; public Item[] ids = new Item[capacity];
public float[] xs = new float[capacity]; public float[] xs = new float[capacity];
@@ -391,5 +391,11 @@ public class Conveyor extends Block implements Autotiler{
len--; len--;
} }
@Nullable
@Override
public Building next(){
return nextc;
}
} }
} }

View File

@@ -23,12 +23,6 @@ public class Router extends Block{
noUpdateDisabled = true; noUpdateDisabled = true;
} }
@Override
public boolean canReplace(Block other){
if(other.alwaysReplace) return true;
return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && size >= other.size;
}
public class RouterBuild extends Building implements ControlBlock{ public class RouterBuild extends Building implements ControlBlock{
public Item lastItem; public Item lastItem;
public Tile lastInput; public Tile lastInput;

View File

@@ -16,6 +16,7 @@ import mindustry.graphics.*;
import mindustry.type.*; import mindustry.type.*;
import mindustry.world.*; import mindustry.world.*;
import mindustry.world.blocks.*; import mindustry.world.blocks.*;
import mindustry.world.blocks.distribution.*;
import static mindustry.Vars.*; import static mindustry.Vars.*;
@@ -73,7 +74,7 @@ public class Conduit extends LiquidBlock implements Autotiler{
return new TextureRegion[]{Core.atlas.find("conduit-bottom"), topRegions[0]}; return new TextureRegion[]{Core.atlas.find("conduit-bottom"), topRegions[0]};
} }
public class ConduitBuild extends LiquidBuild{ public class ConduitBuild extends LiquidBuild implements ChainedBuilding{
public float smoothLiquid; public float smoothLiquid;
public int blendbits, xscl, yscl, blending; public int blendbits, xscl, yscl, blending;
@@ -137,5 +138,15 @@ public class Conduit extends LiquidBlock implements Autotiler{
sleep(); sleep();
} }
} }
@Nullable
@Override
public Building next(){
Tile next = tile.nearby(rotation);
if(next != null && next.build instanceof ConduitBuild){
return next.build;
}
return null;
}
} }
} }

View File

@@ -68,7 +68,7 @@ public class LogicBlock extends Block{
}); });
} }
static String getLinkName(Block block){ public static String getLinkName(Block block){
String name = block.name; String name = block.name;
if(name.contains("-")){ if(name.contains("-")){
String[] split = name.split("-"); String[] split = name.split("-");
@@ -82,11 +82,11 @@ public class LogicBlock extends Block{
return name; return name;
} }
static byte[] compress(String code, Seq<LogicLink> links){ public static byte[] compress(String code, Seq<LogicLink> links){
return compress(code.getBytes(charset), links); return compress(code.getBytes(charset), links);
} }
static byte[] compress(byte[] bytes, Seq<LogicLink> links){ public static byte[] compress(byte[] bytes, Seq<LogicLink> links){
try{ try{
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream stream = new DataOutputStream(new DeflaterOutputStream(baos)); DataOutputStream stream = new DataOutputStream(new DeflaterOutputStream(baos));

View File

@@ -168,7 +168,7 @@ public class Drill extends Block{
} }
itemArray.sort((item1, item2) -> { itemArray.sort((item1, item2) -> {
int type = Boolean.compare(item1 != Items.sand, item2 != Items.sand); int type = Boolean.compare(!item1.lowPriority, !item2.lowPriority);
if(type != 0) return type; if(type != 0) return type;
int amounts = Integer.compare(oreCount.get(item1, 0), oreCount.get(item2, 0)); int amounts = Integer.compare(oreCount.get(item1, 0), oreCount.get(item2, 0));
if(amounts != 0) return amounts; if(amounts != 0) return amounts;

View File

@@ -17,7 +17,11 @@ public class LiquidConverter extends GenericCrafter{
@Override @Override
public void init(){ public void init(){
ConsumeLiquidBase cl = consumes.get(ConsumeType.liquid); if(!consumes.has(ConsumeType.liquid) || !(consumes.get(ConsumeType.liquid) instanceof ConsumeLiquid)){
throw new RuntimeException("LiquidsConverters must have a ConsumeLiquid. Note that filters are not supported.");
}
ConsumeLiquid cl = consumes.get(ConsumeType.liquid);
cl.update(false); cl.update(false);
outputLiquid.amount = cl.amount; outputLiquid.amount = cl.amount;
super.init(); super.init();

View File

@@ -254,7 +254,7 @@ public class CoreBlock extends StorageBlock{
for(Building other : state.teams.cores(team)){ for(Building other : state.teams.cores(team)){
if(other.tile() == tile) continue; if(other.tile() == tile) continue;
storageCapacity += other.block.itemCapacity + other.proximity().sum(e -> owns(e) && owns(other, e) ? e.block.itemCapacity : 0); storageCapacity += other.block.itemCapacity + other.proximity().sum(e -> owns(other, e) ? e.block.itemCapacity : 0);
} }
//Team.sharded.core().items.set(Items.surgeAlloy, 12000) //Team.sharded.core().items.set(Items.surgeAlloy, 12000)

View File

@@ -27,6 +27,7 @@ public class Unloader extends Block{
saveConfig = true; saveConfig = true;
itemCapacity = 0; itemCapacity = 0;
noUpdateDisabled = true; noUpdateDisabled = true;
unloadable = false;
config(Item.class, (UnloaderBuild tile, Item item) -> tile.sortItem = item); config(Item.class, (UnloaderBuild tile, Item item) -> tile.sortItem = item);
configClear((UnloaderBuild tile) -> tile.sortItem = null); configClear((UnloaderBuild tile) -> tile.sortItem = null);
@@ -47,10 +48,15 @@ public class Unloader extends Block{
public Item sortItem = null; public Item sortItem = null;
public Building dumpingTo; public Building dumpingTo;
public int offset = 0; public int offset = 0;
public int[] rotations;
@Override @Override
public void updateTile(){ public void updateTile(){
if(timer(timerUnload, speed / timeScale())){ if(timer(timerUnload, speed / timeScale())){
if(rotations == null || rotations.length != proximity.size){
rotations = new int[proximity.size];
}
for(int i = 0; i < proximity.size; i++){ for(int i = 0; i < proximity.size; i++){
int pos = (offset + i) % proximity.size; int pos = (offset + i) % proximity.size;
var other = proximity.get(pos); var other = proximity.get(pos);
@@ -61,18 +67,19 @@ public class Unloader extends Block{
dumpingTo = other; dumpingTo = other;
//get item to be taken //get item to be taken
Item item = sortItem == null ? other.items.beginTake() : sortItem; Item item = sortItem == null ? other.items.takeIndex(rotations[pos]) : sortItem;
//remove item if it's dumped correctly //remove item if it's dumped correctly
if(put(item)){ if(put(item)){
other.items.remove(item, 1);
if(sortItem == null){ if(sortItem == null){
other.items.endTake(item); rotations[pos] = item.id + 1;
}else{
other.items.remove(item, 1);
} }
other.itemTaken(item); other.itemTaken(item);
}else if(sortItem == null){ }else if(sortItem == null){
other.items.failTake(); rotations[pos] = other.items.nextIndex(rotations[pos]);
} }
} }
} }

View File

@@ -1,5 +1,16 @@
package mindustry.world.meta; package mindustry.world.meta;
public enum BlockGroup{ public enum BlockGroup{
none, walls, projectors, turrets, transportation, power, liquids, drills, storage, units, logic none, walls(true), projectors(true), turrets, transportation(true), power, liquids(true), drills, storage, units, logic(true);
/** if true, any block in this category replaces any other block in this category. */
public final boolean anyReplace;
BlockGroup(boolean anyReplace){
this.anyReplace = anyReplace;
}
BlockGroup(){
this(false);
}
} }

View File

@@ -206,7 +206,7 @@ public class ItemModule extends BlockModule{
/** Begins a speculative take operation. This returns the item that would be returned by #take(), but does not change state. */ /** Begins a speculative take operation. This returns the item that would be returned by #take(), but does not change state. */
@Nullable @Nullable
public Item beginTake(){ public Item takeIndex(int takeRotation){
for(int i = 0; i < items.length; i++){ for(int i = 0; i < items.length; i++){
int index = (i + takeRotation); int index = (i + takeRotation);
if(index >= items.length) index -= items.length; if(index >= items.length) index -= items.length;
@@ -217,23 +217,15 @@ public class ItemModule extends BlockModule{
return null; return null;
} }
/** Finishes a take operation. Updates take state, removes the item. */ public int nextIndex(int takeRotation){
public void endTake(Item item){
items[item.id] --;
total --;
takeRotation = item.id + 1;
}
public void failTake(){
for(int i = 1; i < items.length; i++){ for(int i = 1; i < items.length; i++){
int index = (i + takeRotation); int index = (i + takeRotation);
if(index >= items.length) index -= items.length; if(index >= items.length) index -= items.length;
if(items[index] > 0){ if(items[index] > 0){
takeRotation += i; return (takeRotation + i) % items.length;
takeRotation %= items.length;
return;
} }
} }
return takeRotation;
} }
public int get(int id){ public int get(int id){

View File

@@ -1,7 +1,6 @@
package mindustry.desktop.steam; package mindustry.desktop.steam;
import arc.*; import arc.*;
import arc.math.*;
import arc.struct.*; import arc.struct.*;
import arc.util.*; import arc.util.*;
import com.codedisaster.steamworks.*; import com.codedisaster.steamworks.*;
@@ -26,6 +25,7 @@ public class SStats implements SteamUserStatsCallback{
private ObjectSet<String> blocksBuilt = new ObjectSet<>(), unitsBuilt = new ObjectSet<>(); private ObjectSet<String> blocksBuilt = new ObjectSet<>(), unitsBuilt = new ObjectSet<>();
private ObjectSet<UnitType> t5s = new ObjectSet<>(); private ObjectSet<UnitType> t5s = new ObjectSet<>();
private IntSet checked = new IntSet();
public SStats(){ public SStats(){
stats.requestCurrentStats(); stats.requestCurrentStats();
@@ -78,7 +78,7 @@ public class SStats implements SteamUserStatsCallback{
private void registerEvents(){ private void registerEvents(){
Events.on(UnitDestroyEvent.class, e -> { Events.on(UnitDestroyEvent.class, e -> {
if(ncustom()){ if(campaign()){
if(e.unit.team != Vars.player.team()){ if(e.unit.team != Vars.player.team()){
SStat.unitsDestroyed.add(); SStat.unitsDestroyed.add();
@@ -137,9 +137,11 @@ public class SStats implements SteamUserStatsCallback{
} }
if(e.tile.block() instanceof Conveyor){ if(e.tile.block() instanceof Conveyor){
checked.clear();
check: { check: {
Tile current = e.tile; Tile current = e.tile;
for(int i = 0; i < 4; i++){ for(int i = 0; i < 4; i++){
checked.add(current.pos());
if(current.build == null) break check; if(current.build == null) break check;
Tile next = current.nearby(current.build.rotation); Tile next = current.nearby(current.build.rotation);
if(next != null && next.block() instanceof Conveyor){ if(next != null && next.block() instanceof Conveyor){
@@ -149,7 +151,7 @@ public class SStats implements SteamUserStatsCallback{
} }
} }
if(current == e.tile){ if(current == e.tile && checked.size == 4){
circleConveyor.complete(); circleConveyor.complete();
} }
} }
@@ -253,7 +255,7 @@ public class SStats implements SteamUserStatsCallback{
}); });
Events.on(WaveEvent.class, e -> { Events.on(WaveEvent.class, e -> {
if(ncustom()){ if(campaign()){
SStat.maxWavesSurvived.max(Vars.state.wave); SStat.maxWavesSurvived.max(Vars.state.wave);
if(state.stats.buildingsBuilt == 0 && state.wave >= 10){ if(state.stats.buildingsBuilt == 0 && state.wave >= 10){
@@ -326,10 +328,6 @@ public class SStats implements SteamUserStatsCallback{
}); });
} }
private boolean ncustom(){
return campaign();
}
private boolean campaign(){ private boolean campaign(){
return Vars.state.isCampaign(); return Vars.state.isCampaign();
} }

View File

@@ -0,0 +1,8 @@
[This is a truncated changelog, see Github for full notes]
- Slightly increased Lancer build cost
- Double-tapping now enters a campaign map (Contributed by @joshuaptfan)
- Minor logic memory optimizations - block/sensor constants are no longer stored in every processor
- Doubled surge smelter item capacity
- Made Fungal Pass slightly easier
- Fixed some rare crashes
- Fixed unit spawn shockwave appearing too late

View File

@@ -0,0 +1,2 @@
[This is a truncated changelog, see Github for full notes]
- Fixed a common crash related to planet selection

View File

@@ -0,0 +1,3 @@
[This is a truncated changelog, see Github for full notes]
- Decreased junction item capacity - this may cause slight desync on servers running previous 121 versions, servers are advised to update
- Many various small bugfixes

View File

@@ -105,5 +105,27 @@
"NEW_ACHIEVEMENT_21_22_DESC" "Zacznij w strefie z 10.000 lub większą ilością surowców." "NEW_ACHIEVEMENT_21_22_DESC" "Zacznij w strefie z 10.000 lub większą ilością surowców."
"NEW_ACHIEVEMENT_21_23_NAME" "Zapłon" "NEW_ACHIEVEMENT_21_23_NAME" "Zapłon"
"NEW_ACHIEVEMENT_21_23_DESC" "Aktywuj Reaktor Uderzeniowy." "NEW_ACHIEVEMENT_21_23_DESC" "Aktywuj Reaktor Uderzeniowy."
"NEW_ACHIEVEMENT_21_24_NAME" "Przyspieszenie"
"NEW_ACHIEVEMENT_21_24_DESC" "Aktwuj Przyspiszacz Międzyplanetarny."
"NEW_ACHIEVEMENT_21_25_NAME" "Spirala"
"NEW_ACHIEVEMENT_21_25_DESC" "I się kręci i kręci..."
"NEW_ACHIEVEMENT_21_26_NAME" "Eskalacja"
"NEW_ACHIEVEMENT_21_26_DESC" "Zbuduj jednostkę poziomu 5."
"NEW_ACHIEVEMENT_21_27_NAME" "Architekt"
"NEW_ACHIEVEMENT_21_27_DESC" "Stwóż 20 schematów."
"NEW_ACHIEVEMENT_21_28_NAME" "Globalna Dominacja"
"NEW_ACHIEVEMENT_21_28_DESC" "Podbij każdy sektor na Serpulo."
"NEW_ACHIEVEMENT_21_29_NAME" "Most Lotniczy"
"NEW_ACHIEVEMENT_21_29_DESC" "Podnieś jednostkę poziomu 5 używając jednostki Oct."
"NEW_ACHIEVEMENT_21_30_NAME" "Ostateczna Forma"
"NEW_ACHIEVEMENT_21_30_DESC" "Dołącz do nich."
"NEW_ACHIEVEMENT_21_31_NAME" "Produkcja I"
"NEW_ACHIEVEMENT_21_31_DESC" "Osiągnij 5000 przedmiotów/minute w kampani."
"NEW_ACHIEVEMENT_26_0_NAME" "Production II"
"NEW_ACHIEVEMENT_26_0_DESC" "Osiągnij 50000 przedmiotów/minute w kampani."
"NEW_ACHIEVEMENT_26_1_NAME" "Pewne Zwycięstwo"
"NEW_ACHIEVEMENT_26_1_DESC" "Podbij sektor grając na innym sektorze."
"NEW_ACHIEVEMENT_26_2_NAME" "Małe Królestwo"
"NEW_ACHIEVEMENT_26_2_DESC" "Kontroluj 10 sektorów na raz."
} }
} }

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=08d81cd26f74ea2e490c5ddc6e5a509f30f48368 archash=b35bc6c3431e51204335b9b9378451cc320df575

View File

@@ -53,15 +53,6 @@
{ {
"address": "twsmindustry.24x7.hk:6568" "address": "twsmindustry.24x7.hk:6568"
}, },
{
"address": "Chaotic-Neutral.ddns.net:1111"
},
{
"address": "Chaotic-Neutral.ddns.net:4444"
},
{
"address": "Chaotic-Neutral.ddns.net:3333"
},
{ {
"address": "mindustryranked.ddns.net" "address": "mindustryranked.ddns.net"
}, },

View File

@@ -1,7 +1,7 @@
[ [
{ {
"name": "mindustry.pl", "name": "mindustry.pl",
"address": ["mindustry.pl:6000", "mindustry.pl:6666", "91.134.217.10:6006"] "address": ["mindustry.pl:6000", "mindustry.pl:6666", "mindustry.pl"]
}, },
{ {
"name": "{AA}", "name": "{AA}",
@@ -52,7 +52,7 @@
"address": ["md.surrealment.com"] "address": ["md.surrealment.com"]
}, },
{ {
"name": "MindustryBR", "name": "ALEX",
"address": ["mindustryptbr.ddns.net", "mindustryptbr.ddns.net:4444", "mindustryptbr.myddns.me:6666", "mindustryptbr.myddns.me:5555"] "address": ["alexmindustry.ddns.net:6568", "alexmindustry.ddns.net:6569"]
} }
] ]

View File

@@ -429,3 +429,10 @@ task icongen(dependsOn: classes, type: JavaExec){
standardInput = System.in standardInput = System.in
workingDir = "../core/assets-raw" workingDir = "../core/assets-raw"
} }
task updateScripts(dependsOn: classes, type: JavaExec){
main = "mindustry.tools.ScriptMainGenerator"
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = "../"
}

View File

@@ -38,7 +38,10 @@ public class ScriptMainGenerator{
getClasses("arc.struct"), getClasses("arc.struct"),
getClasses("arc.scene"), getClasses("arc.scene"),
getClasses("arc.math"), getClasses("arc.math"),
getClasses("arc.audio") getClasses("arc.audio"),
getClasses("arc.input"),
getClasses("arc.util"),
getClasses("arc.struct")
); );
classes.addAll(whitelist); classes.addAll(whitelist);
classes.sort(Structs.comparing(Class::getName)); classes.sort(Structs.comparing(Class::getName));