diff --git a/electron/index.js b/electron/index.js index 41831bdd..264aa581 100644 --- a/electron/index.js +++ b/electron/index.js @@ -316,7 +316,7 @@ async function writeFileSafe(filename, contents) { } ipcMain.handle("fs-job", async (event, job) => { - const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/i, "_"); + const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/gi, "_"); const fname = path.join(storePath, filenameSafe); switch (job.type) { case "read": { diff --git a/gulp/mod.js b/gulp/mod.js index 87912bb3..ad6cd4ae 100644 --- a/gulp/mod.js +++ b/gulp/mod.js @@ -1,3 +1,39 @@ -module.exports = function (source, map) { - return source + `\nexport let $s=(n,v)=>eval(n+"=v")`; +const oneExport = exp => { + return `${exp}=v`; // No checks needed +}; + +const twoExports = (exp1, exp2) => { + return `n=="${exp1}"?${exp1}=v:${exp2}=v`; +}; + +const multiExports = exps => { + exps = exps.map(exp => `case "${exp}":${exp}=v;break;`); + + return `switch(n){${exps.toString().replaceAll(";,", ";")} }`; +}; + +const defineFnBody = source => { + const regex = /export (?:let|class) (?\w+)/g; + let names = [...source.matchAll(regex)].map(n => n.groups.name); + switch (names.length) { + case 0: + return false; + case 1: + return oneExport(names[0]); + case 2: + return twoExports(names[0], names[1]); + default: + return multiExports(names); + } +}; +/** + * + * @param {string} source + * @param {*} map + * @returns + */ +module.exports = function (source, map) { + const body = defineFnBody(source); + if (!body) return source; + return source + `\nexport const __$S__=(n,v)=>{${body}}`; }; diff --git a/gulp/webpack.config.js b/gulp/webpack.config.js index 7db0bf0b..3c07d7cc 100644 --- a/gulp/webpack.config.js +++ b/gulp/webpack.config.js @@ -93,6 +93,9 @@ module.exports = ({ watch = false, standalone = false, chineseVersion = false, w end: "typehints:end", }, }, + { + loader: path.resolve(__dirname, "mod.js"), + }, ], }, { diff --git a/gulp/webpack.production.config.js b/gulp/webpack.production.config.js index fdd477b9..f56ae609 100644 --- a/gulp/webpack.production.config.js +++ b/gulp/webpack.production.config.js @@ -131,6 +131,7 @@ module.exports = ({ warnings: true, }, mangle: { + reserved: ["__$S__"], eval: true, keep_classnames: !minifyNames, keep_fnames: !minifyNames, @@ -210,6 +211,9 @@ module.exports = ({ test: /\.js$/, use: [ // "thread-loader", + { + loader: path.resolve(__dirname, "mod.js"), + }, { loader: "babel-loader?cacheDirectory", options: { diff --git a/mod_examples/README.md b/mod_examples/README.md index 6711df06..c0b101e4 100644 --- a/mod_examples/README.md +++ b/mod_examples/README.md @@ -38,7 +38,7 @@ To get into shapez.io modding, I highly recommend checking out all of the exampl | [mod_settings.js](mod_settings.js) | Shows a dialog counting how often the mod has been launched | Reading and storing mod settings | | [storing_data_in_savegame.js](storing_data_in_savegame.js) | Shows how to store custom (structured) data in the savegame | Storing custom data in savegame | | [modify_existing_building.js](modify_existing_building.js) | Makes the rotator building always unlocked and adds a new statistic to the building panel | Modifying a builtin building, replacing builtin methods | -| [modify_ui.js](modify_ui.js) | Shows how to add custom IU elements to builtin game states (the Main Menu in this case) | Extending builtin UI states, Adding CSS | +| [modify_ui.js](modify_ui.js) | Shows how to add custom UI elements to builtin game states (the Main Menu in this case) | Extending builtin UI states, Adding CSS | | [pasting.js](pasting.js) | Shows a dialog when pasting text in the game | Listening to paste events | | [sandbox.js](sandbox.js) | Makes blueprints free and always unlocked | Overriding builtin methods | diff --git a/mod_examples/new_item_type.js b/mod_examples/new_item_type.js index 3f47d4d2..104ef0a0 100644 --- a/mod_examples/new_item_type.js +++ b/mod_examples/new_item_type.js @@ -87,7 +87,7 @@ class FluidItem extends shapez.BaseItem { * @param {number} diameter * @param {DrawParameters} parameters */ - drawItemCenteredClipped(x, y, parameters, diameter = globalConfig.defaultItemDiameter) { + drawItemCenteredClipped(x, y, parameters, diameter = shapez.globalConfig.defaultItemDiameter) { const realDiameter = diameter * 0.6; if (!this.cachedSprite) { this.cachedSprite = shapez.Loader.getSprite(`sprites/fluids/${this.fluidType}.png`); @@ -120,19 +120,19 @@ class Mod extends shapez.Mod { this.modInterface.registerSprite("sprites/fluids/water.png", RESOURCES["water.png"]); // Make the item spawn on the map - this.modInterface.runAfterMethod( - shapez.MapChunk, - "generatePatches", - function ({ rng, chunkCenter, distanceToOriginInChunks }) { - // Generate a simple patch - // ALWAYS use rng and NEVER use Math.random() otherwise the map will look different - // every time you resume the game - if (rng.next() > 0.8) { - const fluidType = rng.choice(Array.from(Object.keys(enumFluidType))); - this.internalGeneratePatch(rng, 4, FLUID_ITEM_SINGLETONS[fluidType]); - } + this.modInterface.runAfterMethod(shapez.MapChunk, "generatePatches", function ({ + rng, + chunkCenter, + distanceToOriginInChunks, + }) { + // Generate a simple patch + // ALWAYS use rng and NEVER use Math.random() otherwise the map will look different + // every time you resume the game + if (rng.next() > 0.8) { + const fluidType = rng.choice(Array.from(Object.keys(enumFluidType))); + this.internalGeneratePatch(rng, 4, FLUID_ITEM_SINGLETONS[fluidType]); } - ); + }); this.modInterface.registerItem(FluidItem, itemData => FLUID_ITEM_SINGLETONS[itemData]); } diff --git a/src/js/core/game_state.js b/src/js/core/game_state.js index b08bef77..fb08e28d 100644 --- a/src/js/core/game_state.js +++ b/src/js/core/game_state.js @@ -211,6 +211,7 @@ export class GameState { /** * Should return the html code of the state. * @returns {string} + * @abstract */ getInnerHTML() { abstract; diff --git a/src/js/core/sprites.js b/src/js/core/sprites.js index 51032e4e..d568f994 100644 --- a/src/js/core/sprites.js +++ b/src/js/core/sprites.js @@ -11,6 +11,7 @@ export class BaseSprite { /** * Returns the raw handle * @returns {HTMLImageElement|HTMLCanvasElement} + * @abstract */ getRawTexture() { abstract; diff --git a/src/js/game/base_item.js b/src/js/game/base_item.js index f6ed1672..a6b38a08 100644 --- a/src/js/game/base_item.js +++ b/src/js/game/base_item.js @@ -29,6 +29,7 @@ export class BaseItem extends BasicSerializableObject { /** * Returns a string id of the item * @returns {string} + * @abstract */ getAsCopyableKey() { abstract; @@ -49,9 +50,9 @@ export class BaseItem extends BasicSerializableObject { /** * Override for custom comparison - * @abstract * @param {BaseItem} other * @returns {boolean} + * @abstract */ equalsImpl(other) { abstract; @@ -62,6 +63,7 @@ export class BaseItem extends BasicSerializableObject { * Draws the item to a canvas * @param {CanvasRenderingContext2D} context * @param {number} size + * @abstract */ drawFullSizeOnCanvas(context, size) { abstract; @@ -86,6 +88,7 @@ export class BaseItem extends BasicSerializableObject { * @param {number} y * @param {DrawParameters} parameters * @param {number=} diameter + * @abstract */ drawItemCenteredImpl(x, y, parameters, diameter = globalConfig.defaultItemDiameter) { abstract; diff --git a/src/js/game/component.js b/src/js/game/component.js index cff14d62..9e1b63f4 100644 --- a/src/js/game/component.js +++ b/src/js/game/component.js @@ -4,6 +4,7 @@ export class Component extends BasicSerializableObject { /** * Returns the components unique id * @returns {string} + * @abstract */ static getId() { abstract; diff --git a/src/js/game/components/storage.js b/src/js/game/components/storage.js index be243a44..46305929 100644 --- a/src/js/game/components/storage.js +++ b/src/js/game/components/storage.js @@ -5,6 +5,10 @@ import { typeItemSingleton } from "../item_resolver"; import { ColorItem } from "../items/color_item"; import { ShapeItem } from "../items/shape_item"; +/** @type {{ + * [x: string]: (item: BaseItem) => Boolean + * }} */ +export const MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER = {}; export class StorageComponent extends Component { static getId() { return "Storage"; @@ -56,11 +60,15 @@ export class StorageComponent extends Component { const itemType = item.getItemType(); - // Check type matches if (itemType !== this.storedItem.getItemType()) { + // Check type matches return false; } + if (MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType]) { + return MODS_ADDITIONAL_STORAGE_ITEM_RESOLVER[itemType].apply(this, [item]); + } + if (itemType === "color") { return /** @type {ColorItem} */ (this.storedItem).color === /** @type {ColorItem} */ (item).color; } diff --git a/src/js/game/entity.js b/src/js/game/entity.js index 3010f067..9acaf26b 100644 --- a/src/js/game/entity.js +++ b/src/js/game/entity.js @@ -224,6 +224,7 @@ export class Entity extends BasicSerializableObject { /** * override, should draw the entity * @param {DrawParameters} parameters + * @abstract */ drawImpl(parameters) { abstract; diff --git a/src/js/game/game_mode.js b/src/js/game/game_mode.js index 5414306c..2c4527e3 100644 --- a/src/js/game/game_mode.js +++ b/src/js/game/game_mode.js @@ -144,6 +144,7 @@ export class GameMode extends BasicSerializableObject { /** * @param {number} w * @param {number} h + * @abstract */ adjustZone(w = 0, h = 0) { abstract; diff --git a/src/js/game/hud/base_hud_part.js b/src/js/game/hud/base_hud_part.js index 84b6d619..91b3fd3a 100644 --- a/src/js/game/hud/base_hud_part.js +++ b/src/js/game/hud/base_hud_part.js @@ -25,6 +25,7 @@ export class BaseHUDPart { /** * Should initialize the element, called *after* the elements have been created + * @abstract */ initialize() { abstract; diff --git a/src/js/game/hud/parts/constant_signal_edit.js b/src/js/game/hud/parts/constant_signal_edit.js index a6e7501d..f7099046 100644 --- a/src/js/game/hud/parts/constant_signal_edit.js +++ b/src/js/game/hud/parts/constant_signal_edit.js @@ -15,6 +15,11 @@ import trim from "trim"; import { enumColors } from "../../colors"; import { ShapeDefinition } from "../../shape_definition"; +/** @type {{ + * [x: string]: (entity: Entity) => BaseItem + * }} */ +export const MODS_ADDITIONAL_CONSTANT_SIGNAL_RESOLVER = {}; + export class HUDConstantSignalEdit extends BaseHUDPart { initialize() { this.root.camera.downPreHandler.add(this.downPreHandler, this); @@ -190,6 +195,10 @@ export class HUDConstantSignalEdit extends BaseHUDPart { code = trim(code); const codeLower = code.toLowerCase(); + if (MODS_ADDITIONAL_CONSTANT_SIGNAL_RESOLVER[codeLower]) { + return MODS_ADDITIONAL_CONSTANT_SIGNAL_RESOLVER[codeLower].apply(this, [entity]); + } + if (enumColors[codeLower]) { return COLOR_ITEM_SINGLETONS[codeLower]; } diff --git a/src/js/game/meta_building.js b/src/js/game/meta_building.js index 0e92d3d9..4482a281 100644 --- a/src/js/game/meta_building.js +++ b/src/js/game/meta_building.js @@ -278,6 +278,7 @@ export class MetaBuilding { * Should setup the entity components * @param {Entity} entity * @param {GameRoot} root + * @abstract */ setupEntityComponents(entity, root) { abstract; diff --git a/src/js/game/systems/display.js b/src/js/game/systems/display.js index 65cb3a5c..a54c7a10 100644 --- a/src/js/game/systems/display.js +++ b/src/js/game/systems/display.js @@ -7,6 +7,15 @@ import { isTrueItem } from "../items/boolean_item"; import { ColorItem, COLOR_ITEM_SINGLETONS } from "../items/color_item"; import { MapChunkView } from "../map_chunk_view"; +/** @type {{ + * [x: string]: (item: BaseItem) => BaseItem + * }} */ +export const MODS_ADDITIONAL_DISPLAY_ITEM_RESOLVER = {}; + +/** @type {{ + * [x: string]: (parameters: import("../../core/draw_parameters").DrawParameters, entity: import("../entity").Entity, item: BaseItem) => BaseItem + * }} */ +export const MODS_ADDITIONAL_DISPLAY_ITEM_DRAW = {}; export class DisplaySystem extends GameSystem { constructor(root) { super(root); @@ -32,6 +41,10 @@ export class DisplaySystem extends GameSystem { return null; } + if (MODS_ADDITIONAL_DISPLAY_ITEM_RESOLVER[value.getItemType()]) { + return MODS_ADDITIONAL_DISPLAY_ITEM_RESOLVER[value.getItemType()].apply(this, [value]); + } + switch (value.getItemType()) { case "boolean": { return isTrueItem(value) ? COLOR_ITEM_SINGLETONS[enumColors.white] : null; @@ -74,6 +87,14 @@ export class DisplaySystem extends GameSystem { continue; } + if (MODS_ADDITIONAL_DISPLAY_ITEM_DRAW[value.getItemType()]) { + return MODS_ADDITIONAL_DISPLAY_ITEM_DRAW[value.getItemType()].apply(this, [ + parameters, + entity, + value, + ]); + } + const origin = entity.components.StaticMapEntity.origin; if (value.getItemType() === "color") { this.displaySprites[/** @type {ColorItem} */ (value).color].drawCachedCentered( diff --git a/src/js/mods/mod_interface.js b/src/js/mods/mod_interface.js index 295014ca..8130dc5a 100644 --- a/src/js/mods/mod_interface.js +++ b/src/js/mods/mod_interface.js @@ -594,8 +594,8 @@ export class ModInterface { * @param {string=} payload.name * @param {string=} payload.description * @param {Vector=} payload.dimensions - * @param {(root: GameRoot) => [string, string][]} payload.additionalStatistics - * @param {(root: GameRoot) => boolean[]} payload.isUnlocked + * @param {(root: GameRoot) => [string, string][]=} payload.additionalStatistics + * @param {(root: GameRoot) => boolean[]=} payload.isUnlocked */ addVariantToExistingBuilding(metaClass, variant, payload) { if (!payload.rotationVariants) { @@ -671,9 +671,14 @@ export class ModInterface { })); } - // Register our variant finally + // Register our variant finally, with rotation variants payload.rotationVariants.forEach(rotationVariant => - shapez.registerBuildingVariant(internalId, metaClass, variant, rotationVariant) + shapez.registerBuildingVariant( + rotationVariant ? internalId + "-" + rotationVariant : internalId, + metaClass, + variant, + rotationVariant + ) ); } } diff --git a/src/js/mods/modloader.js b/src/js/mods/modloader.js index daf0766e..3d0985d5 100644 --- a/src/js/mods/modloader.js +++ b/src/js/mods/modloader.js @@ -112,7 +112,8 @@ export class ModLoader { // @ts-ignore const module = modules(key); for (const member in module) { - if (member === "default") { + if (member === "default" || member === "__$S__") { + // Setter continue; } if (exports[member]) { @@ -124,7 +125,7 @@ export class ModLoader { return module[member]; }, set(v) { - throw new Error("Overriding the shapez exports is currently not possible"); + module.__$S__(member, v); }, }); } diff --git a/src/js/platform/achievement_provider.js b/src/js/platform/achievement_provider.js index 583dbfb2..3b60ad95 100644 --- a/src/js/platform/achievement_provider.js +++ b/src/js/platform/achievement_provider.js @@ -92,6 +92,7 @@ export class AchievementProviderInterface { /** * Initializes the achievement provider. * @returns {Promise} + * @abstract */ initialize() { abstract; @@ -102,6 +103,7 @@ export class AchievementProviderInterface { * Opportunity to do additional initialization work with the GameRoot. * @param {GameRoot} root * @returns {Promise} + * @abstract */ onLoad(root) { abstract; @@ -118,6 +120,7 @@ export class AchievementProviderInterface { * Call to activate an achievement with the provider * @param {string} key - Maps to an Achievement * @returns {Promise} + * @abstract */ activate(key) { abstract; @@ -127,6 +130,7 @@ export class AchievementProviderInterface { /** * Checks if achievements are supported in the current build * @returns {boolean} + * @abstract */ hasAchievements() { abstract; diff --git a/src/js/platform/ad_provider.js b/src/js/platform/ad_provider.js index a614a793..4aa8949c 100644 --- a/src/js/platform/ad_provider.js +++ b/src/js/platform/ad_provider.js @@ -19,6 +19,7 @@ export class AdProviderInterface { /** * Returns if this provider serves ads at all * @returns {boolean} + * @abstract */ getHasAds() { abstract; @@ -29,6 +30,7 @@ export class AdProviderInterface { * Returns if it would be possible to show a video ad *now*. This can be false if for * example the last video ad is * @returns {boolean} + * @abstract */ getCanShowVideoAd() { abstract; diff --git a/src/js/platform/analytics.js b/src/js/platform/analytics.js index 7bd7ae50..cf839aca 100644 --- a/src/js/platform/analytics.js +++ b/src/js/platform/analytics.js @@ -11,6 +11,7 @@ export class AnalyticsInterface { /** * Initializes the analytics * @returns {Promise} + * @abstract */ initialize() { abstract; diff --git a/src/js/platform/game_analytics.js b/src/js/platform/game_analytics.js index 00286fc2..19fdf752 100644 --- a/src/js/platform/game_analytics.js +++ b/src/js/platform/game_analytics.js @@ -11,6 +11,7 @@ export class GameAnalyticsInterface { /** * Initializes the analytics * @returns {Promise} + * @abstract */ initialize() { abstract; @@ -43,6 +44,7 @@ export class GameAnalyticsInterface { /** * Activates a DLC * @param {string} dlc + * @abstract */ activateDlc(dlc) { abstract; diff --git a/src/js/platform/storage.js b/src/js/platform/storage.js index 165ee828..c5c3701c 100644 --- a/src/js/platform/storage.js +++ b/src/js/platform/storage.js @@ -13,6 +13,7 @@ export class StorageInterface { /** * Initializes the storage * @returns {Promise} + * @abstract */ initialize() { abstract; @@ -24,6 +25,7 @@ export class StorageInterface { * @param {string} filename * @param {string} contents * @returns {Promise} + * @abstract */ writeFileAsync(filename, contents) { abstract; @@ -34,6 +36,7 @@ export class StorageInterface { * Reads a string asynchronously. Returns Promise if file was not found. * @param {string} filename * @returns {Promise} + * @abstract */ readFileAsync(filename) { abstract; diff --git a/src/js/platform/wrapper.js b/src/js/platform/wrapper.js index f80c2fd6..e0a896fb 100644 --- a/src/js/platform/wrapper.js +++ b/src/js/platform/wrapper.js @@ -81,6 +81,7 @@ export class PlatformWrapperInterface { * Attempt to open an external url * @param {string} url * @param {boolean=} force Whether to always open the url even if not allowed + * @abstract */ openExternalLink(url, force = false) { abstract; @@ -88,6 +89,7 @@ export class PlatformWrapperInterface { /** * Attempt to restart the app + * @abstract */ performRestart() { abstract; @@ -103,6 +105,7 @@ export class PlatformWrapperInterface { /** * Should set the apps fullscreen state to the desired state * @param {boolean} flag + * @abstract */ setFullscreen(flag) { abstract; @@ -117,6 +120,7 @@ export class PlatformWrapperInterface { /** * Attempts to quit the app + * @abstract */ exitApp() { abstract; diff --git a/src/js/profile/setting_types.js b/src/js/profile/setting_types.js index 4df02892..943e8e53 100644 --- a/src/js/profile/setting_types.js +++ b/src/js/profile/setting_types.js @@ -64,6 +64,7 @@ export class BaseSetting { /** * Returns the HTML for this setting * @param {Application} app + * @abstract */ getHtml(app) { abstract; @@ -84,6 +85,7 @@ export class BaseSetting { /** * Attempts to modify the setting + * @abstract */ modify() { abstract; @@ -107,6 +109,7 @@ export class BaseSetting { * Validates the set value * @param {any} value * @returns {boolean} + * @abstract */ validate(value) { abstract; diff --git a/src/js/savegame/serialization_data_types.js b/src/js/savegame/serialization_data_types.js index df352e78..c27e2295 100644 --- a/src/js/savegame/serialization_data_types.js +++ b/src/js/savegame/serialization_data_types.js @@ -48,6 +48,7 @@ export class BaseDataType { /** * Serializes a given raw value * @param {any} value + * @abstract */ serialize(value) { abstract; @@ -68,6 +69,7 @@ export class BaseDataType { * @param {object} targetObject * @param {string|number} targetKey * @returns {string|void} String error code or null on success + * @abstract */ deserialize(value, targetObject, targetKey, root) { abstract; @@ -92,6 +94,7 @@ export class BaseDataType { /** * INTERNAL Should return the json schema representation + * @abstract */ getAsJsonSchemaUncached() { abstract; @@ -131,6 +134,7 @@ export class BaseDataType { /** * Should return a cacheable key + * @abstract */ getCacheKey() { abstract; diff --git a/translations/base-fr.yaml b/translations/base-fr.yaml index a0ec9066..e1371279 100644 --- a/translations/base-fr.yaml +++ b/translations/base-fr.yaml @@ -454,8 +454,9 @@ ingame: clearItems: Supprimer les objets share: Partager report: Signaler - clearBuildings: Effacer les batiments - resetPuzzle: Reset Puzzle + clearBuildings: Effacer les Constructions + resetPuzzle: Réinitialiser le Puzzle + puzzleEditorControls: title: Créateur de Puzzles instructions: @@ -475,6 +476,7 @@ ingame: - 6. Une fois publié tous les batiments seront supprimés sauf les générateurs et les récepteurs - C'est la partie ou le joueur est censé se débrouiller seul :) + puzzleCompletion: title: Puzzle Résolu ! titleLike: "Cliquez sur le cœur si vous avez aimé le Puzzle:" @@ -485,7 +487,7 @@ ingame: nextPuzzle: Puzzle suivant puzzleMetadata: author: Auteur - shortKey: Clée courte + shortKey: Raccourci clavier rating: Niveau de difficulté averageDuration: Durée moyenne completionRate: Taux de réussite @@ -1073,7 +1075,7 @@ settings: visible en dézoomant. shapeTooltipAlwaysOn: title: Info-bulle de forme - Toujours afficher - description: Si activé une info-bule s'affiche quand vous survolez un batiment + description: Si activé, une info-bule s'affiche quand vous survolez un batiment sinon il faut maintenir 'ALT'. tickrateHz: Hz newBadge: New! @@ -1152,10 +1154,10 @@ keybindings: placementDisableAutoOrientation: Désactiver l’orientation automatique placeMultiple: Rester en mode placement placeInverse: Inverser l’orientation des convoyeurs - rotateToUp: "Rotate: Point Up" - rotateToDown: "Rotate: Point Down" - rotateToRight: "Rotate: Point Right" - rotateToLeft: "Rotate: Point Left" + rotateToUp: "Rotation : pointer vers le haut" + rotateToDown: "Rotation : pointer vers le bas" + rotateToRight: "Rotation : pointer vers le droite" + rotateToLeft: "Rotation : pointer vers le gauche" constant_producer: Producteur Constant goal_acceptor: Récepteur block: Bloc @@ -1311,16 +1313,16 @@ puzzleMenu: un clic droit sur shapez.io dans votre bibliothèque, en sélectionnant Propriétés > DLC. search: - action: Chercher + action: Recherche placeholder: Entrez un puzzle ou un nom d'auteur - includeCompleted: Inclure les puzzles terminés + includeCompleted: Inclure terminé difficulties: - any: Toutes difficultés + any: Toute difficulté easy: Facile - medium: Moyen - hard: Difficile + medium: Medium + hard: Dificile durations: - any: Toutes durées + any: Toute durée short: Court (< 2 min) medium: Normal long: Long (> 10 min) @@ -1353,18 +1355,17 @@ backendErrors: no-permission: Vous n'êtes pas autorisé à effectuer cette action. mods: title: Mods - author: Author + author: Auteur version: Version - modWebsite: Website - openFolder: Open Mods Folder - folderOnlyStandalone: Opening the mod folder is only possible when running the standalone. - browseMods: Browse Mods - modsInfo: To install and manage mods, copy them to the mods folder within the - game directory. You can also use the 'Open Mods Folder' button on the - top right. - noModSupport: You need the standalone version on Steam to install mods. + modWebsite: Page web + openFolder: Ouvrir le dossier des mods + folderOnlyStandalone: Ouvrir le dossier des mods est uniquement possible avec la version complète + browseMods: Chercher les Mods + modsInfo: Pour installer et gérer les mods, copier-les dans le dossier Mods dans le répertoire du jeu. + Vous pouvez aussi utiliser le bouton 'Ouvrir le dossier des Mods' en haut à droite + noModSupport: Vous avez besoin de la version complète sur Steam pour installer des mods. togglingComingSoon: - title: Coming Soon - description: Enabling or disabling mods is currently only possible by copying - the mod file from or to the mods/ folder. However, being able to - toggle them here is planned for a future update! + title: Bientôt disponible + description: Activer ou désactiver un mod est pour le moment possible qu'en + copiant le fichier du mod depuis ou vers le dossier des mods. Cependant, + activer ou désactiver un mod est prévu pour une mise à jour future ! diff --git a/translations/base-nl.yaml b/translations/base-nl.yaml index 9154e6ca..24bdc9e2 100644 --- a/translations/base-nl.yaml +++ b/translations/base-nl.yaml @@ -81,9 +81,9 @@ mainMenu: puzzleDlcWishlist: Voeg nu toe aan je verlanglijst! puzzleDlcViewNow: Bekijk DLC mods: - title: Active Mods - warningPuzzleDLC: Playing the Puzzle DLC is not possible with mods. Please - disable all mods to play the DLC. + title: Actieve Mods + warningPuzzleDLC: Het spelen van de Puzzle DLC is niet mogelijk met mods. Schakel + alsjeblieft alle mods uit om de DLC te spelen. dialogs: buttons: ok: OK @@ -270,12 +270,12 @@ dialogs: desc: Weet je zeker dat je '' wilt verwijderen? Dit kan niet ongedaan gemaakt worden! modsDifference: - title: Mod Warning + title: Mod Waarschuwing desc: The currently installed mods differ from the mods the savegame was created with. This might cause the savegame to break or not load at all. Are you sure you want to continue? - missingMods: Missing Mods - newMods: Newly installed Mods + missingMods: Missende Mods + newMods: Nieuw geïnstalleerde Mods ingame: keybindingsOverlay: moveMap: Beweeg rond de wereld @@ -1188,10 +1188,8 @@ tips: - Knippers knippen altijd verticaal, ongeacht hun oriëntatie. - De opslagbuffer geeft prioriteit aan de eerste uitvoer. - Investeer tijd om herhaalbare ontwerpen te maken - het is het waard! - - Invest time to build repeatable designs - it's worth it! - Je kunt <b>ALT</b> ingedrukt houden om de richting van de geplaatste lopende banden om te keren. - - You can hold <b>ALT</b> to invert the direction of placed belts. - Vormontginningen die verder van de HUB verwijderd zijn, zijn complexer. - Machines hebben een beperkte snelheid, verdeel ze voor maximale efficiëntie. @@ -1214,7 +1212,6 @@ tips: mannen. - Maak een aparte blueprint fabriek. Ze zijn belangrijk voor modules. - Bekijk de kleurenmixer eens wat beter, en je vragen worden beantwoord. - - Have a closer look at the color mixer, and your questions will be answered. - Use <b>CTRL</b> + Click to select an area. - Met het speldpictogram naast elke vorm in de upgradelijst zet deze vast op het scherm. @@ -1234,7 +1231,6 @@ tips: - Druk twee keer op F4 om de tegel van je muis en camera weer te geven. - Je kan aan de linkerkant op een vastgezette vorm klikken om deze los te maken. - - You can click a pinned shape on the left side to unpin it. puzzleMenu: play: Spelen edit: Bewerken @@ -1280,21 +1276,21 @@ puzzleMenu: easy: Makkelijk medium: Medium hard: Moeilijk - unknown: Unrated + unknown: Onbeoordeeld search: - action: Search - placeholder: Enter a puzzle or author name - includeCompleted: Include Completed + action: Zoeken + placeholder: Voer een puzzel- of auteursnaam in + includeCompleted: Inclusief Voltooide difficulties: - any: Any Difficulty - easy: Easy + any: Elke Moeilijkheidsgraad + easy: Makkelijk medium: Medium - hard: Hard + hard: Moeilijk durations: - any: Any Duration - short: Short (< 2 min) - medium: Normal - long: Long (> 10 min) + any: Elke Tijd + short: Kort (< 2 min) + medium: Normaal + long: Lang (> 10 min) backendErrors: ratelimit: Je voert je handelingen te vaak uit. Wacht alstublieft even. invalid-api-key: Kan niet communiceren met de servers, probeer alstublieft het @@ -1323,18 +1319,17 @@ backendErrors: no-permission: Je bent niet gemachtigd om deze actie uit te voeren. mods: title: Mods - author: Author - version: Version + author: Auteur + version: Versie modWebsite: Website - openFolder: Open Mods Folder - folderOnlyStandalone: Opening the mod folder is only possible when running the standalone. - browseMods: Browse Mods - modsInfo: To install and manage mods, copy them to the mods folder within the - game directory. You can also use the 'Open Mods Folder' button on the - top right. - noModSupport: You need the standalone version on Steam to install mods. + openFolder: Open Mods Map + folderOnlyStandalone: Het openen van de mod map is alleen mogelijk bij het gebruiken van de zelfstandige versie. + browseMods: Door mods bladeren + modsInfo: Om mods te installeren en te beheren, kopieert u ze naar de map mods in de + spel map. U kunt ook de knop 'Open Mods Map' gebruiken rechtsboven. + noModSupport: Je hebt de zelfstandige versie op Steam nodig om mods te installeren. togglingComingSoon: - title: Coming Soon - description: Enabling or disabling mods is currently only possible by copying - the mod file from or to the mods/ folder. However, being able to - toggle them here is planned for a future update! + title: Binnenkort Beschikbaar + description: Mods in- of uitschakelen is momenteel alleen mogelijk door + het mod-bestand van of naar de mods map te kopiëren. Echter, in staat zijn om + ze hier in- of uitteschakelen is gepland voor een toekomstige update! diff --git a/translations/base-ru.yaml b/translations/base-ru.yaml index f93423da..f3bb7c95 100644 --- a/translations/base-ru.yaml +++ b/translations/base-ru.yaml @@ -95,9 +95,9 @@ dialogs: viewUpdate: Посмотреть Обновление showUpgrades: Показать Улучшения showKeybindings: Показать Управление (Привязку клавиш) - retry: Retry - continue: Continue - playOffline: Play Offline + retry: Заново + continue: Подолжить + playOffline: Играть оффлайн importSavegameError: title: Ошибка импортирования text: Не удалось импортировать сохранение игры. @@ -245,7 +245,7 @@ dialogs: puzzleShare: title: Короткий ключ скопирован desc: Короткий ключ головоломки (<key>) был скопирован в буфер обмена! Он может - быть введен в меню головолом для доступа к головоломке. + быть введен в меню головоломок для доступа к головоломке. puzzleReport: title: Жалоба на головоломку options: @@ -292,7 +292,7 @@ ingame: clearSelection: Отменить pipette: Пипетка switchLayers: Переключить слои - clearBelts: Clear belts + clearBelts: Очистить конвейеры colors: red: Красный green: Зеленый @@ -451,8 +451,8 @@ ingame: clearItems: Очистить предметы share: Поделиться report: Пожаловаться - clearBuildings: Clear Buildings - resetPuzzle: Reset Puzzle + clearBuildings: Очистить постройки + resetPuzzle: Сброс головоломки puzzleEditorControls: title: Редактор головоломок instructions: @@ -479,7 +479,7 @@ ingame: titleRatingDesc: Ваша оценка поможет мне в будущем делать вам лучшие предложения continueBtn: Продолжить игру menuBtn: Меню - nextPuzzle: Next Puzzle + nextPuzzle: Следующая головоломка puzzleMetadata: author: Автор shortKey: Короткий ключ @@ -709,8 +709,8 @@ buildings: description: Доставьте фигуру в приемник, чтобы установить их в качестве цели. block: default: - name: Block - description: Allows you to block a tile. + name: Блок + description: Блокирует это место от установки чего-либо storyRewards: reward_cutter_and_trash: title: Разрезание Фигур @@ -1044,11 +1044,11 @@ settings: title: Размер ресурсов на карте description: Устанавливает размер фигур на карте (когда вид достаточно отдалён). shapeTooltipAlwaysOn: - title: Shape Tooltip - Show Always - description: Whether to always show the shape tooltip when hovering buildings, - instead of having to hold 'ALT'. - tickrateHz: <amount> Hz - newBadge: New! + + title: Показывать подсказку фигуры + description: Показывать ли подсказку фигуры всегда или только при удержании 'ALT'. + tickrateHz: <amount> Гц + newBadge: Новое! keybindings: title: Настройки управления hint: "Подсказка: Обязательно используйте CTRL, SHIFT и ALT! Они дают разные @@ -1131,7 +1131,7 @@ keybindings: goal_acceptor: Приёмник предметов block: Блок massSelectClear: Очистить конвейеры - showShapeTooltip: Show shape output tooltip + showShapeTooltip: Показывать подсказку фигуры на выходе about: title: Об игре body: >- @@ -1272,19 +1272,19 @@ puzzleMenu: dlcHint: Уже купили DLC? Проверьте, что оно активировано, нажав правый клик на shapez.io в своей библиотеке, и далее Свойства > Доп. Контент search: - action: Search - placeholder: Enter a puzzle or author name - includeCompleted: Include Completed + action: Поиск + placeholder: Введите название головоломки или имя автора + includeCompleted: Показывать завершённые difficulties: - any: Any Difficulty - easy: Easy - medium: Medium - hard: Hard + any: Любая сложность + easy: Легко + medium: Средне + hard: Сложно durations: - any: Any Duration - short: Short (< 2 min) - medium: Normal - long: Long (> 10 min) + any: Любая длительность + short: Короткие (< 2 мин.) + medium: Средние + long: Долгие (> 10 мин.) backendErrors: ratelimit: Вы слишком часто выполняете свои действия. Подождите немного. invalid-api-key: Не удалось связаться с сервером, попробуйте diff --git a/translations/base-tr.yaml b/translations/base-tr.yaml index 0a2a7a6d..472269a8 100644 --- a/translations/base-tr.yaml +++ b/translations/base-tr.yaml @@ -79,9 +79,9 @@ mainMenu: puzzleDlcWishlist: İstek listene ekle! puzzleDlcViewNow: Paketi (DLC) görüntüle mods: - title: Active Mods - warningPuzzleDLC: Playing the Puzzle DLC is not possible with mods. Please - disable all mods to play the DLC. + title: Aktif Modlar + warningPuzzleDLC: Modlarla Yapboz DLC'sini oynamak mümkün değil. Lütfen + Yapboz DLC'sini oynayabilmek için bütün modları devre dışı bırakınız. dialogs: buttons: ok: OK @@ -263,12 +263,12 @@ dialogs: desc: "'<title>' yapbozunu silmek istediğinize emin misiniz? Bu işlem geri alınamaz!" modsDifference: - title: Mod Warning - desc: The currently installed mods differ from the mods the savegame was created - with. This might cause the savegame to break or not load at all. Are - you sure you want to continue? - missingMods: Missing Mods - newMods: Newly installed Mods + title: Mod Uyarısı + desc: Halihazırda kullanılan modlar, kayıtlı oyunun yaratıldığı modlardan farklıdır. + Bu işlem kayıtlı oyunun bozulmasına veya hiç yüklenmemesine neden olabilir. Devam + etmek istediğinize emin misiniz? + missingMods: Eksik Modlar + newMods: Yeni yüklenen Modlar ingame: keybindingsOverlay: moveMap: Hareket Et @@ -1038,7 +1038,7 @@ settings: description: Şekil ipuçlarını 'ALT' tuşuna basarak göstermek yerine her zaman gösterir. tickrateHz: <amount> Hz - newBadge: New! + newBadge: Yeni! keybindings: title: Tuş Atamaları hint: "İpucu: CTRL, SHIFT ve ALT tuşlarından yararlanın! Farklı yerleştirme @@ -1052,7 +1052,7 @@ keybindings: massSelect: Çoklu Seçİm buildings: Yapı Kısayolları placementModifiers: Yerleştİrme Özellİklerİ - mods: Provided by Mods + mods: Modlar tarafından sağlandı mappings: confirm: Kabul back: Geri @@ -1307,19 +1307,19 @@ backendErrors: istiyorsanız support@shapez.io ile iletişime geçiniz! no-permission: Bu işlemi yapmak için izniniz yok. mods: - title: Mods - author: Author - version: Version - modWebsite: Website - openFolder: Open Mods Folder - folderOnlyStandalone: Opening the mod folder is only possible when running the standalone. - browseMods: Browse Mods - modsInfo: To install and manage mods, copy them to the mods folder within the - game directory. You can also use the 'Open Mods Folder' button on the - top right. - noModSupport: You need the standalone version on Steam to install mods. + title: Modlar + author: Sahibi + version: Sürüm + modWebsite: İnternet sitesi + openFolder: Mod Klasörünü Aç + folderOnlyStandalone: Mod klasörünü açmak sadece tam sürümü çalıştırıyorken mümkün. + browseMods: Modlara Gözat + modsInfo: Modları yüklemek ve yönetmek için, bunları oyun dizini içerisindeki Modlar + klasörüne kopyalayın. Ayrıca sağ üstteki 'Modlar Klasörünü Aç' düğmesini de + kullanabilirsiniz. + noModSupport: Mod yükleyebilmek için tam sürümü çalıştırmalısınız. togglingComingSoon: - title: Coming Soon - description: Enabling or disabling mods is currently only possible by copying - the mod file from or to the mods/ folder. However, being able to - toggle them here is planned for a future update! + title: Yakında Gelecek + description: Modları etkinleştirmek veya devre dışı bırakmak şu anda yalnızca + dosyaları Mod klasörüne kopyalayarak mümkündür. Ancak modları burada + değiştirmek gelecekteki bir güncelleme için planlanmıştır!