From 6a21b12b11756fd366a6cfe62e17a01da3848cc5 Mon Sep 17 00:00:00 2001 From: Cardillan <122014763+cardillan@users.noreply.github.com> Date: Fri, 4 Apr 2025 19:26:41 +0200 Subject: [PATCH] Adds LAccess.memoryCapacity - sensable property returning the size of a memory block (#10589) --- core/assets/bundles/bundle.properties | 1 + core/assets/bundles/bundle_be.properties | 1 + core/assets/bundles/bundle_bg.properties | 1 + core/assets/bundles/bundle_ca.properties | 1 + core/assets/bundles/bundle_cs.properties | 1 + core/assets/bundles/bundle_da.properties | 1 + core/assets/bundles/bundle_de.properties | 1 + core/assets/bundles/bundle_es.properties | 1 + core/assets/bundles/bundle_et.properties | 1 + core/assets/bundles/bundle_eu.properties | 1 + core/assets/bundles/bundle_fi.properties | 1 + core/assets/bundles/bundle_fil.properties | 1 + core/assets/bundles/bundle_fr.properties | 1 + core/assets/bundles/bundle_hu.properties | 1 + core/assets/bundles/bundle_id_ID.properties | 1 + core/assets/bundles/bundle_it.properties | 1 + core/assets/bundles/bundle_ja.properties | 1 + core/assets/bundles/bundle_ko.properties | 1 + core/assets/bundles/bundle_lt.properties | 1 + core/assets/bundles/bundle_nl.properties | 1 + core/assets/bundles/bundle_nl_BE.properties | 1 + core/assets/bundles/bundle_pl.properties | 1 + core/assets/bundles/bundle_pt_BR.properties | 1 + core/assets/bundles/bundle_pt_PT.properties | 1 + core/assets/bundles/bundle_ro.properties | 1 + core/assets/bundles/bundle_ru.properties | 1 + core/assets/bundles/bundle_sr.properties | 1 + core/assets/bundles/bundle_sv.properties | 1 + core/assets/bundles/bundle_th.properties | 1 + core/assets/bundles/bundle_tk.properties | 1 + core/assets/bundles/bundle_tr.properties | 1 + core/assets/bundles/bundle_uk_UA.properties | 1 + core/assets/bundles/bundle_vi.properties | 1 + core/assets/bundles/bundle_zh_CN.properties | 1 + core/assets/bundles/bundle_zh_TW.properties | 1 + core/src/mindustry/logic/LAccess.java | 1 + core/src/mindustry/world/blocks/logic/MemoryBlock.java | 9 +++++++++ 37 files changed, 45 insertions(+) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index f59a38ad30..e649a1104a 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -2530,6 +2530,7 @@ lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_be.properties b/core/assets/bundles/bundle_be.properties index 71cd4a2900..b6049e6762 100644 --- a/core/assets/bundles/bundle_be.properties +++ b/core/assets/bundles/bundle_be.properties @@ -2461,6 +2461,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_bg.properties b/core/assets/bundles/bundle_bg.properties index e6ff15318c..6b3caef17a 100644 --- a/core/assets/bundles/bundle_bg.properties +++ b/core/assets/bundles/bundle_bg.properties @@ -2485,6 +2485,7 @@ lenum.shootp = Прицелва се в единица/сграда, изчис lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Дали блокът е активиран или забранен. laccess.currentammotype = Текущите муниции/течност на оръдието. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Цвят на осветителя. laccess.controller = Показва кой контролира единицата.\nАко се управлява от процесор, показва него.\nАко е във формация, показва водача й.\nИначе ще покаже самата единица. diff --git a/core/assets/bundles/bundle_ca.properties b/core/assets/bundles/bundle_ca.properties index 0a36d7e8a1..38013e5dcd 100644 --- a/core/assets/bundles/bundle_ca.properties +++ b/core/assets/bundles/bundle_ca.properties @@ -2487,6 +2487,7 @@ lenum.shootp = Dispara a una unitat/bloc tenint en compte la seva velocitat a l lenum.config = Configuració de l’estructura, com ara el classificador. lenum.enabled = Retorna si el bloc està activat. laccess.currentammotype = Líquid o element de munició actual de la torreta. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Color de l’il·luminador. laccess.controller = Controlador de la unitat. Si es controla per processador, retorna el processador.\nAltrament, retorna la mateixa unitat. diff --git a/core/assets/bundles/bundle_cs.properties b/core/assets/bundles/bundle_cs.properties index 0fa144be0d..e50ff7c312 100644 --- a/core/assets/bundles/bundle_cs.properties +++ b/core/assets/bundles/bundle_cs.properties @@ -2486,6 +2486,7 @@ lenum.shootp = Vystřelí na jednotku/budovu s rychlostní předpovědí. lenum.config = Konfigurace budovy, např. třídící věc pro třídičku. lenum.enabled = Zda je blok povolen. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Počet buněk v paměťovém bloku. laccess.color = Barva osvětlovače. laccess.controller = Kontroler jednotky. Pokud procesor je kontrolován, vrátí procesor\nPokud je ve formaci, vrací vůdce.\nJinak vrací jednotku. diff --git a/core/assets/bundles/bundle_da.properties b/core/assets/bundles/bundle_da.properties index b8d15d34bc..ab33e4345f 100644 --- a/core/assets/bundles/bundle_da.properties +++ b/core/assets/bundles/bundle_da.properties @@ -2461,6 +2461,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_de.properties b/core/assets/bundles/bundle_de.properties index e399a3f45d..89d0366bb8 100644 --- a/core/assets/bundles/bundle_de.properties +++ b/core/assets/bundles/bundle_de.properties @@ -2516,6 +2516,7 @@ lenum.shootp = Schießt auf eine Einheit / einen Block und sagt deren Position v lenum.config = Blockkonfiguration, z.B. das ausgewählte Item in einem Sortierer. lenum.enabled = Ob der Block an oder aus ist. laccess.currentammotype = Aktuelle Munitionsart eines Geschützes +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminiererfarbe. laccess.controller = Einheitensteurer. Gibt "processor" zurück, wenn die Einheit prozessorgesteuert ist,.\nGibt den Steuerer zurück, wenn die Einheit Teil einer Formation ist.\nSonst wird einfach die Einheit zurückgegeben. diff --git a/core/assets/bundles/bundle_es.properties b/core/assets/bundles/bundle_es.properties index 83f9eade4f..26065d36bb 100644 --- a/core/assets/bundles/bundle_es.properties +++ b/core/assets/bundles/bundle_es.properties @@ -2505,6 +2505,7 @@ lenum.shootp = Dispara a una unidad/estructura con predicción de velocidad. lenum.config = Configuración de estructura, por ejemplo: el objeto seleccionado en un clasificador. lenum.enabled = Si el bloque está activado. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Color del iluminador. laccess.controller = Controlador de unidad. Si se controla mediante un procesador, devuelve dicho procesador.\nSi está en formación, devuelve su líder.\nDe otra forma, devuelve la misma unidad. diff --git a/core/assets/bundles/bundle_et.properties b/core/assets/bundles/bundle_et.properties index e0aec94ae5..2afe4537fc 100644 --- a/core/assets/bundles/bundle_et.properties +++ b/core/assets/bundles/bundle_et.properties @@ -2466,6 +2466,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_eu.properties b/core/assets/bundles/bundle_eu.properties index 5cf00ef3aa..998628446e 100644 --- a/core/assets/bundles/bundle_eu.properties +++ b/core/assets/bundles/bundle_eu.properties @@ -2465,6 +2465,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_fi.properties b/core/assets/bundles/bundle_fi.properties index dede240ab0..d032f9af3b 100644 --- a/core/assets/bundles/bundle_fi.properties +++ b/core/assets/bundles/bundle_fi.properties @@ -2468,6 +2468,7 @@ lenum.shootp = Ammu yksikköä/rakennusta nopeudenennustus päällä. lenum.config = Rakennuksen säätö, esim. lajittelijan valinta. lenum.enabled = Selvitä, onko palikka päällä. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Lampun väri. laccess.controller = Yksikön hallitsija. Jos yksikköä hallitsee prosessori, palauttaa prosessorin.\nJos yksikkö on muodostelmassa, palauttaa johtajan.\nPalauttaa muulloin itse yksikön. laccess.dead = Selvitä, onko yksikkö/rakennus tuhoutunut tai ei enää kelvollinen. diff --git a/core/assets/bundles/bundle_fil.properties b/core/assets/bundles/bundle_fil.properties index b7a5f44b81..93e7bb0e00 100644 --- a/core/assets/bundles/bundle_fil.properties +++ b/core/assets/bundles/bundle_fil.properties @@ -2473,6 +2473,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_fr.properties b/core/assets/bundles/bundle_fr.properties index b197e40c45..74d9a45f2b 100644 --- a/core/assets/bundles/bundle_fr.properties +++ b/core/assets/bundles/bundle_fr.properties @@ -2512,6 +2512,7 @@ lenum.shootp = Tire à une unité/bâtiment avec la prédiction de mouvement. lenum.config = La configuration d'un bâtiment. Par exemple, l'objet sélectionné dans un trieur. lenum.enabled = Retourne si le bloc est activé ou pas. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = La couleur d'un illuminateur. laccess.controller = Le contrôleur de l'Unité.\nSi l'Unité est contrôlée par un processeur, cela retournera le processeur en question.\nSi l'Unité est en formation, cela retournera le leader de la formation.\nSinon, renvoie l’unité elle-même. diff --git a/core/assets/bundles/bundle_hu.properties b/core/assets/bundles/bundle_hu.properties index 7d186d377e..1ef7392017 100644 --- a/core/assets/bundles/bundle_hu.properties +++ b/core/assets/bundles/bundle_hu.properties @@ -2528,6 +2528,7 @@ lenum.shootp = Lövés egy egységre/épületre sebesség-előrejelzéssel. lenum.config = Épületkonfiguráció, például nyersanyag-válogató. lenum.enabled = Engedélyezve van-e a blokk. laccess.currentammotype = Egy lövegtorony jelenlegi lőszer nyersanyaga/folyadéka. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Megvilágítás színe. laccess.controller = Egységvezérlő. Ha processzor vezérli, akkor a processzort adja vissza.\nMáskülönben magát az egységet adja vissza. diff --git a/core/assets/bundles/bundle_id_ID.properties b/core/assets/bundles/bundle_id_ID.properties index 9dc9f9c038..b3a0bf2b2b 100644 --- a/core/assets/bundles/bundle_id_ID.properties +++ b/core/assets/bundles/bundle_id_ID.properties @@ -2529,6 +2529,7 @@ lenum.config = Pengaturan bangunan, misalnya menyortir barang. lenum.enabled = Menentukan aktif tidaknya suatu blok. laccess.currentammotype = Bahan amunisi/cairan menara saat ini. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Warna lampu. laccess.controller = Pengendali unit. Jika dikendalikan prosesor, mengembalikan prosesor.\nJika unit dalam barisan, mengembalikan leader.\nSebaliknya, mengembalikan unit itu sendiri. laccess.dead = Menentukan apakah unit/bangunan itu hancur atau tidak ada lagi. diff --git a/core/assets/bundles/bundle_it.properties b/core/assets/bundles/bundle_it.properties index d7ad5a0b25..a7a5b26c92 100644 --- a/core/assets/bundles/bundle_it.properties +++ b/core/assets/bundles/bundle_it.properties @@ -2475,6 +2475,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_ja.properties b/core/assets/bundles/bundle_ja.properties index 3f9d3aa940..2de7a20dbf 100644 --- a/core/assets/bundles/bundle_ja.properties +++ b/core/assets/bundles/bundle_ja.properties @@ -2479,6 +2479,7 @@ lenum.shootp = 任意のユニットや建物を撃ちます。 lenum.config = 建物の設定を取得します。\n例:ソーターに設定されているアイテムなど lenum.enabled = ブロックが有効かどうかを取得します。 laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = イルミネーターの色を取得します。 laccess.controller = ユニットを制御しているものを取得します。\nプロセッサ制御の場合、制御しているプロセッサを返します。\nほかのユニットに制御されている場合、制御しているユニットを返します。\nそれ以外の場合は、ユニット自身を返します。 laccess.dead = ユニットや建物が機能しているかどうか、またはもう有効でないかどうか。 diff --git a/core/assets/bundles/bundle_ko.properties b/core/assets/bundles/bundle_ko.properties index 39763117d7..2fbbfbe51e 100644 --- a/core/assets/bundles/bundle_ko.properties +++ b/core/assets/bundles/bundle_ko.properties @@ -2527,6 +2527,7 @@ lenum.config = 필터의 아이템같은 건물의 설정 lenum.enabled = 블록의 활성 여부 laccess.currentammotype = 포탑의 현재 탄약/액체. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = 조명 색상. laccess.controller = 유닛 제어자. 프로세서가 제어하면, 프로세서를 반환합니다.\n다른 유닛에 의해 지휘되면(G키), 지휘하는 유닛을 반환합니다.\n그 외에는 자신을 반환합니다. laccess.dead = 기체 또는 건물 사망/무효 여부. diff --git a/core/assets/bundles/bundle_lt.properties b/core/assets/bundles/bundle_lt.properties index 6a24dc8f21..c5dc5531ad 100644 --- a/core/assets/bundles/bundle_lt.properties +++ b/core/assets/bundles/bundle_lt.properties @@ -2463,6 +2463,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_nl.properties b/core/assets/bundles/bundle_nl.properties index fe9de859ab..2d9fb0f9fe 100644 --- a/core/assets/bundles/bundle_nl.properties +++ b/core/assets/bundles/bundle_nl.properties @@ -2476,6 +2476,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_nl_BE.properties b/core/assets/bundles/bundle_nl_BE.properties index d5e40eb7a6..148fe900c4 100644 --- a/core/assets/bundles/bundle_nl_BE.properties +++ b/core/assets/bundles/bundle_nl_BE.properties @@ -2463,6 +2463,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_pl.properties b/core/assets/bundles/bundle_pl.properties index a78f417b1d..403b57782b 100644 --- a/core/assets/bundles/bundle_pl.properties +++ b/core/assets/bundles/bundle_pl.properties @@ -2499,6 +2499,7 @@ lenum.shootp = Strzel w jednostkę/budynek z zachowaniem trajektorii. lenum.config = Konfiguracja budynku, np. sortownika. lenum.enabled = Sprawdza czy blok jest włączony. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Kolor iluminatora. laccess.controller = Kontroler jednostki. Jeśli jest kontrolowana przez procesor, zwraca procesor.\nJeśli we formacji, zwraca przywódcę.\nW innym wypadku zwraca samą jednostkę. diff --git a/core/assets/bundles/bundle_pt_BR.properties b/core/assets/bundles/bundle_pt_BR.properties index 2577a9b72b..ce8617b5df 100644 --- a/core/assets/bundles/bundle_pt_BR.properties +++ b/core/assets/bundles/bundle_pt_BR.properties @@ -2509,6 +2509,7 @@ lenum.shootp = Atire em uma unidade/edifício com previsão de velocidade. lenum.config = Configuração do edifício, por ex. item classificador. lenum.enabled = Se o bloco está ativado. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Cor do iluminador. laccess.controller = Controlador de unidade. Se controlado pelo processador, retorna o processador.\nCaso contrário, retorna a própria unidade. diff --git a/core/assets/bundles/bundle_pt_PT.properties b/core/assets/bundles/bundle_pt_PT.properties index d16abb17b5..e2ec34cbe8 100644 --- a/core/assets/bundles/bundle_pt_PT.properties +++ b/core/assets/bundles/bundle_pt_PT.properties @@ -2531,6 +2531,7 @@ lenum.config = Configuração do edifício, por ex. item classificador. lenum.enabled = Se o bloco está ativado. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Cor do iluminador. laccess.controller = Controlador de unidade. Se controlado pelo processador, retorna o processador.\nCaso contrário, retorna a própria unidade. laccess.dead = Se uma unidade/edifício está morta ou não é mais válida. diff --git a/core/assets/bundles/bundle_ro.properties b/core/assets/bundles/bundle_ro.properties index aa79e622b5..c85a884498 100644 --- a/core/assets/bundles/bundle_ro.properties +++ b/core/assets/bundles/bundle_ro.properties @@ -2482,6 +2482,7 @@ lenum.shootp = Lovește către o unitate/clădire. Anticipează viteza țintei lenum.config = Configurația clădirii, de ex. materialul selectat pt Sortator. lenum.enabled = Specifică dacă clădirea este pornită. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Culoarea iluminatorului. laccess.controller = Controlorul unității. Dacă e controlată de procesor, returnează procesorul.\nDacă e într-o formație, returnează liderul.\nAltfel, returnează unitatea însăși. diff --git a/core/assets/bundles/bundle_ru.properties b/core/assets/bundles/bundle_ru.properties index ac6b81b27a..7eec59d6b2 100644 --- a/core/assets/bundles/bundle_ru.properties +++ b/core/assets/bundles/bundle_ru.properties @@ -2489,6 +2489,7 @@ lenum.shootp = Стрельба в единицу/постройку с расч lenum.config = Конфигурация постройки, например, предмет сортировки. lenum.enabled = Включён ли блок. laccess.currentammotype = Текущий боеприпас турели. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Цвет осветителя. laccess.controller = Командующий единицей. Если единица управляется процессором, возвращает процессор. Если в строю, возвращает командующего.\nВ противном случае возвращает саму единицу. diff --git a/core/assets/bundles/bundle_sr.properties b/core/assets/bundles/bundle_sr.properties index 1151b263d1..79f71da7dd 100644 --- a/core/assets/bundles/bundle_sr.properties +++ b/core/assets/bundles/bundle_sr.properties @@ -2485,6 +2485,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Konfiguracija građevine, npr. sortirani materijal. lenum.enabled = Da li je ova građevina osposobljena. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Boja iluminatora. laccess.controller = Upravljač jedinice. Ako upravljano putem procesora, šalji "processor".\nAko je upravljano u formaciji, šalji "lider".U ostalim slučajevima, šalji jedinicu za sebe. diff --git a/core/assets/bundles/bundle_sv.properties b/core/assets/bundles/bundle_sv.properties index 17921ca6d1..671e845f78 100644 --- a/core/assets/bundles/bundle_sv.properties +++ b/core/assets/bundles/bundle_sv.properties @@ -2463,6 +2463,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_th.properties b/core/assets/bundles/bundle_th.properties index 821d59197e..2a38910323 100644 --- a/core/assets/bundles/bundle_th.properties +++ b/core/assets/bundles/bundle_th.properties @@ -2499,6 +2499,7 @@ lenum.shootp = ยิงเป้าหมายโดยมีการคำ lenum.config = การกำหนดค่าของสิ่งก่อสร้าง เช่น ไอเท็มของเครื่องคัดแยก lenum.enabled = ว่าบล็อกเปิดใช้งาน/ทำงานอยู่หรือเปล่า laccess.currentammotype = ประเภทของกระสุนไอเท็ม/ของเหลวในปัจจุบันของป้อมปืน +laccess.memorycapacity = Number of cells in a memory block. laccess.color = สีของตัวเปล่งแสง laccess.controller = ผู้ควบคุมยูนิต ถ้าผู้ควบคุมคือตัวประมวลผล จะส่งกลับค่า processor\nนอกนั้น จะส่งกลับค่าตัวยูนิตเอง diff --git a/core/assets/bundles/bundle_tk.properties b/core/assets/bundles/bundle_tk.properties index 78c22df2ca..18a53f975b 100644 --- a/core/assets/bundles/bundle_tk.properties +++ b/core/assets/bundles/bundle_tk.properties @@ -2463,6 +2463,7 @@ lenum.shootp = Shoot at a unit/building with velocity prediction. lenum.config = Building configuration, e.g. sorter item. lenum.enabled = Whether the block is enabled. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Illuminator color. laccess.controller = Unit controller. If processor controlled, returns processor.\nIf in a formation, returns leader.\nOtherwise, returns the unit itself. laccess.dead = Whether a unit/building is dead or no longer valid. diff --git a/core/assets/bundles/bundle_tr.properties b/core/assets/bundles/bundle_tr.properties index 9339489ffe..76ed9243f2 100644 --- a/core/assets/bundles/bundle_tr.properties +++ b/core/assets/bundles/bundle_tr.properties @@ -2482,6 +2482,7 @@ lenum.shootp = Belli bir birim veya binaya ateş et. lenum.config = Bina yapılandırması, örnek: Ayıklayıcı Türü lenum.enabled = Blok aktif mi? laccess.currentammotype = Bir turretin içindeki şuanki mermi/sıvı. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Aydınlatıcı Rengi laccess.controller = Birim Kontrol edici. Eğer işlemci kontrol ediyorsa işlemci döner. \nFormasyon durumundaysa, lider döner.\nDiğer şekilde, birimi kendi döner. diff --git a/core/assets/bundles/bundle_uk_UA.properties b/core/assets/bundles/bundle_uk_UA.properties index fc99be8d95..a82a6ed781 100644 --- a/core/assets/bundles/bundle_uk_UA.properties +++ b/core/assets/bundles/bundle_uk_UA.properties @@ -2509,6 +2509,7 @@ lenum.shootp = Стріляти в одиницю чи будівлю із пе lenum.config = Конфігурація будівлі, як-от в сортувальника. lenum.enabled = Чи блок увімкнено. laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Колір освітлювача. laccess.controller = Керувач одиницями. Якщо процесор керує одиницею, повертає процесор.\nЯкщо у формуванні, повертається лідер.\nІнакше повертає саму одиницю. diff --git a/core/assets/bundles/bundle_vi.properties b/core/assets/bundles/bundle_vi.properties index 7a90b40eea..a318de3b28 100644 --- a/core/assets/bundles/bundle_vi.properties +++ b/core/assets/bundles/bundle_vi.properties @@ -2529,6 +2529,7 @@ lenum.config = Cấu hình công trình, kiểu như vật phẩm của Khối s lenum.enabled = Khối có đang hoạt động. laccess.currentammotype = Đạn vật phẩm/chất lỏng hiện tại của bệ súng. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = Màu đèn chiếu sáng. laccess.controller = Thứ điều khiển đơn vị. Nếu khối xử lý đã điều khiển, trả về khối xử lý.\nNgược lại, trả về chính đơn vị đó. laccess.dead = Đơn vị/công trình đã chết hoặc không còn hợp lệ hay không. diff --git a/core/assets/bundles/bundle_zh_CN.properties b/core/assets/bundles/bundle_zh_CN.properties index 95f40b0df4..d90f87af3c 100644 --- a/core/assets/bundles/bundle_zh_CN.properties +++ b/core/assets/bundles/bundle_zh_CN.properties @@ -2513,6 +2513,7 @@ lenum.shootp = 根据提前量向某个单位或建筑瞄准/射击 lenum.config = 建筑设置,例如分类器所设置的筛选物品种类 lenum.enabled = 建筑是否已启用 laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = 照明器发光的颜色 laccess.controller = 单位的控制方\n如果单位由处理器控制,返回对应的处理器\n如果单位在编队中,返回编队的领队\n其他情况,返回单位自身 diff --git a/core/assets/bundles/bundle_zh_TW.properties b/core/assets/bundles/bundle_zh_TW.properties index 2ae9fdc05e..4bb073068e 100644 --- a/core/assets/bundles/bundle_zh_TW.properties +++ b/core/assets/bundles/bundle_zh_TW.properties @@ -2508,6 +2508,7 @@ lenum.shootp = 對指定單位/建築開火,具自瞄功能 lenum.config = 建築設置,例如分類器篩选的物品種類 lenum.enabled = 確認該建築是否啟用 laccess.currentammotype = Current ammo item/liquid of a turret. +laccess.memorycapacity = Number of cells in a memory block. laccess.color = 照明燈顏色 laccess.controller = 單位的控制者。受處理器控制時回傳處理器。\n在隊形中回傳領導的單位。\n否則回傳單位自己。 diff --git a/core/src/mindustry/logic/LAccess.java b/core/src/mindustry/logic/LAccess.java index 94b57c73ac..146ed91de1 100644 --- a/core/src/mindustry/logic/LAccess.java +++ b/core/src/mindustry/logic/LAccess.java @@ -18,6 +18,7 @@ public enum LAccess{ ammo, ammoCapacity, currentAmmoType, + memoryCapacity, health, maxHealth, heat, diff --git a/core/src/mindustry/world/blocks/logic/MemoryBlock.java b/core/src/mindustry/world/blocks/logic/MemoryBlock.java index 44af66623a..d384e23a42 100644 --- a/core/src/mindustry/world/blocks/logic/MemoryBlock.java +++ b/core/src/mindustry/world/blocks/logic/MemoryBlock.java @@ -2,6 +2,7 @@ package mindustry.world.blocks.logic; import arc.util.io.*; import mindustry.gen.*; +import mindustry.logic.*; import mindustry.world.*; import mindustry.world.meta.*; @@ -55,6 +56,14 @@ public class MemoryBlock extends Block{ return accessible(); } + @Override + public double sense(LAccess sensor){ + return switch(sensor){ + case memoryCapacity -> memoryCapacity; + default -> super.sense(sensor); + }; + } + @Override public void damage(float damage){ if(privileged) return;