mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Changes to allow more flexibility
This commit is contained in:
parent
96c5915660
commit
76a05a5776
@ -19,7 +19,7 @@ import { Vector } from "../core/vector";
|
||||
|
||||
/**
|
||||
* Stores a lookup table for all building variants (for better performance)
|
||||
* @type {Object<string | number, BuildingVariantIdentifier>}
|
||||
* @type {{[x: string]: BuildingVariantIdentifier, [x: number]: BuildingVariantIdentifier}}
|
||||
*/
|
||||
export const gBuildingVariants = {
|
||||
// Set later
|
||||
@ -79,5 +79,5 @@ export function getCodeFromBuildingData(metaBuilding, variant, rotationVariant)
|
||||
false,
|
||||
"Building not found by data: " + metaBuilding.getId() + " / " + variant + " / " + rotationVariant
|
||||
);
|
||||
return 0;
|
||||
return "0";
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ export class StaticMapEntityComponent extends Component {
|
||||
originalRotation: types.float,
|
||||
|
||||
// See building_codes.js
|
||||
code: types.uint,
|
||||
code: types.string,
|
||||
};
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ export class StaticMapEntityComponent extends Component {
|
||||
|
||||
this.origin = origin;
|
||||
this.rotation = rotation;
|
||||
this.code = code;
|
||||
this.code = code.toString();
|
||||
this.originalRotation = originalRotation;
|
||||
}
|
||||
|
||||
|
@ -13,8 +13,12 @@ import { MetaLeverBuilding } from "../../buildings/lever";
|
||||
import { MetaFilterBuilding } from "../../buildings/filter";
|
||||
import { MetaDisplayBuilding } from "../../buildings/display";
|
||||
import { MetaReaderBuilding } from "../../buildings/reader";
|
||||
import { MetaBuilding } from "../../meta_building";
|
||||
|
||||
const supportedBuildings = [
|
||||
/**
|
||||
* @type {Array<typeof MetaBuilding>}
|
||||
*/
|
||||
export const supportedBuildings = [
|
||||
MetaBeltBaseBuilding,
|
||||
MetaSplitterBuilding,
|
||||
MetaUndergroundBeltBuilding,
|
||||
|
@ -7,7 +7,7 @@ import { Application } from "../application";
|
||||
import { Signal, STOP_PROPAGATION } from "../core/signal";
|
||||
import { IS_MOBILE } from "../core/config";
|
||||
import { T } from "../translations";
|
||||
function key(str) {
|
||||
export function key(str) {
|
||||
return str.toUpperCase().charCodeAt(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user