mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Get rid of some todos / fixmes
This commit is contained in:
parent
1025bede1f
commit
8260edb373
@ -71,10 +71,6 @@ releaseUploader.gulptasksReleaseUploader($, gulp, buildFolder);
|
||||
const translations = require("./translations");
|
||||
translations.gulptasksTranslations($, gulp, buildFolder);
|
||||
|
||||
// FIXME
|
||||
// const cordova = require("./cordova");
|
||||
// cordova.gulptasksCordova($, gulp, buildFolder);
|
||||
|
||||
///////////////////// BUILD TASKS /////////////////////
|
||||
|
||||
// Cleans up everything
|
||||
|
@ -146,8 +146,6 @@ export class ClickDetector {
|
||||
this.touchend.removeAll();
|
||||
this.touchcancel.removeAll();
|
||||
|
||||
// TODO: Remove pointer captures
|
||||
|
||||
this.element = null;
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ export class DrawParameters {
|
||||
/** @type {number} */
|
||||
this.zoomLevel = zoomLevel;
|
||||
|
||||
// FIXME: Not really nice
|
||||
/** @type {GameRoot} */
|
||||
this.root = root;
|
||||
}
|
||||
|
@ -44,7 +44,6 @@ export class RestrictionManager extends ReadWriteProxy {
|
||||
* @param {any} data
|
||||
*/
|
||||
migrate(data) {
|
||||
// Todo
|
||||
return ExplainedResult.good();
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ const variantsCache = new Map();
|
||||
export function registerBuildingVariant(
|
||||
code,
|
||||
meta,
|
||||
variant = "default" /* FIXME: Circular dependency, actually its defaultBuildingVariant */,
|
||||
variant = "default" /* @TODO: Circular dependency, actually its defaultBuildingVariant */,
|
||||
rotationVariant = 0
|
||||
) {
|
||||
assert(!gBuildingVariants[code], "Duplicate id: " + code);
|
||||
|
@ -191,7 +191,6 @@ export class MetaUndergroundBeltBuilding extends MetaBuilding {
|
||||
) {
|
||||
tile = tile.addScalars(searchVector.x, searchVector.y);
|
||||
|
||||
/* WIRES: FIXME */
|
||||
const contents = root.map.getTileContent(tile, "regular");
|
||||
if (contents) {
|
||||
const undergroundComp = contents.components.UndergroundBelt;
|
||||
|
@ -182,23 +182,6 @@ export class EntityManager extends BasicSerializableObject {
|
||||
return this.componentToEntity[componentHandle.getId()] || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all of a given class. This is SLOW!
|
||||
* @param {object} entityClass
|
||||
* @returns {Array<Entity>} entities
|
||||
*/
|
||||
getAllOfClass(entityClass) {
|
||||
// FIXME: Slow
|
||||
const result = [];
|
||||
for (let i = 0; i < this.entities.length; ++i) {
|
||||
const entity = this.entities[i];
|
||||
if (entity instanceof entityClass) {
|
||||
result.push(entity);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unregisters all components of an entity from the component to entity mapping
|
||||
* @param {Entity} entity
|
||||
|
@ -11,6 +11,7 @@ import { ShapeItem } from "../../items/shape_item";
|
||||
import { WireComponent } from "../../components/wire";
|
||||
import { LeverComponent } from "../../components/lever";
|
||||
|
||||
// @todo: Make dictionary
|
||||
const tutorialsByLevel = [
|
||||
// Level 1
|
||||
[
|
||||
|
@ -225,8 +225,7 @@ export class ItemEjectorSystem extends GameSystemWithFilter {
|
||||
*/
|
||||
tryPassOverItem(item, receiver, slotIndex) {
|
||||
// Try figuring out how what to do with the item
|
||||
// TODO: Kinda hacky. How to solve this properly? Don't want to go through inheritance hell.
|
||||
// Also its just a few cases (hope it stays like this .. :x).
|
||||
// @TODO: Kinda hacky. How to solve this properly? Don't want to go through inheritance hell.
|
||||
|
||||
const beltComp = receiver.components.Belt;
|
||||
if (beltComp) {
|
||||
|
@ -55,7 +55,7 @@ export const enumHubGoalRewardsToContentUnlocked = {
|
||||
]),
|
||||
[enumHubGoalRewards.reward_logic_gates]: typed([[MetaLogicGateBuilding, defaultBuildingVariant]]),
|
||||
[enumHubGoalRewards.reward_filter]: typed([[MetaFilterBuilding, defaultBuildingVariant]]),
|
||||
[enumHubGoalRewards.reward_virtual_processing]: null, // @TODO!
|
||||
[enumHubGoalRewards.reward_virtual_processing]: null,
|
||||
|
||||
[enumHubGoalRewards.reward_wires_painter_and_levers]: typed([
|
||||
[MetaPainterBuilding, enumPainterVariants.quad],
|
||||
|
@ -41,7 +41,7 @@ export class SavegameManager extends ReadWriteProxy {
|
||||
}
|
||||
|
||||
verify(data) {
|
||||
// TODO / FIXME!!!!
|
||||
// @TODO
|
||||
return ExplainedResult.good();
|
||||
}
|
||||
|
||||
|
@ -21,10 +21,6 @@ export class PreloadState extends GameState {
|
||||
<div class="loadingImage"></div>
|
||||
<div class="loadingStatus">
|
||||
<span class="desc">Booting</span>
|
||||
<span class="bar">
|
||||
<span class="inner" style="width: 0%"></span>
|
||||
<span class="status">0%</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<span class="prefab_GameHint"></span>
|
||||
@ -56,10 +52,6 @@ export class PreloadState extends GameState {
|
||||
|
||||
/** @type {HTMLElement} */
|
||||
this.statusText = this.htmlElement.querySelector(".loadingStatus > .desc");
|
||||
/** @type {HTMLElement} */
|
||||
this.statusBar = this.htmlElement.querySelector(".loadingStatus > .bar > .inner");
|
||||
/** @type {HTMLElement} */
|
||||
this.statusBarText = this.htmlElement.querySelector(".loadingStatus > .bar > .status");
|
||||
|
||||
/** @type {HTMLElement} */
|
||||
this.hintsText = this.htmlElement.querySelector(".prefab_GameHint");
|
||||
@ -67,7 +59,6 @@ export class PreloadState extends GameState {
|
||||
this.nextHintDuration = 0;
|
||||
|
||||
this.currentStatus = "booting";
|
||||
this.currentIndex = 0;
|
||||
|
||||
this.startLoading();
|
||||
}
|
||||
@ -259,16 +250,8 @@ export class PreloadState extends GameState {
|
||||
*/
|
||||
setStatus(text) {
|
||||
logger.log("✅ " + text);
|
||||
this.currentIndex += 1;
|
||||
this.currentStatus = text;
|
||||
this.statusText.innerText = text;
|
||||
|
||||
const numSteps = 10; // FIXME
|
||||
|
||||
const percentage = (this.currentIndex / numSteps) * 100.0;
|
||||
this.statusBar.style.width = percentage + "%";
|
||||
this.statusBarText.innerText = findNiceValue(percentage) + "%";
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ function match(originalObj, translatedObj, path = "/") {
|
||||
if (typeof valueOriginal === "object") {
|
||||
match(valueOriginal, valueMatching, path + key + "/");
|
||||
} else if (typeof valueOriginal === "string") {
|
||||
// todo
|
||||
// @todo
|
||||
const originalPlaceholders = matchAll(valueOriginal, placeholderRegexp).toArray();
|
||||
const translatedPlaceholders = matchAll(valueMatching, placeholderRegexp).toArray();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user