From 897ac8b327d2813e912556685ec010f3228893f6 Mon Sep 17 00:00:00 2001
From: Sense101 <67970865+Sense101@users.noreply.github.com>
Date: Thu, 12 Nov 2020 16:53:19 +0000
Subject: [PATCH 1/3] added the new splitter
Update changelog and update translation regarding 20 upgrade tiers, closes #907
---
src/js/changelog.js | 5 ++++-
translations/base-ar.yaml | 4 ++--
translations/base-cat.yaml | 2 +-
translations/base-cz.yaml | 5 +++--
translations/base-da.yaml | 8 ++++----
translations/base-de.yaml | 2 +-
translations/base-el.yaml | 4 ++--
translations/base-en.yaml | 7 +++++--
translations/base-fi.yaml | 2 +-
translations/base-fr.yaml | 2 +-
translations/base-hr.yaml | 4 ++--
translations/base-hu.yaml | 2 +-
translations/base-ind.yaml | 2 +-
translations/base-it.yaml | 2 +-
translations/base-lt.yaml | 4 ++--
translations/base-nl.yaml | 2 +-
translations/base-no.yaml | 2 +-
translations/base-pl.yaml | 5 +++--
translations/base-pt-BR.yaml | 2 +-
translations/base-pt-PT.yaml | 2 +-
translations/base-ro.yaml | 2 +-
translations/base-ru.yaml | 2 +-
translations/base-sl.yaml | 4 ++--
translations/base-sr.yaml | 4 ++--
translations/base-sv.yaml | 5 +++--
translations/base-tr.yaml | 11 +++++++----
translations/base-uk.yaml | 8 +++++---
27 files changed, 59 insertions(+), 45 deletions(-)
diff --git a/src/js/changelog.js b/src/js/changelog.js
index 3a93bb96..fcafbe2b 100644
--- a/src/js/changelog.js
+++ b/src/js/changelog.js
@@ -7,7 +7,10 @@ export const CHANGELOG = [
"Fix reward notification being too long sometimes (by LeopoldTal)",
"Use locale decimal separator on belt reader display (by LeopoldTal)",
"Vastly improved performance when saving games (by LeopoldTal)",
- "Updated translations",
+ "Prevent some antivirus programs blocking the opening of external links (by LeopoldTal)",
+ "Match tutorials to the correct painter variants (by LeopoldTal)",
+ "Prevent throughput goals containing fractional numbers (by CEbbinghaus)",
+ "Updated translations and added Hungarian",
],
},
{
diff --git a/translations/base-ar.yaml b/translations/base-ar.yaml
index 55327fdf..305c9b88 100644
--- a/translations/base-ar.yaml
+++ b/translations/base-ar.yaml
@@ -16,7 +16,7 @@ steamPage:
advantages:
- 12 New Level for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -359,7 +359,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-cat.yaml b/translations/base-cat.yaml
index 85e03e8f..4d4954b3 100644
--- a/translations/base-cat.yaml
+++ b/translations/base-cat.yaml
@@ -369,7 +369,7 @@ ingame:
title: Guarda ∞ partides
desc: Tantes com vulguis!
upgrades:
- title: 20 Nivells de millora
+ title: ∞ Nivells de millora
desc: La versió demo només en té 5!
markers:
title: ∞ Marcadors
diff --git a/translations/base-cz.yaml b/translations/base-cz.yaml
index add0e440..2f2909f0 100644
--- a/translations/base-cz.yaml
+++ b/translations/base-cz.yaml
@@ -303,7 +303,8 @@ ingame:
2_1_place_cutter: "Teď umístěte pilu k rozřezání kruhového tvaru na dvě
poloviny!
PS: Pila řeže tvary vždy svisle na
poloviny bez ohledu na její orientaci."
- 2_2_place_trash: Pila se může zaseknout a zastavit vaši produkci!
Použijte
+ 2_2_place_trash:
+ Pila se může zaseknout a zastavit vaši produkci!
Použijte
koš ke smazání (!) nepotřebných
částí tvarů.
2_3_more_cutters: "Dobrá práce! Teď postavte více pil pro zrychlení
@@ -360,7 +361,7 @@ ingame:
title: ∞ Uložených her
desc: Tolik, kolik vaše srdce touží!
upgrades:
- title: 20 vylepšení
+ title: ∞ vylepšení
desc: Tato demo verze má pouze 5!
markers:
title: ∞ Značek
diff --git a/translations/base-da.yaml b/translations/base-da.yaml
index 52af9b54..44293fdd 100644
--- a/translations/base-da.yaml
+++ b/translations/base-da.yaml
@@ -42,10 +42,10 @@ steamPage:
source_code: Source code (GitHub)
translate: Hjælp med oversættelse
text_open_source: >-
- Hvem som helst kan bidrage, jeg er aktivt involveret i fælleskabet og
- forsøger at gennemgå alle ideer og tager feedback i overvejelse
+ Hvem som helst kan bidrage, jeg er aktivt involveret i fælleskabet og
+ forsøger at gennemgå alle ideer og tager feedback i overvejelse
hvor muligt.
-
+
Be sure to check out my trello board for the full roadmap!
global:
loading: Indlæser
@@ -363,7 +363,7 @@ ingame:
title: ∞ Gemte spil
desc: Så mange dit hjerte begær!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-de.yaml b/translations/base-de.yaml
index ee3bc70f..26e9dfc2 100644
--- a/translations/base-de.yaml
+++ b/translations/base-de.yaml
@@ -360,7 +360,7 @@ ingame:
title: ∞ Speicherstände
desc: So viele dein Herz begehrt!
upgrades:
- title: 20 Upgrade-Stufen
+ title: ∞ Upgrade-Stufen
desc: Diese Demo hat nur 5!
markers:
title: ∞ Marker
diff --git a/translations/base-el.yaml b/translations/base-el.yaml
index 08edd918..ec0df592 100644
--- a/translations/base-el.yaml
+++ b/translations/base-el.yaml
@@ -18,7 +18,7 @@ steamPage:
advantages:
- 12 New Level for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -374,7 +374,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-en.yaml b/translations/base-en.yaml
index 639dca3a..85e3b9b0 100644
--- a/translations/base-en.yaml
+++ b/translations/base-en.yaml
@@ -42,7 +42,7 @@ steamPage:
advantages:
- 12 New Levels for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -487,7 +487,7 @@ ingame:
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
@@ -575,6 +575,9 @@ buildings:
splitter-inverse:
name: Splitter (compact)
description: Splits one conveyor belt into two.
+ splitter-triple:
+ name: Splitter (compact)
+ description: Splits one conveyor belt into three.
cutter:
default:
diff --git a/translations/base-fi.yaml b/translations/base-fi.yaml
index 56b52600..42d73425 100644
--- a/translations/base-fi.yaml
+++ b/translations/base-fi.yaml
@@ -358,7 +358,7 @@ ingame:
title: ∞ Tallennukset
desc: Niin paljon kuin sielusi kaipaa!
upgrades:
- title: 20 päivitystasoa
+ title: ∞ päivitystasoa
desc: Kokeiluversiossa on vain viisi!
markers:
title: ∞ Merkit
diff --git a/translations/base-fr.yaml b/translations/base-fr.yaml
index 65d962a2..6af2f86e 100644
--- a/translations/base-fr.yaml
+++ b/translations/base-fr.yaml
@@ -367,7 +367,7 @@ ingame:
title: Sauvegardes ∞
desc: Autant que votre cœur le désire !
upgrades:
- title: 20 niveaux d’amélioration
+ title: ∞ niveaux d’amélioration
desc: Cette version de démonstration n’en a que 5 !
markers:
title: Balises ∞
diff --git a/translations/base-hr.yaml b/translations/base-hr.yaml
index 70f2bcb3..ae62d58c 100644
--- a/translations/base-hr.yaml
+++ b/translations/base-hr.yaml
@@ -17,7 +17,7 @@ steamPage:
advantages:
- 12 New Level for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -360,7 +360,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-hu.yaml b/translations/base-hu.yaml
index 9f1cc854..cfbce76a 100644
--- a/translations/base-hu.yaml
+++ b/translations/base-hu.yaml
@@ -363,7 +363,7 @@ ingame:
title: ∞ Mentés
desc: Amennyit csak szeretnél!
upgrades:
- title: 20 Fejlesztési Szint
+ title: ∞ Fejlesztési Szint
desc: A Demó Verzió csak 5-öt tartalmaz!
markers:
title: ∞ Jelölő
diff --git a/translations/base-ind.yaml b/translations/base-ind.yaml
index 2da9b377..8211a34f 100644
--- a/translations/base-ind.yaml
+++ b/translations/base-ind.yaml
@@ -368,7 +368,7 @@ ingame:
title: ∞ Data Simpanan
desc: Sebanyak yang kamu mau!
upgrades:
- title: 20 Tingkatan Upgrade
+ title: ∞ Tingkatan Upgrade
desc: Versi demo ini hanya punya 5!
markers:
title: ∞ Penanda
diff --git a/translations/base-it.yaml b/translations/base-it.yaml
index f1ed9ba4..572bbc77 100644
--- a/translations/base-it.yaml
+++ b/translations/base-it.yaml
@@ -367,7 +367,7 @@ ingame:
title: ∞ salvataggi
desc: Quanti ne desideri!
upgrades:
- title: 20 gradi di miglioramenti
+ title: ∞ gradi di miglioramenti
desc: Questa demo ne ha solo 5!
markers:
title: ∞ etichette
diff --git a/translations/base-lt.yaml b/translations/base-lt.yaml
index 910cb9f2..f69bbc03 100644
--- a/translations/base-lt.yaml
+++ b/translations/base-lt.yaml
@@ -17,7 +17,7 @@ steamPage:
advantages:
- 12 New Level for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -359,7 +359,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-nl.yaml b/translations/base-nl.yaml
index bebba218..09192564 100644
--- a/translations/base-nl.yaml
+++ b/translations/base-nl.yaml
@@ -368,7 +368,7 @@ ingame:
title: ∞ Savegames
desc: Zo veel je maar wilt!
upgrades:
- title: 20 Upgrade Levels
+ title: ∞ Upgrade Levels
desc: Deze demo heeft er enkel 5!
markers:
title: ∞ Markeringen
diff --git a/translations/base-no.yaml b/translations/base-no.yaml
index 1e8bf7b0..8ab3a2a7 100644
--- a/translations/base-no.yaml
+++ b/translations/base-no.yaml
@@ -365,7 +365,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-pl.yaml b/translations/base-pl.yaml
index d42c80f2..360f3cad 100644
--- a/translations/base-pl.yaml
+++ b/translations/base-pl.yaml
@@ -326,7 +326,8 @@ ingame:
niezależnie od swojej orientacji."
2_2_place_trash: Przecinak może się zapchać i zablokować!
Użyj
śmietnik aby usunąć obecnie (!) nie potrzebne elementy.
- 2_3_more_cutters: "Dobra robota! Teraz umieść 2 kolejne przecinaki,aby przyspieszyć
+ 2_3_more_cutters:
+ "Dobra robota! Teraz umieść 2 kolejne przecinaki,aby przyspieszyć
ten wolny proces!
PS: Użyj klawiszy 0-9,
aby szybciej uzyskać dostęp do budynków!"
3_1_rectangles: "Teraz wydobądź kilka kwadratów! Wybuduj
@@ -365,7 +366,7 @@ ingame:
title: ∞ Zapisów Gry
desc: Twórz tyle, ile potrzebujesz!
upgrades:
- title: 20 Poziomów Ulepszeń
+ title: ∞ Poziomów Ulepszeń
desc: To demo posiada tylko 5!
markers:
title: ∞ Znaczników
diff --git a/translations/base-pt-BR.yaml b/translations/base-pt-BR.yaml
index 8e8ea027..c52816d4 100644
--- a/translations/base-pt-BR.yaml
+++ b/translations/base-pt-BR.yaml
@@ -361,7 +361,7 @@ ingame:
title: Saves ∞
desc: Quantos o seu coração mandar!
upgrades:
- title: 20 Níveis de Melhorias
+ title: ∞ Níveis de Melhorias
desc: Essa demo tem apenas 5!
markers:
title: Marcadores ∞
diff --git a/translations/base-pt-PT.yaml b/translations/base-pt-PT.yaml
index c6c18b98..a0d7901c 100644
--- a/translations/base-pt-PT.yaml
+++ b/translations/base-pt-PT.yaml
@@ -368,7 +368,7 @@ ingame:
title: Savegames ∞
desc: Tantos quanto o teu corção desejar!
upgrades:
- title: 20 Níveis de melhoria
+ title: ∞ Níveis de melhoria
desc: Nesta versão demo apenas tens 5!
markers:
title: Marcos ∞
diff --git a/translations/base-ro.yaml b/translations/base-ro.yaml
index 3a6ca947..1dd87f08 100644
--- a/translations/base-ro.yaml
+++ b/translations/base-ro.yaml
@@ -367,7 +367,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-ru.yaml b/translations/base-ru.yaml
index 23b635b7..6c01272e 100644
--- a/translations/base-ru.yaml
+++ b/translations/base-ru.yaml
@@ -360,7 +360,7 @@ ingame:
title: ∞ Сохранений
desc: Сколько Вашей душе угодно!
upgrades:
- title: 20 стадий улучшений!
+ title: ∞ стадий улучшений!
desc: В демоверсии всего 5!
markers:
title: ∞ Маркеров!
diff --git a/translations/base-sl.yaml b/translations/base-sl.yaml
index 516aa9de..907aa1f5 100644
--- a/translations/base-sl.yaml
+++ b/translations/base-sl.yaml
@@ -18,7 +18,7 @@ steamPage:
advantages:
- 12 New Level for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -361,7 +361,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-sr.yaml b/translations/base-sr.yaml
index 3a9d72ea..35f2c8ca 100644
--- a/translations/base-sr.yaml
+++ b/translations/base-sr.yaml
@@ -17,7 +17,7 @@ steamPage:
advantages:
- 12 New Level for a total of 26 levels
- 18 New Buildings for a fully automated factory!
- - 20 Upgrade Tiers for many hours of fun!
+ - Unlimited Upgrade Tiers for many hours of fun!
- Wires Update for an entirely new dimension!
- Dark Mode!
- Unlimited Savegames
@@ -361,7 +361,7 @@ ingame:
title: ∞ Savegames
desc: As many as your heart desires!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ Markers
diff --git a/translations/base-sv.yaml b/translations/base-sv.yaml
index 9d4284de..8083c8d1 100644
--- a/translations/base-sv.yaml
+++ b/translations/base-sv.yaml
@@ -364,7 +364,7 @@ ingame:
title: ∞ med sparfiler
desc: Så många som du bara vill!
upgrades:
- title: 20 Upgrade Tiers
+ title: ∞ Upgrade Tiers
desc: This demo version has only 5!
markers:
title: ∞ med markeringar!
@@ -520,7 +520,8 @@ buildings:
färger eller booleansk "1")
xor:
name: XOR Grind
- description: Avger en booleansk "1" om ett av inflöderna är positiv, dock inte om båda är positiva.
+ description:
+ Avger en booleansk "1" om ett av inflöderna är positiv, dock inte om båda är positiva.
(Positiva menas med former, färger eller booleansk "1")
or:
name: OR Grind
diff --git a/translations/base-tr.yaml b/translations/base-tr.yaml
index 7cc78d33..389b01e8 100644
--- a/translations/base-tr.yaml
+++ b/translations/base-tr.yaml
@@ -302,20 +302,23 @@ ingame:
yerleştir.
İpucu: Birden fazla üretici yerleştirmek için
SHIFT tuşuna basılı tut, ve R
tuşuyla taşıma bandının yönünü döndür."
- 2_1_place_cutter: "Şimdi daireleri yarıya bölmek için bir Kesici yerleştir!
+ 2_1_place_cutter:
+ "Şimdi daireleri yarıya bölmek için bir Kesici yerleştir!
Not: Kesici şekilleri yönünden bağımsız olarak her zaman yukarıdan aşağıya
keser."
2_2_place_trash: Kesicinin çıkış hatları doluysa durabilir!
Bunun için kullanılmayan çıktılara çöp
yerleştirin.
- 2_3_more_cutters: "İyi iş çıkardın! Şimdi işleri hızlandırmak için iki kesici daha
+ 2_3_more_cutters:
+ "İyi iş çıkardın! Şimdi işleri hızlandırmak için iki kesici daha
yerleştir.
Not: 0-9 tuşlarını kullanarak yapılara
daha hızlı ulaşabilirsin!"
3_1_rectangles: "Şimdi biraz dikdörtgen üretelim! 4 Üretici yerleştir ve
bunları merkeze bağla.
Not: SHIFT tuşuna
basılı tutarak bant planlayıcıyı
etkinleştir!"
- 21_1_place_quad_painter: Dörtlü boyayıcıyı yerleştirin ve daireyi,
+ 21_1_place_quad_painter:
+ Dörtlü boyayıcıyı yerleştirin ve daireyi,
beyaz ve kırmızı renkleri
elde edin!
21_2_switch_to_wires: Kablo katmanına E tuşuna basarak geçiş yapın!
@@ -362,7 +365,7 @@ ingame:
title: ∞ Oyun Kayıtları
desc: Canın ne kadar isterse!
upgrades:
- title: 20 Geliştirme Aşaması
+ title: ∞ Geliştirme Aşaması
desc: Bu deneme sürümünde sadece 5 tane var!
markers:
title: ∞ Yer imleri
diff --git a/translations/base-uk.yaml b/translations/base-uk.yaml
index 45765dd9..eddd4210 100644
--- a/translations/base-uk.yaml
+++ b/translations/base-uk.yaml
@@ -520,7 +520,7 @@ ingame:
desc: Стільки, скільки вашій душі завгодно!
upgrades:
- title: 20 рівнів Поліпшень
+ title: ∞ рівнів Поліпшень
desc: Демо-версія має лише 5!
markers:
@@ -706,7 +706,8 @@ buildings:
logic_gate:
default:
name: Логічне "І"
- description: Видає логічну "1" якщо обидва вводи отримують сигнал "Істинний". (Під "Істинний" мається наувазі фігура,
+ description:
+ Видає логічну "1" якщо обидва вводи отримують сигнал "Істинний". (Під "Істинний" мається наувазі фігура,
колір чи логічна "1")
not:
name: Логічне "НЕ"
@@ -745,7 +746,8 @@ buildings:
reader:
default:
name: &reader Зчитувач конвеєєра
- description: Дозволяє вимірювати середню пропускну здатність конвеєрної стрічки. Видає сигнал останнього зчитаного елемента
+ description:
+ Дозволяє вимірювати середню пропускну здатність конвеєрної стрічки. Видає сигнал останнього зчитаного елемента
на шар дротів (коли розблоковано).
analyzer:
From f39fd506d835bb65aa71d25ec6aed8af8fdf8383 Mon Sep 17 00:00:00 2001
From: Sense101 <67970865+Sense101@users.noreply.github.com>
Date: Thu, 12 Nov 2020 19:01:21 +0000
Subject: [PATCH 2/3] Update base-en.yaml
---
translations/base-en.yaml | 3 ---
1 file changed, 3 deletions(-)
diff --git a/translations/base-en.yaml b/translations/base-en.yaml
index 85e3b9b0..62ed2808 100644
--- a/translations/base-en.yaml
+++ b/translations/base-en.yaml
@@ -575,9 +575,6 @@ buildings:
splitter-inverse:
name: Splitter (compact)
description: Splits one conveyor belt into two.
- splitter-triple:
- name: Splitter (compact)
- description: Splits one conveyor belt into three.
cutter:
default:
From c12be469dd9b1d67532704f6070aa7b9cc1913b0 Mon Sep 17 00:00:00 2001
From: Sense101 <67970865+Sense101@users.noreply.github.com>
Date: Thu, 24 Jun 2021 15:10:41 +0100
Subject: [PATCH 3/3] Added back copy/paste in puzzle mode
---
src/js/game/game_mode.js | 4 ++--
src/js/game/hud/parts/blueprint_placer.js | 14 +++++++++-----
src/js/game/hud/parts/mass_selector.js | 15 +++++++++++++++
src/js/game/modes/puzzle.js | 8 ++++++--
4 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/js/game/game_mode.js b/src/js/game/game_mode.js
index 5eca211a..bb60d8a6 100644
--- a/src/js/game/game_mode.js
+++ b/src/js/game/game_mode.js
@@ -166,8 +166,8 @@ export class GameMode extends BasicSerializableObject {
}
/** @returns {boolean} */
- getSupportsCopyPaste() {
- return true;
+ getHasFreeCopyPaste() {
+ return false;
}
/** @returns {boolean} */
diff --git a/src/js/game/hud/parts/blueprint_placer.js b/src/js/game/hud/parts/blueprint_placer.js
index 54e2e3b7..e006d24a 100644
--- a/src/js/game/hud/parts/blueprint_placer.js
+++ b/src/js/game/hud/parts/blueprint_placer.js
@@ -27,6 +27,8 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
}
initialize() {
+ this.isCopyPasteFree = this.root.gameMode.getHasFreeCopyPaste();
+
this.root.hud.signals.buildingsSelectedForCopy.add(this.createBlueprintFromBuildings, this);
/** @type {TypedTrackedState} */
@@ -82,7 +84,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
update() {
const currentBlueprint = this.currentBlueprint.get();
- this.domAttach.update(currentBlueprint && currentBlueprint.getCost() > 0);
+ this.domAttach.update(!this.isCopyPasteFree && currentBlueprint && currentBlueprint.getCost() > 0);
this.trackedCanAfford.set(currentBlueprint && currentBlueprint.canAfford(this.root));
}
@@ -114,7 +116,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
return;
}
- if (!blueprint.canAfford(this.root)) {
+ if (!this.isCopyPasteFree && !blueprint.canAfford(this.root)) {
this.root.soundProxy.playUiError();
return;
}
@@ -122,8 +124,10 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
const worldPos = this.root.camera.screenToWorld(pos);
const tile = worldPos.toTileSpace();
if (blueprint.tryPlace(this.root, tile)) {
- const cost = blueprint.getCost();
- this.root.hubGoals.takeShapeByKey(this.root.gameMode.getBlueprintShapeKey(), cost);
+ if (!this.isCopyPasteFree) {
+ const cost = blueprint.getCost();
+ this.root.hubGoals.takeShapeByKey(this.root.gameMode.getBlueprintShapeKey(), cost);
+ }
this.root.soundProxy.playUi(SOUNDS.placeBuilding);
}
return STOP_PROPAGATION;
@@ -131,7 +135,7 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
}
/**
- * Mose move handler
+ * Mouse move handler
*/
onMouseMove() {
// Prevent movement while blueprint is selected
diff --git a/src/js/game/hud/parts/mass_selector.js b/src/js/game/hud/parts/mass_selector.js
index ab933da3..b8283d55 100644
--- a/src/js/game/hud/parts/mass_selector.js
+++ b/src/js/game/hud/parts/mass_selector.js
@@ -1,5 +1,6 @@
import { globalConfig } from "../../../core/config";
import { DrawParameters } from "../../../core/draw_parameters";
+import { gMetaBuildingRegistry } from "../../../core/global_registries";
import { createLogger } from "../../../core/logging";
import { STOP_PROPAGATION } from "../../../core/signal";
import { formatBigNumberFull } from "../../../core/utils";
@@ -7,6 +8,8 @@ import { Vector } from "../../../core/vector";
import { ACHIEVEMENTS } from "../../../platform/achievement_provider";
import { T } from "../../../translations";
import { Blueprint } from "../../blueprint";
+import { MetaBlockBuilding } from "../../buildings/block";
+import { MetaConstantProducerBuilding } from "../../buildings/constant_producer";
import { enumMouseButton } from "../../camera";
import { Component } from "../../component";
import { Entity } from "../../entity";
@@ -260,7 +263,14 @@ export class HUDMassSelector extends BaseHUDPart {
for (let x = realTileStart.x; x <= realTileEnd.x; ++x) {
for (let y = realTileStart.y; y <= realTileEnd.y; ++y) {
const contents = this.root.map.getLayerContentXY(x, y, this.root.currentLayer);
+
if (contents && this.root.logic.canDeleteBuilding(contents)) {
+ const staticComp = contents.components.StaticMapEntity;
+
+ if (!staticComp.getMetaBuilding().getIsRemovable(this.root)) {
+ continue;
+ }
+
this.selectedUids.add(contents.uid);
}
}
@@ -320,6 +330,11 @@ export class HUDMassSelector extends BaseHUDPart {
renderedUids.add(uid);
const staticComp = contents.components.StaticMapEntity;
+
+ if (!staticComp.getMetaBuilding().getIsRemovable(this.root)) {
+ continue;
+ }
+
const bounds = staticComp.getTileSpaceBounds();
parameters.context.beginRoundedRect(
bounds.x * globalConfig.tileSize + boundsBorder,
diff --git a/src/js/game/modes/puzzle.js b/src/js/game/modes/puzzle.js
index 4bf3b1e6..75a47ee2 100644
--- a/src/js/game/modes/puzzle.js
+++ b/src/js/game/modes/puzzle.js
@@ -7,6 +7,8 @@ import { types } from "../../savegame/serialization";
import { enumGameModeTypes, GameMode } from "../game_mode";
import { HUDPuzzleBackToMenu } from "../hud/parts/puzzle_back_to_menu";
import { HUDPuzzleDLCLogo } from "../hud/parts/puzzle_dlc_logo";
+import { HUDBlueprintPlacer } from "../hud/parts/blueprint_placer";
+import { HUDMassSelector } from "../hud/parts/mass_selector";
export class PuzzleGameMode extends GameMode {
static getType() {
@@ -30,6 +32,8 @@ export class PuzzleGameMode extends GameMode {
this.additionalHudParts = {
puzzleBackToMenu: HUDPuzzleBackToMenu,
puzzleDlcLogo: HUDPuzzleDLCLogo,
+ blueprintPlacer: HUDBlueprintPlacer,
+ massSelector: HUDMassSelector,
};
this.zoneWidth = data.zoneWidth || 8;
@@ -79,8 +83,8 @@ export class PuzzleGameMode extends GameMode {
return false;
}
- getSupportsCopyPaste() {
- return false;
+ getHasFreeCopyPaste() {
+ return true;
}
throughputDoesNotMatter() {