From 2df2f70b25096d246e2d5331d451b6d58ea50a8c Mon Sep 17 00:00:00 2001 From: mamoniot Date: Mon, 27 Mar 2023 12:23:48 -0400 Subject: [PATCH 01/24] improved recipe logic --- TODO | 1 + cybersyn/changelog.txt | 2 ++ cybersyn/data-final-fixes.lua | 31 +++++++++++++++++++++++++------ cybersyn/prototypes/tech.lua | 9 +++++---- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index 9f61c75..914136e 100644 --- a/TODO +++ b/TODO @@ -33,3 +33,4 @@ compat: cargo ships editor extensions (test surface separation) train fuel types for refuelers + automatic recipe creation diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index 7366f98..e801eb6 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -3,6 +3,8 @@ Version: 1.2.14 Date: 2023-3-14 Features: - Added opt-in WIP trains, inventory, and station manager gui (highly experimental, use at your own risk) + Changes: + - Improved the recipe derivation logic for the cybernetic combinator, in all modpacks it should now consistently be about as difficult to craft as an arthmetic combinator. Vanilla recipe is unchanged, but several overhaul mods will receive new recipes. Bugfixes: - Provider override thresholds now correctly override the required train capacity as well; fix contributed by shopt - Fixed a rare crash relating to an uninitialized network mask on a new station diff --git a/cybersyn/data-final-fixes.lua b/cybersyn/data-final-fixes.lua index 176c80e..b3cf5dd 100644 --- a/cybersyn/data-final-fixes.lua +++ b/cybersyn/data-final-fixes.lua @@ -1,10 +1,29 @@ +flib = require("__flib__.table") +require('scripts.constants') --Credit to modo-lv for submitting the following code if mods["nullius"] then - -- Place combinator in the same subgroup as the regular train stop - data.raw["recipe"][COMBINATOR_NAME].subgroup = data.raw["train-stop"]["train-stop"].subgroup - data.raw["item"][COMBINATOR_NAME].subgroup = data.raw["item"]["train-stop"].subgroup - -- Nullius makes modded technologies part of its research tree - -- Place combinator in the same place on the research tree as LTN - table.insert(data.raw.technology["nullius-broadcasting-1"].prerequisites, "cybersyn-train-network") + -- Place combinator in the same subgroup as the regular train stop + data.raw["recipe"][COMBINATOR_NAME].subgroup = data.raw["train-stop"]["train-stop"].subgroup + data.raw["item"][COMBINATOR_NAME].subgroup = data.raw["item"]["train-stop"].subgroup + -- Nullius makes modded technologies part of its research tree + -- Place combinator in the same place on the research tree as LTN + table.insert(data.raw.technology["nullius-broadcasting-1"].prerequisites, "cybersyn-train-network") end + +-- Reset the combinator recipe back to arithmetic combinator recipe in case a mod has changed it +local recipe = flib.deep_copy(data.raw["recipe"]["arithmetic-combinator"].ingredients) +for k, _ in pairs(recipe) do + local mult = 2 + for i, _ in pairs(recipe) do + if recipe[k][i] == "copper-cable" then + mult = 4 + end + end + for i, _ in pairs(recipe) do + if type(recipe[k][i]) == "number" then + recipe[k][i] = mult*recipe[k][i] + end + end +end +data.raw["recipe"][COMBINATOR_NAME].ingredients = recipe diff --git a/cybersyn/prototypes/tech.lua b/cybersyn/prototypes/tech.lua index 4e64122..21367ac 100644 --- a/cybersyn/prototypes/tech.lua +++ b/cybersyn/prototypes/tech.lua @@ -1,9 +1,10 @@ --By Mami combinator_recipe = flib.copy_prototype(data.raw["recipe"]["arithmetic-combinator"], COMBINATOR_NAME) -combinator_recipe.ingredients = { - {"copper-cable", 20}, - {"electronic-circuit", 10}, -} +--- Recipe is set in data-fixes-final, but in vanilla it should match below +--combinator_recipe.ingredients = { +-- {"copper-cable", 20}, +-- {"electronic-circuit", 10},aww +--} combinator_recipe.enabled = false combinator_recipe.subgroup = data.raw["recipe"]["train-stop"].subgroup From d843ff120b77e6bad6494577fd335f889a3a1016 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Mon, 27 Mar 2023 12:24:12 -0400 Subject: [PATCH 02/24] minor fix --- cybersyn/data-final-fixes.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/cybersyn/data-final-fixes.lua b/cybersyn/data-final-fixes.lua index b3cf5dd..940be26 100644 --- a/cybersyn/data-final-fixes.lua +++ b/cybersyn/data-final-fixes.lua @@ -18,6 +18,7 @@ for k, _ in pairs(recipe) do for i, _ in pairs(recipe) do if recipe[k][i] == "copper-cable" then mult = 4 + break; end end for i, _ in pairs(recipe) do From 565d03005ad740e867ae36c3624b038c1e6a979a Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 28 Mar 2023 20:20:38 +0100 Subject: [PATCH 03/24] Initial translation to Spanish --- cybersyn/locale/es/base.cfg | 98 ++++++++++++++++++++++++++++++++++ cybersyn/locale/es/manager.cfg | 91 +++++++++++++++++++++++++++++++ 2 files changed, 189 insertions(+) create mode 100644 cybersyn/locale/es/base.cfg create mode 100644 cybersyn/locale/es/manager.cfg diff --git a/cybersyn/locale/es/base.cfg b/cybersyn/locale/es/base.cfg new file mode 100644 index 0000000..5bcb8b8 --- /dev/null +++ b/cybersyn/locale/es/base.cfg @@ -0,0 +1,98 @@ +[mod-setting-name] +cybersyn-enable-planner=Habilitar planificador central +cybersyn-ticks-per-second=Planificador central actualizaciones por minuto +cybersyn-update-rate=Planificador central velocidad de actualización +cybersyn-request-threshold=Umbral de pedido por defecto +cybersyn-priority=Prioridad por defecto +cybersyn-locked-slots=Espacios bloqueados por vagón de carga por defecto +cybersyn-network-flag=Redes ocultas por defecto +cybersyn-fuel-threshold=Umbral de combustible +cybersyn-depot-bypass-enabled=Evitar depósito habilitado +cybersyn-warmup-time=Tiempo de calentamiento de estación (seg) +cybersyn-stuck-train-time=Tren atascado tiempo de espera (seg) +cybersyn-allow-cargo-in-depot=Permitir carga en depositos +cybersyn-invert-sign=Invertir salida del combinador (obsoleto) +cybersyn-manager-enabled=Habilitar la GUI de Cybersyn. +cybersyn-manager-update-rate=Actualizar manager intervalo de tick +cybersyn-manager-result-limit=Máxima cantidad de entidades mostradas en las páginas GUI. + +[mod-setting-description] +cybersyn-enable-planner=Habilitar o deshabilitar el planificador central del algoritmo. Si esta deshabilitado, no se haran envíos de nuevos trenes. +cybersyn-ticks-per-second=Cuantas veces por segundo el planificador central debería actualizar el estado de la red y programar entregas. Este valor se rendondea para arriba hasta un divisor de 60. Configurar esto como 0 frenara todos los envíos. +cybersyn-update-rate=Cuantas estaciones por tick pueden ser sondeadas a la vez, o pueden tener envíos programados a la vez. Un número más alto le permite al planificador central estar más actualizado con el estado actual de la red, pero a costa del rendimiento. +cybersyn-request-threshold=El umbral de pedido por defecto cuando no se le da una señal de umbral de pedido a una estación. Cuando una estación recive un valor negativo que supera el umbral de pedido, se programará una entrega de dicho item entre dos estaciones, siempre y cuando haya una estación con una señal positiva mayor que el umbral de pedido. +cybersyn-priority=La prioridad por defecto cuando no se envía una señal de prioridad a una estación, depósito o reabastecedor de combustible. Estaciones con mayor prioridad, recibiran envíos antes que aquellos con menor prioridad. +cybersyn-locked-slots=La cantidad por defecto de espacios bloquador por vagón de carga, cuando no se le da a la estación una señal de "espacios bloqueados por vagón de carga". Cuando una estación proveedora tiene X espacios bloqueados por vagón de carga, cualquier tren intentando hacer una entrega desde ella, tendra su orden modificada para que cada vagón tenga al menos X espacios libres. Esto es necesario para que las estaciones que proveen múltiples items funcionen correctamente. +cybersyn-network-flag=La cantidad por defecto de sub-redes a las que una estación va a atender, cuando no se le da a la estación una señal. Este número entero es interpretado como bit, para dar 32 posibles sub-redes de las cuales elegir. +cybersyn-fuel-threshold=Que porcentaje del inventario del tren tiene que estar lleno para saltearse el reabastecedor de combustible. Si el valor es 1, los trenes siempre van a ir a ser reabastecidos después de terminar una entrega. +cybersyn-depot-bypass-enabled=Si está marcado, cuando un tren completa la entrega y el reabastecimiento de combustible, puede recibir una nueva orden en vez de volver al depósito. +cybersyn-warmup-time=Cuantos segundos esperará el combinador cibernético, antes de conectarse a la red de Cybersyn. Este es un período de gracia para modificar o corregir el circuito de red antes de que los trenes comienzen a ser despachados hacia la nueva estación. +cybersyn-stuck-train-time=Después de esta cantidad de segundos de ser despachado el tren, una alerta será enviada para informar que el tren probablemente esté atascado y no completó su entrega. El jugador seguramente tenga que arreglar su red para desbloquar al tren. +cybersyn-allow-cargo-in-depot=Si está marcado, se le permitirá a los trenes tener carga en los depósitos. Ninguna alerta será generada, y el tren no será detenido. Adicionalmente, trenes con ordenes de visitar estaciones solicitantes con "Condiciones de inactividad" marcados esperarán por inactividad en vez de carga vacia. Útil para crear sistemas de trenes donde los depósitos se ocupan del exceso de carga. Para jugadores avanzados unicamente. +cybersyn-invert-sign=Cambia el signo de salida de los combinadores cibernéticos para que sean iguales a LTN o a versiones anteriores de Project Cybersyn. +cybersyn-manager-result-limit=Limita el número de entidades iguales (p.ej. estaciones, trenes) para limitar la cantidad de tiempo consumido en actualizaciones cuando la lista es renovada. \n-1 devuelve todos los resultados. + +[item-name] +cybersyn-combinator=Combinador cibernético + +[item-description] +cybersyn-combinator=Colocar al lado de una parada de tren para agregarla a la red de trenes de Cybersyn. Esta parada ahora puede solicitar o proveer items que son reportados a ella por el circuito de red. + +[entity-name] +cybersyn-combinator=Combinador cibernético +cybersyn-combinator-output=Salida del combinador cibernético + +[entity-description] +cybersyn-combinator=Tiene 5 modos diferentes. Solo se necesitan los modos de estación y depósito para empezar. + +[technology-name] +cybersyn-train-network=Red de trenes Cybersyn + +[technology-description] +cybersyn-train-network=Controladores de paradas del tren capaces de coordinar las salidas y entradas de una economía entera. + +[virtual-signal-name] +cybersyn-priority=Prioridad de estación +cybersyn-request-threshold=Umbral de pedido +cybersyn-locked-slots=Espacios bloqueados por vagón de carga + +[cybersyn-messages] +nonempty-train=A train is being held in the depot because it still has cargo Un tren esta siendo retenido en el depósito porque todavía tiene carga +unexpected-train=Un tren volvio inesperadamente al depósito antes de completar su entrega +stuck-train=Un tren está atascado +cannot-path-between-surfaces=Un tren está intentando realizar una entrega entre dos superficies desconectadas. Intente ponerlas en redes separadas +depot-broken=Un tren está perdido porque su depósito fue destruido +refueler-broken=Un tren está perdido porque su reabastecedor de combustible fue destruido +station-broken=Un tren está perdido porque una de sus estaciones del envío esta rota +train-at-incorrect=Un tren está detenido en una estación para la cuál no tenía un envío programado +missing-train=No se pudo encontrar ningún tren en la red correcta para hacer un envío desde __2__ hasta __1__ +no-train-has-capacity=No se pudo encontrar ningún tren con capacidad de carga suficiente para hacer un envío desde __2__ hasta __1__ +no-train-matches-r-layout=No se pudo encontrar ningún tren en la lista de permitidos de __1__ para hacer una entrega +no-train-matches-p-layout=No se pudo encontrar ningún tren en la lista de permitidos de __1__ para hacer una entrega a __1__ + +[cybersyn-gui] +combinator-title=Combinador cibernético +operation=Modo +comb1=Estación +depot=Depósito +refueler=Reabastecedor de combustible +comb2=Control de estación +wagon-manifest=Control de vagón +switch-provide=Solo proveer +switch-request=Solo solicitar +switch-provide-tooltip=Bloquear la estación para que solo provea items a la red. La estación provee y solicita al mismo tiempo por defecto. +switch-request-tooltip=Bloquear la estación para que solo solicite items de la red. La estación provee y solicita al mismo tiempo por defecto. +network=Red +network-tooltip=La señal indica a que red pertenece este combinador. Los trenes serán despachados desde depósitos a estaciones proveedoras y solicitadoras, solo si comparten la misma señal. +allow-list-description=Lista de permitidos automática +allow-list-tooltip=Si está marcado, los trenes de la red serán agregados automáticamente a la lista de permitidos, si cada vagón del tren puede ser cargado o descargado por esta estación. Si no está marcado, la lista de permitidos no será utilizada, y todos los trenes podrán frenar aquí. +is-stack-description=Umbrales de pila +is-stack-tooltip=Si está marcado, todos los umbrales de solicitud para esta estación serán interpretados como una cuenta de pilas de items en vez de una cuenta de total de items. El umbral para líquidos no es afectado. +enable-inactive-description=Condición de inactividad +enable-inactive-tooltip=Si está marcado, un tren en un proveedor deberá esperar por inactividad, incluso si su orden ya fue completada. Esto es util frecuentemente para prevenir que los insertadores queden trabados con items en sus manos. +use-same-depot-description=Requerir mismo depósito +use-same-depot-tooltip=Si está marcado, los trenes de este depósito, siempre deben volver al mismo depósito. Si no está marcado, el tren puede volver a cualquier depósito con el mismo nombre que esta. +depot-bypass-description=Evitar depósito +depot-bypass-tooltip=Si está marcado, los trenes de este depósito no tienen que estar frenados aquí para recibir nuevas ordenes, solo tienen que no tener ordenes activas. El tren volverá igualmente a este depósito si tiene poco combustible y no hay reabastecedores de combustible disponibles. +enable-slot-barring-description=Bloquear espacios sin filtrar +enable-slot-barring-tooltip=Si está marcado, cualquier espacio de un vagón adjacente que no este filtrado será bloqueado para que no pueda ser cargado con ningún item. diff --git a/cybersyn/locale/es/manager.cfg b/cybersyn/locale/es/manager.cfg new file mode 100644 index 0000000..c029594 --- /dev/null +++ b/cybersyn/locale/es/manager.cfg @@ -0,0 +1,91 @@ +[mod-name] +cybersyn=Project Cybersyn + +[controls] +cybersyn-toggle-gui=Alternar Cybersyn Manager + +[cybersyn-gui] +alert-delivery-failed=Entrega fallida +alert-delivery-failed-description=El tren tomo demasiado tiempo en realizar su tarea y fue abandonado por LTN, o fue invalidado. Puedes configurar cuanto tiempo esperará LTN por un tren en los ajustes del mod. \n\nEl envío planificado esta listado en verde. +alert-provider-missing-cargo-description=El tren abandonó el proveedor, antes de recibir todos los items que estaba destinado a cargar. \n\nVerde indica la carga destinada, rojo indica su carga actual. +alert-provider-missing-cargo=Proveedor - carga faltante +alert-provider-unscheduled-cargo-description=El tren abandono su proveedor con carga no programada / no destinada. \n\nVerde indica la carga planificada, rojo indica la carga no programada. +alert-provider-unscheduled-cargo=Proveedor - carga no programada +alert-requester-remaining-cargo-description=No todos los materiales fueron descargados del tren antes de que se fuera de la estación, y volvió al depósito con la carga restante. \n\nLos items restantes estan listados en rojo. +alert-requester-remaining-cargo=Solicitador - remaining cargo +alert-requester-unscheduled-cargo-description=El tren arribó al solicitador con carga no programada / no destinada. \n\nVerde indica la carga planificada, rojo indica la carga no programada. +alert-requester-unscheduled-cargo=Solicitador - carga no programada +alerts=Alertas +all-paren=(Todos) +clear-history=Limpiar historial +composition=Composición +composition-description=La disposición del tren.\nL = Locomotora\nC = Vagón de carga\nF = Vagón de fluidos\nA = Vagón de artillería\n< > = Dirección +control-signals=Señales de control +delete-alert=Eliminar alerta +delete-all-alerts=Eliminar todas las alertas +delivering-to=Entregando a +depot=Depósito +depots=Depósitos +dispatcher-disabled-description=El despachador de LTN esta deshabilitado. No se crearán nuevas entregas. Vuelva a activar el despachador através de los ajustes del mapa, o utilizando la tecla de acceso rápido. +dispatcher-disabled=Despachador de LTN esta deshabilitado! +fetching-from=Buscando desde +finished=Terminado +history=Historial +in-transit=En tránsito +inventory=Inventario +keep-open=Mantener abierto +layout=Disposición del tren +loading-at=Cargando en +name=Nombre +network-name-label=Filtro de la red: +network-id-label=ID de la red: +network-id=ID de la red +no-alerts=[img=warning-white] No hay alertas +no-depots=[img=warning-white] No hay depósitos +no-history=[img=warning-white] No hay historial +no-stations=[img=warning-white] No hay estaciones +not-available=No disponible +no-trains=[img=warning-white] No hay trenes +open-station-gui=Abrir GUI de la estación\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Abrir estación en el mapa\n[font=default-semibold][color=128,206,240]Control:[/color][/font] Abrir Combinador Cibernético de la estación\n[font=default-semibold][color=128,206,240]Alt:[/color][/font] Abrir Combinador Cibernético de la estación de control +open-train-gui=Abrir GUI del tren +parked-at-depot=Estacionado en depósito +parked-at-depot-with-residue=Estacionado en depósito con residuos +provided=Proveido +provided-requested-description=Green = proveido\nRed = solicitado +provided-requested=Proveido / solicitado +refresh-tooltip=Actualizar\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Alternar auto-actualizar +requested=Solicitado +returning-to-depot=Volviendo al depósito +route=Ruta +runtime=Tiempo de ejecución +search-label=Nombre de la estación: +search-item-label=Filtro del item: +shipments-description=Green = Entrante\nBlue = Saliente +shipment=Envío +shipments=Envíos +stations=Estaciones +status-description=[img=flib_indicator_green]1 = estado normal\n[img=flib_indicator_blue]n = Tren controlado por LTN frenado en la parada, n = número de trenes\n[img=flib_indicator_yellow]n = Parada es parte de la entrega programada, n = número de trenes\n[img=flib_indicator_white]1 = Error - no fue inicializado\n[img=flib_indicator_red]1 = Error - cortocircuito\n[img=flib_indicator_red]2 = Error - parada desactivada +status=Señal de la red +surface-label=Superficie: +time=Tiempo +train-id=ID del tren +trains=Trenes +type=Tipo +unloading-at=Descargando en + +[cybersyn-message] +error-cybernetic-combinator-not-found=No se pudo encontrar combinador cibernético para esta estación. +error-station-control-combinator-not-found=No se pudo encontrar el control de estación combinador cibernético para esta estación. +error-station-is-invalid=La estación es inválida, por favor actualice la GUI. +error-train-is-invalid=El tren es inválido, por favor actualice la GUI. +error-cross-surface-camera-invalid=No se puede mover la cámara a una entidad en otra superficie! + +[cybersyn-mod-setting-description] +iterations-per-tick=Reduzca este numero si esta teniendo problemas con el rendimiento. + +[cybersyn-mod-setting-name] +history-length=Longitud del historial +iterations-per-tick=Iteraciones por tick [img=info] + +[shortcut-name] +cybersyn-toggle-gui=Alternar Cybersyn Manager From d7f73080a226c4415bacf8d641d558a07c3de17a Mon Sep 17 00:00:00 2001 From: Monica Moniot Date: Tue, 28 Mar 2023 23:19:02 -0400 Subject: [PATCH 04/24] Revert "Add en locale string and description for 'cybersyn-manager-updates-per-second'" --- cybersyn/locale/en/base.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cybersyn/locale/en/base.cfg b/cybersyn/locale/en/base.cfg index 7d68c87..42d7217 100644 --- a/cybersyn/locale/en/base.cfg +++ b/cybersyn/locale/en/base.cfg @@ -13,7 +13,7 @@ cybersyn-stuck-train-time=Stuck train timeout (sec) cybersyn-allow-cargo-in-depot=Allow cargo in depots cybersyn-invert-sign=Invert combinator output (deprecated) cybersyn-manager-enabled=Enable the Cybersyn GUI. -cybersyn-manager-updates-per-second=Manager refreshes per second +cybersyn-manager-update-rate=Manager refresh tick interval cybersyn-manager-result-limit=Max entities displayed on GUI pages. [mod-setting-description] @@ -30,7 +30,6 @@ cybersyn-warmup-time=How many seconds a cybernetic combinator will wait before c cybersyn-stuck-train-time=After this many seconds from a train's dispatch, an alert will be sent to let you know a train is probably stuck and has not completed its delivery. The player will likely have to debug their network to get the train unstuck. cybersyn-allow-cargo-in-depot=If checked, trains will be allowed to have cargo in depots; no alerts will be generated and the train will not be held. In addition, trains with orders to visit requester stations with "Inactivity condition" checked will wait for inactivity instead of waiting for empty cargo. Useful for creating train systems where depots handle excess cargo. For advanced users only. cybersyn-invert-sign=Flip the sign of the output of cybernetic combinators to be the same as it is in LTN or in earlier versions of Project Cybersyn. -cybersyn-manager-updates-per-second=How many times per second should the Manager GUI update. This value will be rounded up to a divisor of 60. cybersyn-manager-result-limit=Caps the number of matching enitities (e.g. stations, trains) to limit the amount of update time consumed when the list is refreshed.\n-1 means return all results. [item-name] From 9fe93329cd610992eaf80874a431db5fecd8d4e7 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Tue, 28 Mar 2023 23:23:04 -0400 Subject: [PATCH 05/24] updated changelog --- cybersyn/changelog.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index e801eb6..4156c75 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -1,6 +1,6 @@ --------------------------------------------------------------------------------------------------- Version: 1.2.14 -Date: 2023-3-14 +Date: 2023-3-28 Features: - Added opt-in WIP trains, inventory, and station manager gui (highly experimental, use at your own risk) Changes: @@ -10,6 +10,8 @@ Date: 2023-3-14 - Fixed a rare crash relating to an uninitialized network mask on a new station - Fixed a SE space elevator bug that caused incorrect orders when the provider and requester station had the same name - Added an incompatibility error with picker dollies, proper compatibility to come in a later update + Translation: + - lengua española (Spanish language) contributed by Majestuozzo --------------------------------------------------------------------------------------------------- Version: 1.2.13 Date: 2023-2-5 From 7ac4c2f660c2733563eb4c841a1878cef23413b4 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Wed, 29 Mar 2023 14:31:42 -0400 Subject: [PATCH 06/24] Remove LTNManager hard incompatibility flag in info.json --- cybersyn/info.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cybersyn/info.json b/cybersyn/info.json index 9bb2ecc..e1a036f 100644 --- a/cybersyn/info.json +++ b/cybersyn/info.json @@ -11,7 +11,6 @@ "? space-exploration >= 0.6.94", "? miniloader", "? nullius", - "? pypostprocessing", - "! LtnManager" + "? pypostprocessing" ] } From 4ef0d245c84c62d5182d06ad427e85fd4148224b Mon Sep 17 00:00:00 2001 From: mamoniot Date: Wed, 29 Mar 2023 15:19:02 -0400 Subject: [PATCH 07/24] fixed allow list logic --- cybersyn/changelog.txt | 1 + cybersyn/scripts/layout.lua | 262 ++++++++++++++++---------------- cybersyn/scripts/main.lua | 6 +- cybersyn/scripts/migrations.lua | 7 +- 4 files changed, 143 insertions(+), 133 deletions(-) diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index 4156c75..9586626 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -5,6 +5,7 @@ Date: 2023-3-28 - Added opt-in WIP trains, inventory, and station manager gui (highly experimental, use at your own risk) Changes: - Improved the recipe derivation logic for the cybernetic combinator, in all modpacks it should now consistently be about as difficult to craft as an arthmetic combinator. Vanilla recipe is unchanged, but several overhaul mods will receive new recipes. + - The automatic allow list now consistently looks 3 tiles past the first curve rail it finds along a station for inserters or pumps. Previously it would conditionally look only 1 tile past. This should lead to more intuitive allow list behaviour for stations with trains that park slightly on curved rails. Bugfixes: - Provider override thresholds now correctly override the required train capacity as well; fix contributed by shopt - Fixed a rare crash relating to an uninitialized network mask on a new station diff --git a/cybersyn/scripts/layout.lua b/cybersyn/scripts/layout.lua index ee2ceb1..46b82b1 100644 --- a/cybersyn/scripts/layout.lua +++ b/cybersyn/scripts/layout.lua @@ -6,6 +6,10 @@ local ceil = math.ceil local min = math.min local max = math.max local bit_extract = bit32.extract +local defines_front = defines.rail_direction.front +local defines_back = defines.rail_direction.back +local defines_straight = defines.rail_connection_direction.straight +local search_type = {"straight-rail", "curved-rail"} ---@param layout_pattern (0|1|2|3)[] @@ -417,7 +421,7 @@ function unset_wagon_combs(map_data, stop) end end - +local type_filter = {"inserter", "pump", "arithmetic-combinator", "loader-1x1"} ---@param map_data MapData ---@param stop Station|Refueler ---@param is_station_or_refueler boolean @@ -432,10 +436,10 @@ function reset_stop_layout(map_data, stop, is_station_or_refueler, forbidden_ent return end local rail_direction_from_stop - if stop.entity_stop.connected_rail_direction == defines.rail_direction.front then - rail_direction_from_stop = defines.rail_direction.back + if stop.entity_stop.connected_rail_direction == defines_front then + rail_direction_from_stop = defines_back else - rail_direction_from_stop = defines.rail_direction.front + rail_direction_from_stop = defines_front end local stop_direction = stop.entity_stop.direction local surface = stop.entity_stop.surface @@ -446,38 +450,67 @@ function reset_stop_layout(map_data, stop, is_station_or_refueler, forbidden_ent local area_delta local is_ver if stop_direction == defines.direction.north then - search_area = {left_top = {x = middle_x - reach, y = middle_y}, right_bottom = {x = middle_x + reach, y = middle_y + 6}} - area_delta = {x = 0, y = 7} + search_area = {{middle_x - reach, middle_y}, {middle_x + reach, middle_y + 6}} + area_delta = {0, 7} is_ver = true elseif stop_direction == defines.direction.east then - search_area = {left_top = {y = middle_y - reach, x = middle_x - 6}, right_bottom = {y = middle_y + reach, x = middle_x}} - area_delta = {x = -7, y = 0} + search_area = {{middle_x - 6, middle_y - reach}, {middle_x, middle_y + reach}} + area_delta = {-7, 0} is_ver = false elseif stop_direction == defines.direction.south then - search_area = {left_top = {x = middle_x - reach, y = middle_y - 6}, right_bottom = {x = middle_x + reach, y = middle_y}} - area_delta = {x = 0, y = -7} + search_area = {{middle_x - reach, middle_y - 6}, {middle_x + reach, middle_y}} + area_delta = {0, -7} is_ver = true elseif stop_direction == defines.direction.west then - search_area = {left_top = {y = middle_y - reach, x = middle_x}, right_bottom = {y = middle_y + reach, x = middle_x + 6}} - area_delta = {x = 7, y = 0} + search_area = {{middle_x, middle_y - reach}, {middle_x + 6, middle_y + reach}} + area_delta = {7, 0} is_ver = false else assert(false, "cybersyn: invalid stop direction") end - local length = 2 + local length = 1 + ---@type LuaEntity? local pre_rail = stop_rail local layout_pattern = {0} - local type_filter = {"inserter", "pump", "arithmetic-combinator", "loader-1x1"} local wagon_number = 0 for i = 1, 112 do - local rail, rail_direction, rail_connection_direction = pre_rail.get_connected_rail({rail_direction = rail_direction_from_stop, rail_connection_direction = defines.rail_connection_direction.straight}) - if not rail or not rail.valid then - is_break = true - break + if pre_rail then + local rail, rail_direction, rail_connection_direction = pre_rail.get_connected_rail({rail_direction = rail_direction_from_stop, rail_connection_direction = defines_straight}) + if not rail or rail_connection_direction ~= defines_straight then + -- There is a curved rail or break in the tracks at this point + -- We are assuming it's a curved rail, maybe that's a bad assumption + -- We stop searching to expand the allow list after we see a curved rail + -- We are allowing up to 3 tiles of extra allow list usage on a curved rail + length = length + 3 + pre_rail = nil + else + pre_rail = rail + length = length + 2 + end end - pre_rail = rail - length = length + 2 - if length%7 <= 1 then + if length >= 6 or not pre_rail then + if not pre_rail then + if length <= 0 then + -- No point searching nothing + -- Once we hit a curve and process the 3 extra tiles we break here + -- This is the only breakpoint in this for loop + break + end + -- Minimize the search_area to include only the straight section of track and the 3 tiles of the curved rail + local missing_rail_length = 6 - length + if missing_rail_length > 0 then + if stop_direction == defines.direction.north then + search_area[2][2] = search_area[2][2] - missing_rail_length + elseif stop_direction == defines.direction.east then + search_area[1][1] = search_area[1][1] + missing_rail_length + elseif stop_direction == defines.direction.south then + search_area[1][2] = search_area[1][2] + missing_rail_length + else + search_area[2][1] = search_area[2][1] - missing_rail_length + end + end + end + length = length - 7 wagon_number = wagon_number + 1 local supports_cargo = false local supports_fluid = false @@ -486,7 +519,7 @@ function reset_stop_layout(map_data, stop, is_station_or_refueler, forbidden_ent type = type_filter, }) for _, entity in pairs(entities) do - if entity.valid and entity ~= forbidden_entity then + if entity ~= forbidden_entity then if entity.type == "inserter" then if not supports_cargo then local pos = entity.pickup_position @@ -566,10 +599,6 @@ function reset_stop_layout(map_data, stop, is_station_or_refueler, forbidden_ent end search_area = area.move(search_area, area_delta) end - if rail_connection_direction ~= defines.rail_connection_direction.straight then - is_break = true - break - end end stop.layout_pattern = layout_pattern if is_station_or_refueler then @@ -593,47 +622,55 @@ function update_stop_if_auto(map_data, stop, is_station_or_refueler, forbidden_e end end +---@param map_data MapData +---@param entity LuaEntity +---@param forbidden_entity LuaEntity? +---@param force boolean? +local function resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force) + local id = entity.unit_number--[[@as uint]] + local is_station = true + ---@type Station|Refueler + local stop = map_data.stations[id] + if not stop then + stop = map_data.refuelers[id] + is_station = false + end + if stop and stop.entity_stop.valid then + if force then + reset_stop_layout(map_data, stop, is_station, forbidden_entity) + elseif not stop.allows_all_trains then + reset_stop_layout(map_data, stop, is_station, forbidden_entity) + end + end +end ---@param map_data MapData ---@param rail LuaEntity ---@param forbidden_entity LuaEntity? ---@param force boolean? function update_stop_from_rail(map_data, rail, forbidden_entity, force) --NOTE: is this a correct way to figure out the direction? + ---@type LuaEntity? + local rail_front = rail + ---@type LuaEntity? + local rail_back = rail ---@type defines.rail_direction - local rail_direction = defines.rail_direction.back - local entity = rail.get_rail_segment_entity(rail_direction, false) - if not entity then - rail_direction = defines.rail_direction.front - entity = rail.get_rail_segment_entity(rail_direction, false) - end for i = 1, 112 do - if not entity or not entity.valid then - return - end - if entity.name == "train-stop" then - local id = entity.unit_number--[[@as uint]] - local is_station = true - ---@type Station|Refueler - local stop = map_data.stations[id] - if not stop then - stop = map_data.refuelers[id] - is_station = false + if rail_back then + local entity = rail_back.get_rail_segment_entity(defines_back, false) + if entity and entity.name == "train-stop" then + resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force) + return end - if stop and stop.entity_stop.valid then - if force then - reset_stop_layout(map_data, stop, is_station, forbidden_entity) - elseif not stop.allows_all_trains then - reset_stop_layout(map_data, stop, is_station, forbidden_entity) - end + rail_back = rail_back.get_connected_rail({rail_direction = defines_back, rail_connection_direction = defines_straight}) + end + if rail_front then + local entity = rail_front.get_rail_segment_entity(defines_front, false) + if entity and entity.name == "train-stop" then + resolve_update_stop_from_rail(map_data, entity, forbidden_entity, force) + return end - return + rail_front = rail_front.get_connected_rail({rail_direction = defines_front, rail_connection_direction = defines_straight}) end - - rail = rail.get_connected_rail({rail_direction = rail_direction, rail_connection_direction = defines.rail_connection_direction.straight})--[[@as LuaEntity]] - if not rail or not rail.valid then - return - end - entity = rail.get_rail_segment_entity(rail_direction, false) end end @@ -650,20 +687,46 @@ end ---@param forbidden_entity LuaEntity? function update_stop_from_inserter(map_data, inserter, forbidden_entity) local surface = inserter.surface + local pos0 = inserter.position + local pos1 = inserter.pickup_position + local pos2 = inserter.drop_position + local has_found = false - --NOTE: we don't use find_entity solely for miniloader compat local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = inserter.pickup_position, - radius = 1, + type = search_type, + position = pos1, + }) + if rails[1] then + update_stop_from_rail(map_data, rails[1], forbidden_entity) + has_found = true + end + rails = surface.find_entities_filtered({ + type = search_type, + position = pos2, + }) + if rails[1] then + update_stop_from_rail(map_data, rails[1], forbidden_entity) + has_found = true + end + if has_found then + return + end + -- We need to check secondary positions because of weird modded inserters. + -- Mostly because of miniloaders not aligning with the hitbox of a rail by default. + pos1.x = pos1.x + 0.2*(pos1.x - pos0.x) + pos1.y = pos1.y + 0.2*(pos1.y - pos0.y) + pos2.x = pos2.x + 0.2*(pos2.x - pos0.x) + pos2.y = pos2.y + 0.2*(pos2.y - pos0.y) + rails = surface.find_entities_filtered({ + type = search_type, + position = pos1, }) if rails[1] then update_stop_from_rail(map_data, rails[1], forbidden_entity) end rails = surface.find_entities_filtered({ - type = "straight-rail", - position = inserter.drop_position, - radius = 1, + type = search_type, + position = pos2, }) if rails[1] then update_stop_from_rail(map_data, rails[1], forbidden_entity) @@ -681,86 +744,29 @@ function update_stop_from_loader(map_data, loader, forbidden_entity) if loader_type == "input" then --loading train if direction == defines.direction.east then position.x = position.x + 1 -- input and facing east -> move on X axis 1 to the right - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end elseif direction == defines.direction.south then position.y = position.y + 1 -- input and facing south -> move on Y axis down 1 unit - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end elseif direction == defines.direction.west then position.x = position.x - 1 -- input and facing west -> move on X axis 1 to the left - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end elseif direction == defines.direction.north then position.y = position.y - 1 -- input and facing south -> move on Y axis up 1 unit - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end end elseif loader_type == "output" then --unloading train if direction == defines.direction.east then position.x = position.x - 1 -- output and facing east -> move on X axis 1 to the left - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end elseif direction == defines.direction.south then position.y = position.y - 1 -- output and facing south -> move on Y axis up 1 unit - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end elseif direction == defines.direction.west then position.x = position.x + 1 -- output and facing west -> move on X axis 1 to the right - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end elseif direction == defines.direction.north then position.y = position.y + 1 -- output and facing south -> move on Y axis down 1 unit - local rails = surface.find_entities_filtered({ - type = "straight-rail", - position = position, - radius = 1, - }) - if rails[1] then - update_stop_from_rail(map_data, rails[1], forbidden_entity) - end end end -end \ No newline at end of file + local rails = surface.find_entities_filtered({ + type = search_type, + position = position, + }) + if rails[1] then + update_stop_from_rail(map_data, rails[1], forbidden_entity) + end +end diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index f1cc163..e276892 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -624,7 +624,7 @@ local function on_built(event) update_stop_from_loader(global, entity) elseif entity.type == "pump" then update_stop_from_pump(global, entity) - elseif entity.type == "straight-rail" then + elseif entity.type == "straight-rail" or entity.type == "curved-rail" then update_stop_from_rail(global, entity) end end @@ -642,7 +642,7 @@ local function on_broken(event) update_stop_from_loader(global, entity, entity) elseif entity.type == "pump" then update_stop_from_pump(global, entity, entity) - elseif entity.type == "straight-rail" then + elseif entity.type == "straight-rail" or entity.type == "curved-rail" then update_stop_from_rail(global, entity, nil) elseif entity.train then local train_id = entity.train.id @@ -876,6 +876,7 @@ local filter_built = { {filter = "type", type = "inserter"}, {filter = "type", type = "pump"}, {filter = "type", type = "straight-rail"}, + {filter = "type", type = "curved-rail"}, {filter = "type", type = "loader-1x1"}, } local filter_broken = { @@ -884,6 +885,7 @@ local filter_broken = { {filter = "type", type = "inserter"}, {filter = "type", type = "pump"}, {filter = "type", type = "straight-rail"}, + {filter = "type", type = "curved-rail"}, {filter = "type", type = "loader-1x1"}, {filter = "rolling-stock"}, } diff --git a/cybersyn/scripts/migrations.lua b/cybersyn/scripts/migrations.lua index e6292de..5498059 100644 --- a/cybersyn/scripts/migrations.lua +++ b/cybersyn/scripts/migrations.lua @@ -321,13 +321,14 @@ local migrations_table = { ---@param data ConfigurationChangedData function on_config_changed(data) - for i, v in pairs(global.manager.players) do - manager_gui.reset_player(i, v) - end global.tick_state = STATE_INIT global.tick_data = {} flib_migration.on_config_changed(data, migrations_table) + for i, v in pairs(global.manager.players) do + manager_gui.reset_player(i, v) + end + IS_SE_PRESENT = remote.interfaces["space-exploration"] ~= nil if IS_SE_PRESENT and not global.se_tele_old_id then global.se_tele_old_id = {} From ae287209a4469cdd4b81407765fa4246b76aa337 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Wed, 29 Mar 2023 15:29:24 -0400 Subject: [PATCH 08/24] fixed typo --- cybersyn/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index 9586626..413398d 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -5,7 +5,7 @@ Date: 2023-3-28 - Added opt-in WIP trains, inventory, and station manager gui (highly experimental, use at your own risk) Changes: - Improved the recipe derivation logic for the cybernetic combinator, in all modpacks it should now consistently be about as difficult to craft as an arthmetic combinator. Vanilla recipe is unchanged, but several overhaul mods will receive new recipes. - - The automatic allow list now consistently looks 3 tiles past the first curve rail it finds along a station for inserters or pumps. Previously it would conditionally look only 1 tile past. This should lead to more intuitive allow list behaviour for stations with trains that park slightly on curved rails. + - The automatic allow list now consistently looks 3 tiles down the first curved rail it finds along a station for inserters or pumps. Previously it would conditionally look only 1 tile down. This should lead to more intuitive allow list behaviour for stations with trains that park slightly on curved rails. Bugfixes: - Provider override thresholds now correctly override the required train capacity as well; fix contributed by shopt - Fixed a rare crash relating to an uninitialized network mask on a new station From 3fc82e00d1f84b743c993fcb639c94bbb790c236 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Wed, 29 Mar 2023 15:34:18 -0400 Subject: [PATCH 09/24] Remove superfluous conditional added prior to realizing filter can be cleared by right-clicking --- cybersyn/scripts/gui/inventory.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cybersyn/scripts/gui/inventory.lua b/cybersyn/scripts/gui/inventory.lua index 04ef2a6..14b55da 100644 --- a/cybersyn/scripts/gui/inventory.lua +++ b/cybersyn/scripts/gui/inventory.lua @@ -66,13 +66,9 @@ function inventory_tab.build(map_data, player_data) end end if search_network_name then - if search_network_name == (NETWORK_EACH or NETWORK_ANYTHING) then - goto has_match - end if search_network_name ~= station.network_name then goto continue end - ::has_match:: local train_flag = get_network_mask(station, station.network_name) if not bit32.btest(search_network_mask, train_flag) then goto continue From 7b41bf97467417347f164e36a9efd6437c43a754 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Wed, 29 Mar 2023 16:32:51 -0400 Subject: [PATCH 10/24] added debug revision numbers --- cybersyn/info.lua | 6 ++++++ cybersyn/scripts/migrations.lua | 34 +++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 cybersyn/info.lua diff --git a/cybersyn/info.lua b/cybersyn/info.lua new file mode 100644 index 0000000..860f838 --- /dev/null +++ b/cybersyn/info.lua @@ -0,0 +1,6 @@ + +--- The number below is the debug revision number. +--- It is used in migrations.lua to determine if any migrations need to be run for beta testers. +--- It is expected these are only meaningful between releases during beta testing. +--- It should be set to nil for any release version. +return 1 diff --git a/cybersyn/scripts/migrations.lua b/cybersyn/scripts/migrations.lua index 5498059..b14c890 100644 --- a/cybersyn/scripts/migrations.lua +++ b/cybersyn/scripts/migrations.lua @@ -1,6 +1,8 @@ --By Mami local flib_migration = require("__flib__.migration") local manager_gui = require('gui.main') +local debug_revision = require('info') +local check_debug_revision local migrations_table = { @@ -298,7 +300,9 @@ local migrations_table = { ---@type MapData local map_data = global - manager_gui.on_init() + map_data.manager = { + players = {}, + } for i, v in pairs(game.players) do manager_gui.on_player_created({player_index = i}) end @@ -318,7 +322,6 @@ local migrations_table = { end, } --STATUS_R_TO_D = 5 - ---@param data ConfigurationChangedData function on_config_changed(data) global.tick_state = STATE_INIT @@ -333,4 +336,31 @@ function on_config_changed(data) if IS_SE_PRESENT and not global.se_tele_old_id then global.se_tele_old_id = {} end + if global.debug_revision ~= debug_revision then + global.debug_revision = debug_revision + if debug_revision then + on_debug_revision_change() + end + end +end + +---NOTE: this runs before on_config_changed +---It does not have access to game +function on_debug_revision_change() + local map_data = global + + if debug_revision == 1 then + for _, e in pairs(map_data.refuelers) do + e.network_mask = e.network_flag + e.network_flag = nil + end + for _, e in pairs(map_data.stations) do + e.network_mask = e.network_flag + e.network_flag = nil + end + for _, e in pairs(map_data.trains) do + e.network_mask = e.network_flag + e.network_flag = nil + end + end end From 8aca2151bb52b75e1babbd7ca1876fed657fbbbd Mon Sep 17 00:00:00 2001 From: Adam Hellberg Date: Fri, 31 Mar 2023 01:33:37 +0200 Subject: [PATCH 11/24] Fix Nullius overwriting localised names Nullius modifies the names of some base items by writing to their `localised_name` property. This modification is done before the modified tables are copied and used by other mods (possibly depending on load order). As such, if mods use custom names from a `*.cfg` file, they will not be respected unless the mod also writes to the `localised_name` property in Lua code during the data stage. --- cybersyn/prototypes/entity.lua | 3 +++ cybersyn/prototypes/item.lua | 1 + 2 files changed, 4 insertions(+) diff --git a/cybersyn/prototypes/entity.lua b/cybersyn/prototypes/entity.lua index 7f597ad..92fc203 100644 --- a/cybersyn/prototypes/entity.lua +++ b/cybersyn/prototypes/entity.lua @@ -13,6 +13,9 @@ combinator_entity.radius_visualisation_specification = { } combinator_entity.active_energy_usage = "10KW" +if mods["nullius"] then + combinator_entity.localised_name = { "entity-name.cybersyn-combinator" } +end local COMBINATOR_SPRITE = "__cybersyn__/graphics/combinator/cybernetic-combinator.png" local COMBINATOR_HR_SPRITE = "__cybersyn__/graphics/combinator/hr-cybernetic-combinator.png" diff --git a/cybersyn/prototypes/item.lua b/cybersyn/prototypes/item.lua index a14d55a..7ed59e9 100644 --- a/cybersyn/prototypes/item.lua +++ b/cybersyn/prototypes/item.lua @@ -7,6 +7,7 @@ combinator_item.subgroup = data.raw["item"]["train-stop"].subgroup combinator_item.order = data.raw["item"]["train-stop"].order.."-b" combinator_item.place_result = COMBINATOR_NAME if mods["nullius"] then + combinator_item.localised_name = { "item-name.cybersyn-combinator" } -- Enable item in Nullius and place next to the regular train stop combinator_item.order = "nullius-eca" end From 03e2a2ba73b1149a124cc91d43cd717594f88b53 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:44:10 -0400 Subject: [PATCH 12/24] Fix clobbering of train network masks when debug revision runs after migration has already run --- cybersyn/scripts/migrations.lua | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/cybersyn/scripts/migrations.lua b/cybersyn/scripts/migrations.lua index b14c890..fe0786b 100644 --- a/cybersyn/scripts/migrations.lua +++ b/cybersyn/scripts/migrations.lua @@ -346,21 +346,28 @@ end ---NOTE: this runs before on_config_changed ---It does not have access to game +---NOTE 2: Everything in this section must be idempotent function on_debug_revision_change() local map_data = global if debug_revision == 1 then for _, e in pairs(map_data.refuelers) do - e.network_mask = e.network_flag - e.network_flag = nil + if e.network_flag ~= nil then + e.network_mask = e.network_flag + e.network_flag = nil + end end for _, e in pairs(map_data.stations) do - e.network_mask = e.network_flag - e.network_flag = nil + if e.network_flag ~= nil then + e.network_mask = e.network_flag + e.network_flag = nil + end end for _, e in pairs(map_data.trains) do - e.network_mask = e.network_flag - e.network_flag = nil + if e.network_flag ~= nil then + e.network_mask = e.network_flag + e.network_flag = nil + end end end end From 7c61dcff180200690717e1ba799b37fe095178e6 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:16:24 -0400 Subject: [PATCH 13/24] Bind the on_gui_closed event for manager_window --- cybersyn/prototypes/gui-style.lua | 8 ++++++++ cybersyn/scripts/gui/main.lua | 2 +- cybersyn/scripts/main.lua | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cybersyn/prototypes/gui-style.lua b/cybersyn/prototypes/gui-style.lua index b579675..5d75dfe 100644 --- a/cybersyn/prototypes/gui-style.lua +++ b/cybersyn/prototypes/gui-style.lua @@ -370,6 +370,14 @@ if settings.startup["cybersyn-manager-enabled"].value then key_sequence = "CONTROL + T", action = "lua", }, + { + type = "custom-input", + name = "cybersyn-manager-confirm-gui", + key_sequence = "", + action = "lua", + linked_game_control = "confirm-gui" + }, + -- TODO: bind this input to focusing on the station_name box --{ -- type = "custom-input", -- name = "ltnm-linked-focus-search", diff --git a/cybersyn/scripts/gui/main.lua b/cybersyn/scripts/gui/main.lua index 76305de..ae7d033 100644 --- a/cybersyn/scripts/gui/main.lua +++ b/cybersyn/scripts/gui/main.lua @@ -47,7 +47,7 @@ end local manager_gui = {} function manager_gui.on_lua_shortcut(e) - if e.prototype_name == "cybersyn-toggle-gui" or e.input_name == "cybersyn-toggle-gui" then + if e.prototype_name == "cybersyn-toggle-gui" or e.input_name == "cybersyn-toggle-gui" or e.element.name == "manager_window" then manager.wrapper(e, manager.handle.manager_toggle) end end diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index e276892..db631c7 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -955,6 +955,7 @@ local function main() script.on_event(defines.events.on_player_removed, manager.on_player_removed) script.on_event(defines.events.on_player_created, manager.on_player_created) script.on_event(defines.events.on_lua_shortcut, manager.on_lua_shortcut) + script.on_event(defines.events.on_gui_closed, manager.on_lua_shortcut) script.on_event("cybersyn-toggle-gui", manager.on_lua_shortcut) end From feeb31cc332e6b6cb0a74e28eefdf4ac836e6609 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:19:57 -0400 Subject: [PATCH 14/24] Revert unnecessary change --- cybersyn/prototypes/gui-style.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/cybersyn/prototypes/gui-style.lua b/cybersyn/prototypes/gui-style.lua index 5d75dfe..b579675 100644 --- a/cybersyn/prototypes/gui-style.lua +++ b/cybersyn/prototypes/gui-style.lua @@ -370,14 +370,6 @@ if settings.startup["cybersyn-manager-enabled"].value then key_sequence = "CONTROL + T", action = "lua", }, - { - type = "custom-input", - name = "cybersyn-manager-confirm-gui", - key_sequence = "", - action = "lua", - linked_game_control = "confirm-gui" - }, - -- TODO: bind this input to focusing on the station_name box --{ -- type = "custom-input", -- name = "ltnm-linked-focus-search", From 704acf38506fafdb75da0492ebf051b275a1f09f Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:53:23 -0400 Subject: [PATCH 15/24] Add fallback value in GUI sprite button tooltips for entity prototypes --- cybersyn/scripts/gui/inventory.lua | 6 +++--- cybersyn/scripts/gui/util.lua | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cybersyn/scripts/gui/inventory.lua b/cybersyn/scripts/gui/inventory.lua index 14b55da..20405d9 100644 --- a/cybersyn/scripts/gui/inventory.lua +++ b/cybersyn/scripts/gui/inventory.lua @@ -174,7 +174,7 @@ function inventory_tab.build(map_data, player_data) tooltip = { "", img_path, " [font=default-semibold]", - { item_string }, + item_string, "[/font]\n"..format.number(count), }, } @@ -198,7 +198,7 @@ function inventory_tab.build(map_data, player_data) tooltip = { "", img_path, " [font=default-semibold]", - { item_string }, + item_string, "[/font]\n"..format.number(count), }, } @@ -222,7 +222,7 @@ function inventory_tab.build(map_data, player_data) tooltip = { "", img_path, " [font=default-semibold]", - { item_string }, + item_string, "[/font]\n"..format.number(count), }, } diff --git a/cybersyn/scripts/gui/util.lua b/cybersyn/scripts/gui/util.lua index 6d2bbd8..dd7c7f6 100644 --- a/cybersyn/scripts/gui/util.lua +++ b/cybersyn/scripts/gui/util.lua @@ -35,23 +35,23 @@ end --- Builds a valid sprite path or returns nil --- @param item string ---- @return string, string, string +--- @return string, string, LocalizedString function util.generate_item_references(item) local sprite = nil local image_path = "" - local item_name = "" + local item_name if game.is_valid_sprite_path("item/" .. item) then sprite = "item/" .. item image_path = "[img=item." .. item .. "]" - item_name = "item-name." .. item + item_name = {"?", { "item-name." .. item }, { "entity-name." .. item }, "LocalizedString failure: " .. item } elseif game.is_valid_sprite_path("fluid/" .. item) then sprite = "fluid/" .. item image_path = "[img=fluid." .. item .. "]" - item_name = "fluid-name." .. item + item_name = {"?", { "fluid-name." .. item }, "LocalizedString failure: " .. item } elseif game.is_valid_sprite_path("virtual-signal/" .. item) then sprite = "virtual-signal/" .. item image_path = "[img=virtual-signal." .. item .. "]" - item_name = "virtual-signal." .. item + item_name = {"?", { "virtual-signal." .. item }, "LocalizedString failure: " .. item } end return sprite, image_path, item_name end @@ -78,8 +78,8 @@ function util.slot_table_build_from_manifest(manifest, color) number = count, tooltip = { "", - img_path, - { item_string }, + img_path, + item_string, "\n"..format.number(count), }, } @@ -121,7 +121,7 @@ function util.slot_table_build_from_station(station) tooltip = { "", img_path, - { item_string }, + item_string, "\n"..format.number(count), }, number = count @@ -158,7 +158,7 @@ function util.slot_table_build_from_deliveries(station) tooltip = { "", img_path, - { item_string }, + item_string, "\n"..format.number(count), }, number = count From 31ce9d598eb5e049fbc9508b1f4db7f85b2166d0 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Tue, 4 Apr 2023 12:09:16 -0400 Subject: [PATCH 16/24] Fix edge case where manager script.on_nth_tick could clobber main script.on_nth_tick --- cybersyn/scripts/main.lua | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/cybersyn/scripts/main.lua b/cybersyn/scripts/main.lua index e276892..85a27ab 100644 --- a/cybersyn/scripts/main.lua +++ b/cybersyn/scripts/main.lua @@ -847,17 +847,26 @@ local function grab_all_settings() end local function register_tick() script.on_nth_tick(nil) - if mod_settings.tps > DELTA then - local nth_tick_main = ceil(60/mod_settings.tps)--[[@as uint]] - script.on_nth_tick(nth_tick_main, function() + --edge case catch to register both main and manager tick if they're scheduled to run on the same ticks + if mod_settings.manager_enabled and mod_settings.manager_ups == mod_settings.tps and mod_settings.tps > DELTA then + local nth_tick = ceil(60/mod_settings.tps) + script.on_nth_tick(nth_tick, function() tick(global, mod_settings) - end) - end - if mod_settings.manager_enabled and mod_settings.manager_ups > DELTA then - local nth_tick_manager = ceil(60/mod_settings.manager_ups)--[[@as uint]] - script.on_nth_tick(nth_tick_manager, function() manager.tick(global) end) + else + if mod_settings.tps > DELTA then + local nth_tick_main = ceil(60/mod_settings.tps)--[[@as uint]] + script.on_nth_tick(nth_tick_main, function() + tick(global, mod_settings) + end) + end + if mod_settings.manager_enabled and mod_settings.manager_ups > DELTA then + local nth_tick_manager = ceil(60/mod_settings.manager_ups)--[[@as uint]] + script.on_nth_tick(nth_tick_manager, function() + manager.tick(global) + end) + end end end local function on_settings_changed(event) From 096d515df229cedc1b93c24a1ceb59a1e1f1d88a Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Tue, 4 Apr 2023 14:00:15 -0400 Subject: [PATCH 17/24] Cleaned up unused LTN Manager strings, added new string templates --- cybersyn/locale/de/base.cfg | 4 +++ cybersyn/locale/de/manager.cfg | 58 +++++++++---------------------- cybersyn/locale/en/manager.cfg | 44 +++-------------------- cybersyn/locale/es/manager.cfg | 44 ++++------------------- cybersyn/locale/ru/base.cfg | 4 +++ cybersyn/locale/ru/manager.cfg | 53 ++++++++++++++++++++++++++++ cybersyn/locale/zh-CN/base.cfg | 4 +++ cybersyn/locale/zh-CN/manager.cfg | 54 +++++++--------------------- 8 files changed, 105 insertions(+), 160 deletions(-) create mode 100644 cybersyn/locale/ru/manager.cfg diff --git a/cybersyn/locale/de/base.cfg b/cybersyn/locale/de/base.cfg index bd74207..e583157 100644 --- a/cybersyn/locale/de/base.cfg +++ b/cybersyn/locale/de/base.cfg @@ -12,6 +12,9 @@ cybersyn-warmup-time=Aufwärmzeit für die Station (sec) cybersyn-stuck-train-time=Zeitüberschreitung bei festgefahrenem Zug in Sekunden cybersyn-allow-cargo-in-depot=Erlaube Züge mit Fracht in Depots cybersyn-invert-sign=Invertieren der Kombinatorausgabe (veraltet) +#cybersyn-manager-enabled= +#cybersyn-manager-update-rate= +#cybersyn-manager-result-limit= [mod-setting-description] cybersyn-enable-planner=Aktivieren oder deaktivieren des zentralen Planungsalgorithmus. Wenn er deaktiviert ist, werden keine neuen Züge abgefertigt. @@ -27,6 +30,7 @@ cybersyn-warmup-time=Wie viele Sekunden ein kybernetischer Kombinator wartet, be cybersyn-stuck-train-time=So viele Sekunden nach der Abfertigung eines Zuges wird eine Warnung gesendet, um darauf hinzuweisen, dass der Zug wahrscheinlich stecken geblieben ist und seine Lieferung nicht abgeschlossen hat. Der Spieler muss dann wahrscheinlich sein Netzwerk debuggen, um den Zug wieder freizubekommen. cybersyn-allow-cargo-in-depot=Wenn ausgewählt, dürfen Züge Fracht in Depots haben; es werden keine Warnungen erzeugt und der Zug wird nicht aufgehalten. Außerdem werden Züge mit Aufträgen zum Besuch von Anforderunngsstationen mit aktivierter "Inaktivitätsbedingung" auf Inaktivität warten, anstatt auf leere Fracht zu warten. Nützlich für die Erstellung von Zugsystemen, bei denen Depots überschüssige Fracht abfertigen. Nur für fortgeschrittene Benutzer. cybersyn-invert-sign=Ändern Sie das Vorzeichen der Ausgabe von kybernetischen Kombinatoren, so dass es dasselbe ist wie in LTN oder in früheren Versionen von Project Cybersyn. +#cybersyn-manager-result-limit= [item-name] cybersyn-combinator=Kybernetischer Kombinator diff --git a/cybersyn/locale/de/manager.cfg b/cybersyn/locale/de/manager.cfg index b74a739..3c5d507 100644 --- a/cybersyn/locale/de/manager.cfg +++ b/cybersyn/locale/de/manager.cfg @@ -1,77 +1,51 @@ +[mod-name] +cybersyn=Project Cybersyn + [controls] cybersyn-toggle-gui=LTN-Manager umschalten [cybersyn-gui] -alert-delivery-failed=Lieferung fehlgeschlagen -alert-delivery-failed-description=Der Zug hat zu lange gebraucht, um seine Aufgabe zu erfüllen, und wurde von LTN aufgegeben, oder der Zug wurde aus anderen Gründen für ungültig erklärt. Sie können in den Mod-Einstellungen konfigurieren, wie lange LTN auf einen Zug wartet.\n\nDie geplante Lieferung wird in Grün aufgelistet. -alert-provider-missing-cargo-description=Nur ein Teil der vorgesehenen Fracht wurde verladen, bevor der Zug die Anbieterstation verließ.\n\nGrün kennzeichnet die vorgesehene Fracht, rot die tatsächliche Fracht. -alert-provider-missing-cargo=Anbieter - fehlende Fracht -alert-provider-unscheduled-cargo-description=Der Zug hat den Anbieter mit außerplanmäßiger/unbeabsichtigter Fracht verlassen.\n\nGrün zeigt die geplante Ladung an, rot die außerplanmäßige Ladung. -alert-provider-unscheduled-cargo=Anbieter - außerplanmäßige Fracht -alert-requester-remaining-cargo-description=Es wurden nicht alle Gegenstände aus dem Zug entladen, bevor er die Station verließ, und er ist mit der Restladung in sein Depot zurückgekehrt.\n\nDie Restposten sind in rot aufgeführt. -alert-requester-remaining-cargo=Anfrage - Restladung -alert-requester-unscheduled-cargo-description=Der Zug ist beim Anforderer mit außerplanmäßiger/unbeabsichtigter Fracht angekommen.\n\nGrün zeigt die geplante Ladung an, rot die außerplanmäßige Ladung. -alert-requester-unscheduled-cargo=Anforderer - außerplanmäßige Fracht alerts=Warnungen all-paren=(Alle) -clear-history=Verlauf löschen -composition=Zusammensetzung -composition-description=Layout des Zuges.\nL = Lokomotive\nC = Güterwagen\nF = Flüssigkeitswagen\nA = Artilleriewagen\n< > = Fahrtrichtung control-signals=Kontrollsignale -delete-alert=Warnung löschen -delete-all-alerts=Alle Warnungen löschen -delivering-to=Belieferung an -depot=Depot -depots=Depots -dispatcher-disabled-description=Der LTN-Dispatcher ist deaktiviert; es werden keine neuen Lieferungen erstellt. Aktivieren Sie den Dispatcher wieder über die Karteneinstellungen oder über das Tastaturkürzel. -dispatcher-disabled=LTN-Disponent ist deaktiviert! -fetching-from=Abrufen aus -finished=Abgeschlossen -history=Verlauf +;history=Verlauf in-transit=unterwegs inventory=Inventar -keep-open=Offen halten -loading-at=Laden bei +layout= name=Name +network-name-label= network-id-label=Netzwerk ID: network-id=Netzwerk ID no-alerts=[img=warning-white] Keine Warnungen -no-depots=[img=warning-white] Keine Depots -no-history=[img=warning-white] Kein Verlauf +;no-history=[img=warning-white] Kein Verlauf no-stations=[img=warning-white] Keine Stationen -not-available=Nicht verfügbar +;not-available=Nicht verfügbar no-trains=[img=warning-white] Keine Züge -open-ltn-combinator-gui=[font=default-semibold][color=128,206,240]Control:[/color][/font] LTN Kombinator GUI öffnen open-station-gui=Open station GUI\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Station auf der Karte öffnen open-train-gui=Zug-GUI öffnen -parked-at-depot=Im Depot geparkt -parked-at-depot-with-residue=Geparkt im Depot mit Restladung provided=angeboten -provided-requested-description=Green = provided\nRed = angefordert +;provided-requested-description=Green = provided\nRed = angefordert provided-requested=angeboten / angefordert -refresh-tooltip=Refresh\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Automatisches Aktualisieren einschalten +;refresh-tooltip=Refresh\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Automatisches Aktualisieren einschalten requested=angefordert -returning-to-depot=Rückkehr zum Depot -route=Route -runtime=Laufzeit search-label=Suche: -shipments-description=Green = Eingehend\nBlue = Ausgehend +#search-item-label= +;shipments-description=Green = Eingehend\nBlue = Ausgehend shipment=Lieferung shipments=Lieferungen stations=Stationen -status-description=[img=flib_indicator_green]1 = Normaler Status\n[img=flib_indicator_blue]n = LTN kontrollierter Zug parkt beim Halt, n = Anzahl der Züge\n[img=flib_indicator_yellow]n = Halt ist Teil einer geplanten Lieferung, n = Anzahl der Züge\n[img=flib_indicator_white]1 = Fehler - nicht initialisiert\n[img=flib_indicator_red]1 = Fehler - Kurzschluss\n[img=flib_indicator_red]2 = Fehler - Halt deaktiviert -status=Status +#status=Status surface-label=Overfläche: time=Zeit train-id=Zug ID trains=Züge -type=Typ -unloading-at=Entladung bei [cybersyn-message] -error-ltn-combinator-not-found=Konnte keinen LTN Kombinator für diese Station finden. +#error-cybernetic-combinator-not-found= +#error-station-control-combinator-not-found= error-station-is-invalid=Station ist ungültig, bitte aktualisiere die GUI error-train-is-invalid=Zug ist ungültig, bitte aktualisiere die Gui +#error-cross-surface-camera-invalid= [cybersyn-mod-setting-description] iterations-per-tick=Verringern Sie diese Zahl, wenn Sie Probleme mit der Leistung haben. diff --git a/cybersyn/locale/en/manager.cfg b/cybersyn/locale/en/manager.cfg index c2ce90d..d4e8eb3 100644 --- a/cybersyn/locale/en/manager.cfg +++ b/cybersyn/locale/en/manager.cfg @@ -5,73 +5,39 @@ cybersyn=Project Cybersyn cybersyn-toggle-gui=Toggle Cybersyn Manager [cybersyn-gui] -alert-delivery-failed=Delivery failed -alert-delivery-failed-description=The train took too long to perform its task and was abandoned by LTN, or the train was otherwise invalidated. You can configure how long LTN will wait for a train in the mod settings.\n\nThe planned shipment is listed in green. -alert-provider-missing-cargo-description=Not all of the intended cargo was loaded before the train left the provider.\n\nGreen indicates the intended shipment, red indicates the actual shipment. -alert-provider-missing-cargo=Provider - missing cargo -alert-provider-unscheduled-cargo-description=The train left the provider with unscheduled / unintended cargo.\n\nGreen indicates the planned shipment, red indicates the unscheduled load. -alert-provider-unscheduled-cargo=Provider - unscheduled cargo -alert-requester-remaining-cargo-description=Not all materials were unloaded from the train before it left the station, and it has returned to its depot with the leftover cargo.\n\nThe leftover items are listed in red. -alert-requester-remaining-cargo=Requester - remaining cargo -alert-requester-unscheduled-cargo-description=The train arrived at the requester with unscheduled / unintended cargo.\n\nGreen indicates the planned shipment, red indicates the unscheduled load. -alert-requester-unscheduled-cargo=Requester - unscheduled cargo alerts=Alerts all-paren=(All) -clear-history=Clear history -composition=Composition -composition-description=The train's layout.\nL = Locomotive\nC = Cargo wagon\nF = Fluid wagon\nA = Artillery wagon\n< > = Direction control-signals=Control signals -delete-alert=Delete alert -delete-all-alerts=Delete all alerts -delivering-to=Delivering to -depot=Depot -depots=Depots -dispatcher-disabled-description=The LTN dispatcher is disabled; no new deliveries will be created. Re-enable the dispatcher via the map settings or by using the hotkey. -dispatcher-disabled=LTN dispatcher is disabled! -fetching-from=Fetching from -finished=Finished -history=History +;history=History in-transit=In transit inventory=Inventory -keep-open=Keep open layout=Train Layout -loading-at=Loading at name=Name network-name-label=Network Filter: network-id-label=Network ID: network-id=Network ID no-alerts=[img=warning-white] No alerts -no-depots=[img=warning-white] No depots -no-history=[img=warning-white] No history +;no-history=[img=warning-white] No history no-stations=[img=warning-white] No stations -not-available=Not available +;not-available=Not available no-trains=[img=warning-white] No trains open-station-gui=Open station GUI\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Open station on map\n[font=default-semibold][color=128,206,240]Control:[/color][/font] Open Station Cybernetic Combinator\n[font=default-semibold][color=128,206,240]Alt:[/color][/font] Open Station Control Cybernetic Combinator open-train-gui=Open train GUI -parked-at-depot=Parked at depot -parked-at-depot-with-residue=Parked at depot with residue provided=Provided -provided-requested-description=Green = provided\nRed = requested +;provided-requested-description=Green = provided\nRed = requested provided-requested=Provided / requested -refresh-tooltip=Refresh\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Toggle auto-refresh +;refresh-tooltip=Refresh\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Toggle auto-refresh requested=Requested -returning-to-depot=Returning to depot -route=Route -runtime=Runtime search-label=Station Name: search-item-label=Item Filter: -shipments-description=Green = Inbound\nBlue = Outbound shipment=Shipment shipments=Shipments stations=Stations -status-description=[img=flib_indicator_green]1 = normal status\n[img=flib_indicator_blue]n = LTN Controlled Train parked at stop, n = number of trains\n[img=flib_indicator_yellow]n = Stop is part of a scheduled delivery, n = number of trains\n[img=flib_indicator_white]1 = Error - not initialized\n[img=flib_indicator_red]1 = Error - short circuit\n[img=flib_indicator_red]2 = Error - deactivated stop status=Network Signal surface-label=Surface: time=Time train-id=Train ID trains=Trains -type=Type -unloading-at=Unloading at [cybersyn-message] error-cybernetic-combinator-not-found=Could not find a cybernetic combinator for this station. diff --git a/cybersyn/locale/es/manager.cfg b/cybersyn/locale/es/manager.cfg index c029594..57e9edc 100644 --- a/cybersyn/locale/es/manager.cfg +++ b/cybersyn/locale/es/manager.cfg @@ -5,73 +5,41 @@ cybersyn=Project Cybersyn cybersyn-toggle-gui=Alternar Cybersyn Manager [cybersyn-gui] -alert-delivery-failed=Entrega fallida -alert-delivery-failed-description=El tren tomo demasiado tiempo en realizar su tarea y fue abandonado por LTN, o fue invalidado. Puedes configurar cuanto tiempo esperará LTN por un tren en los ajustes del mod. \n\nEl envío planificado esta listado en verde. -alert-provider-missing-cargo-description=El tren abandonó el proveedor, antes de recibir todos los items que estaba destinado a cargar. \n\nVerde indica la carga destinada, rojo indica su carga actual. -alert-provider-missing-cargo=Proveedor - carga faltante -alert-provider-unscheduled-cargo-description=El tren abandono su proveedor con carga no programada / no destinada. \n\nVerde indica la carga planificada, rojo indica la carga no programada. -alert-provider-unscheduled-cargo=Proveedor - carga no programada -alert-requester-remaining-cargo-description=No todos los materiales fueron descargados del tren antes de que se fuera de la estación, y volvió al depósito con la carga restante. \n\nLos items restantes estan listados en rojo. -alert-requester-remaining-cargo=Solicitador - remaining cargo -alert-requester-unscheduled-cargo-description=El tren arribó al solicitador con carga no programada / no destinada. \n\nVerde indica la carga planificada, rojo indica la carga no programada. -alert-requester-unscheduled-cargo=Solicitador - carga no programada alerts=Alertas all-paren=(Todos) clear-history=Limpiar historial -composition=Composición -composition-description=La disposición del tren.\nL = Locomotora\nC = Vagón de carga\nF = Vagón de fluidos\nA = Vagón de artillería\n< > = Dirección control-signals=Señales de control -delete-alert=Eliminar alerta -delete-all-alerts=Eliminar todas las alertas -delivering-to=Entregando a -depot=Depósito -depots=Depósitos -dispatcher-disabled-description=El despachador de LTN esta deshabilitado. No se crearán nuevas entregas. Vuelva a activar el despachador através de los ajustes del mapa, o utilizando la tecla de acceso rápido. -dispatcher-disabled=Despachador de LTN esta deshabilitado! -fetching-from=Buscando desde -finished=Terminado -history=Historial +;history=Historial in-transit=En tránsito inventory=Inventario -keep-open=Mantener abierto layout=Disposición del tren -loading-at=Cargando en name=Nombre network-name-label=Filtro de la red: network-id-label=ID de la red: network-id=ID de la red no-alerts=[img=warning-white] No hay alertas -no-depots=[img=warning-white] No hay depósitos -no-history=[img=warning-white] No hay historial +;no-history=[img=warning-white] No hay historial no-stations=[img=warning-white] No hay estaciones -not-available=No disponible +;not-available=No disponible no-trains=[img=warning-white] No hay trenes open-station-gui=Abrir GUI de la estación\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Abrir estación en el mapa\n[font=default-semibold][color=128,206,240]Control:[/color][/font] Abrir Combinador Cibernético de la estación\n[font=default-semibold][color=128,206,240]Alt:[/color][/font] Abrir Combinador Cibernético de la estación de control open-train-gui=Abrir GUI del tren -parked-at-depot=Estacionado en depósito -parked-at-depot-with-residue=Estacionado en depósito con residuos provided=Proveido -provided-requested-description=Green = proveido\nRed = solicitado +;provided-requested-description=Green = proveido\nRed = solicitado provided-requested=Proveido / solicitado -refresh-tooltip=Actualizar\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Alternar auto-actualizar +;refresh-tooltip=Actualizar\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Alternar auto-actualizar requested=Solicitado -returning-to-depot=Volviendo al depósito -route=Ruta -runtime=Tiempo de ejecución search-label=Nombre de la estación: search-item-label=Filtro del item: -shipments-description=Green = Entrante\nBlue = Saliente +;shipments-description=Green = Entrante\nBlue = Saliente shipment=Envío shipments=Envíos stations=Estaciones -status-description=[img=flib_indicator_green]1 = estado normal\n[img=flib_indicator_blue]n = Tren controlado por LTN frenado en la parada, n = número de trenes\n[img=flib_indicator_yellow]n = Parada es parte de la entrega programada, n = número de trenes\n[img=flib_indicator_white]1 = Error - no fue inicializado\n[img=flib_indicator_red]1 = Error - cortocircuito\n[img=flib_indicator_red]2 = Error - parada desactivada status=Señal de la red surface-label=Superficie: time=Tiempo train-id=ID del tren trains=Trenes -type=Tipo -unloading-at=Descargando en [cybersyn-message] error-cybernetic-combinator-not-found=No se pudo encontrar combinador cibernético para esta estación. diff --git a/cybersyn/locale/ru/base.cfg b/cybersyn/locale/ru/base.cfg index 3718c2c..5b15be8 100644 --- a/cybersyn/locale/ru/base.cfg +++ b/cybersyn/locale/ru/base.cfg @@ -12,6 +12,9 @@ cybersyn-warmup-time=Время "прогрева" станции (сек) cybersyn-stuck-train-time=Таймаут застревания поезда (сек) cybersyn-allow-cargo-in-depot=Разрешить поезда с грузом в депо cybersyn-invert-sign=Инвертировать вывод комбинатора (устаревший параметр) +#cybersyn-manager-enabled= +#cybersyn-manager-update-rate= +#cybersyn-manager-result-limit= [mod-setting-description] cybersyn-enable-planner=Включает или отключает алгоритм централизованного планирования. Если этот параметр отключен, новые поезда отправляться не будут. @@ -27,6 +30,7 @@ cybersyn-warmup-time=Сколько секунд кибернетический cybersyn-stuck-train-time=По истечении этого количества секунд с момента отправки поезда будет отправлено оповещение, сообщающее вам, что поезд, вероятно, застрял и не завершил свою доставку. Игроку, скорее всего, придется отлаживать свою сеть, чтобы освободить поезд. cybersyn-allow-cargo-in-depot=Если этот параметр включен, поездам будет разрешено иметь груз во время стоянки в депо; никаких предупреждений генерироваться не будет, и поезд не будет приостановлен. Кроме того, поезда при посещении станций снабжения с включенной настройкой "Условие бездействия" будут ожидать бездействия вместо ожидания полной разгрузки. Полезно для создания железнодорожных систем, в которых депо обрабатывают избыточный груз. Только для продвинутых пользователей. cybersyn-invert-sign=Изменяет знак сигналов вывода кибернетического комбинатора так, чтобы он был таким же, как в LTN или в более ранних версиях Project Cybersyn. +#cybersyn-manager-result-limit= [item-name] cybersyn-combinator=Кибернетический комбинатор diff --git a/cybersyn/locale/ru/manager.cfg b/cybersyn/locale/ru/manager.cfg new file mode 100644 index 0000000..6c5b46b --- /dev/null +++ b/cybersyn/locale/ru/manager.cfg @@ -0,0 +1,53 @@ +[mod-name] +#cybersyn=Project Cybersyn + +[controls] +#cybersyn-toggle-gui= + +[cybersyn-gui] +#alerts= +#all-paren= +#control-signals= +;history= +#in-transit= +#inventory= +#layout= +#name= +#network-name-label= +#network-id-label= +#network-id= +#no-alerts= +;no-history= +#no-stations= +;not-available= +#no-trains= +#open-station-gui= +#open-train-gui= +#provided= +;provided-requested-description= +#provided-requested= +#requested= +#search-label= +#search-item-label= +#shipment= +#shipments= +#stations= +#status= +#surface-label= +#time= +#train-id= +#trains= + +[cybersyn-message] +#error-cybernetic-combinator-not-found= +#error-station-control-combinator-not-found= +#error-station-is-invalid= +#error-train-is-invalid= +#error-cross-surface-camera-invalid= + +[cybersyn-mod-setting-description] +#iterations-per-tick= + +[cybersyn-mod-setting-name] +#history-length= +#iterations-per-tick= \ No newline at end of file diff --git a/cybersyn/locale/zh-CN/base.cfg b/cybersyn/locale/zh-CN/base.cfg index 340cf25..bd78c0e 100644 --- a/cybersyn/locale/zh-CN/base.cfg +++ b/cybersyn/locale/zh-CN/base.cfg @@ -12,6 +12,9 @@ cybersyn-warmup-time=站预热时间(秒) cybersyn-stuck-train-time=卡住火车超时(秒) cybersyn-allow-cargo-in-depot=允许仓库中的货物 cybersyn-invert-sign=反转组合器输出(已弃用) +#cybersyn-manager-enabled= +#cybersyn-manager-update-rate= +#cybersyn-manager-result-limit= [mod-setting-description] cybersyn-enable-planner=启用或禁用中央计划算法。 如果禁用,则不会派遣新列车。 @@ -27,6 +30,7 @@ cybersyn-warmup-time=Cybernetic 组合器在连接到 Cybersyn 网络之前将 cybersyn-stuck-train-time=在火车调度后的这么多秒后,将发送警报,让您知道火车可能被卡住并且尚未完成交付。 玩家可能必须调试他们的网络才能让火车脱困。 cybersyn-allow-cargo-in-depot=如果选中,火车将被允许在仓库中装载货物; 不会生成任何警报,也不会保留列车。 此外,在选中“不活动状态”的情况下,带有访问请求站点命令的列车将等待不活动状态,而不是等待空载货物。 可用于创建火车系统,其中仓库处理超额货物。 仅限高级用户。 cybersyn-invert-sign=将 Cybernetic 组合器的输出符号翻转为与 LTN 或早期版本的 Cybersyn 项目相同。 +#cybersyn-manager-result-limit= [item-name] cybersyn-combinator=Cybersyn 组合器 diff --git a/cybersyn/locale/zh-CN/manager.cfg b/cybersyn/locale/zh-CN/manager.cfg index dadbbcb..e77ee7d 100644 --- a/cybersyn/locale/zh-CN/manager.cfg +++ b/cybersyn/locale/zh-CN/manager.cfg @@ -1,77 +1,49 @@ +[mod-name] +cybersyn=Project Cybersyn + [controls] cybersyn-toggle-gui=切换 LTN 管理器 [cybersyn-gui] -alert-delivery-failed=发送失败 -alert-delivery-failed-description=火车执行任务的时间太长,被 LTN 放弃,或者火车因其他原因而失效。 您可以在模组设置中配置 LTN 等待火车的时间。\n\n计划装运以绿色列出。 -alert-provider-missing-cargo-description=在火车离开供应商之前,并未装载所有预定货物。\n\n绿色表示预定装运,红色表示实际装运。 -alert-provider-missing-cargo=供应商 - 货物丢失 -alert-provider-unscheduled-cargo-description=火车离开供应商没有计划/意外的货物。\n\n绿色表示计划装运,红色表示计划外装载。 -alert-provider-unscheduled-cargo=提供商 - 不定期货物 -alert-requester-remaining-cargo-description=在火车离开车站之前,并不是所有的材料都从火车上卸下来,并且它已经带着剩余的货物返回了它的仓库。\n\n剩余的物品以红色列出。 -alert-requester-remaining-cargo=请求者 - 剩余货物 -alert-requester-unscheduled-cargo-description=火车带着计划外/意外的货物到达请求者。\n\n绿色表示计划装运,红色表示计划外装载。 -alert-requester-unscheduled-cargo=请求者 - 未安排的货物 alerts=警报 all-paren=(所有) -clear-history=清除历史记录 -composition=布局 -composition-description=火车的布局。\nL = 机车\nC = 货车\nF = 流体车\nA = 火炮车\n< > = 方向 control-signals=控制信号 -delete-alert=删除警报 -delete-all-alerts=删除所有警报 -delivering-to=交付给 -depot=仓库 -depots=仓库 -dispatcher-disabled-description=LTN 调度器被禁用; 不会创建新的交付。 通过地图设置或使用热键重新启用调度程序。 -dispatcher-disabled=LTN 调度器被禁用! -fetching-from=从中获取 -finished=完成 -history=历史 in-transit=在途 inventory=库存 -keep-open=保持开放 -loading-at=加载中 +#layout= name=名字 +#network-name-label= network-id-label=网络ID: network-id=网络ID no-alerts=[img=warning-white] 没有警报 -no-depots=[img=warning-white] 没有仓库 -no-history=[img=warning-white] 没有历史记录 +;no-history=[img=warning-white] 没有历史记录 no-stations=[img=warning-white] 没有站 -not-available=不可用 +;not-available=不可用 no-trains=[img=warning-white] 没有火车 -open-ltn-combinator-gui=[font=default-semibold][color=128,206,240]Control:[/color][/font] 打开 LTN 组合器 GUI open-station-gui=开站GUI\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] 在地图上开站 open-train-gui=打开火车 GUI -parked-at-depot=停在仓库 -parked-at-depot-with-residue=停在有残留物的仓库 provided=提供 -provided-requested-description=绿色 = 提供\n红色 = 要求 +;provided-requested-description=绿色 = 提供\n红色 = 要求 provided-requested=提供/请求 -refresh-tooltip=刷新\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] 切换自动刷新 +;refresh-tooltip=刷新\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] 切换自动刷新 requested=请求 -returning-to-depot=返回仓库 -route=路线 -runtime=运行时 search-label=搜索: -shipments-description=绿色 = 入站\n蓝色 = 出站 +#search-item-label= shipment=装运 shipments=出货量 stations=站 -status-description=[img=flib_indicator_green]1 = 正常状态\n[img=flib_indicator_blue]n = LTN 控制列车停在车站,n = 列车数量\n[img=flib_indicator_yellow]n = 车站是预定交付的一部分 , n = 列车数量\n[img=flib_indicator_white]1 = 错误 - 未初始化\n[img=flib_indicator_red]1 = 错误 - 短路\n[img=flib_indicator_red]2 = 错误 - 停用停止 status=状态 surface-label=表面: time=时间 train-id=列车编号 trains=火车 -type=类型 -unloading-at=卸载于 [cybersyn-message] -error-ltn-combinator-not-found=找不到该站的 LTN 组合器。 +#error-cybernetic-combinator-not-found= +#error-station-control-combinator-not-found= error-station-is-invalid=站点无效,请刷新 GUI。 error-train-is-invalid=火车无效,请刷新 GUI。 +#error-cross-surface-camera-invalid= [cybersyn-mod-setting-description] iterations-per-tick=如果你有性能问题,减少这个数字。 From 99bd75396aa59b33f7afd024f55e3c24465748bb Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Tue, 4 Apr 2023 14:07:54 -0400 Subject: [PATCH 18/24] Flag additional strings for review --- cybersyn/locale/de/manager.cfg | 4 ++-- cybersyn/locale/zh-CN/manager.cfg | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cybersyn/locale/de/manager.cfg b/cybersyn/locale/de/manager.cfg index 3c5d507..074ec78 100644 --- a/cybersyn/locale/de/manager.cfg +++ b/cybersyn/locale/de/manager.cfg @@ -2,7 +2,7 @@ cybersyn=Project Cybersyn [controls] -cybersyn-toggle-gui=LTN-Manager umschalten +#cybersyn-toggle-gui=LTN-Manager umschalten [cybersyn-gui] alerts=Warnungen @@ -55,4 +55,4 @@ history-length=Verlaufslänge iterations-per-tick=Iterationen pro Tick [img=info] [shortcut-name] -cybersyn-toggle-gui=LTN-Manager umschalten +#cybersyn-toggle-gui=LTN-Manager umschalten diff --git a/cybersyn/locale/zh-CN/manager.cfg b/cybersyn/locale/zh-CN/manager.cfg index e77ee7d..529867d 100644 --- a/cybersyn/locale/zh-CN/manager.cfg +++ b/cybersyn/locale/zh-CN/manager.cfg @@ -2,7 +2,7 @@ cybersyn=Project Cybersyn [controls] -cybersyn-toggle-gui=切换 LTN 管理器 +#cybersyn-toggle-gui=切换 LTN 管理器 [cybersyn-gui] alerts=警报 @@ -32,7 +32,7 @@ search-label=搜索: shipment=装运 shipments=出货量 stations=站 -status=状态 +#status=状态 surface-label=表面: time=时间 train-id=列车编号 @@ -53,4 +53,4 @@ history-length=历史长度 iterations-per-tick=每次滴答的迭代次数[img=info] [shortcut-name] -cybersyn-toggle-gui=切换 LTN 管理器 +#cybersyn-toggle-gui=切换 LTN 管理器 From 32d20b94658dc9d2d315472a3ed49c3e43315519 Mon Sep 17 00:00:00 2001 From: Will Berry <73126355+wdberry@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:17:27 -0400 Subject: [PATCH 19/24] Attempted bugfix for NRE when e.element is nil --- cybersyn/scripts/gui/main.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cybersyn/scripts/gui/main.lua b/cybersyn/scripts/gui/main.lua index ae7d033..277810c 100644 --- a/cybersyn/scripts/gui/main.lua +++ b/cybersyn/scripts/gui/main.lua @@ -47,8 +47,14 @@ end local manager_gui = {} function manager_gui.on_lua_shortcut(e) - if e.prototype_name == "cybersyn-toggle-gui" or e.input_name == "cybersyn-toggle-gui" or e.element.name == "manager_window" then - manager.wrapper(e, manager.handle.manager_toggle) + if e.prototype_name == "cybersyn-toggle-gui" or e.input_name == "cybersyn-toggle-gui" or e.element then + if e.element then + if e.element.name == "manager_window" then + manager.wrapper(e, manager.handle.manager_toggle) + end + else + manager.wrapper(e, manager.handle.manager_toggle) + end end end From 6044dcbe853d133b5d7e19433dad70be5b4862bb Mon Sep 17 00:00:00 2001 From: Eldrinn-Elantey Date: Wed, 5 Apr 2023 05:36:14 +0400 Subject: [PATCH 20/24] File replacement for ease of translation --- cybersyn/locale/ru/manager.cfg | 88 ++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/cybersyn/locale/ru/manager.cfg b/cybersyn/locale/ru/manager.cfg index 6c5b46b..d4e8eb3 100644 --- a/cybersyn/locale/ru/manager.cfg +++ b/cybersyn/locale/ru/manager.cfg @@ -1,53 +1,57 @@ [mod-name] -#cybersyn=Project Cybersyn +cybersyn=Project Cybersyn [controls] -#cybersyn-toggle-gui= +cybersyn-toggle-gui=Toggle Cybersyn Manager [cybersyn-gui] -#alerts= -#all-paren= -#control-signals= -;history= -#in-transit= -#inventory= -#layout= -#name= -#network-name-label= -#network-id-label= -#network-id= -#no-alerts= -;no-history= -#no-stations= -;not-available= -#no-trains= -#open-station-gui= -#open-train-gui= -#provided= -;provided-requested-description= -#provided-requested= -#requested= -#search-label= -#search-item-label= -#shipment= -#shipments= -#stations= -#status= -#surface-label= -#time= -#train-id= -#trains= +alerts=Alerts +all-paren=(All) +control-signals=Control signals +;history=History +in-transit=In transit +inventory=Inventory +layout=Train Layout +name=Name +network-name-label=Network Filter: +network-id-label=Network ID: +network-id=Network ID +no-alerts=[img=warning-white] No alerts +;no-history=[img=warning-white] No history +no-stations=[img=warning-white] No stations +;not-available=Not available +no-trains=[img=warning-white] No trains +open-station-gui=Open station GUI\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Open station on map\n[font=default-semibold][color=128,206,240]Control:[/color][/font] Open Station Cybernetic Combinator\n[font=default-semibold][color=128,206,240]Alt:[/color][/font] Open Station Control Cybernetic Combinator +open-train-gui=Open train GUI +provided=Provided +;provided-requested-description=Green = provided\nRed = requested +provided-requested=Provided / requested +;refresh-tooltip=Refresh\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Toggle auto-refresh +requested=Requested +search-label=Station Name: +search-item-label=Item Filter: +shipment=Shipment +shipments=Shipments +stations=Stations +status=Network Signal +surface-label=Surface: +time=Time +train-id=Train ID +trains=Trains [cybersyn-message] -#error-cybernetic-combinator-not-found= -#error-station-control-combinator-not-found= -#error-station-is-invalid= -#error-train-is-invalid= -#error-cross-surface-camera-invalid= +error-cybernetic-combinator-not-found=Could not find a cybernetic combinator for this station. +error-station-control-combinator-not-found=Could not find a station control cybernetic combinator for this station. +error-station-is-invalid=Station is invalid, please refresh the GUI. +error-train-is-invalid=Train is invalid, please refresh the GUI. +error-cross-surface-camera-invalid=Cannot move the camera to an entity on a different surface! [cybersyn-mod-setting-description] -#iterations-per-tick= +iterations-per-tick=Decrease this number if you're having performance issues. [cybersyn-mod-setting-name] -#history-length= -#iterations-per-tick= \ No newline at end of file +history-length=History length +iterations-per-tick=Iterations per tick [img=info] + +[shortcut-name] +cybersyn-toggle-gui=Toggle Cybersyn Manager From b823829e081d1a4fe27502498391f607a57cd2b9 Mon Sep 17 00:00:00 2001 From: Eldrinn-Elantey Date: Wed, 5 Apr 2023 05:36:54 +0400 Subject: [PATCH 21/24] Primary translation into Russian The primary translation of the Cybersyn Manager interface into Russian --- cybersyn/locale/ru/manager.cfg | 76 +++++++++++++++++----------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/cybersyn/locale/ru/manager.cfg b/cybersyn/locale/ru/manager.cfg index d4e8eb3..b100280 100644 --- a/cybersyn/locale/ru/manager.cfg +++ b/cybersyn/locale/ru/manager.cfg @@ -2,56 +2,56 @@ cybersyn=Project Cybersyn [controls] -cybersyn-toggle-gui=Toggle Cybersyn Manager +cybersyn-toggle-gui=Вкл/выкл Cybersyn Менеджер [cybersyn-gui] -alerts=Alerts -all-paren=(All) -control-signals=Control signals +alerts=Тревоги +all-paren=(Все) +control-signals=Контрольные сигналы ;history=History -in-transit=In transit -inventory=Inventory -layout=Train Layout -name=Name -network-name-label=Network Filter: -network-id-label=Network ID: -network-id=Network ID -no-alerts=[img=warning-white] No alerts +in-transit=В пути +inventory=Инвентарь +layout=Схема движения поезда +name=Название +network-name-label=Фильтр сети: +network-id-label=ID сети: +network-id=ID сети +no-alerts=[img=warning-white] Тревог нет ;no-history=[img=warning-white] No history -no-stations=[img=warning-white] No stations +no-stations=[img=warning-white] Станций нет ;not-available=Not available -no-trains=[img=warning-white] No trains -open-station-gui=Open station GUI\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Open station on map\n[font=default-semibold][color=128,206,240]Control:[/color][/font] Open Station Cybernetic Combinator\n[font=default-semibold][color=128,206,240]Alt:[/color][/font] Open Station Control Cybernetic Combinator -open-train-gui=Open train GUI -provided=Provided +no-trains=[img=warning-white] Поездов нет +open-station-gui=Открыть интерфейс станции\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Открыть станцию на карте\n[font=default-semibold][color=128,206,240]Control:[/color][/font] Открыть интерфейс кибернетического комбинатора станции\n[font=default-semibold][color=128,206,240]Alt:[/color][/font] Открыть интерфейс кибернетического комбинатора контроля станции +open-train-gui=Открыть интерфейс поезда +provided=Снабжение ;provided-requested-description=Green = provided\nRed = requested -provided-requested=Provided / requested +provided-requested=Снабжение / Запрос ;refresh-tooltip=Refresh\n[font=default-semibold][color=128,206,240]Shift:[/color][/font] Toggle auto-refresh -requested=Requested -search-label=Station Name: -search-item-label=Item Filter: -shipment=Shipment -shipments=Shipments -stations=Stations -status=Network Signal -surface-label=Surface: -time=Time -train-id=Train ID -trains=Trains +requested=Запрос +search-label=Название станции: +search-item-label=Предметный фильтр: +shipment=Доставка +shipments=Доставки +stations=Станции +status=Сетевой сигнал +surface-label=Поверхность: +time=Время +train-id=ID поезда +trains=Поезда [cybersyn-message] -error-cybernetic-combinator-not-found=Could not find a cybernetic combinator for this station. -error-station-control-combinator-not-found=Could not find a station control cybernetic combinator for this station. -error-station-is-invalid=Station is invalid, please refresh the GUI. -error-train-is-invalid=Train is invalid, please refresh the GUI. -error-cross-surface-camera-invalid=Cannot move the camera to an entity on a different surface! +error-cybernetic-combinator-not-found=Не удалось найти кибернетический комбинатор для этой станции. +error-station-control-combinator-not-found=Не удалось найти кибернетический комбинатор контроля станции для этой станции. +error-station-is-invalid=Неверная станция, пожалуйста, обновите интерфейс. +error-train-is-invalid=Неверный поезд, пожалуйста, обновите интерфейс. +error-cross-surface-camera-invalid=Не удается переместить камеру на объект находящийся на другой поверхности! [cybersyn-mod-setting-description] -iterations-per-tick=Decrease this number if you're having performance issues. +iterations-per-tick=Уменьшите это число, если у вас возникли проблемы с производительностью. [cybersyn-mod-setting-name] -history-length=History length -iterations-per-tick=Iterations per tick [img=info] +history-length=Длина истории +iterations-per-tick=Итераций за тик [img=info] [shortcut-name] -cybersyn-toggle-gui=Toggle Cybersyn Manager +cybersyn-toggle-gui=Вкл/выкл Cybersyn Менеджер From c4e74b54c0552061c4fc34ba7969207193498e95 Mon Sep 17 00:00:00 2001 From: Eldrinn-Elantey Date: Thu, 6 Apr 2023 11:41:41 +0400 Subject: [PATCH 22/24] Edits from iassasin Co-Authored-By: Igor <20709774+iassasin@users.noreply.github.com> --- cybersyn/locale/ru/manager.cfg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cybersyn/locale/ru/manager.cfg b/cybersyn/locale/ru/manager.cfg index b100280..d50f2b2 100644 --- a/cybersyn/locale/ru/manager.cfg +++ b/cybersyn/locale/ru/manager.cfg @@ -33,7 +33,7 @@ search-item-label=Предметный фильтр: shipment=Доставка shipments=Доставки stations=Станции -status=Сетевой сигнал +status=Сигнал сети surface-label=Поверхность: time=Время train-id=ID поезда @@ -42,9 +42,9 @@ trains=Поезда [cybersyn-message] error-cybernetic-combinator-not-found=Не удалось найти кибернетический комбинатор для этой станции. error-station-control-combinator-not-found=Не удалось найти кибернетический комбинатор контроля станции для этой станции. -error-station-is-invalid=Неверная станция, пожалуйста, обновите интерфейс. -error-train-is-invalid=Неверный поезд, пожалуйста, обновите интерфейс. -error-cross-surface-camera-invalid=Не удается переместить камеру на объект находящийся на другой поверхности! +error-station-is-invalid=Ошибочная станция, пожалуйста, обновите интерфейс. +error-train-is-invalid=Ошибочный поезд, пожалуйста, обновите интерфейс. +error-cross-surface-camera-invalid=Невозможно переместить камеру на объект, находящийся на другой поверхности! [cybersyn-mod-setting-description] iterations-per-tick=Уменьшите это число, если у вас возникли проблемы с производительностью. From a299cb694c3fdf37c10421ad0ad733427addd075 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Sun, 30 Apr 2023 14:32:52 -0400 Subject: [PATCH 23/24] updated changelog --- cybersyn/changelog.txt | 1 + cybersyn/info.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index 413398d..5f5c811 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -11,6 +11,7 @@ Date: 2023-3-28 - Fixed a rare crash relating to an uninitialized network mask on a new station - Fixed a SE space elevator bug that caused incorrect orders when the provider and requester station had the same name - Added an incompatibility error with picker dollies, proper compatibility to come in a later update + - Fixed entities not having the correct names in nullius contributed by Sharparam Translation: - lengua española (Spanish language) contributed by Majestuozzo --------------------------------------------------------------------------------------------------- diff --git a/cybersyn/info.lua b/cybersyn/info.lua index 860f838..639a3a2 100644 --- a/cybersyn/info.lua +++ b/cybersyn/info.lua @@ -3,4 +3,4 @@ --- It is used in migrations.lua to determine if any migrations need to be run for beta testers. --- It is expected these are only meaningful between releases during beta testing. --- It should be set to nil for any release version. -return 1 +return nil From e09cd1412a3a955b28b40642c3d49c451df04b8d Mon Sep 17 00:00:00 2001 From: mamoniot Date: Sun, 30 Apr 2023 14:35:26 -0400 Subject: [PATCH 24/24] updated changelog --- cybersyn/changelog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cybersyn/changelog.txt b/cybersyn/changelog.txt index 5f5c811..4f1170c 100644 --- a/cybersyn/changelog.txt +++ b/cybersyn/changelog.txt @@ -1,6 +1,6 @@ --------------------------------------------------------------------------------------------------- Version: 1.2.14 -Date: 2023-3-28 +Date: 2023-4-30 Features: - Added opt-in WIP trains, inventory, and station manager gui (highly experimental, use at your own risk) Changes: