Merge branch 'master' of https://github.com/Anuken/Mindustry into v117

This commit is contained in:
Petr Gašparík
2020-11-30 21:29:13 +01:00
122 changed files with 1307 additions and 861 deletions
+2 -2
View File
@@ -99,7 +99,7 @@ preparingconfig = Preparing Config
preparingcontent = Preparing Content
uploadingcontent = Uploading Content
uploadingpreviewfile = Uploading Preview File
committingchanges = Comitting Changes
committingchanges = Committing Changes
done = Done
feature.unsupported = Your device does not support this feature.
@@ -1460,7 +1460,7 @@ unit.reign.description = Fires a barrage of massive piercing bullets at all near
unit.nova.description = Fires laser bolts that damage enemies and repair allied structures. Capable of flight.
unit.pulsar.description = Fires arcs of electricity that damage enemies and repair allied structures. Capable of flight.
unit.quasar.description = Fires piercing laser beams that damage enemies and repair allied structures. Capable of flight. Shielded.
unit.vela.description = Fires a massive continuous laser beam that damages enemies, causes fires and repair allied structures. Capable of flight.
unit.vela.description = Fires a massive continuous laser beam that damages enemies, causes fires and repairs allied structures. Capable of flight.
unit.corvus.description = Fires a massive laser blast that damages enemies and repairs allied structures. Can step over most terrain.
unit.crawler.description = Runs toward enemies and self-destructs, causing a large explosion.
unit.atrax.description = Fires debilitating orbs of slag at ground targets. Can step over most terrain.
File diff suppressed because it is too large Load Diff
+79 -41
View File
@@ -22,6 +22,7 @@ highscore = [accent]Nowy rekord!
copied = Skopiowano.
indev.popup = [accent]Wersja v6[] jest obecnie w [accent]alphie[].\n[lightgray]Oznacza to, że:[]\n[scarlet]- Kampania nie jest skończona[]\n- Brakuje zawartości\n - Większość [scarlet]SI jednostek[] nie działa poprawnie\n- Wiele jednostek jest niedokończonych\n- Wszystko to, co widzisz, może ulec zmianie lub usunięciu.\n\nZgłaszaj błędy i awarie na [accent]Githubie[].
indev.notready = Ta część gry nie jest jeszcze ukończona
indev.campaign = [accent]Udało ci się zakończyć kampanie![]\n\nZawartość kończy się na tym. Podróż międzyplanetarna zostanie dodana w przyszłych aktualizacjach.
load.sound = Dźwięki
load.map = Mapy
@@ -189,6 +190,10 @@ servers.local = Serwery Lokalne
servers.remote = Serwery Zdalne
servers.global = Serwery Publiczne
servers.showhidden = Pokaż Ukryte Serwery
server.shown = Pokazane
server.hidden = Ukryte
trace = Zlokalizuj Gracza
trace.playername = Nazwa gracza: [accent]{0}
trace.ip = IP: [accent]{0}
@@ -495,7 +500,7 @@ zone.objective = [lightgray]Cel: [accent]{0}
zone.objective.survival = Przeżyj
zone.objective.attack = Zniszcz Rdzeń Wroga
add = Dodaj...
boss.health = Zdrowie Bossa
boss.health = Zdrowie Strażnika
connectfail = [crimson]Nie można połączyć się z serwerem:\n\n[accent]{0}
error.unreachable = Serwer niedostępny.\nCzy adres jest wpisany poprawnie?
@@ -523,10 +528,12 @@ sectors.launch = Wystrzel
sectors.select = Wybierz
sectors.nonelaunch = [lightgray]żaden (słońce)
sectors.rename = Zmień Nazwę Sektora
sector.missingresources = [scarlet]Insufficient Core Resources
sector.missingresources = [scarlet]Niewystarczające Zasoby Rdzenia
sector.attacked = Sektor [accent]{0}[white] jest atakowany!
sector.lost = Sektor [accent]{0}[white] został stracony!
planet.serpulo.name = Serpulo
planet.sun.name = Sun
planet.sun.name = Słońce
sector.groundZero.name = Punkt Zerowy
sector.craters.name = Kratery
@@ -539,6 +546,10 @@ sector.overgrowth.name = Przerośnięty Las
sector.tarFields.name = Pola Smołowe
sector.saltFlats.name = Solne Równiny
sector.fungalPass.name = Grzybowa Przełęcz
sector.biomassFacility.name = Obiekt Syntezy Biomasy
sector.windsweptIslands.name = Wyspy Wiatru
sector.extractionOutpost.name = Placówka Ekstrakcji
sector.planetaryTerminal.name = Planetarny Terminal Startowy
sector.groundZero.description = Optymalna lokalizacja, aby rozpocząć jeszcze raz. Niskie zagrożenie. Niewiele zasobów.\nZbierz jak najwięcej miedzi i ołowiu, tyle ile jest możliwe.\nPrzejdź do następnej strefy jak najszybciej.
sector.frozenForest.description = Nawet tutaj, bliżej gór, zarodniki rozprzestrzeniły się. Niskie temperatury nie mogą ich zatrzymać na zawsze.\n\nRozpocznij przedsięwzięcie od prądu. Buduj generatory spalinowe. Naucz się korzystać z naprawiaczy.
@@ -551,6 +562,11 @@ sector.tarFields.description = Obrzeża strefy produkcji ropy, między górami a
sector.desolateRift.description = Strefa wyjątkowo niebezpieczna. Obfita w zasoby ale mało miejsca. Wysokie ryzyko zniszczenia. Opuść tę strefe jak najszybciej. Nie daj się zwieść długiemu odstępowi między atakami wroga.
sector.nuclearComplex.description = Dawny zakład produkcji i przetwarzania toru, zredukowny do ruin.\n[lightgray]Zbadaj tor i jego zastosowania.\n\nWróg jest tutaj obecny w dużej ilości, nieustannie poszukuje napastników.
sector.fungalPass.description = Przejściowy obszar pomiędzy wysokimi górami a nisko znajdującymi się, ogarniętymi przez zarodniki równinami. Znajduje się tu mała postawiona przez wrogów baza zwiadowcza.\nZniszcz ją.\nUżyj jednostek Nóż i Pełzak. Zniszcz oba rdzenie.
sector.biomassFacility.description = Miejsce powstania zarodników. Tutał były badane i początkowo produkowane.\nZbadaj zawartą w nim technologię. Hoduj zarodniki dla paliwa i tworzyw sztucznych.\n\n[lightgray]Po upadku tej placówki zarodniki zostały uwolnione. Nic w lokalnym ekosystemie nie mogło konkurować z tak inwazyjnym organizmem.
sector.windsweptIslands.description = Dalej za linią brzegową znajduje się ten odległy łańcuch wysp. Zapisy wyakzują ze były tu struktury produkujące [accent]Plastan[].\n\nOdeprzyj morskie jednostki wroga. Załóż bazę na wyspach. Odkryj te fabryki.
sector.extractionOutpost.description = Odległa placówka zbudowana przez wroga w celu wystrzeliwania zasobów do innych sektorów.\n\nDo dalszych podbojów niezbędna jest międzysektorowa technologia transportu. Zniszcz bazę. Zbadaj ich Wyrzutnie.
sector.impact0078.description = Tutaj leżą pozostałości międzygwiezdnego statku transportowego, który jako pierwszy wszedł do tego układu.\n\nWydobądź jak najwięcej z wraku. Zbadaj każdą nienaruszoną technologię.
sector.planetaryTerminal.description = Ostatni cel.\n\nTa baza przybrzeżna zawiera strukturę zdolną do wyrzucania rdzeni na lokalne planety. Jest wyjątkowo dobrze strzeżona.\n\nProdukuj jednostki morskie. Jak najszybciej wyeliminuj wroga. Zbadaj tą strukturę.
settings.language = Język
settings.data = Dane Gry
@@ -573,14 +589,14 @@ settings.clearcampaignsaves.confirm = Jesteś pewny że chcesz usunąć wszystki
paused = [accent]< Wstrzymano >
clear = Wyczyść
banned = [scarlet]Zbanowano
unplaceable.sectorcaptured = [scarlet]Requires captured sector
unplaceable.sectorcaptured = [scarlet]Wymaga podbitego sektora.
yes = Tak
no = Nie
info.title = Informacje
error.title = [crimson]Wystąpił błąd
error.crashtitle = Wystąpił błąd
unit.nobuild = [scarlet]Jednostka nie może budować
lastaccessed = [lightgray]Last Accessed: {0}
lastaccessed = [lightgray]Osatino wpłynął: {0}
block.unknown = [lightgray]???
stat.input = Wejście
@@ -600,7 +616,7 @@ stat.size = Rozmiar
stat.displaysize = Wielkość Wyświetlania
stat.liquidcapacity = Pojemność cieczy
stat.powerrange = Zakres mocy
stat.linkrange = Link Range
stat.linkrange = Odległość połączeń
stat.instructions = Instrukcje
stat.powerconnections = Maksymalna ilość połączeń
stat.poweruse = Zużycie prądu
@@ -642,16 +658,19 @@ stat.minetier = Stopień Wydobycia
stat.payloadcapacity = Ładowność
stat.commandlimit = Limit Jednostek Zarządanych
stat.abilities = Umiejętności
stat.canboost = Może przyspieszyć
stat.flying = Latanie
ability.forcefield = Pole Mocy
ability.repairfield = Pole Naprawy
ability.statusfield = Pole Statusu
ability.unitspawn = {0} Fabryka
ability.unitspawn = Fabryka jednostek {0}
ability.shieldregenfield = Strefa Tarczy Regenerującej
ability.movelightning = Pioruny Poruszania
bar.drilltierreq = Wymagane Lepsze Wiertło
bar.noresources = Missing Resources
bar.corereq = Core Base Required
bar.noresources = Brak Zasobów
bar.corereq = Wymagany Rdzeń
bar.drillspeed = Prędkość wiertła: {0}/s
bar.pumpspeed = Prędkość pompy: {0}/s
bar.efficiency = Efektywność: {0}%
@@ -659,7 +678,7 @@ bar.powerbalance = Moc: {0}
bar.powerstored = Zmagazynowano: {0}/{1}
bar.poweramount = Moc: {0}
bar.poweroutput = Wyjście mocy: {0}
bar.powerlines = Connections: {0}/{1}
bar.powerlines = Połączenia: {0}/{1}
bar.items = Przedmiotów: {0}
bar.capacity = Pojemność: {0}
bar.unitcap = {0} {1}/{2}
@@ -671,7 +690,7 @@ bar.progress = Postęp Budowy
bar.input = Wejście
bar.output = Wyjście
units.processorcontrol = [lightgray]Procesor Kontrolowany
units.processorcontrol = [lightgray]Kontrolowany Procesorem
bullet.damage = [stat]{0}[lightgray] Obrażenia
bullet.splashdamage = [stat]{0}[lightgray] Obrażenia obszarowe ~[stat] {1}[lightgray] kratki
@@ -899,6 +918,7 @@ content.item.name = Przedmioty
content.liquid.name = Płyny
content.unit.name = Jednostki
content.block.name = Klocki
content.sector.name = Sektory
item.copper.name = Miedź
item.lead.name = Ołów
@@ -963,21 +983,21 @@ block.grass.name = Trawa
block.slag.name = Żużel
block.space.name = Space
block.salt.name = Sól
block.salt-wall.name = Salt Wall
block.salt-wall.name = Solna Ściana
block.pebbles.name = Kamyki
block.tendrils.name = Wić
block.sand-wall.name = Sand Wall
block.sand-wall.name = Piaskowa Ściana
block.spore-pine.name = Sosna Zarodnikowa
block.spore-wall.name = Spore Wall
block.boulder.name = Boulder
block.snow-boulder.name = Snow Boulder
block.spore-wall.name = Zarodinkowa Ściana
block.boulder.name = Głaz
block.snow-boulder.name = Śnieżny Głaz
block.snow-pine.name = Sosna śniegowa
block.shale.name = Łupek
block.shale-boulder.name = Głaz Łupkowy
block.moss.name = Mech
block.shrubs.name = Krzewy
block.spore-moss.name = Mech Zarodnikowy
block.shale-wall.name = Shale Wall
block.shale-wall.name = Ściana Z Łupku
block.scrap-wall.name = Ściana ze Złomu
block.scrap-wall-large.name = Duża Ściana ze Złomu
block.scrap-wall-huge.name = Ogromna Ściana ze Złomu
@@ -1160,6 +1180,10 @@ block.payload-router.name = Rozdzielacz Ładunku
block.disassembler.name = Rozkładacz
block.silicon-crucible.name = Tygiel Krzemu
block.overdrive-dome.name = Kopuła Pola Overdrive
block.block-forge.name = Piec Bloków
block.block-loader.name = Ładownik Bloków
block.block-unloader.name = Opróżniacz Bloków
block.interplanetary-accelerator.name = Przspieszacz Międzyplanetarny
block.switch.name = Przełącznik
block.micro-processor.name = Micro Procesor
@@ -1178,27 +1202,41 @@ team.derelict.name = szary
team.green.name = zielony
team.purple.name = fioletowy
tutorial.next = [lightgray]<Kliknij, aby kontynuować>
tutorial.intro = Wszedłeś do[scarlet] Samouczka Mindustry.[]\nUżyj [accent][[WASD][], aby poruszyć się.\n[accent]Przytrzymaj [[Ctrl] podczas przewijania[], aby przybliżyć i oddalić widok.\nZacznij od[accent] wydobycia miedzi[]. W tym celu przybliż się, a następnie dotknij żyły rudy miedzi w pobliżu rdzenia.\n\n[accent]{0}/{1} miedź
tutorial.intro.mobile = Wszedłeś do[scarlet] Samouczka Mindustry.[]\nPrzesuń palcem po ekranie, aby poruszyć się.\n[accent]Użyj dwóch palcy[], aby przybliżyć i oddalić widok.\nZacznij od[accent] wydobycia miedzi[]. W tym celu przybliż się, a następnie dotknij żyły rudy miedzi w pobliżu rdzenia.\n\n[accent]{0}/{1} miedź
tutorial.drill = Wydobywanie ręczne nie jest efektywne.\n[accent]Wiertła []mogą kopać automatycznie.\nKliknij zakładkę wiertła w prawym dolnym rogu.\nWybierz[accent] wiertło mechaniczne[]. Umieść go na złożu miedzi, klikając.\n[accent]Kliknij prawym przyciskiem myszy[], aby przestać budować.
tutorial.drill.mobile = Wydobywanie ręczne jest nieefektywne.\n[accent]Wiertła []mogą kopać automatycznie.\nDotknij zakładkę wiertła w prawym dolnym rogu.\nWybierz[accent] wiertło mechaniczne[].\nUmieść go na złożu miedzi poprzez Stuknięcie, potem wciśnij[accent] ptaszek[] na dole by potwierdzić wybór.\nNaciśnij przycisk[accent] X[] by anulować budowe.
tutorial.blockinfo = Każdy blok ma inne statystyki. Każde wiertło może kopać tylko wybrane rudy.\nBy sprawdzić informacje i statystyki bloku,[accent] kliknij przycisk "?" podczas jego wyboru w menu budowy.[]\n\n[accent]Sprawdź teraz statystyki mechanicznego wiertła.[]
tutorial.conveyor = [accent]Przenośnik[] jest używany do transportowania przedmiotów do rdzenia.\nStwórz linie przenośników z wierteł do rdzenia.\n[accent]Przytrzymaj przycisk myszy by położyć w linii.[]\nPrzytrzymaj[accent] CTRL[] podczas wybierania linii, by budować po skosie.\n\n[accent]{0}/{1} Przenośniki położone w linii\n[accent]0/1 Przedmioty dostarczone
tutorial.conveyor.mobile = [accent]Przenośnik[] jest używany do transportowania przedmiotów do rdzenia.\nStwórz linie przenośników z wierteł do rdzenia.\n[accent] Zbuduj w linii poprzez przytrzymanie palcem przez moment[] i przesunięcie w którymś kierunku.\n\n[accent]{0}/{1} Przenośniki położone w linii\n[accent]0/1 Przedmioty dostarczone
tutorial.turret = Kiedy przedmiot dociera do rdzenia, może zostać użyty do budowy.\nPamiętaj że nie każdy przedmiot może zostać użyty do budowy.\nprzedmioty które nie są używane do budowy, takie jak[accent] Węgiel[] lub[accent] złom[], nie moga zostać wprowadzone do rdzenia.\nStruktury obronne muszą zostać zbudowane by odeprzeć[lightgray] wroga[].\nZbuduj[accent] podwójne działko[] niedaleko swojej bazy.
tutorial.drillturret = Podwójne działka wymagają[accent] miedzianej amunicji []do strzelania.\nPołóż wiertło obok działka.\nPoprowadź przenośniki do działek by zaopatrzyć je w miedź.\n\n[accent]Amunicja dostarczona: 0/1
tutorial.pause = Podczas gry, możesz[accent] zatrzymać grę.[]\nMożesz ustalić kolejkę budowy podczas pauzy.\n\n[accent]Naciśnij spacje by zapauzować.
tutorial.pause.mobile = Podczas gry, możesz[accent] zatrzymać grę.[]\nMożesz ustalić kolejkę budowy podczas pauzy.\n\n[accent]Nacniśnij przycisk w lewym górnym rogu by zapauzować.
tutorial.unpause = Teraz znowu naciśnij spacje by odpauzować.
tutorial.unpause.mobile = Naciśnij go znowu by odpauzować.
tutorial.breaking = Bloki często wymagają rozbiórki.\n[accent]Przytrzymaj prawy przcisk myszy[] by niszczyć wszystkie wybrane bloki.[]\n\n[accent]Zniszcz wszystkie bloki złomu na lewo od twojego rdzenia używając selekcji obszarowej.
tutorial.breaking.mobile = Bloki często wymagają rozbiórki.\n[accent]Wybierz tryb dekonstrukcji[], a następnie dotknij blok by zacząć go niszczyć.\nZdekonstruuj obszarowo poprzez przytrzymanie palcem przez moment[] i przesunięcie go w jakimś kierunku.\nNaciśnij przycisk ptaszka by potwierdzić rozbiórkę.\n\n[accent]Zniszcz wszystkie bloki złomu na lewo od twojego rdzenia używając selekcji obszarowej.
tutorial.withdraw = Czasami, konieczne jest wyjmowanie przedmiotów prosto z bloków.\nBy tego dokonać, [accent]kliknij blok[] z przedmiotami w nim, potem [accent]kliknij przedmiot[] w inwentarzu.\nMożesz zebrać wiele przedmiotów naraz poprzez [accent]kliknięcie i przytrzymanie[].\n\n[accent]Zabierz trochę miedzi z rdzenia.[]
tutorial.deposit = Włóż przedmioty do bloków poprzez przeciągnięcie z twojego statku do danego bloku.\n\n[accent]Włóż miedź z powrotem do rdzenia .[]
tutorial.waves = [lightgray] Wrogowie[] nadchodzą.\n\nBroń swój rdzeń przez 2 fale.[accent] Kliknij[] by strzelać.\nZbuduj wiecej działek i wierteł. Wydobądź więcej miedzi.
tutorial.waves.mobile = [lightgray] Wrogowie[] nadchodzą.\n\nBroń swój rdzeń przez 2 fale. Twój statek będzie automatycznie atakował wrogów.\nZbuduj wiecej działek i wierteł. Wydobądź więcej miedzi.
tutorial.launch = Kiedy dotrzesz do określonej fali, masz możliwość[accent] wystrzelenia rdzenia[], pozostawiając struktury obronne za sobą i[accent] otrzymując wszystkie surowce znajdujące się w rdzeniu.[]\nSurowce te mogą potem zostać użyte do odkrywania nowych technologii.\n\n[accent]Naciśnij przycisk Wystrzału.
hint.skip = Pomiń
hint.desktopMove = Użyj [accent][[WASD][] by się poruszać.
hint.zoom = [accent]Przewiń[] by przybliżać lub oddlać obraz.
hint.mine = Zbliż się do \uf8c4 rudy miedzi i [accent]kliknij[] by kopać manualnie.
hint.desktopShoot = Kliknij [accent][[Lewy przycisk myszy][] by strzelać.
hint.depositItems = By przenosić przedmoty, przeciągij je ze swojego statku do rdzenia.
hint.respawn = By się odrodzić jako statek, kliknij [accent][[V][].
hint.respawn.mobile = Przełączyłeś się na inną jednoskę/strukturę. By odrodzić się jako statek, [accent]kliknij w awatar w górnym lewym rogu.[]
hint.desktopPause = Naciśnij [accent][[Spację][] by zatrzymać lub wznowić grę.
hint.placeDrill = Wybierz \ue85e [accent]Wiertło[] w menu w prawym dolnym rogu, i wybierz wtedy \uf870 [accent]Wiertło[] i kliknij na miedzi by je postawić.
hint.placeDrill.mobile = Wybierz zakładkę z \ue85e[accent]Wiertłem[] w menu w prawym dolnym rogu, i wtedy wybierz \uf870 [accent]Wietło[] i kliknij na miedzi by je postawić.\n\nNaciśnij \ue800 [accent]znak potwierdzenia[] w dolnym prawym rogu by potwierdzić.
hint.placeConveyor = Przenośniki mogą przenosić przedmioty z wierteł. Wybierz \uf896 [accent]Przenośnik[] z zakładki \ue814 [accent]Dystrybucja[].\n\nKliknij i przeciągnij by położyć wiele przeciągników.\n[accent]Przewiń[] by obrócić.
hint.placeConveyor.mobile = Przenośniki mogą przenosić przedmioty z wierteł. Wybierz \uf896 [accent]Przenośnik[] z zakładki \ue814 [accent]Dystrybucja[].\n\nPrzytrzymaj palcem i przeciągij by położyć wiele przeciągników.
hint.placeTurret = Postaw \uf861 [accent]Działka[] by bronić się przed wrogami.\n\nDziałka potzebują amunicji - w tym wypadku, \uf838copper.\nUżyj przenośników i wierteł by je naładować.
hint.breaking = Użyj [accent]Prawego przycisku myszy[] i przeciągnij by zniszczyć bloki.
hint.breaking.mobile = Aktywuj \ue817 [accent]ikonę młota[] w dolnym prawym rogu by zniszczyć bloki.\n\nPrzytrymaj swój palec i przeciągij by wybrać wiele bloków do zniszczenia.
hint.research = Klikij przycisk \ue875 [accent]Badań[] by odkrwyać nowe technologie.
hint.research.mobile = Użyj przycisku \ue875 [accent]Badań[] w \ue88c [accent]Menu[] by odkrwyać nowe technologie.
hint.unitControl = Przytrzymaj [accent][[Lewy CTRL][] i [accent]kliknij[] to control by kontrolować sojusznicze jednostki i działka.
hint.unitControl.mobile = [accent][Kliknij dwukrotnie[] by kontrolować sojusznicze jednostki i działka.
hint.launch = Gdy zebrałeś wystarczająco materiałów możesz [accent]Wystrzelić[] wybierając \ue827 [accent]Mape[] w dolnym prawym rogu.
hint.launch.mobile = Gdy zebrałeś wystarczająco materiałów możesz [accent]Wystrzelić[] do pobliskich sektorów klikając w \ue827 [accent]Mape[] w \ue88c [accent]Menu[].
hint.schematicSelect = Przytrzymaj [accent][[F][] by kopiować i wkleić bloki.\n\n[accent][[Środkowy przycisk myszy][] kopiuje pojedyńczy blok.
hint.conveyorPathfind = Przeciągij i przytrzymaj [accent][[Lewy CTRL][] w trakcie budowania przenośników by wygenerować ścieżkę.
hint.conveyorPathfind.mobile = Włącz \ue844 [accent]tryb ukośny[] i przeciągnij w trakcie budowania przenośników by wygenerować ścieżkę.
hint.boost = Przytrzymaj [accent][[Lewy Shift][] by przelecieć ponad przeszkody.\n\nNie wszystkie jednostki tak mogą.
hint.command = Kliknij [accent][[G][] by ukształtować formacje z pobliskich jednostek.
hint.command.mobile = [accent][[Podwójne kliknięcie][] kształtuje formacje z pobliskich jednostek.
hint.payloadPickup = Kliknij [accent][[[] by podnieść małe bloki lub jednostki.
hint.payloadPickup.mobile = [accent]Kliknij i przytrzymaj[] mały blok by go podnieść.
hint.payloadDrop = Kliknij [accent]][] by opuścić podniesoiny towar.
hint.payloadDrop.mobile = [accent]Kliknij i przytrzymaj[] w puste miejsce by opuścić podniesoiny towar.
hint.waveFire = [accent]Strumień[] wypełniony wodą będzie gasić pobiskie pożary.
hint.generator = \uf879 [accent]Generatory Spalinowe[] spalają węgiel i przekuzują moc do pobliskich bloków.\n\nMożesz powiększyć odległość transmitowanej mocy używająć \uf87f [accent]Węzeły Prądu[].
hint.guardian = Jednostki [accent]Strażnicze[] są uzbrojone. Słaba amunicja - taka jak [accent]Miedź[] oraz [accent]Ołów[] [scarlet]nie jest efektywna[].\n\nUżyj lepszych działek takich jak \uf835 [accent]Naładowane Grafitem[] \uf861Duo/\uf859Salwa by pozbyć się strażników.
item.copper.description = Przydatny materiał budowlany. Szeroko używany w prawie każdej konstrukcji.
item.lead.description = Podstawowy materiał. Używany w przesyle przemiotów i płynów. Nie jest on przypadkiem szkodliwy?
@@ -1356,7 +1394,7 @@ block.memory-cell.description = Przechowuje informacje dla procesora.
block.memory-bank.description = Przechowuje informacje dla procesora. Duża pojemność.
block.logic-display.description = Wyświetla obraz z procesora.
block.large-logic-display.description = Wyświetla obraz z procesora.
block.interplanetary-accelerator.description = Masywna elektromagnetyczna wierza. Przyspiesza rdzeń do prędkości ucieczki by wylądować na innych planetach.
block.interplanetary-accelerator.description = Masywna elektromagnetyczna wieża. Przyspiesza rdzeń do prędkości ucieczki by wylądować na innych planetach.
unit.dagger.description = Strzela standardowymi pociskami w najbliższych wrogów.
@@ -1387,8 +1425,8 @@ unit.oct.description = Broni wszystkie jednostki tarczą regeneracyjną. Może p
unit.risso.description = Strzela sporą ilością pocisków i rakiet w najbliższych przeciwników.
unit.minke.description = Strzela granatami i standardowymi pociskami w najbliższych przeciwników.
unit.bryde.description = Strzela granatami i rakietami na dużą odległość we wrogów.
unit.sei.description = Strzela dużą ilością rakiet oraz przebijających zbroje pocisków we wrogów
unit.omura.description = Strzela przebijającym superszybkim pociskiem we wrogów ze sporej odległości. Produkuje Błyski (jednostki)
unit.sei.description = Strzela dużą ilością rakiet oraz przebijających zbroje pocisków we wrogów.
unit.omura.description = Strzela przebijającym superszybkim pociskiem we wrogów ze sporej odległości. Produkuje Błyski (jednostki).
unit.alpha.description = Chroni Rdzeń: Odłamek przed wrogami. Buduje struktury.
unit.beta.description = Chroni Rdzeń: Podstawa przed wrogami. Buduje struktury.
unit.gamma.description = Chroni Rdzeń: Jądro przed wrogami. Buduje struktury.
+105 -33
View File
@@ -17,11 +17,14 @@ linkfail = 打开链接失败!\n网址已复制到您的剪贴板。
screenshot = 屏幕截图已保存到 {0}
screenshot.invalid = 地图太大,可能没有足够的内存用于截图。
gameover = 游戏结束
gameover.disconnect = 断开连接
gameover.pvp = [accent] {0}[]队获胜!
gameover.waiting = [accent]正在等待下一张地图...
highscore = [accent]新纪录!
copied = 已复制
copied = 已复制
indev.popup = [accent]6.0[]仍在[accent]测试版[].\n[lightgray]这意味着:[]\n[scarlet]- 战役玩法完全没有完成[]\n- 很多内容还没有做完\n - 大多[scarlet]单位AI[]无法正确地运行\n- 单位系统完全没有完成\n- 一切您所看到的内容都可能会移除或调整。\n\n在[accent]Github[]提交错误报告。\n[#66ccff]来自译者WinterUnderTheSnow的忠告:不建议新玩家游玩还在测试阶段的6.0!建议您先从[orange]v104.6[#66ccff]或[orange]v104.10[#66ccff]开始游玩!
indev.notready = 这部分玩法还未开发完成。
indev.campaign = [accent]您已经到达战役模式的结尾![]\n\n这是内容所能做到的。 未来的更新中将添加行星际旅行。
load.sound = 音乐加载中
load.map = 地图加载中
@@ -57,6 +60,7 @@ schematic.rename = 重命名蓝图
schematic.info = {0}x{1}{2} 个方块
schematic.disabled = [scarlet]蓝图已禁用![]\n您不能在此[accent]地图[]或[accent]服务器[]上使用蓝图.
stats = 统计资料
stat.wave = 防守波数:[accent]{0}
stat.enemiesDestroyed = 消灭敌人:[accent]{0}
stat.built = 建造建筑:[accent]{0}
@@ -189,6 +193,10 @@ servers.local = 本地服务器
servers.remote = 远程服务器
servers.global = 全球服务器
servers.showhidden = 显示隐藏的服务器
server.shown = 显示
server.hidden = 隐藏
trace = 跟踪玩家
trace.playername = 玩家名称:[accent]{0}
trace.ip = IP 地址:[accent]{0}
@@ -267,6 +275,9 @@ cancel = 取消
openlink = 打开链接
copylink = 复制链接
back = 返回
crash.export = 导出崩溃日志
crash.none = 找不到崩溃日志。
crash.exported = 崩溃日志已导出。
data.export = 导出数据
data.import = 导入数据
data.openfolder = 打开数据文件夹
@@ -283,6 +294,7 @@ cancelbuilding = [accent][[{0}][]来清除规划
selectschematic = [accent][[{0}][]来选择复制
pausebuilding = [accent][[{0}][]来暂停建造
resumebuilding = [scarlet][[{0}][]来恢复建造
showui = UI已隐藏\n按[accent][[{0}][]显示UI
wave = [accent]第{0}波
wave.cap = [accent]Wave {0}/{1}
wave.waiting = [lightgray]下一波倒计时:{0}秒
@@ -290,6 +302,8 @@ wave.waveInProgress = [lightgray]波次袭来
waiting = [lightgray]等待中…
waiting.players = 等待玩家中…
wave.enemies = [lightgray]剩余 {0} 个敌人
wave.enemycores = [accent]{0}[lightgray] 敌人核心(多个)
wave.enemycore = [accent]{0}[lightgray] 敌人核心
wave.enemy = [lightgray]剩余 {0} 个敌人
wave.guardianwarn = Boss 将在[accent]{0}[]波后到来。
wave.guardianwarn.one = Boss 将在[accent]{0}[]波后到来。
@@ -350,6 +364,7 @@ waves.invalid = 剪贴板中的波次信息无效。
waves.copied = 波次信息已复制。
waves.none = 没有定义敌人。\n请注意,这将自动替换为默认的敌人列表。
#these are intentionally in lower case
wavemode.counts = 数目
wavemode.totals = 总和
wavemode.health = 生命值
@@ -462,6 +477,8 @@ load = 载入游戏
save = 保存
fps = 帧数:{0}
ping = 延迟:{0}毫秒
memory = 内存: {0}mb
memory2 = 内存:\n {0}mb +\n {1}mb
language.restart = 为了使语言设置生效请重启游戏。
settings = 设置
tutorial = 教程
@@ -476,24 +493,21 @@ complete = [lightgray]完成:
requirement.wave = {1}中的第{0}波次
requirement.core = 在{0}中摧毁敌方核心
requirement.research = 研究 {0}
requirement.produce = 生产 {0}
requirement.capture = 占领 {0}
bestwave = [lightgray]最高波次:{0}
launch.text = 发射
research.multiplayer = 仅有服主可研究物品。
map.multiplayer = 仅有服主可查看区域。
uncover = 解锁
configure = 设定装运的数量
loadout = 装运
resources = 资源
bannedblocks = 禁用建筑
addall = 添加所有
launch.from = 发射地: [accent]{0}
launch.destination = 目的地: {0}
configure.invalid = 数量必须是0到{0}之间的数字。
zone.unlocked = [lightgray]{0} 已解锁。
zone.requirement.complete = 完成{0}。\n已达成解锁{1}的要求。
zone.resources = 地图中的资源:
zone.objective = [lightgray]目标:[accent]{0}
zone.objective.survival = 生存
zone.objective.attack = 摧毁敌方核心
add = 添加…
boss.health = Boss 生命值
@@ -517,17 +531,41 @@ weather.fog.name = 雾
sectors.unexplored = [lightgray]未探索
sectors.resources = 资源:
sectors.production = 产出:
sectors.export = 输出:
sectors.time = 时间:
sectors.threat = 威胁
sectors.wave = 进攻波:
sectors.stored = 贮存:
sectors.resume = 继续
sectors.launch = 发射
sectors.select = 选择
sectors.nonelaunch = [lightgray]无 (太阳)
sectors.rename = 重命名区块
sectors.enemybase = [scarlet]敌人基地
sectors.vulnerable = [scarlet]脆弱的
sectors.underattack = [scarlet]遭到攻击![accent]{0}% 被摧毁
sectors.survives = [accent]存活{0}波
sectors.go = 进入
sector.curcapture = 区域已占领
sector.curlost = 区域丢失
sector.missingresources = [scarlet]核心资源不足
sector.attacked = 区域[accent]{0}[white]受到攻击!
sector.lost = 区域[accent]{0}[white]已丢失!
#note: the missing space in the line below is intentional
sector.captured = 区域[accent]{0}[white]已占领!
threat.low =
threat.medium =
threat.high =
threat.extreme = 极高
threat.eradication = 根除
planets = 行星
planet.serpulo.name = 塞普罗
planet.sun.name = 太阳
sector.impact0078.name = 影响0078
sector.groundZero.name = 零号地区
sector.craters.name = 陨石带
sector.frozenForest.name = 冰冻森林
@@ -539,6 +577,10 @@ sector.overgrowth.name = 增生区
sector.tarFields.name = 油田
sector.saltFlats.name = 盐碱荒滩
sector.fungalPass.name = 真菌通道
sector.biomassFacility.name = 生物质合成设施
sector.windsweptIslands.name = 风吹群岛
sector.extractionOutpost.name = 萃取前哨
sector.planetaryTerminal.name = 行星发射终端
sector.groundZero.description = 踏上旅程的最佳位置。这儿的敌人威胁很小,但资源也少。\n收集尽可能多的铅和铜。\n出发吧!
sector.frozenForest.description = 即使是靠近山脉的这里,孢子也已经扩散。他们不能长期停留在寒冷的温度中。\n\n开始运用电力。建造火力发电机并学会使用修理者。
@@ -573,7 +615,6 @@ settings.clearcampaignsaves.confirm = 您确定要清除战役进度?
paused = [accent]< 暂停 >
clear = 清除
banned = [scarlet]已禁止
unplaceable.sectorcaptured = [scarlet]需要占领区块
yes =
no =
info.title = [accent]详情
@@ -583,6 +624,7 @@ unit.nobuild = [scarlet]单位未能建造
lastaccessed = [lightgray]上次操作: {0}
block.unknown = [lightgray]???
stat.description = 介绍
stat.input = 输入
stat.output = 输出
stat.booster = 增强物品/液体
@@ -610,6 +652,8 @@ stat.memorycapacity = 内存容量
stat.basepowergeneration = 基础能源输出
stat.productiontime = 生产时间
stat.repairtime = 建筑完全修复时间
stat.weapons = 武器
stat.bullet = 子弹
stat.speedincrease = 提速
stat.range = 范围
stat.drilltier = 可钻探矿物
@@ -642,12 +686,15 @@ stat.minetier = 采矿等级
stat.payloadcapacity = 载货容量
stat.commandlimit = 指挥上限
stat.abilities = 能力
stat.canboost = 助推器
stat.flying = 飞行
ability.forcefield = 力墙场
ability.repairfield = 修复场
ability.statusfield = 状态场
ability.unitspawn = {0} 工厂
ability.shieldregenfield = 护盾再生场
ability.movelightning = 闪电移动
bar.drilltierreq = 需要更好的钻头
bar.noresources = 缺失资源
@@ -676,12 +723,14 @@ units.processorcontrol = [lightgray]由处理器控制
bullet.damage = [stat]{0}[lightgray] 伤害
bullet.splashdamage = [stat]{0}[lightgray] 范围伤害 ~[stat] {1}[lightgray] 格
bullet.incendiary = [stat] 燃烧
bullet.sapping = [stat]sapping
bullet.homing = [stat] 追踪
bullet.shock = [stat] 电击
bullet.frag = [stat] 分裂
bullet.knockback = [stat]{0}[lightgray] 击退
bullet.pierce = [stat]{0}[lightgray]x 穿透
bullet.infinitepierce = [stat]pierce
bullet.healpercent = [stat]{0}[lightgray]% 修复
bullet.freezing = [stat] 冰冻
bullet.tarred = [stat] 减速
bullet.multiplier = [stat]{0}[lightgray]x 装弹数量
@@ -706,6 +755,7 @@ unit.items = 物品
unit.thousands = K
unit.millions = M
unit.billions = B
category.purpose = 介绍
category.general = 普通
category.power = 能量
category.liquids = 液体
@@ -719,6 +769,7 @@ setting.blockreplace.name = 自动推荐合适的建筑
setting.linear.name = 抗锯齿
setting.hints.name = 提示
setting.flow.name = 显示资源传送速度[scarlet] (实验性)
setting.backgroundpause.name = 在背景中暂停
setting.buildautopause.name = 自动暂停建造
setting.animatedwater.name = 流动的水
setting.animatedshields.name = 动态画面
@@ -747,7 +798,6 @@ setting.conveyorpathfinding.name = 传送带自动寻路
setting.sensitivity.name = 控制器灵敏度
setting.saveinterval.name = 自动保存间隔
setting.seconds = {0} 秒
setting.blockselecttimeout.name = 建筑选择超时
setting.milliseconds = {0} 毫秒
setting.fullscreen.name = 全屏
setting.borderlesswindow.name = 无边界窗口[lightgray](可能需要重启)
@@ -836,6 +886,8 @@ keybind.menu.name = 菜单
keybind.pause.name = 暂停
keybind.pause_building.name = 暂停/继续建造
keybind.minimap.name = 小地图
keybind.planet_map.name = 行星地图
keybind.research.name = 研究
keybind.chat.name = 聊天
keybind.player_list.name = 玩家列表
keybind.console.name = 控制台
@@ -899,6 +951,7 @@ content.item.name = 物品
content.liquid.name = 液体
content.unit.name = 部队
content.block.name =
content.sector.name = 区域
item.copper.name =
item.lead.name =
@@ -959,6 +1012,7 @@ block.resupply-point.name = 补给点
block.parallax.name = 差扰光束
block.cliff.name = 悬崖
block.sand-boulder.name = 砂岩
block.basalt-boulder.name = 玄武岩巨石
block.grass.name = 草地
block.slag.name = 矿渣
block.space.name = 太空
@@ -1056,7 +1110,6 @@ block.conveyor.name = 传送带
block.titanium-conveyor.name = 钛传送带
block.plastanium-conveyor.name = 塑钢传送带
block.armored-conveyor.name = 装甲传送带
block.armored-conveyor.description = 运送物品,与钛传送带一样的速度,但有更强的装甲。除其他传送带,不接受任何边上的输入。
block.junction.name = 连接器
block.router.name = 路由器
block.distributor.name = 分配器
@@ -1064,7 +1117,6 @@ block.sorter.name = 分类器
block.inverted-sorter.name = 反向分类器
block.message.name = 信息板
block.illuminator.name = 照明器
block.illuminator.description = 小型、紧凑、可配置的光源。需要能量运行。
block.overflow-gate.name = 溢流门
block.underflow-gate.name = 反向溢流门
block.silicon-smelter.name = 硅冶炼厂
@@ -1160,6 +1212,11 @@ block.payload-router.name = 载荷路由器
block.disassembler.name = 解离机
block.silicon-crucible.name = 热能坩埚
block.overdrive-dome.name = 超速穹顶投射器
#experimental, may be removed
block.block-forge.name = 方块熔炉
block.block-loader.name = 方块装载机
block.block-unloader.name = 方块卸载机
block.interplanetary-accelerator.name = 行星际加速器
block.switch.name = 开关
block.micro-processor.name = 微型处理器
@@ -1178,30 +1235,45 @@ team.derelict.name = 灰
team.green.name = 绿
team.purple.name =
tutorial.next = [lightgray]<点击以继续>
tutorial.intro = 您已进入[scarlet] Mindustry 教程[]。[]\n使用[accent][[WASD][]键移动机甲和视角。\n[accent]按住[[Ctrl]并转动鼠标滚轮[]缩放视野。\n让我们从[accent]采集铜矿[]开始。先移动到铜矿旁边,然后点按矿脉附近散落的矿物。\n\n[accent]{0}/{1} 铜
tutorial.intro.mobile = 您已进入[scarlet] Mindustry 教程[]。\n在屏幕上滑动来继续。\n[accent]双指捏合[] 来缩小和放大。\n让我们从[accent]采集铜矿[]开始。先移动到铜矿旁边,然后点按矿脉附近散落的矿物。\n\n[accent]铜 {0}/{1}
tutorial.drill = 手动采矿效率不高。\n[accent]钻头[]可以自动采矿。\n让我们在在铜矿上放一个。\n点击右下角的钻头菜单。\n选择[accent]机械钻头[]。\n单击将其放置在铜矿上。\n[accent]右键单击[]来停止。
tutorial.drill.mobile = 手动采矿效率不高。\n[accent]钻头[]可以自动采矿。\n点右下角的钻头菜单。\n选择[accent]机械钻头[]。\n点一下将其放在铜矿上,点[accent]对号[]来确定。\n点[accent]叉号[]来取消。
tutorial.blockinfo = 每种钻头都有其独特的数据。每个钻头只能开采部分矿石。\n若要查看建筑的详细信息,[accent]在菜单中点击问号。[]\n\n[accent]现在查看机械钻头的数据吧。[]
tutorial.conveyor = [accent]传送带[]可以把物资传送到核心。\n请在钻头到核心间建造一条传送带。
tutorial.conveyor.mobile = [accent]传送带[]可以把物资传送到核心。\n请在钻头到核心间建造一条传送带。\n[accent]长按数秒[]并向一个方向拖动来直线放置。\n\n[accent]{0}/{1} 条传送带\n[accent]0/1 物品
tutorial.turret = 必须建造防御建筑来击退[lightgray]敌人[]。\n请在核心附近造一个双管炮。
tutorial.drillturret = 双管炮需要[accent]铜[]作弹药来射击。\n可以放一个钻头在炮塔附近供应铜。
tutorial.pause = 在战斗中,您可以[accent]暂停游戏[]。\n暂停时您可以规划建筑物。\n\n按[accent]空格[]暂停。
tutorial.pause.mobile = 在战斗中,您可以[accent]暂停游戏[]。\n暂停时您可以规划建筑物。\n\n[accent]点击左上角的按钮以暂停。
tutorial.unpause = 现在再次按空格以继续。
tutorial.unpause.mobile = 现在再次点按以继续
tutorial.breaking = 建筑经常需要拆除。\n[accent]按住鼠标右键[]来拆除选中的建筑。[]\n\n[accent]使用范围拆除来拆除核心左侧的废墙。
tutorial.breaking.mobile = 建筑经常需要拆除。\n[accent]选择拆除模式[],点击建筑以拆除。\n[accent]长按几秒[]并拖动来范围拆除。\n点击对号来确定。\n\n[accent]使用范围拆除来拆除核心左侧的废墙。
tutorial.withdraw = 有时,从建筑中取出物品是必要的。\n[accent]点击包含物品的建筑[],然后[accent]点击在方框中的物品[]。\n可以通过[accent]点击或长按[]来取出物品。\n\n[accent]从核心中取出一些铜[]。
tutorial.deposit = 将物品从机甲拖向建筑来放下物品。\n\n[accent]将铜放回核心[]。
tutorial.waves = [lightgray]敌人[]来了。\n\n保护核心,防御两波攻击。造更多的炮塔。[accent]点击[]以射击。\n建造更多的炮塔和钻头,并采更多的矿
tutorial.waves.mobile = [lightgray]敌人[]来了。\n\n保护核心,防御两波攻击。造更多的炮塔。你的机甲将对敌人自动开火。\n建造更多的炮塔和钻头,并采更多的矿
tutorial.launch = 进入特定波次后,你可以[accent]发射核心(起飞)[],[accent]带走核心中的所有资源[]并抛下所有的建筑。\n装运的资源可用于研究科技。\n\n[accent]点击发射按钮。
hint.skip = 跳过
hint.desktopMove = 使用[accent][[WASD][]来移动.
hint.zoom = [accent]滚动[]放大或缩小.
hint.mine = 移动到\uf8c4铜矿附近并点按[accent]tap[]进行手动开采
hint.desktopShoot = [accent][[Left-click][]射击.
hint.depositItems = 要转移物品,请将其从飞船上拖到核心。
hint.respawn = 要重生飞船,请按[accent][[V][].
hint.respawn.mobile = 您已切换控制单元/结构. 如果要重生飞船请[accent]点击左上方的图标(那个和你长得一样的).[]
hint.desktopPause = 按[accent][[Space][]暂停和取消暂停游戏.
hint.placeDrill = 选择\ue85e[accent]钻头[]右下角菜单中的标签,然后选择一个\uf870 [accent]钻头[]然后单击铜矿将其放置.
hint.placeDrill.mobile = 选择\ue85e[accent]钻头[]右下角菜单中的标签,然后选择一个\uf870 [accent]钻头[]然后点击铜矿将其放置.\n\n按下\ue800 [accent]复选标记[]在右下角按钮确认.
hint.placeConveyor = 传送带将物品从钻头移到其他块中。选择一个\uf896 [accent]传送带[]从\ue814 [accent]布局[]标签.\n\n单击并拖动以放置多个传送带.\n[accent]滚动[]旋转.
hint.placeConveyor.mobile = 传送带将物品从钻头移到其他块中。选择一个\uf896 [accent]传送带[]从\ue814 [accent]布局[]标签.\n\n按住手指一秒钟,然后拖动以放置多个传送带.
hint.placeTurret = 放置\uf861 [accent]炮塔[]保卫你的基地从敌人手中.\n\n炮塔需要弹药-在这种情况下e, \uf838copper.\n使用传送带和钻头为它们供弹
hint.breaking = [accent]右击[]并拖动以拆除方块.
hint.breaking.mobile = 激活\ue817 [accent]锤子[]在右下角点击以拆除方块.\n\n按住手指一秒钟,然后拖动以选择.
hint.research = 使用\ue875 [accent]科技树[]按钮研究新技术.
hint.research.mobile = 使用\ue875 [accent]科技树[]按钮在\ue88c [accent]菜单[]去研究新技术.
hint.unitControl = 按住[accent][[L-ctrl][]和[accent]点击[]控制友军单位或炮塔
hint.unitControl.mobile = [accent][双击[]控制友军单位或炮塔(双击)
hint.launch = 一旦收集到足够的资源,您就可以[accent]发射[]通过选择附近的区域从\ue827 [accent]地图[]在右下角.
hint.launch.mobile = 一旦收集到足够的资源,您就可以[accent]发射[]通过选择附近的区域从\ue827 [accent]地图[]在\ue88c [accent]菜单[].
hint.schematicSelect = 按住[accent][[F][]并拖动以选择要复制和粘贴的块.\n\n[accent][[Middle Click][]复制单个块类型.
hint.conveyorPathfind = 按住[accent][[L-Ctrl][]拖动,传送带会自动生成路径.
hint.conveyorPathfind.mobile = 启用\ue844 [accent]对角线模式[]并拖动,传送带会自动生成路径.
hint.boost = 按住[accent][[L-Shift][]用当前单位飞越障碍物.\n\n只有少数地面单位有助推器.(首先排除爬虫家族)
hint.command = 按accent][[G][]指挥附近的单位编队.
hint.command.mobile = [accent][双击][]您的部队指挥附近的部队编队.(双击)
hint.payloadPickup = 按[accent][[[]捡起小方块或单位.
hint.payloadPickup.mobile = [accent]点住]一个小方块或一个单位来捡起来.
hint.payloadDrop = 按[accent]][]放下有效载荷.
hint.payloadDrop.mobile = [accent]点住[]一个空的位置将有效载荷丢到那里.(不是很精准)
hint.waveFire = [accent]进攻波[]炮塔加水弹药会自动扑灭附近的大火.(浪涌和海啸)
hint.generator = \uf879 [accent]燃烧发电机[]燃烧煤炭并将电力传输到相邻方块.\n\n电力传输范围可以扩展,用\uf87f [accent]能量节点[].
item.copper.description = 一种最基本的的建筑材料。在各种类型的建筑中被广泛使用。
item.copper.details = 铜. 在Serpulo上的金属异常丰富。 除非加固,否则结构较弱。
item.lead.description = 一种基本的电力材料。广泛用于电子设备和液体输送模块。
item.lead.details = Dense. Inert. Extensively used in batteries.\nNote: Likely toxic to biological life forms. Not that there are many left here.
item.metaglass.description = 一种致密坚硬的复合玻璃。广泛用于液体输送和存储。
item.graphite.description = 一种高密度的碳材料,用于弹药和电器元件。
item.sand.description = 一种常见的材料,广泛用于冶炼,包括制作合金和助熔剂。
+1
View File
@@ -102,3 +102,4 @@ newlocknew (freesound.org)
dsmolenaers (freesound.org)
Headphaze (freesound.org)
VolasYouKnow
Ángel Rodríguez Aguilera
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -112,8 +112,8 @@ public abstract class ClientLauncher extends ApplicationCore implements Platform
super.add(module);
//autoload modules when necessary
if(module instanceof Loadable){
assets.load((Loadable)module);
if(module instanceof Loadable l){
assets.load(l);
}
}
+4 -2
View File
@@ -47,6 +47,8 @@ public class Vars implements Loadable{
public static final int bufferSize = 8192;
/** global charset, since Android doesn't support the Charsets class */
public static final Charset charset = Charset.forName("UTF-8");
/** mods suggested for import */
public static final String[] suggestedMods = {""};
/** main application name, capitalized */
public static final String appName = "Mindustry";
/** URL for itch.io donations. */
@@ -56,7 +58,7 @@ public class Vars implements Loadable{
/** URL for sending crash reports to */
public static final String crashReportURL = "http://192.99.169.18/report";
/** URL the links to the wiki's modding guide.*/
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/";
public static final String modGuideURL = "https://mindustrygame.github.io/wiki/modding/1-modding/";
/** URL to the JSON file containing all the global, public servers. Not queried in BE. */
public static final String serverJsonURL = "https://raw.githubusercontent.com/Anuken/Mindustry/master/servers.json";
/** URL to the JSON file containing all the BE servers. Only queried in BE. */
@@ -88,7 +90,7 @@ public class Vars implements Loadable{
/** duration of time between turns in ticks */
public static final float turnDuration = 2 * Time.toMinutes;
/** chance of an invasion per turn, 1 = 100% */
public static final float baseInvasionChance = 1f / 75f;
public static final float baseInvasionChance = 1f / 100f;
/** how many turns have to pass before invasions start */
public static final int invasionGracePeriod = 20;
/** min armor fraction damage; e.g. 0.05 = at least 5% damage */
+4 -3
View File
@@ -55,11 +55,12 @@ public class BaseAI{
public void update(){
if(data.team.rules().aiCoreSpawn && timer.get(timerSpawn, 60 * 2.5f) && data.hasCore()){
CoreBlock block = (CoreBlock)data.core().block;
int coreUnits = Groups.unit.count(u -> u.team == data.team && u.type == block.unitType);
//create AI core unit
if(!state.isEditor() && !Groups.unit.contains(u -> u.team() == data.team && u.type == block.unitType)){
//create AI core unit(s)
if(!state.isEditor() && coreUnits < data.cores.size){
Unit unit = block.unitType.create(data.team);
unit.set(data.core());
unit.set(data.cores.random());
unit.add();
Fx.spawn.at(unit);
}
+3 -2
View File
@@ -13,6 +13,7 @@ import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.world.*;
import mindustry.world.blocks.storage.*;
import mindustry.world.meta.*;
import static mindustry.Vars.*;
@@ -115,7 +116,7 @@ public class Pathfinder implements Runnable{
}
return PathTile.get(
tile.build == null || !tile.solid() ? 0 : Math.min((int)(tile.build.health / 40), 80),
tile.build == null || !tile.solid() || tile.block() instanceof CoreBlock ? 0 : Math.min((int)(tile.build.health / 40), 80),
tile.getTeamID(),
tile.solid(),
tile.floor().isLiquid,
@@ -458,7 +459,7 @@ public class Pathfinder implements Runnable{
/** costs of getting to a specific tile */
public int[][] weights;
/** search IDs of each position - the highest, most recent search is prioritized and overwritten */
int[][] searches;
public int[][] searches;
/** search frontier, these are Pos objects */
IntQueue frontier = new IntQueue();
/** all target positions; these positions have a cost of 0, and must be synchronized on! */
+1 -1
View File
@@ -67,7 +67,7 @@ public class FormationAI extends AIController implements FormationMember{
if(core != null && leader.mineTile.drop() != null && unit.within(core, unit.type.range) && !unit.acceptsItem(leader.mineTile.drop())){
if(core.acceptStack(unit.stack.item, unit.stack.amount, unit) > 0){
Call.transferItemTo(unit.stack.item, unit.stack.amount, unit.x, unit.y, core);
Call.transferItemTo(unit, unit.stack.item, unit.stack.amount, unit.x, unit.y, core);
unit.clearItem();
}
+1 -1
View File
@@ -65,7 +65,7 @@ public class MinerAI extends AIController{
if(unit.within(core, unit.type.range)){
if(core.acceptStack(unit.stack.item, unit.stack.amount, unit) > 0){
Call.transferItemTo(unit.stack.item, unit.stack.amount, unit.x, unit.y, core);
Call.transferItemTo(unit, unit.stack.item, unit.stack.amount, unit.x, unit.y, core);
}
unit.clearItem();
+1 -1
View File
@@ -1388,7 +1388,7 @@ public class Blocks implements ContentList{
size = 5;
unitCapModifier = 24;
researchCostMultiplier = 0.05f;
researchCostMultiplier = 0.06f;
}};
vault = new StorageBlock("vault"){{
+1 -15
View File
@@ -37,7 +37,7 @@ public class Bullets implements ContentList{
waterShot, cryoShot, slagShot, oilShot, heavyWaterShot, heavyCryoShot, heavySlagShot, heavyOilShot,
//environment, misc.
damageLightning, damageLightningGround, fireball, basicFlame, pyraFlame, driverBolt, healBullet, healBulletBig;
damageLightning, damageLightningGround, fireball, basicFlame, pyraFlame, driverBolt;
@Override
public void load(){
@@ -374,20 +374,6 @@ public class Bullets implements ContentList{
knockback = 0.7f;
}};
healBullet = new LaserBoltBulletType(5.2f, 13){{
healPercent = 3f;
collidesTeam = true;
backColor = Pal.heal;
frontColor = Color.white;
}};
healBulletBig = new LaserBoltBulletType(5.2f, 15){{
healPercent = 5.5f;
collidesTeam = true;
backColor = Pal.heal;
frontColor = Color.white;
}};
fireball = new BulletType(1f, 4){
{
pierce = true;
@@ -83,7 +83,7 @@ public class SectorPresets implements ContentList{
}};
desolateRift = new SectorPreset("desolateRift", serpulo, 123){{
captureWave = 30;
captureWave = 18;
difficulty = 8;
}};
+5 -4
View File
@@ -98,11 +98,11 @@ public class TechTree implements ContentList{
node(platedConduit, () -> {
});
});
node(rotaryPump, () -> {
node(thermalPump, () -> {
node(rotaryPump, () -> {
node(thermalPump, () -> {
});
});
});
});
@@ -471,7 +471,8 @@ public class TechTree implements ContentList{
node(desolateRift, Seq.with(
new SectorComplete(impact0078),
new Research(thermalGenerator),
new Research(thoriumReactor)
new Research(thoriumReactor),
new Research(coreNucleus)
), () -> {
node(planetaryTerminal, Seq.with(
new SectorComplete(desolateRift),
+32 -17
View File
@@ -292,6 +292,7 @@ public class UnitTypes implements ContentList{
shootSound = Sounds.lasershoot;
bullet = new LaserBoltBulletType(5.2f, 14){{
lifetime = 37f;
healPercent = 5f;
collidesTeam = true;
backColor = Pal.heal;
@@ -311,7 +312,7 @@ public class UnitTypes implements ContentList{
mineTier = 2;
mineSpeed = 5f;
commandLimit = 8;
commandLimit = 9;
abilities.add(new ShieldRegenFieldAbility(20f, 40f, 60f * 5, 60f));
ammoType = AmmoTypes.power;
@@ -619,7 +620,7 @@ public class UnitTypes implements ContentList{
drag = 0.4f;
hitSize = 12f;
rotateSpeed = 3f;
health = 800;
health = 900;
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
legCount = 6;
legLength = 13f;
@@ -650,7 +651,7 @@ public class UnitTypes implements ContentList{
bullet = new SapBulletType(){{
sapStrength = 0.4f;
length = 75f;
damage = 18;
damage = 20;
shootEffect = Fx.shootSmall;
hitColor = color = Color.valueOf("bf92f9");
despawnEffect = Fx.none;
@@ -670,7 +671,7 @@ public class UnitTypes implements ContentList{
bullet = new SapBulletType(){{
sapStrength = 0.8f;
length = 40f;
damage = 15;
damage = 16;
shootEffect = Fx.shootSmall;
hitColor = color = Color.valueOf("bf92f9");
despawnEffect = Fx.none;
@@ -975,7 +976,7 @@ public class UnitTypes implements ContentList{
zenith = new UnitType("zenith"){{
health = 700;
speed = 1.7f;
speed = 1.8f;
accel = 0.04f;
drag = 0.016f;
flying = true;
@@ -997,7 +998,7 @@ public class UnitTypes implements ContentList{
velocityRnd = 0.2f;
shootSound = Sounds.missile;
bullet = new MissileBulletType(3f, 12){{
bullet = new MissileBulletType(3f, 14){{
width = 8f;
height = 8f;
shrinkY = 0f;
@@ -1005,7 +1006,7 @@ public class UnitTypes implements ContentList{
homingRange = 60f;
keepVelocity = false;
splashDamageRadius = 25f;
splashDamage = 10f;
splashDamage = 16f;
lifetime = 60f;
trailColor = Pal.unitBack;
backColor = Pal.unitBack;
@@ -1251,8 +1252,8 @@ public class UnitTypes implements ContentList{
mineTier = 3;
mineSpeed = 4f;
health = 500;
armor = 5f;
health = 460;
armor = 3f;
speed = 2.5f;
accel = 0.06f;
drag = 0.017f;
@@ -1264,6 +1265,7 @@ public class UnitTypes implements ContentList{
engineSize = 3f;
payloadCapacity = (2 * 2) * tilePayload;
buildSpeed = 2.6f;
isCounted = false;
ammoType = AmmoTypes.power;
@@ -1274,7 +1276,13 @@ public class UnitTypes implements ContentList{
x = 8f;
y = -6f;
rotate = true;
bullet = Bullets.healBulletBig;
bullet = new LaserBoltBulletType(5.2f, 10){{
lifetime = 35f;
healPercent = 5.5f;
collidesTeam = true;
backColor = Pal.heal;
frontColor = Color.white;
}};
}},
new Weapon("heal-weapon-mount"){{
shootSound = Sounds.lasershoot;
@@ -1282,7 +1290,13 @@ public class UnitTypes implements ContentList{
x = 4f;
y = 5f;
rotate = true;
bullet = Bullets.healBullet;
bullet = new LaserBoltBulletType(5.2f, 8){{
lifetime = 35f;
healPercent = 3f;
collidesTeam = true;
backColor = Pal.heal;
frontColor = Color.white;
}};
}});
}};
@@ -1643,6 +1657,7 @@ public class UnitTypes implements ContentList{
recoil = 3f;
occlusion = 12f;
ejectEffect = Fx.casing3;
shootSound = Sounds.shootBig;
shots = 3;
shotDelay = 4f;
@@ -1735,13 +1750,13 @@ public class UnitTypes implements ContentList{
top = false;
ejectEffect = Fx.casing1;
bullet = new BasicBulletType(2.5f, 10){{
bullet = new BasicBulletType(2.5f, 11){{
width = 7f;
height = 9f;
lifetime = 60f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.02f;
tileDamageMultiplier = 0.01f;
}};
}});
}};
@@ -1777,13 +1792,13 @@ public class UnitTypes implements ContentList{
spacing = 0f;
ejectEffect = Fx.casing1;
bullet = new BasicBulletType(3f, 10){{
bullet = new BasicBulletType(3f, 11){{
width = 7f;
height = 9f;
lifetime = 60f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.02f;
tileDamageMultiplier = 0.01f;
}};
}});
}};
@@ -1817,13 +1832,13 @@ public class UnitTypes implements ContentList{
shotDelay = 3f;
ejectEffect = Fx.casing1;
bullet = new BasicBulletType(3.5f, 10){{
bullet = new BasicBulletType(3.5f, 11){{
width = 6.5f;
height = 11f;
lifetime = 70f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.02f;
tileDamageMultiplier = 0.01f;
homingPower = 0.04f;
}};
}});
+5 -3
View File
@@ -53,10 +53,11 @@ public class Weathers implements ContentList{
baseSpeed = 5.4f;
attrs.set(Attribute.light, -0.1f);
attrs.set(Attribute.water, -0.1f);
opacityMultiplier = 0.5f;
opacityMultiplier = 0.35f;
force = 0.1f;
sound = Sounds.wind;
soundVol = 0.3f;
soundVol = 0.8f;
duration = 7f * Time.toMinutes;
}};
sporestorm = new ParticleWeather("sporestorm"){{
@@ -77,7 +78,8 @@ public class Weathers implements ContentList{
opacityMultiplier = 0.75f;
force = 0.1f;
sound = Sounds.wind;
soundVol = 0.3f;
soundVol = 0.7f;
duration = 7f * Time.toMinutes;
}};
fog = new ParticleWeather("fog"){{
+20 -1
View File
@@ -334,9 +334,28 @@ public class Control implements ApplicationListener, Loadable{
state.wave = 1;
//set up default wave time
state.wavetime = state.rules.waveSpacing * 2f;
//reset captured state
sector.info.wasCaptured = false;
//re-enable waves
state.rules.waves = true;
//reset win wave??
state.rules.winWave = state.rules.attackMode ? -1 : sector.preset != null ? sector.preset.captureWave : 40;
state.rules.winWave = state.rules.attackMode ? -1 : sector.preset != null ? sector.preset.captureWave : state.rules.winWave > state.wave ? state.rules.winWave : 40;
//if there's still an enemy base left, fix it
if(state.rules.attackMode){
//replace all broken blocks
for(var plan : state.rules.waveTeam.data().blocks){
Tile tile = world.tile(plan.x, plan.y);
if(tile != null){
tile.setBlock(content.block(plan.block), state.rules.waveTeam, plan.rotation);
if(plan.config != null && tile.build != null){
tile.build.configure(plan.config);
}
}
}
state.rules.waveTeam.data().blocks.clear();
}
//kill all units, since they should be dead anyway
Groups.unit.clear();
+10 -1
View File
@@ -109,6 +109,13 @@ public class Logic implements ApplicationListener{
}
state.rules.waveTeam.rules().aiTier = state.getSector().threat * 0.8f;
state.rules.waveTeam.rules().infiniteResources = true;
//fill enemy cores by default.
for(var core : state.rules.waveTeam.cores()){
for(Item item : content.items()){
core.items.set(item, core.block.itemCapacity);
}
}
}
//save settings
@@ -128,8 +135,8 @@ public class Logic implements ApplicationListener{
//convert all blocks to neutral, randomly killing them
if(tile.isCenter() && tile.build != null && tile.build.team == state.rules.waveTeam){
Building b = tile.build;
Call.setTeam(b, Team.derelict);
Time.run(Mathf.random(0f, 60f * 6f), () -> {
Call.setTeam(b, Team.derelict);
if(Mathf.chance(0.25)){
b.kill();
}
@@ -260,6 +267,8 @@ public class Logic implements ApplicationListener{
if(state.rules.sector == null) return;
state.rules.sector.info.wasCaptured = true;
//fire capture event
Events.fire(new SectorCaptureEvent(state.rules.sector));
+5
View File
@@ -447,6 +447,11 @@ public class NetServer implements ApplicationListener{
return;
}
if(currentlyKicking[0].target.team() != player.team()){
player.sendMessage("[scarlet]You can't vote for other teams.");
return;
}
if(!arg[0].toLowerCase().equals("y") && !arg[0].toLowerCase().equals("n")){
player.sendMessage("[scarlet]Vote either 'y' (yes) or 'n' (no).");
return;
+1 -1
View File
@@ -258,11 +258,11 @@ public class UI implements ApplicationListener, Loadable{
TextField field = cont.field(def, t -> {}).size(330f, 50f).get();
field.setFilter((f, c) -> field.getText().length() < textLength && filter.acceptChar(f, c));
buttons.defaults().size(120, 54).pad(4);
buttons.button("@cancel", this::hide);
buttons.button("@ok", () -> {
confirmed.get(field.getText());
hide();
}).disabled(b -> field.getText().isEmpty());
buttons.button("@cancel", this::hide);
keyDown(KeyCode.enter, () -> {
String text = field.getText();
if(!text.isEmpty()){
+1 -1
View File
@@ -311,7 +311,7 @@ public class World{
//TODO bad code
boolean hasSnow = floors[0].name.contains("ice") || floors[0].name.contains("snow");
boolean hasRain = !hasSnow && content.contains(Liquids.water) && !floors[0].name.contains("sand");
boolean hasDesert = !hasSnow && !hasRain && floors[0].name.contains("sand");
boolean hasDesert = !hasSnow && !hasRain && floors[0] == Blocks.sand;
boolean hasSpores = floors[0].name.contains("spore") || floors[0].name.contains("moss") || floors[0].name.contains("tainted");
if(hasSnow){
+2 -2
View File
@@ -17,7 +17,7 @@ import mindustry.ui.*;
public class WaveGraph extends Table{
public Seq<SpawnGroup> groups = new Seq<>();
public int from, to = 20;
public int from = 0, to = 20;
private Mode mode = Mode.counts;
private int[][] values;
@@ -114,7 +114,7 @@ public class WaveGraph extends Table{
Lines.line(cx, cy, cx, cy + len);
if(i == values.length/2){
font.draw("" + (i + from), cx, cy - 2f, Align.center);
font.draw("" + (i + from + 1), cx, cy - 2f, Align.center);
}
}
font.setColor(Color.white);
+11 -5
View File
@@ -2,7 +2,6 @@ package mindustry.entities;
import arc.*;
import arc.func.*;
import arc.graphics.*;
import arc.math.*;
import arc.math.geom.*;
import arc.struct.*;
@@ -33,15 +32,22 @@ public class Damage{
private static Unit tmpUnit;
/** Creates a dynamic explosion based on specified parameters. */
public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, Color color, boolean damage){
public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, boolean damage){
dynamicExplosion(x, y, flammability, explosiveness, power, radius, damage, true, null);
}
/** Creates a dynamic explosion based on specified parameters. */
public static void dynamicExplosion(float x, float y, float flammability, float explosiveness, float power, float radius, boolean damage, boolean fire, @Nullable Team ignoreTeam){
if(damage){
for(int i = 0; i < Mathf.clamp(power / 20, 0, 6); i++){
int branches = 5 + Mathf.clamp((int)(power / 30), 1, 20);
Time.run(i * 2f + Mathf.random(4f), () -> Lightning.create(Team.derelict, Pal.power, 3, x, y, Mathf.random(360f), branches + Mathf.range(2)));
}
for(int i = 0; i < Mathf.clamp(flammability / 4, 0, 30); i++){
Time.run(i / 2f, () -> Call.createBullet(Bullets.fireball, Team.derelict, x, y, Mathf.random(360f), Bullets.fireball.damage, 1, 1));
if(fire){
for(int i = 0; i < Mathf.clamp(flammability / 4, 0, 30); i++){
Time.run(i / 2f, () -> Call.createBullet(Bullets.fireball, Team.derelict, x, y, Mathf.random(360f), Bullets.fireball.damage, 1, 1));
}
}
int waves = Mathf.clamp((int)(explosiveness / 4), 0, 30);
@@ -49,7 +55,7 @@ public class Damage{
for(int i = 0; i < waves; i++){
int f = i;
Time.run(i * 2f, () -> {
Damage.damage(x, y, Mathf.clamp(radius + explosiveness, 0, 50f) * ((f + 1f) / waves), explosiveness / 2f);
Damage.damage(ignoreTeam, x, y, Mathf.clamp(radius + explosiveness, 0, 50f) * ((f + 1f) / waves), explosiveness / 2f, false);
Fx.blockExplosionSmoke.at(x + Mathf.range(radius), y + Mathf.range(radius));
});
}
+1 -1
View File
@@ -15,7 +15,7 @@ public class Fires{
private static final float baseLifetime = 1000f;
private static final IntMap<Fire> map = new IntMap<>();
/** Start a fire on the tile. If there already is a file there, refreshes its lifetime. */
/** Start a fire on the tile. If there already is a fire there, refreshes its lifetime. */
public static void create(Tile tile){
if(net.client() || tile == null || !state.rules.fire) return; //not clientside.
+1 -1
View File
@@ -53,7 +53,7 @@ public class Lightning{
world.raycastEach(World.toTile(from.getX()), World.toTile(from.getY()), World.toTile(to.getX()), World.toTile(to.getY()), (wx, wy) -> {
Tile tile = world.tile(wx, wy);
if(tile != null && tile.block().insulated){
if(tile != null && tile.block().insulated && tile.team() != team){
bhit = true;
//snap it instead of removing
lines.get(lines.size -1).set(wx * tilesize, wy * tilesize);
+4 -4
View File
@@ -38,9 +38,9 @@ public class Puddles{
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);
p.lastRipple(Time.time());
p.lastRipple(Time.time);
}
return;
}
@@ -62,9 +62,9 @@ public class Puddles{
}else if(p.liquid() == liquid){
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);
p.lastRipple(Time.time());
p.lastRipple(Time.time);
}
}else{
p.amount(p.amount() + reactPuddle(p.liquid(), liquid, amount, p.tile(), (p.x() + source.worldx())/2f, (p.y() + source.worldy())/2f));
@@ -30,7 +30,7 @@ public class RepairFieldAbility extends Ability{
Units.nearby(unit.team, unit.x, unit.y, range, other -> {
if(other.damaged()){
healEffect.at(unit);
healEffect.at(other);
wasHealed = true;
}
other.heal(amount);
@@ -273,7 +273,8 @@ public abstract class BulletType extends Content{
}
if(weaveMag > 0){
b.vel.rotate(Mathf.sin(Mathf.randomSeed(b.id, 10f) + b.time, weaveScale, weaveMag) * Time.delta);
float scl = Mathf.randomSeed(id, 0.9f, 1.1f);
b.vel.rotate(Mathf.sin(b.time + Mathf.PI * weaveScale/2f * scl, weaveScale * scl, weaveMag) * Time.delta);
}
if(trailChance > 0){
@@ -85,10 +85,10 @@ public class ContinuousLaserBulletType extends BulletType{
Lines.lineAngle(b.x, b.y, b.rotation(), baseLen);
for(int s = 0; s < colors.length; s++){
Draw.color(Tmp.c1.set(colors[s]).mul(1f + Mathf.absin(Time.time(), 1f, 0.1f)));
Draw.color(Tmp.c1.set(colors[s]).mul(1f + Mathf.absin(Time.time, 1f, 0.1f)));
for(int i = 0; i < tscales.length; i++){
Tmp.v1.trns(b.rotation() + 180f, (lenscales[i] - 1f) * spaceMag);
Lines.stroke((width + Mathf.absin(Time.time(), oscScl, oscMag)) * fout * strokes[s] * tscales[i]);
Lines.stroke((width + Mathf.absin(Time.time, oscScl, oscMag)) * fout * strokes[s] * tscales[i]);
Lines.lineAngle(b.x + Tmp.v1.x, b.y + Tmp.v1.y, b.rotation(), baseLen * lenscales[i], false);
}
}
@@ -16,11 +16,13 @@ abstract class BoundedComp implements Velc, Posc, Healthc, Flyingc{
@Override
public void update(){
//repel unit out of bounds
if(x < 0) vel.x += (-x/warpDst);
if(y < 0) vel.y += (-y/warpDst);
if(x > world.unitWidth()) vel.x -= (x - world.unitWidth())/warpDst;
if(y > world.unitHeight()) vel.y -= (y - world.unitHeight())/warpDst;
if(!net.client() || isLocal()){
//repel unit out of bounds
if(x < 0) vel.x += (-x/warpDst);
if(y < 0) vel.y += (-y/warpDst);
if(x > world.unitWidth()) vel.x -= (x - world.unitWidth())/warpDst;
if(y > world.unitHeight()) vel.y -= (y - world.unitHeight())/warpDst;
}
//clamp position if not flying
if(isGrounded()){
@@ -11,6 +11,7 @@ import mindustry.annotations.Annotations.*;
import mindustry.content.*;
import mindustry.entities.units.*;
import mindustry.game.EventType.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.type.*;
@@ -28,6 +29,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
@Import float x, y, rotation;
@Import UnitType type;
@Import Team team;
@SyncLocal Queue<BuildPlan> plans = new Queue<>(1);
@SyncLocal transient boolean updateBuilding = true;
@@ -75,27 +77,27 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
Tile tile = world.tile(current.x, current.y);
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));
if(hasAll){
Call.beginPlace(current.block, team(), current.x, current.y, current.rotation);
Call.beginPlace(self(), current.block, team, current.x, current.y, current.rotation);
}else{
current.stuck = true;
}
}else if(!current.initialized && current.breaking && Build.validBreak(team(), current.x, current.y)){
Call.beginBreak(team(), current.x, current.y);
}else if(!current.initialized && current.breaking && Build.validBreak(team, current.x, current.y)){
Call.beginBreak(self(), team, current.x, current.y);
}else{
plans.removeFirst();
return;
}
}else if(tile.team() != team()){
}else if(tile.team() != team){
plans.removeFirst();
return;
}
if(tile.build instanceof ConstructBuild && !current.initialized){
Core.app.post(() -> Events.fire(new BuildSelectEvent(tile, team(), (Builderc)this, current.breaking)));
Core.app.post(() -> Events.fire(new BuildSelectEvent(tile, team, self(), current.breaking)));
current.initialized = true;
}
@@ -128,7 +130,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
control.input.drawBreaking(request);
}else{
request.block.drawRequest(request, control.input.allRequests(),
Build.validPlace(request.block, team(), request.x, request.y, request.rotation) || control.input.requestMatches(request));
Build.validPlace(request.block, team, request.x, request.y, request.rotation) || control.input.requestMatches(request));
}
}
@@ -138,7 +140,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
/** @return whether this request should be skipped, in favor of the next one. */
boolean shouldSkip(BuildPlan request, @Nullable Building core){
//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) 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);
}
@@ -222,7 +224,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
float tx = plan.drawx(), ty = plan.drawy();
Lines.stroke(1f, Pal.accent);
float focusLen = 3.8f + Mathf.absin(Time.time(), 1.1f, 0.6f);
float focusLen = 3.8f + Mathf.absin(Time.time, 1.1f, 0.6f);
float px = x + Angles.trnsx(rotation, focusLen);
float py = y + Angles.trnsy(rotation, focusLen);
@@ -244,7 +246,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
Lines.line(px, py, x1, y1);
Lines.line(px, py, x3, y3);
Fill.circle(px, py, 1.6f + Mathf.absin(Time.time(), 0.8f, 1.5f));
Fill.circle(px, py, 1.6f + Mathf.absin(Time.time, 0.8f, 1.5f));
Draw.color();
}
@@ -14,6 +14,7 @@ import arc.scene.ui.layout.*;
import arc.struct.*;
import arc.util.*;
import arc.util.io.*;
import mindustry.*;
import mindustry.annotations.Annotations.*;
import mindustry.audio.*;
import mindustry.content.*;
@@ -29,8 +30,8 @@ import mindustry.logic.*;
import mindustry.type.*;
import mindustry.ui.*;
import mindustry.world.*;
import mindustry.world.blocks.*;
import mindustry.world.blocks.ConstructBlock.*;
import mindustry.world.blocks.*;
import mindustry.world.blocks.environment.*;
import mindustry.world.blocks.payloads.*;
import mindustry.world.blocks.power.*;
@@ -435,7 +436,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
}
/** Handle a stack input. */
public void handleStack(Item item, int amount, Teamc source){
public void handleStack(Item item, int amount, @Nullable Teamc source){
noSleep();
items.add(item, amount);
}
@@ -519,6 +520,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
public void dumpLiquid(Liquid liquid){
int dump = this.cdump;
if(liquids.get(liquid) <= 0.0001f) return;
if(!net.client() && state.isCampaign() && team == state.rules.defaultTeam) liquid.unlock();
for(int i = 0; i < proximity.size; i++){
@@ -619,6 +622,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
* containers, it gets added to the block's inventory.
*/
public void offload(Item item){
produced(item, 1);
int dump = this.cdump;
if(!net.client() && state.isCampaign() && team == state.rules.defaultTeam) item.unlock();
@@ -652,6 +656,14 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
return false;
}
public void produced(Item item){
produced(item, 1);
}
public void produced(Item item, int amount){
if(Vars.state.rules.sector != null && team == state.rules.defaultTeam) Vars.state.rules.sector.info.handleProduction(item, amount);
}
/** Try dumping any item near the */
public boolean dump(){
return dump(null);
@@ -917,6 +929,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
//null is of type void.class; anonymous classes use their superclass.
Class<?> type = value == null ? void.class : value.getClass().isAnonymousClass() || value.getClass().getSimpleName().startsWith("adapter") ? value.getClass().getSuperclass() : value.getClass();
if(value instanceof Block) type = Block.class;
if(builder != null && builder.isPlayer()){
lastAccessed = builder.getPlayer().name;
}
@@ -970,34 +984,13 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
});
}
Damage.dynamicExplosion(x, y, flammability, explosiveness * 3.5f, power, tilesize * block.size / 2f, Pal.darkFlame, state.rules.damageExplosions);
Damage.dynamicExplosion(x, y, flammability, explosiveness * 3.5f, power, tilesize * block.size / 2f, state.rules.damageExplosions);
if(!floor().solid && !floor().isLiquid){
Effect.rubble(x, y, block.size);
}
}
/**
* Returns the flammability of the Used for fire calculations.
* Takes flammability of floor liquid into account.
*/
public float getFlammability(){
if(!block.hasItems){
if(floor().isLiquid && !block.solid){
return floor().liquidDrop.flammability;
}
return 0;
}else{
float result = items.sum((item, amount) -> item.flammability * amount);
if(block.hasLiquids){
result += liquids.sum((liquid, amount) -> liquid.flammability * amount / 3f);
}
return result;
}
}
public String getDisplayName(){
return block.localizedName;
}
@@ -26,7 +26,7 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
@Override
public void update(){
if(Mathf.chance(0.1 * Time.delta)){
if(Mathf.chance(0.09 * Time.delta)){
Fx.fire.at(x + Mathf.range(4f), y + Mathf.range(4f));
}
@@ -59,7 +59,7 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
}
if(baseFlammability < 0 || block != tile.block()){
baseFlammability = tile.build == null ? 0 : tile.build.getFlammability();
baseFlammability = tile.build == null ? 0 : tile.getFlammability();
block = tile.block();
}
@@ -77,12 +77,12 @@ abstract class FireComp implements Timedc, Posc, Firec, Syncc{
}
}
if(Mathf.chance(0.1 * Time.delta)){
if(Mathf.chance(0.025 * Time.delta)){
Puddlec p = Puddles.get(tile);
puddleFlammability = p != null ? p.getFlammability() / 3f : 0;
if(damage){
entity.damage(0.4f);
entity.damage(1.6f);
}
Damage.damageUnits(null, tile.worldx(), tile.worldy(), tilesize, 3f,
unit -> !unit.isFlying() && !unit.isImmune(StatusEffects.burning),
@@ -46,8 +46,8 @@ abstract class FlyingComp implements Posc, Velc, Healthc, Hitboxc{
}
void wobble(){
x += Mathf.sin(Time.time() + id() * 99, 25f, 0.05f) * Time.delta * elevation;
y += Mathf.cos(Time.time() + id() * 99, 25f, 0.05f) * Time.delta * elevation;
x += Mathf.sin(Time.time + (id() % 10) * 12, 25f, 0.05f) * Time.delta * elevation;
y += Mathf.cos(Time.time + (id() % 10) * 12, 25f, 0.05f) * Time.delta * elevation;
}
void moveAt(Vec2 vector, float acceleration){
@@ -55,7 +55,7 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
if(core != null && mineTile != null && mineTile.drop() != null && !acceptsItem(mineTile.drop()) && within(core, mineTransferRange) && !offloadImmediately()){
int accepted = core.acceptStack(item(), stack().amount, this);
if(accepted > 0){
Call.transferItemTo(item(), accepted,
Call.transferItemTo(self(), item(), accepted,
mineTile.worldx() + Mathf.range(tilesize / 2f),
mineTile.worldy() + Mathf.range(tilesize / 2f), core);
clearItem();
@@ -76,8 +76,12 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
if(mineTimer >= 50f + item.hardness*15f){
mineTimer = 0;
if(state.rules.sector != null && team() == state.rules.defaultTeam) state.rules.sector.info.handleProduction(item, 1);
if(core != null && within(core, mineTransferRange) && core.acceptStack(item, 1, this) == 1 && offloadImmediately()){
Call.transferItemTo(item, 1,
//add item to inventory before it is transferred
if(item() == item) addItem(item);
Call.transferItemTo(self(), item, 1,
mineTile.worldx() + Mathf.range(tilesize / 2f),
mineTile.worldy() + Mathf.range(tilesize / 2f), core);
}else if(acceptsItem(item)){
@@ -101,25 +105,25 @@ abstract class MinerComp implements Itemsc, Posc, Teamc, Rotc, Drawc{
@Override
public void draw(){
if(!mining()) return;
float focusLen = hitSize / 2f + Mathf.absin(Time.time(), 1.1f, 0.5f);
float focusLen = hitSize / 2f + Mathf.absin(Time.time, 1.1f, 0.5f);
float swingScl = 12f, swingMag = tilesize / 8f;
float flashScl = 0.3f;
float px = x + Angles.trnsx(rotation, focusLen);
float py = y + Angles.trnsy(rotation, focusLen);
float ex = mineTile.worldx() + Mathf.sin(Time.time() + 48, swingScl, swingMag);
float ey = mineTile.worldy() + Mathf.sin(Time.time() + 48, swingScl + 2f, swingMag);
float ex = mineTile.worldx() + Mathf.sin(Time.time + 48, swingScl, swingMag);
float ey = mineTile.worldy() + Mathf.sin(Time.time + 48, swingScl + 2f, swingMag);
Draw.z(Layer.flyingUnit + 0.1f);
Draw.color(Color.lightGray, Color.white, 1f - flashScl + Mathf.absin(Time.time(), 0.5f, flashScl));
Draw.color(Color.lightGray, Color.white, 1f - flashScl + Mathf.absin(Time.time, 0.5f, flashScl));
Drawf.laser(team(), Core.atlas.find("minelaser"), Core.atlas.find("minelaser-end"), px, py, ex, ey, 0.75f);
if(isLocal()){
Lines.stroke(1f, Pal.accent);
Lines.poly(mineTile.worldx(), mineTile.worldy(), 4, tilesize / 2f * Mathf.sqrt2, Time.time());
Lines.poly(mineTile.worldx(), mineTile.worldy(), 4, tilesize / 2f * Mathf.sqrt2, Time.time);
}
Draw.color();
@@ -243,7 +243,7 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra
}
if(Core.settings.getBool("playerchat") && ((textFadeTime > 0 && lastText != null) || typing)){
String text = textFadeTime <= 0 || lastText == null ? "[lightgray]" + Strings.animated(Time.time(), 4, 15f, ".") : lastText;
String text = textFadeTime <= 0 || lastText == null ? "[lightgray]" + Strings.animated(Time.time, 4, 15f, ".") : lastText;
float width = 100f;
float visualFadeTime = 1f - Mathf.curve(1f - textFadeTime, 0.9f);
font.setColor(1f, 1f, 1f, textFadeTime <= 0 || lastText == null ? 1f : visualFadeTime);
@@ -101,10 +101,10 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
float sscl = 25f;
Draw.color(tmp.set(liquid.color).shiftValue(-0.05f));
Fill.circle(x + Mathf.sin(Time.time() + seeds * 532, sscl, smag), y + Mathf.sin(Time.time() + seeds * 53, sscl, smag), f * 8f);
Fill.circle(x + Mathf.sin(Time.time + seeds * 532, sscl, smag), y + Mathf.sin(Time.time + seeds * 53, sscl, smag), f * 8f);
Angles.randLenVectors(id(), 3, f * 6f, (ex, ey) -> {
Fill.circle(x + ex + Mathf.sin(Time.time() + seeds * 532, sscl, smag),
y + ey + Mathf.sin(Time.time() + seeds * 53, sscl, smag), f * 5f);
Fill.circle(x + ex + Mathf.sin(Time.time + seeds * 532, sscl, smag),
y + ey + Mathf.sin(Time.time + seeds * 53, sscl, smag), f * 5f);
seeds++;
});
Draw.color();
+10 -7
View File
@@ -90,8 +90,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
public float prefRotation(){
if(activelyBuilding()){
return angleTo(buildPlan());
}else if(mineTile() != null){
return angleTo(mineTile());
}else if(mineTile != null){
return angleTo(mineTile);
}else if(moving()){
return vel().angle();
}
@@ -310,7 +310,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
drag = type.drag * (isGrounded() ? (floorOn().dragMultiplier) : 1f);
//apply knockback based on spawns
if(team != state.rules.waveTeam && state.hasSpawns()){
if(team != state.rules.waveTeam && state.hasSpawns() && (!net.client() || isLocal())){
float relativeSize = state.rules.dropZoneRadius + hitSize/2f + 1f;
for(Tile spawn : spawner.getSpawns()){
if(within(spawn.worldx(), spawn.worldy(), relativeSize)){
@@ -397,9 +397,12 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
/** Actually destroys the unit, removing it and creating explosions. **/
public void destroy(){
float explosiveness = 2f + item().explosiveness * stack().amount / 3f;
float flammability = item().flammability * stack().amount / 3f;
Damage.dynamicExplosion(x, y, flammability, explosiveness, 0f, bounds() / 2f, Pal.darkFlame, state.rules.damageExplosions);
float explosiveness = 2f + item().explosiveness * stack().amount * 1.53f;
float flammability = item().flammability * stack().amount / 1.9f;
if(!spawnedByCore){
Damage.dynamicExplosion(x, y, flammability, explosiveness, 0f, bounds() / 2f, state.rules.damageExplosions, item().flammability > 1, team);
}
float shake = hitSize / 3f;
@@ -415,7 +418,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
}
//if this unit crash landed (was flying), damage stuff in a radius
if(type.flying){
if(type.flying && !spawnedByCore){
Damage.damage(team,x, y, Mathf.pow(hitSize, 0.94f) * 1.25f, Mathf.pow(hitSize, 0.75f) * type.crashDamageMultiplier * 5f, true, false, true);
}
+5 -3
View File
@@ -278,11 +278,13 @@ public class EventType{
public static class BlockBuildBeginEvent{
public final Tile tile;
public final Team team;
public final @Nullable Unit unit;
public final boolean breaking;
public BlockBuildBeginEvent(Tile tile, Team team, boolean breaking){
public BlockBuildBeginEvent(Tile tile, Team team, Unit unit, boolean breaking){
this.tile = tile;
this.team = team;
this.unit = unit;
this.breaking = breaking;
}
}
@@ -310,10 +312,10 @@ public class EventType{
public static class BuildSelectEvent{
public final Tile tile;
public final Team team;
public final Builderc builder;
public final Unit builder;
public final boolean breaking;
public BuildSelectEvent(Tile tile, Team team, Builderc builder, boolean breaking){
public BuildSelectEvent(Tile tile, Team team, Unit builder, boolean breaking){
this.tile = tile;
this.team = team;
this.builder = builder;
+1 -1
View File
@@ -59,7 +59,7 @@ public class Objectives{
@Override
public boolean complete(){
return preset.sector.save != null && !preset.sector.isAttacked() && preset.sector.hasBase();
return preset.sector.save != null && (!preset.sector.isAttacked() || preset.sector.info.wasCaptured) && preset.sector.hasBase();
}
@Override
+43 -24
View File
@@ -23,6 +23,8 @@ public class SectorInfo{
/** Core input statistics. */
public ObjectMap<Item, ExportStat> production = new ObjectMap<>();
/** Raw item production statistics. */
public ObjectMap<Item, ExportStat> rawProduction = new ObjectMap<>();
/** Export statistics. */
public ObjectMap<Item, ExportStat> export = new ObjectMap<>();
/** Items stored in all cores. */
@@ -33,6 +35,8 @@ public class SectorInfo{
public int storageCapacity = 0;
/** Whether a core is available here. */
public boolean hasCore = true;
/** Whether this sector was ever fully captured. */
public boolean wasCaptured = false;
/** Sector that was launched from. */
public @Nullable Sector origin;
/** Launch destination. */
@@ -69,19 +73,27 @@ public class SectorInfo{
public boolean shown = false;
/** Special variables for simulation. */
public float sumHealth, sumRps, sumDps, waveHealthBase, waveHealthSlope, waveDpsBase, waveDpsSlope;
public float sumHealth, sumRps, sumDps, waveHealthBase, waveHealthSlope, waveDpsBase, waveDpsSlope, bossHealth, bossDps;
/** Wave where first boss shows up. */
public int bossWave = -1;
/** Counter refresh state. */
private transient Interval time = new Interval();
/** Core item storage to prevent spoofing. */
private transient int[] coreItemCounts;
/** Core item storage input/output deltas. */
private @Nullable transient int[] coreDeltas;
/** Core item storage input/output deltas. */
private @Nullable transient int[] productionDeltas;
/** Handles core item changes. */
public void handleCoreItem(Item item, int amount){
if(coreItemCounts == null){
coreItemCounts = new int[content.items().size];
}
coreItemCounts[item.id] += amount;
if(coreDeltas == null) coreDeltas = new int[content.items().size];
coreDeltas[item.id] += amount;
}
/** Handles raw production stats. */
public void handleProduction(Item item, int amount){
if(productionDeltas == null) productionDeltas = new int[content.items().size];
productionDeltas[item.id] += amount;
}
/** @return the real location items go when launched on this sector */
@@ -172,6 +184,11 @@ public class SectorInfo{
damage = 0;
hasSpawns = spawner.countSpawns() > 0;
//cap production at raw production.
production.each((item, stat) -> {
stat.mean = Math.min(stat.mean, rawProduction.get(item, ExportStat::new).mean);
});
if(state.rules.sector != null){
state.rules.sector.saveInfo();
}
@@ -185,8 +202,6 @@ public class SectorInfo{
//updating in multiplayer as a client doesn't make sense
if(net.client()) return;
CoreBuild ent = state.rules.defaultTeam.core();
//refresh throughput
if(time.get(refreshPeriod)){
@@ -204,30 +219,34 @@ public class SectorInfo{
stat.mean = stat.means.rawMean();
});
if(coreItemCounts == null){
coreItemCounts = new int[content.items().size];
}
if(coreDeltas == null) coreDeltas = new int[content.items().size];
if(productionDeltas == null) productionDeltas = new int[content.items().size];
//refresh core items
for(Item item : content.items()){
ExportStat stat = production.get(item, ExportStat::new);
if(!stat.loaded){
stat.means.fill(stat.mean);
stat.loaded = true;
}
updateDelta(item, production, coreDeltas);
updateDelta(item, rawProduction, productionDeltas);
//get item delta
int delta = coreItemCounts[item.id];
//store means
stat.means.add(delta);
stat.mean = stat.means.rawMean();
production.get(item).mean = Math.min(production.get(item).mean, rawProduction.get(item).mean);
}
Arrays.fill(coreItemCounts, 0);
Arrays.fill(coreDeltas, 0);
Arrays.fill(productionDeltas, 0);
}
}
void updateDelta(Item item, ObjectMap<Item, ExportStat> map, int[] deltas){
ExportStat stat = map.get(item, ExportStat::new);
if(!stat.loaded){
stat.means.fill(stat.mean);
stat.loaded = true;
}
//store means
stat.means.add(deltas[item.id]);
stat.mean = stat.means.rawMean();
}
public ObjectFloatMap<Item> exportRates(){
ObjectFloatMap<Item> map = new ObjectFloatMap<>();
export.each((item, value) -> map.put(item, value.mean));
+11
View File
@@ -6,6 +6,7 @@ import arc.struct.*;
import arc.util.*;
import mindustry.content.*;
import mindustry.game.EventType.*;
import mindustry.game.SectorInfo.*;
import mindustry.maps.*;
import mindustry.type.*;
import mindustry.world.blocks.storage.*;
@@ -180,6 +181,7 @@ public class Universe{
}else if(attacked && wavesPassed > 0 && sector.info.winWave > 1 && sector.info.wave + wavesPassed >= sector.info.winWave && !sector.hasEnemyBase()){
//autocapture the sector
sector.info.waves = false;
sector.info.wasCaptured = true;
//fire the event
Events.fire(new SectorCaptureEvent(sector));
@@ -198,6 +200,13 @@ public class Universe{
}
}
sector.info.export.each((item, amount) -> {
if(sector.info.items.get(item) <= 0 && sector.info.production.get(item, ExportStat::new).mean < 0){
//disable export when production is negative.
sector.info.export.get(item).mean = 0f;
}
});
//add production, making sure that it's capped
sector.info.production.each((item, stat) -> sector.info.items.add(item, Math.min((int)(stat.mean * newSecondsPassed * scl), sector.info.storageCapacity - sector.info.items.get(item))));
//prevent negative values with unloaders
@@ -216,9 +225,11 @@ public class Universe{
if(sector.isBeingPlayed()){
state.rules.winWave = waveMax;
state.rules.waves = true;
state.rules.attackMode = false;
}else{
sector.info.winWave = waveMax;
sector.info.waves = true;
sector.info.attack = false;
sector.saveInfo();
}
@@ -129,7 +129,7 @@ public class BlockRenderer implements Disposable{
if(!camera.bounds(Tmp.r1).grow(tilesize * 2f).overlaps(Tmp.r2.setSize(b.size * tilesize).setCenter(block.x * tilesize + b.offset, block.y * tilesize + b.offset))) continue;
Draw.alpha(0.33f * brokenFade);
Draw.mixcol(Color.white, 0.2f + Mathf.absin(Time.globalTime(), 6f, 0.2f));
Draw.mixcol(Color.white, 0.2f + Mathf.absin(Time.globalTime, 6f, 0.2f));
Draw.rect(b.icon(Cicon.full), block.x * tilesize + b.offset, block.y * tilesize + b.offset, b.rotate ? block.rotation * 90 : 0f);
}
Draw.reset();
@@ -257,11 +257,11 @@ public class MenuRenderer implements Disposable{
Draw.color(Pal.engine);
Fill.circle(x + Angles.trnsx(rotation + 180, engineOffset), y + Angles.trnsy(rotation + 180, engineOffset),
engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f));
engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f));
Draw.color(Color.white);
Fill.circle(x + Angles.trnsx(rotation + 180, engineOffset - 1f), y + Angles.trnsy(rotation + 180, engineOffset - 1f),
(engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f)) / 2f);
(engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f)) / 2f);
Draw.color();
Draw.rect(icon, x, y, flyerRot - 90);
@@ -89,7 +89,7 @@ public class OverlayRenderer{
}
Lines.stroke(unitFade);
Lines.square(select.x, select.y, select.hitSize() * 1.5f, Time.time() * 2f);
Lines.square(select.x, select.y, select.hitSize() * 1.5f, Time.time * 2f);
Draw.reset();
}
@@ -112,14 +112,14 @@ public class OverlayRenderer{
if(dst < state.rules.enemyCoreBuildRadius * 2.2f){
Draw.color(Color.darkGray);
Lines.circle(core.x, core.y - 2, state.rules.enemyCoreBuildRadius);
Draw.color(Pal.accent, core.team.color, 0.5f + Mathf.absin(Time.time(), 10f, 0.5f));
Draw.color(Pal.accent, core.team.color, 0.5f + Mathf.absin(Time.time, 10f, 0.5f));
Lines.circle(core.x, core.y, state.rules.enemyCoreBuildRadius);
}
});
}
Lines.stroke(2f);
Draw.color(Color.gray, Color.lightGray, Mathf.absin(Time.time(), 8f, 1f));
Draw.color(Color.gray, Color.lightGray, Mathf.absin(Time.time, 8f, 1f));
if(state.hasSpawns()){
for(Tile tile : spawner.getSpawns()){
@@ -167,15 +167,15 @@ public class OverlayRenderer{
float size = 8;
Draw.rect(player.unit().item().icon(Cicon.medium), v.x, v.y, size, size);
Draw.color(Pal.accent);
Lines.circle(v.x, v.y, 6 + Mathf.absin(Time.time(), 5f, 1f));
Lines.circle(v.x, v.y, 6 + Mathf.absin(Time.time, 5f, 1f));
Draw.reset();
Building tile = world.buildWorld(v.x, v.y);
if(input.canDropItem() && tile != null && tile.interactable(player.team()) && tile.acceptStack(player.unit().item(), player.unit().stack.amount, player.unit()) > 0 && player.within(tile, itemTransferRange)){
Lines.stroke(3f, Pal.gray);
Lines.square(tile.x, tile.y, tile.block.size * tilesize / 2f + 3 + Mathf.absin(Time.time(), 5f, 1f));
Lines.square(tile.x, tile.y, tile.block.size * tilesize / 2f + 3 + Mathf.absin(Time.time, 5f, 1f));
Lines.stroke(1f, Pal.place);
Lines.square(tile.x, tile.y, tile.block.size * tilesize / 2f + 2 + Mathf.absin(Time.time(), 5f, 1f));
Lines.square(tile.x, tile.y, tile.block.size * tilesize / 2f + 2 + Mathf.absin(Time.time, 5f, 1f));
Draw.reset();
}
+5 -5
View File
@@ -66,7 +66,7 @@ public class Shaders{
public void apply(){
setUniformf("u_resolution", Core.graphics.getWidth(), Core.graphics.getHeight());
setUniformf("u_time", Time.globalTime() / 10f);
setUniformf("u_time", Time.globalTime / 10f);
setUniformf("u_campos", camera.position);
setUniformf("u_rcampos", Tmp.v31.set(camera.position).sub(planet.position));
setUniformf("u_light", planet.getLightNormal());
@@ -174,7 +174,7 @@ public class Shaders{
setUniformf("u_color", color);
setUniformf("u_uv", region.u, region.v);
setUniformf("u_uv2", region.u2, region.v2);
setUniformf("u_time", Time.time());
setUniformf("u_time", Time.time);
setUniformf("u_texsize", region.texture.width, region.texture.height);
}
}
@@ -188,7 +188,7 @@ public class Shaders{
@Override
public void apply(){
setUniformf("u_dp", Scl.scl(1f));
setUniformf("u_time", Time.time() / Scl.scl(1f));
setUniformf("u_time", Time.time / Scl.scl(1f));
setUniformf("u_offset",
Core.camera.position.x - Core.camera.width / 2,
Core.camera.position.y - Core.camera.height / 2);
@@ -216,7 +216,7 @@ public class Shaders{
setUniformf("u_campos", Core.camera.position.x, Core.camera.position.y);
setUniformf("u_ccampos", Core.camera.position);
setUniformf("u_resolution", Core.graphics.getWidth(), Core.graphics.getHeight());
setUniformf("u_time", Time.time());
setUniformf("u_time", Time.time);
texture.bind(1);
renderer.effectBuffer.getTexture().bind(0);
@@ -240,7 +240,7 @@ public class Shaders{
public void apply(){
setUniformf("u_campos", Core.camera.position.x - Core.camera.width / 2, Core.camera.position.y - Core.camera.height / 2);
setUniformf("u_resolution", Core.camera.width, Core.camera.height);
setUniformf("u_time", Time.time());
setUniformf("u_time", Time.time);
if(hasUniform("u_noise")){
Core.assets.get("sprites/noise.png", Texture.class).bind(1);
@@ -37,6 +37,7 @@ public class PlanetRenderer implements Disposable{
public final VertexBatch3D batch = new VertexBatch3D(20000, false, true, 0);
public float zoom = 1f;
public float orbitAlpha = 1f;
private final Mesh[] outlines = new Mesh[10];
public final PlaneBatch3D projector = new PlaneBatch3D();
@@ -168,7 +169,7 @@ public class PlanetRenderer implements Disposable{
Vec3 center = planet.parent.position;
float radius = planet.orbitRadius;
int points = (int)(radius * 10);
Angles.circleVectors(points, radius, (cx, cy) -> batch.vertex(Tmp.v32.set(center).add(cx, 0, cy), Pal.gray));
Angles.circleVectors(points, radius, (cx, cy) -> batch.vertex(Tmp.v32.set(center).add(cx, 0, cy), Pal.gray.write(Tmp.c1).a(orbitAlpha)));
batch.flush(Gl.lineLoop);
}
@@ -208,7 +209,7 @@ public class PlanetRenderer implements Disposable{
for(int i = 0; i < pointCount + 1; i++){
float f = i / (float)pointCount;
Tmp.c1.set(from).lerp(to, (f+Time.globalTime()/timeScale)%1f);
Tmp.c1.set(from).lerp(to, (f+ Time.globalTime /timeScale)%1f);
batch.color(Tmp.c1);
batch.vertex(Tmp.bz3.valueAt(Tmp.v32, f));
@@ -217,7 +218,7 @@ public class PlanetRenderer implements Disposable{
}
public void drawBorders(Sector sector, Color base){
Color color = Tmp.c1.set(base).a(base.a + 0.3f + Mathf.absin(Time.globalTime(), 5f, 0.3f));
Color color = Tmp.c1.set(base).a(base.a + 0.3f + Mathf.absin(Time.globalTime, 5f, 0.3f));
float r1 = 1f;
float r2 = outlineRad + 0.001f;
+2 -2
View File
@@ -629,8 +629,8 @@ public class DesktopInput extends InputHandler{
unit.moveAt(movement);
}else{
unit.moveAt(Tmp.v2.trns(unit.rotation, movement.len()));
if(!movement.isZero() && ground){
unit.vel.rotateTo(movement.angle(), unit.type.rotateSpeed);
if(!movement.isZero()){
unit.vel.rotateTo(movement.angle(), unit.type.rotateSpeed * Math.max(Time.delta, 1));
}
}
+7 -8
View File
@@ -96,18 +96,17 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
@Remote(called = Loc.server, unreliable = true)
public static void transferItemTo(Item item, int amount, float x, float y, Building build){
public static void setItem(Building build, Item item, int amount){
if(build == null || build.items == null) return;
for(int i = 0; i < Mathf.clamp(amount / 5, 1, 8); i++){
Time.run(i * 3, () -> createItemTransfer(item, amount, x, y, build, () -> {}));
}
build.items.add(item, amount);
build.items.set(item, amount);
}
@Remote(called = Loc.server, unreliable = true)
public static void transferItemTo(Unit unit, Item item, int amount, float x, float y, Building build){
public static void transferItemTo(@Nullable Unit unit, Item item, int amount, float x, float y, Building build){
if(build == null || build.items == null) return;
unit.stack.amount = Math.max(unit.stack.amount - amount, 0);
if(unit != null && unit.item() == item) unit.stack.amount = Math.max(unit.stack.amount - amount, 0);
for(int i = 0; i < Mathf.clamp(amount / 3, 1, 8); i++){
Time.run(i * 3, () -> createItemTransfer(item, amount, x, y, build, () -> {}));
}
@@ -750,7 +749,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
boolean valid = validPlace(request.x, request.y, request.block, request.rotation);
Draw.reset();
Draw.mixcol(!valid ? Pal.breakInvalid : Color.white, (!valid ? 0.4f : 0.24f) + Mathf.absin(Time.globalTime(), 6f, 0.28f));
Draw.mixcol(!valid ? Pal.breakInvalid : Color.white, (!valid ? 0.4f : 0.24f) + Mathf.absin(Time.globalTime, 6f, 0.28f));
Draw.alpha(1f);
request.block.drawRequestConfigTop(request, selectRequests);
Draw.reset();
+6 -6
View File
@@ -376,8 +376,8 @@ public class MobileInput extends InputHandler implements GestureListener{
float radius = Interp.swingIn.apply(crosshairScale);
Lines.poly(target.getX(), target.getY(), 4, 7f * radius, Time.time() * 1.5f);
Lines.spikes(target.getX(), target.getY(), 3f * radius, 6f * radius, 4, Time.time() * 1.5f);
Lines.poly(target.getX(), target.getY(), 4, 7f * radius, Time.time * 1.5f);
Lines.spikes(target.getX(), target.getY(), 3f * radius, 6f * radius, 4, Time.time * 1.5f);
}
Draw.reset();
@@ -769,7 +769,7 @@ public class MobileInput extends InputHandler implements GestureListener{
@Override
public boolean pan(float x, float y, float deltaX, float deltaY){
if(Core.scene.hasDialog() || Core.settings.getBool("keyboard")) return false;
if(Core.scene == null || Core.scene.hasDialog() || Core.settings.getBool("keyboard")) return false;
float scale = Core.camera.width / Core.graphics.getWidth();
deltaX *= scale;
@@ -836,7 +836,7 @@ public class MobileInput extends InputHandler implements GestureListener{
if(type == null) return;
boolean omni = unit.type.omniMovement;
boolean legs = unit.isGrounded();
boolean ground = unit.isGrounded();
boolean allowHealing = type.canHeal;
boolean validHealTarget = allowHealing && target instanceof Building && ((Building)target).isValid() && target.team() == unit.team &&
((Building)target).damaged() && target.within(unit, type.range);
@@ -908,8 +908,8 @@ public class MobileInput extends InputHandler implements GestureListener{
unit.moveAt(movement);
}else{
unit.moveAt(Tmp.v2.trns(unit.rotation, movement.len()));
if(!movement.isZero() && legs){
unit.vel.rotateTo(movement.angle(), type.rotateSpeed);
if(!movement.isZero()){
unit.vel.rotateTo(movement.angle(), unit.type.rotateSpeed * Math.max(Time.delta, 1));
}
}
+1 -1
View File
@@ -14,7 +14,7 @@ import mindustry.world.*;
/** "Compiles" a sequence of statements into instructions. */
public class LAssembler{
public static ObjectMap<String, Func<String[], LStatement>> customParsers = new ObjectMap<>();
public static final int maxTokenLength = 40;
public static final int maxTokenLength = 36;
private int lastVar;
/** Maps names to variable IDs. */
+2
View File
@@ -285,6 +285,8 @@ public class LExecutor{
exec.setnum(outX, cache.x);
exec.setnum(outY, cache.y);
}
}else{
exec.setbool(outFound, false);
}
}
+29 -3
View File
@@ -68,6 +68,11 @@ public class SectorDamage{
float enemyDps = info.waveDpsBase + info.waveDpsSlope * (i);
float enemyHealth = info.waveHealthBase + info.waveHealthSlope * (i);
if(info.bossWave == i){
enemyDps += info.bossDps;
enemyHealth += info.bossHealth;
}
//happens due to certain regressions
if(enemyHealth < 0 || enemyDps < 0) continue;
@@ -305,6 +310,7 @@ public class SectorDamage{
//calculate DPS and health for the next few waves and store in list
var reg = new LinearRegression();
SpawnGroup bossGroup = null;
Seq<Vec2> waveDps = new Seq<>(), waveHealth = new Seq<>();
for(int wave = state.wave; wave < state.wave + 10; wave ++){
@@ -320,6 +326,11 @@ public class SectorDamage{
float healthMult = 1f + Mathf.clamp(group.type.armor / 20f);
StatusEffect effect = (group.effect == null ? StatusEffects.none : group.effect);
int spawned = group.getSpawned(wave);
//save the boss group
if(group.effect == StatusEffects.boss){
bossGroup = group;
continue;
}
if(spawned <= 0) continue;
sumWaveHealth += spawned * (group.getShield(wave) + group.type.health * effect.healthMultiplier * healthMult);
sumWaveDps += spawned * group.type.dpsEstimate * effect.damageMultiplier;
@@ -328,6 +339,21 @@ public class SectorDamage{
waveHealth.add(new Vec2(wave, sumWaveHealth));
}
if(bossGroup != null){
float bossMult = 1.1f;
//calculate first boss appearaance
for(int wave = state.wave; wave < state.wave + 60; wave++){
int spawned = bossGroup.getSpawned(wave - 1);
if(spawned > 0){
//set up relevant stats
info.bossWave = wave;
info.bossDps = spawned * bossGroup.type.dpsEstimate * StatusEffects.boss.damageMultiplier * bossMult;
info.bossHealth = spawned * (bossGroup.getShield(wave) + bossGroup.type.health * StatusEffects.boss.healthMultiplier * (1f + Mathf.clamp(bossGroup.type.armor / 20f))) * bossMult;
break;
}
}
}
//calculate linear regression of the wave data and store it
reg.calculate(waveHealth);
info.waveHealthBase = reg.intercept;
@@ -338,9 +364,9 @@ public class SectorDamage{
info.waveDpsSlope = reg.slope;
//enemy units like to aim for a lot of non-essential things, so increase resulting health slightly
info.sumHealth = sumHealth * 1.2f;
info.sumHealth = sumHealth * 1.05f;
//players tend to have longer range units/turrets, so assume DPS is higher
info.sumDps = sumDps * 1.2f;
info.sumDps = sumDps * 1.05f;
info.sumRps = sumRps;
info.wavesSurvived = getWavesSurvived(info);
@@ -356,7 +382,7 @@ public class SectorDamage{
for(Tile tile : tiles){
if((tile.block() instanceof CoreBlock && tile.team() == state.rules.waveTeam) || tile.overlay() == Blocks.spawn){
frontier.add(tile);
values[tile.x][tile.y] = fraction * 26;
values[tile.x][tile.y] = fraction * 24;
}
}
@@ -3,6 +3,8 @@ package mindustry.maps.planet;
import arc.graphics.*;
import arc.math.*;
import arc.math.geom.*;
import mindustry.content.*;
import mindustry.game.*;
import mindustry.maps.generators.*;
public class TantrosPlanetGenerator extends PlanetGenerator{
@@ -18,4 +20,13 @@ public class TantrosPlanetGenerator extends PlanetGenerator{
float depth = (float)noise.octaveNoise3D(2, 0.56, 1.7f, position.x, position.y, position.z) / 2f;
return c1.write(out).lerp(c2, Mathf.clamp(Mathf.round(depth, 0.15f))).a(0.6f);
}
@Override
protected void generate(){
pass((x, y) -> {
floor = Blocks.deepwater;
});
Schematics.placeLaunchLoadout(width / 2, height / 2);
}
}
+5 -1
View File
@@ -225,7 +225,7 @@ public class ContentParser{
currentContent = block;
read(() -> {
if(value.has("consumes")){
if(value.has("consumes") && value.get("consumes").isObject()){
for(JsonValue child : value.get("consumes")){
if(child.name.equals("item")){
block.consumes.item(find(ContentType.item, child.asString()));
@@ -309,6 +309,10 @@ public class ContentParser{
}
if(value.has("controller")){
unit.defaultController = make(resolve(value.getString("controller"), "mindustry.ai.type"));
}
//read extra default waves
if(value.has("waves")){
JsonValue waves = value.remove("waves");
+1 -1
View File
@@ -247,7 +247,7 @@ public class Mods implements Loadable{
mods.add(mod);
}catch(Throwable e){
if(e instanceof ClassNotFoundException && e.getMessage().contains("mindustry.plugin.Plugin")){
Log.info("Plugin @ is outdated and needs to be ported to 6.0! Update its main class to inherit from 'mindustry.mod.Plugin'.");
Log.info("Plugin @ is outdated and needs to be ported to 6.0! Update its main class to inherit from 'mindustry.mod.Plugin'. See https://mindustrygame.github.io/wiki/modding/6-migrationv6/");
}else{
Log.err("Failed to load mod file @. Skipping.", file);
Log.err(e);
+7 -7
View File
@@ -502,9 +502,9 @@ public class UnitType extends UnlockableContent{
//draw back items
if(unit.item() != null && unit.itemTime > 0.01f){
float size = (itemSize + Mathf.absin(Time.time(), 5f, 1f)) * unit.itemTime;
float size = (itemSize + Mathf.absin(Time.time, 5f, 1f)) * unit.itemTime;
Draw.mixcol(Pal.accent, Mathf.absin(Time.time(), 5f, 0.5f));
Draw.mixcol(Pal.accent, Mathf.absin(Time.time, 5f, 0.5f));
Draw.rect(unit.item().icon(Cicon.medium),
unit.x + Angles.trnsx(unit.rotation + 180f, itemOffsetY),
unit.y + Angles.trnsy(unit.rotation + 180f, itemOffsetY),
@@ -516,7 +516,7 @@ public class UnitType extends UnlockableContent{
Lines.circle(
unit.x + Angles.trnsx(unit.rotation + 180f, itemOffsetY),
unit.y + Angles.trnsy(unit.rotation + 180f, itemOffsetY),
(3f + Mathf.absin(Time.time(), 5f, 1f)) * unit.itemTime);
(3f + Mathf.absin(Time.time, 5f, 1f)) * unit.itemTime);
if(unit.isLocal() && !renderer.pixelator.enabled()){
Fonts.outline.draw(unit.stack.amount + "",
@@ -538,20 +538,20 @@ public class UnitType extends UnlockableContent{
if(unit instanceof Trailc){
Trail trail = ((Trailc)unit).trail();
trail.draw(unit.team.color, (engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f) * scale) * trailScl);
trail.draw(unit.team.color, (engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f) * scale) * trailScl);
}
Draw.color(unit.team.color);
Fill.circle(
unit.x + Angles.trnsx(unit.rotation + 180, offset),
unit.y + Angles.trnsy(unit.rotation + 180, offset),
(engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f)) * scale
(engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f)) * scale
);
Draw.color(Color.white);
Fill.circle(
unit.x + Angles.trnsx(unit.rotation + 180, offset - 1f),
unit.y + Angles.trnsy(unit.rotation + 180, offset - 1f),
(engineSize + Mathf.absin(Time.time(), 2f, engineSize / 4f)) / 2f * scale
(engineSize + Mathf.absin(Time.time, 2f, engineSize / 4f)) / 2f * scale
);
Draw.color();
}
@@ -632,7 +632,7 @@ public class UnitType extends UnlockableContent{
}
public Color cellColor(Unit unit){
return Tmp.c1.set(Color.black).lerp(unit.team.color, unit.healthf() + Mathf.absin(Time.time(), Math.max(unit.healthf() * 5f, 1f), 1f - unit.healthf()));
return Tmp.c1.set(Color.black).lerp(unit.team.color, unit.healthf() + Mathf.absin(Time.time, Math.max(unit.healthf() * 5f, 1f), 1f - unit.healthf()));
}
public void drawLight(Unit unit){
+1 -1
View File
@@ -13,7 +13,7 @@ import mindustry.io.*;
public class Weapon{
/** displayed weapon region */
public String name;
public String name = "";
/** bullet shot */
public BulletType bullet;
/** shell ejection effect */
+10 -10
View File
@@ -19,9 +19,9 @@ import mindustry.world.blocks.*;
import static mindustry.Vars.*;
public abstract class Weather extends UnlockableContent{
public class Weather extends UnlockableContent{
/** Default duration of this weather event in ticks. */
public float duration = 9f * Time.toMinutes;
public float duration = 10f * Time.toMinutes;
public float opacityMultiplier = 1f;
public Attributes attrs = new Attributes();
public Sound sound = Sounds.none;
@@ -90,7 +90,7 @@ public abstract class Weather extends UnlockableContent{
}
if(!headless && sound != Sounds.none){
float noise = soundVolOscMag > 0 ? (float)Math.abs(Noise.rawNoise(Time.time() / soundVolOscScl)) * soundVolOscMag : 0;
float noise = soundVolOscMag > 0 ? (float)Math.abs(Noise.rawNoise(Time.time / soundVolOscScl)) * soundVolOscMag : 0;
control.sound.loop(sound, Math.max((soundVol + noise) * state.opacity, soundVolMin));
}
}
@@ -120,8 +120,8 @@ public abstract class Weather extends UnlockableContent{
float scl = rand.random(0.5f, 1f);
float scl2 = rand.random(0.5f, 1f);
float size = rand.random(sizeMin, sizeMax);
float x = (rand.random(0f, world.unitWidth()) + Time.time() * windx * scl2);
float y = (rand.random(0f, world.unitHeight()) + Time.time() * windy * scl);
float x = (rand.random(0f, world.unitWidth()) + Time.time * windx * scl2);
float y = (rand.random(0f, world.unitHeight()) + Time.time * windy * scl);
float alpha = rand.random(minAlpha, maxAlpha);
x += Mathf.sin(y, rand.random(sinSclMin, sinSclMax), rand.random(sinMagMin, sinMagMax));
@@ -155,8 +155,8 @@ public abstract class Weather extends UnlockableContent{
float scl = rand.random(0.5f, 1f);
float scl2 = rand.random(0.5f, 1f);
float size = rand.random(sizeMin, sizeMax);
float x = (rand.random(0f, world.unitWidth()) + Time.time() * xspeed * scl2);
float y = (rand.random(0f, world.unitHeight()) - Time.time() * yspeed * scl);
float x = (rand.random(0f, world.unitWidth()) + Time.time * xspeed * scl2);
float y = (rand.random(0f, world.unitHeight()) - Time.time * yspeed * scl);
float tint = rand.random(1f) * alpha;
x -= Tmp.r1.x;
@@ -180,7 +180,7 @@ public abstract class Weather extends UnlockableContent{
int total = (int)(Tmp.r1.area() / density * intensity) / 2;
Lines.stroke(stroke);
float t = Time.time() / timeScale;
float t = Time.time / timeScale;
for(int i = 0; i < total; i++){
float offset = rand.random(0f, 1f);
@@ -227,7 +227,7 @@ public abstract class Weather extends UnlockableContent{
float windx = vwindx * speed, windy = vwindy * speed;
float scale = 1f / noisescl;
float scroll = Time.time() * scale + offset;
float scroll = Time.time * scale + offset;
Tmp.tr1.texture = noise;
Core.camera.bounds(Tmp.r1);
Tmp.tr1.set(Tmp.r1.x*scale, Tmp.r1.y*scale, (Tmp.r1.x + Tmp.r1.width)*scale, (Tmp.r1.y + Tmp.r1.height)*scale);
@@ -262,7 +262,7 @@ public abstract class Weather extends UnlockableContent{
/** Creates a weather entry with some approximate weather values. */
public WeatherEntry(Weather weather){
this(weather, weather.duration * 3f, weather.duration * 6f, weather.duration / 2f, weather.duration * 1.5f);
this(weather, weather.duration * 2f, weather.duration * 6f, weather.duration / 2f, weather.duration * 1.5f);
}
public WeatherEntry(Weather weather, float minFrequency, float maxFrequency, float minDuration, float maxDuration){
+8 -1
View File
@@ -29,7 +29,11 @@ public class Bar extends Element{
public Bar(Prov<String> name, Prov<Color> color, Floatp fraction){
this.fraction = fraction;
lastValue = value = Mathf.clamp(fraction.get());
try{
lastValue = value = Mathf.clamp(fraction.get());
}catch(Exception e){ //getting the fraction may involve referring to invalid data
lastValue = value = 0f;
}
update(() -> {
try{
this.name = name.get();
@@ -78,6 +82,9 @@ public class Bar extends Element{
lastValue = computed;
}
if(Float.isNaN(computed)) computed = 0;
if(Float.isInfinite(computed)) computed = 1f;
blink = Mathf.lerpDelta(blink, 0f, 0.2f);
value = Mathf.lerpDelta(value, computed, 0.15f);
@@ -199,7 +199,7 @@ public class JoinDialog extends BaseDialog{
void refreshServer(Server server){
server.content.clear();
server.content.label(() -> Core.bundle.get("server.refreshing") + Strings.animated(Time.time(), 4, 11, "."));
server.content.label(() -> Core.bundle.get("server.refreshing") + Strings.animated(Time.time, 4, 11, "."));
net.pingHost(server.ip, server.port, host -> setupServer(server, host), e -> {
server.content.clear();
@@ -340,7 +340,7 @@ public class JoinDialog extends BaseDialog{
local.clear();
local.background(null);
local.table(Tex.button, t -> t.label(() -> "[accent]" + Core.bundle.get("hosts.discovering.any") + Strings.animated(Time.time(), 4, 10f, ".")).pad(10f)).growX();
local.table(Tex.button, t -> t.label(() -> "[accent]" + Core.bundle.get("hosts.discovering.any") + Strings.animated(Time.time, 4, 10f, ".")).pad(10f)).growX();
net.discoverServers(this::addLocalHost, this::finishLocalHosts);
}
@@ -102,12 +102,16 @@ public class ModsDialog extends BaseDialog{
t.button("@mod.import.github", Icon.github, bstyle, () -> {
dialog.hide();
var modString = Core.settings.getString("lastmod", "");
var suggested = Structs.random(suggestedMods);
ui.showTextInput("@mod.import.github", "", 64, Core.settings.getString("lastmod", "Anuken/ExampleMod"), text -> {
Core.settings.put("lastmod", text);
ui.showTextInput("@mod.import.github", "", 64, modString.isEmpty() ? suggested : modString, text -> {
if(!modString.isEmpty() || !Structs.eq(suggested, text)){
Core.settings.put("lastmod", text);
}
ui.loadfrag.show();
//Try to download the 6.0 branch first, but if it doesn't exist try master.
//Try to download the 6.0 branch first, but if it doesn't exist, try master.
githubImport("6.0", text, e1 -> {
githubImport("master", text, e2 -> {
githubImport("main", text, e3 -> {
@@ -287,7 +287,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
Color color =
sec.hasBase() ? Tmp.c2.set(Team.sharded.color).lerp(Team.crux.color, sec.hasEnemyBase() ? 0.5f : 0f) :
sec.preset != null ? Tmp.c2.set(Team.derelict.color).lerp(Color.white, Mathf.absin(Time.time(), 10f, 1f)) :
sec.preset != null ? Tmp.c2.set(Team.derelict.color).lerp(Color.white, Mathf.absin(Time.time, 10f, 1f)) :
sec.hasEnemyBase() ? Team.crux.color :
null;
@@ -409,6 +409,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
@Override
public void draw(){
planets.orbitAlpha = selectAlpha;
planets.render(PlanetDialog.this);
if(Core.scene.getDialog() == PlanetDialog.this){
Core.scene.setScrollFocus(PlanetDialog.this);
@@ -562,7 +563,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
if(t.getChildren().any()){
c.add(name).left().row();
c.add(t).padLeft(10f).row();
c.add(t).padLeft(10f).left().row();
}
};
@@ -626,6 +627,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
Table stable = sectorTop;
if(sector == null){
stable.clear();
return;
}
@@ -711,6 +713,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
stable.table(t -> {
t.add("@sectors.resources").padRight(4);
for(UnlockableContent c : sector.info.resources){
if(c == null) continue; //apparently this is possible.
t.image(c.icon(Cicon.small)).padRight(3).size(Cicon.small.size);
}
}).padLeft(10f).fillX().row();
@@ -257,18 +257,6 @@ public class ResearchDialog extends BaseDialog{
return node.content.unlocked() || !node.objectives.contains(i -> !i.complete());
}
public void showToast(String info){
Table table = new Table();
table.actions(Actions.fadeOut(0.5f, Interp.fade), Actions.remove());
table.top().add(info);
table.name = "toast";
table.update(() -> {
table.toFront();
table.setPosition(Core.graphics.getWidth() / 2f, Core.graphics.getHeight() - 21, Align.top);
});
Core.scene.add(table);
}
boolean locked(TechNode node){
return node.content.locked();
}
@@ -451,7 +439,6 @@ public class ResearchDialog extends BaseDialog{
void unlock(TechNode node){
node.content.unlock();
showToast(Core.bundle.format("researched", node.content.localizedName));
checkNodes(root);
hoverNode = null;
treeLayout();
@@ -275,7 +275,7 @@ public class HudFragment extends Fragment{
t.name = "nearpoint";
t.touchable = Touchable.disabled;
t.table(Styles.black, c -> c.add("@nearpoint")
.update(l -> l.setColor(Tmp.c1.set(Color.white).lerp(Color.scarlet, Mathf.absin(Time.time(), 10f, 1f))))
.update(l -> l.setColor(Tmp.c1.set(Color.white).lerp(Color.scarlet, Mathf.absin(Time.time, 10f, 1f))))
.get().setAlignment(Align.center, Align.center))
.margin(6).update(u -> u.color.a = Mathf.lerpDelta(u.color.a, Mathf.num(spawner.playerNear()), 0.1f)).get().color.a = 0f;
});
@@ -317,7 +317,7 @@ public class HudFragment extends Fragment{
return coreAttackOpacity[0] > 0;
});
t.table(Tex.button, top -> top.add("@coreattack").pad(2)
.update(label -> label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time(), 2f, 1f)))).touchable(Touchable.disabled);
.update(label -> label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time, 2f, 1f)))).touchable(Touchable.disabled);
});
//'saving' indicator
+1 -1
View File
@@ -392,7 +392,7 @@ public class Block extends UnlockableContent{
public void drawRequest(BuildPlan req, Eachable<BuildPlan> list, boolean valid){
Draw.reset();
Draw.mixcol(!valid ? Pal.breakInvalid : Color.white, (!valid ? 0.4f : 0.24f) + Mathf.absin(Time.globalTime(), 6f, 0.28f));
Draw.mixcol(!valid ? Pal.breakInvalid : Color.white, (!valid ? 0.4f : 0.24f) + Mathf.absin(Time.globalTime, 6f, 0.28f));
Draw.alpha(1f);
float prevScale = Draw.scl;
Draw.scl *= req.animScale;
+15 -5
View File
@@ -20,7 +20,7 @@ public class Build{
private static final IntSet tmp = new IntSet();
@Remote(called = Loc.server)
public static void beginBreak(Team team, int x, int y){
public static void beginBreak(@Nullable Unit unit, Team team, int x, int y){
if(!validBreak(team, x, y)){
return;
}
@@ -40,14 +40,14 @@ public class Build{
tile.setBlock(sub, team, rotation);
tile.<ConstructBuild>bc().setDeconstruct(previous);
tile.build.health = tile.build.maxHealth * prevPercent;
if(unit != null && unit.isPlayer()) tile.build.lastAccessed = unit.getPlayer().name;
Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, true)));
Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, unit, true)));
}
/** Places a ConstructBlock at this location. */
@Remote(called = Loc.server)
public static void beginPlace(Block result, Team team, int x, int y, int rotation){
public static void beginPlace(@Nullable Unit unit, Block result, Team team, int x, int y, int rotation){
if(!validPlace(result, team, x, y, rotation)){
return;
}
@@ -57,6 +57,15 @@ public class Build{
//just in case
if(tile == null) return;
//auto-rotate the block to the correct orientation and bail out
if(tile.team() == team && tile.block == result && tile.build != null && tile.block.quickRotate){
if(unit != null && unit.isPlayer()) tile.build.lastAccessed = unit.getPlayer().name;
tile.build.rotation = Mathf.mod(rotation, 4);
tile.build.updateProximity();
tile.build.noSleep();
return;
}
Block previous = tile.block();
Block sub = ConstructBlock.get(result.size);
Seq<Building> prevBuild = new Seq<>(9);
@@ -76,10 +85,11 @@ public class Build{
build.setConstruct(previous.size == sub.size ? previous : Blocks.air, result);
build.prevBuild = prevBuild;
if(unit != null && unit.isPlayer()) build.lastAccessed = unit.getPlayer().name;
result.placeBegan(tile, previous);
Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, false)));
Core.app.post(() -> Events.fire(new BlockBuildBeginEvent(tile, team, unit, false)));
}
/** Returns whether a tile can be placed at this location by this team. */
@@ -23,7 +23,7 @@ public class DirectionalItemBuffer{
public void accept(int buffer, Item item){
if(!accepts(buffer)) return;
buffers[buffer][indexes[buffer]++] = BufferItem.get((byte)item.id, Time.time());
buffers[buffer][indexes[buffer]++] = BufferItem.get((byte)item.id, Time.time);
}
public Item poll(int buffer, float speed){
@@ -31,7 +31,7 @@ public class DirectionalItemBuffer{
long l = buffers[buffer][0];
float time = BufferItem.time(l);
if(Time.time() >= time + speed || Time.time() < time){
if(Time.time >= time + speed || Time.time < time){
return content.item(BufferItem.item(l));
}
}
+2 -2
View File
@@ -20,7 +20,7 @@ public class ItemBuffer{
public void accept(Item item, short data){
//if(!accepts()) return;
buffer[index++] = Pack.longInt(Float.floatToIntBits(Time.time()), Pack.shortInt(item.id, data));
buffer[index++] = Pack.longInt(Float.floatToIntBits(Time.time), Pack.shortInt(item.id, data));
}
public void accept(Item item){
@@ -32,7 +32,7 @@ public class ItemBuffer{
long l = buffer[0];
float time = Float.intBitsToFloat(Pack.leftInt(l));
if(Time.time() >= time + speed || Time.time() < time){
if(Time.time >= time + speed || Time.time < time){
return content.item(Pack.leftShort(Pack.rightInt(l)));
}
}
+22
View File
@@ -103,6 +103,28 @@ public class Tile implements Position, QuadTreeObject, Displayable{
return -1;
}
/**
* Returns the flammability of the Used for fire calculations.
* Takes flammability of floor liquid into account.
*/
public float getFlammability(){
if(!block.hasItems){
if(floor.liquidDrop != null && !block.solid){
return floor.liquidDrop.flammability;
}
return 0;
}else if(build != null){
float result = build.items.sum((item, amount) -> item.flammability * amount);
if(block.hasLiquids){
result += build.liquids.sum((liquid, amount) -> liquid.flammability * amount / 3f);
}
return result;
}
return 0;
}
/** Convenience method that returns the building of this tile with a cast.
* Method name is shortened to prevent conflict. */
@SuppressWarnings("unchecked")
@@ -19,6 +19,7 @@ import mindustry.graphics.*;
import mindustry.type.*;
import mindustry.ui.*;
import mindustry.world.*;
import mindustry.world.blocks.storage.CoreBlock.*;
import mindustry.world.modules.*;
import static mindustry.Vars.*;
@@ -275,8 +276,9 @@ public class ConstructBlock extends Block{
if(clampedAmount > 0 && accumulated > 0){ //if it's positive, add it to the core
if(core != null && requirements[i].item.unlockedNow()){ //only accept items that are unlocked
int accepting = core.acceptStack(requirements[i].item, accumulated, builder);
core.handleStack(requirements[i].item, accepting, builder);
int accepting = Math.min(accumulated, ((CoreBuild)core).storageCapacity - core.items.get(requirements[i].item));
//transfer items directly, as this is not production.
core.items.add(requirements[i].item, accepting);
accumulator[i] -= accepting;
}else{
accumulator[i] -= accumulated;
@@ -51,7 +51,7 @@ public class Accelerator extends Block{
for(int l = 0; l < 4; l++){
float length = 7f + l * 5f;
Draw.color(team.color, Pal.darkMetal, Mathf.absin(Time.time() + l*50f, 10f, 1f));
Draw.color(team.color, Pal.darkMetal, Mathf.absin(Time.time + l*50f, 10f, 1f));
for(int i = 0; i < 4; i++){
float rot = i*90f + 45f;
@@ -67,13 +67,13 @@ public class Accelerator extends Block{
Lines.square(x, y, rad * 1.22f, 45f);
Lines.stroke(3f, Pal.accent);
Lines.square(x, y, rad, Time.time() / scl);
Lines.square(x, y, rad, -Time.time() / scl);
Lines.square(x, y, rad, Time.time / scl);
Lines.square(x, y, rad, -Time.time / scl);
Draw.color(team.color);
for(int i = 0; i < 4; i++){
float rot = i*90f + 45f + (-Time.time()/3f)%360f;
float rot = i*90f + 45f + (-Time.time /3f)%360f;
float length = 26f;
Draw.rect(arrowRegion, x + Angles.trnsx(rot, length), y + Angles.trnsy(rot, length), rot + 180f);
}
@@ -56,6 +56,11 @@ public class LaunchPad extends Block{
bars.add("items", entity -> new Bar(() -> Core.bundle.format("bar.items", entity.items.total()), () -> Pal.items, () -> (float)entity.items.total() / itemCapacity));
}
@Override
public boolean outputsItems(){
return false;
}
public class LaunchPadBuild extends Building{
@Override
@@ -104,10 +104,10 @@ public class MendProjector extends Block{
public void draw(){
super.draw();
float f = 1f - (Time.time() / 100f) % 1f;
float f = 1f - (Time.time / 100f) % 1f;
Draw.color(baseColor, phaseColor, phaseHeat);
Draw.alpha(heat * Mathf.absin(Time.time(), 10f, 1f) * 0.5f);
Draw.alpha(heat * Mathf.absin(Time.time, 10f, 1f) * 0.5f);
Draw.rect(topRegion, x, y);
Draw.alpha(1f);
Lines.stroke((2f * f + 0.2f) * heat);
@@ -114,10 +114,10 @@ public class OverdriveProjector extends Block{
public void draw(){
super.draw();
float f = 1f - (Time.time() / 100f) % 1f;
float f = 1f - (Time.time / 100f) % 1f;
Draw.color(baseColor, phaseColor, phaseHeat);
Draw.alpha(heat * Mathf.absin(Time.time(), 10f, 1f) * 0.5f);
Draw.alpha(heat * Mathf.absin(Time.time, 10f, 1f) * 0.5f);
Draw.rect(topRegion, x, y);
Draw.alpha(1f);
Lines.stroke((2f * f + 0.1f) * heat);
@@ -11,7 +11,7 @@ import mindustry.world.meta.*;
import static mindustry.Vars.*;
public abstract class BaseTurret extends Block{
public class BaseTurret extends Block{
public float range = 80f;
public float rotateSpeed = 5;
@@ -9,7 +9,7 @@ import mindustry.world.meta.values.*;
import static mindustry.Vars.*;
public abstract class ReloadTurret extends BaseTurret{
public class ReloadTurret extends BaseTurret{
public float reloadTime = 10f;
public ReloadTurret(String name){
@@ -27,7 +27,7 @@ import mindustry.world.meta.*;
import static mindustry.Vars.*;
public abstract class Turret extends ReloadTurret{
public class Turret extends ReloadTurret{
//after being logic-controlled and this amount of time passes, the turret will resume normal AI
public final static float logicControlCooldown = 60 * 2;
@@ -114,7 +114,7 @@ public class Conveyor extends Block implements Autotiler{
@Override
public void draw(){
int frame = enabled && clogHeat <= 0.5f ? (int)(((Time.time() * speed * 8f * timeScale())) % 4) : 0;
int frame = enabled && clogHeat <= 0.5f ? (int)(((Time.time * speed * 8f * timeScale())) % 4) : 0;
//draw extra conveyors facing this one for non-square tiling purposes
Draw.z(Layer.blockUnder);
@@ -311,7 +311,7 @@ public class Conveyor extends Block implements Autotiler{
if(len >= capacity) return false;
Tile facing = Edges.getFacingEdge(source.tile, tile);
int direction = Math.abs(facing.relativeTo(tile.x, tile.y) - rotation);
return (((direction == 0) && minitem >= itemSpace) || ((direction % 2 == 1) && minitem > 0.7f)) && !(source.block.rotate && (source.rotation + 2) % 4 == rotation);
return (((direction == 0) && minitem >= itemSpace) || ((direction % 2 == 1) && minitem > 0.7f)) && !(source.block.rotate && next == source);
}
@Override
@@ -93,7 +93,7 @@ public class ItemBridge extends Block{
Draw.reset();
Draw.color(Pal.placing);
Lines.stroke(1f);
if(link != null){
if(link != null && Math.abs(link.x - x) + Math.abs(link.y - y) > 1){
int rot = link.absoluteRelativeTo(x, y);
float w = (link.x == x ? tilesize : Math.abs(link.x - x) * tilesize - tilesize);
float h = (link.y == y ? tilesize : Math.abs(link.y - y) * tilesize - tilesize);
@@ -145,7 +145,7 @@ public class ItemBridge extends Block{
if(config != null) return;
Tile link = findLink(tile.x, tile.y);
if(linkValid(tile, link)){
if(linkValid(tile, link) && !proximity.contains(link.build)){
link.build.configure(tile.pos());
}
@@ -170,7 +170,7 @@ public class ItemBridge extends Block{
Tmp.v2.trns(tile.angleTo(other), 2f);
float tx = tile.drawx(), ty = tile.drawy();
float ox = other.drawx(), oy = other.drawy();
float alpha = Math.abs((linked ? 100 : 0)-(Time.time() * 2f) % 100f) / 100f;
float alpha = Math.abs((linked ? 100 : 0)-(Time.time * 2f) % 100f) / 100f;
float x = Mathf.lerp(ox, tx, alpha);
float y = Mathf.lerp(oy, ty, alpha);
@@ -207,7 +207,7 @@ public class ItemBridge extends Block{
boolean linked = other.pos() == link;
Drawf.select(other.drawx(), other.drawy(),
other.block().size * tilesize / 2f + 2f + (linked ? 0f : Mathf.absin(Time.time(), 4f, 1f)), linked ? Pal.place : Pal.breakInvalid);
other.block().size * tilesize / 2f + 2f + (linked ? 0f : Mathf.absin(Time.time, 4f, 1f)), linked ? Pal.place : Pal.breakInvalid);
}
}
}
@@ -298,7 +298,7 @@ public class ItemBridge extends Block{
int i = relativeTo(other.x, other.y);
Draw.color(Color.white, Color.black, Mathf.absin(Time.time(), 6f, 0.07f));
Draw.color(Color.white, Color.black, Mathf.absin(Time.time, 6f, 0.07f));
Draw.alpha(Math.max(uptime, 0.25f) * opacity);
Draw.rect(endRegion, x, y, i * 90 + 90);
@@ -44,7 +44,7 @@ public class Junction extends Block{
long l = buffer.buffers[i][0];
float time = BufferItem.time(l);
if(Time.time() >= time + speed / timeScale || Time.time() < time){
if(Time.time >= time + speed / timeScale || Time.time < time){
Item item = content.item(BufferItem.item(l));
Building dest = nearby(i);
@@ -65,7 +65,7 @@ public class MassDriver extends Block{
if(selected == null || !(selected.block instanceof MassDriver) || !(selected.within(x * tilesize, y * tilesize, range))) return;
//if so, draw a dotted line towards it while it is in range
float sin = Mathf.absin(Time.time(), 6f, 1f);
float sin = Mathf.absin(Time.time, 6f, 1f);
Tmp.v1.set(x * tilesize + offset, y * tilesize + offset).sub(selected.x, selected.y).limit((size / 2f + 1) * tilesize + sin + 0.5f);
float x2 = x * tilesize - Tmp.v1.x, y2 = y * tilesize - Tmp.v1.y,
x1 = selected.x + Tmp.v1.x, y1 = selected.y + Tmp.v1.y;
@@ -202,7 +202,7 @@ public class MassDriver extends Block{
@Override
public void drawConfigure(){
float sin = Mathf.absin(Time.time(), 6f, 1f);
float sin = Mathf.absin(Time.time, 6f, 1f);
Draw.color(Pal.accent);
Lines.stroke(1f);
@@ -204,7 +204,7 @@ public class PayloadConveyor extends Block{
}
public float time(){
return Time.time();
return Time.time;
}
@Override
@@ -234,6 +234,12 @@ public class PayloadConveyor extends Block{
updatePayload();
}
@Override
public void onRemoved(){
super.onRemoved();
if(item != null) item.dump();
}
@Override
public void write(Writes write){
super.write(write);
@@ -4,7 +4,7 @@ import arc.graphics.g2d.*;
import arc.math.*;
import mindustry.world.*;
/**A type of floor that is overlaid on top of over floors.*/
/**A type of floor that is overlaid on top of other floors.*/
public class OverlayFloor extends Floor{
public OverlayFloor(String name){
@@ -22,7 +22,7 @@ public class TreeBlock extends Block{
public void drawBase(Tile tile){
float x = tile.worldx(), y = tile.worldy();
float rot = Mathf.randomSeed(tile.pos(), 0, 4) * 90 + Mathf.sin(Time.time() + x, 50f, 0.5f) + Mathf.sin(Time.time() - y, 65f, 0.9f) + Mathf.sin(Time.time() + y - x, 85f, 0.9f);
float rot = Mathf.randomSeed(tile.pos(), 0, 4) * 90 + Mathf.sin(Time.time + x, 50f, 0.5f) + Mathf.sin(Time.time - y, 65f, 0.9f) + Mathf.sin(Time.time + y - x, 85f, 0.9f);
float w = region.width * Draw.scl, h = region.height * Draw.scl;
float scl = 30f, mag = 0.2f;
@@ -34,8 +34,8 @@ public class TreeBlock extends Block{
Draw.z(Layer.power + 1);
Draw.rectv(region, x, y, w, h, rot, vec -> {
vec.add(
Mathf.sin(vec.y*3 + Time.time(), scl, mag) + Mathf.sin(vec.x*3 - Time.time(), 70, 0.8f),
Mathf.cos(vec.x*3 + Time.time() + 8, scl + 6f, mag * 1.1f) + Mathf.sin(vec.y*3 - Time.time(), 50, 0.2f)
Mathf.sin(vec.y*3 + Time.time, scl, mag) + Mathf.sin(vec.x*3 - Time.time, 70, 0.8f),
Mathf.cos(vec.x*3 + Time.time + 8, scl + 6f, mag * 1.1f) + Mathf.sin(vec.y*3 - Time.time, 50, 0.2f)
);
});
}
@@ -101,12 +101,12 @@ public class ImpactReactor extends PowerGenerator{
Draw.rect(bottomRegion, x, y);
for(int i = 0; i < plasmaRegions.length; i++){
float r = size * tilesize - 3f + Mathf.absin(Time.time(), 2f + i * 1f, 5f - i * 0.5f);
float r = size * tilesize - 3f + Mathf.absin(Time.time, 2f + i * 1f, 5f - i * 0.5f);
Draw.color(plasma1, plasma2, (float)i / plasmaRegions.length);
Draw.alpha((0.3f + Mathf.absin(Time.time(), 2f + i * 2f, 0.3f + i * 0.05f)) * warmup);
Draw.alpha((0.3f + Mathf.absin(Time.time, 2f + i * 2f, 0.3f + i * 0.05f)) * warmup);
Draw.blend(Blending.additive);
Draw.rect(plasmaRegions[i], x, y, r, r, Time.time() * (12 + i * 6f) * warmup);
Draw.rect(plasmaRegions[i], x, y, r, r, Time.time * (12 + i * 6f) * warmup);
Draw.blend();
}

Some files were not shown because too many files have changed in this diff Show More