mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Further fixes found during testing, update local config
This commit is contained in:
parent
7cd1ee22fd
commit
f584d9d93e
Binary file not shown.
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 157 KiB |
@ -26,9 +26,6 @@ export default {
|
|||||||
// Allow to zoom freely without limits
|
// Allow to zoom freely without limits
|
||||||
// disableZoomLimits: true,
|
// disableZoomLimits: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
// Shows a border arround every chunk
|
|
||||||
// showChunkBorders: true,
|
|
||||||
// -----------------------------------------------------------------------------------
|
|
||||||
// All rewards can be unlocked by passing just 1 of any shape
|
// All rewards can be unlocked by passing just 1 of any shape
|
||||||
// rewardsInstant: true,
|
// rewardsInstant: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
@ -110,5 +107,8 @@ export default {
|
|||||||
// Allows manual ticking
|
// Allows manual ticking
|
||||||
// manualTickOnly: true,
|
// manualTickOnly: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
|
// Disables slow asserts, useful for debugging performance
|
||||||
|
// disableSlowAsserts: true,
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
/* dev:end */
|
/* dev:end */
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,7 @@ import { MetaBuilding } from "../meta_building";
|
|||||||
import { GameRoot } from "../root";
|
import { GameRoot } from "../root";
|
||||||
import { ConstantSignalComponent } from "../components/constant_signal";
|
import { ConstantSignalComponent } from "../components/constant_signal";
|
||||||
import { generateMatrixRotations } from "../../core/utils";
|
import { generateMatrixRotations } from "../../core/utils";
|
||||||
|
import { enumHubGoalRewards } from "../tutorial_goals";
|
||||||
|
|
||||||
const overlayMatrix = generateMatrixRotations([0, 1, 0, 1, 1, 1, 1, 1, 1]);
|
const overlayMatrix = generateMatrixRotations([0, 1, 0, 1, 1, 1, 1, 1, 1]);
|
||||||
|
|
||||||
@ -21,8 +22,7 @@ export class MetaConstantSignalBuilding extends MetaBuilding {
|
|||||||
* @param {GameRoot} root
|
* @param {GameRoot} root
|
||||||
*/
|
*/
|
||||||
getIsUnlocked(root) {
|
getIsUnlocked(root) {
|
||||||
// @todo
|
return root.hubGoals.isRewardUnlocked(enumHubGoalRewards.reward_constant_signal);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {"wires"} **/
|
/** @returns {"wires"} **/
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
|
import { formatItemsPerSecond } from "../../core/utils";
|
||||||
import { enumDirection, Vector } from "../../core/vector";
|
import { enumDirection, Vector } from "../../core/vector";
|
||||||
|
import { T } from "../../translations";
|
||||||
import { FilterComponent } from "../components/filter";
|
import { FilterComponent } from "../components/filter";
|
||||||
import { ItemAcceptorComponent } from "../components/item_acceptor";
|
import { ItemAcceptorComponent } from "../components/item_acceptor";
|
||||||
import { ItemEjectorComponent } from "../components/item_ejector";
|
import { ItemEjectorComponent } from "../components/item_ejector";
|
||||||
@ -32,6 +34,16 @@ export class MetaFilterBuilding extends MetaBuilding {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {GameRoot} root
|
||||||
|
* @param {string} variant
|
||||||
|
* @returns {Array<[string, string]>}
|
||||||
|
*/
|
||||||
|
getAdditionalStatistics(root, variant) {
|
||||||
|
const beltSpeed = root.hubGoals.getBeltBaseSpeed();
|
||||||
|
return [[T.ingame.buildingPlacement.infoTexts.speed, formatItemsPerSecond(beltSpeed)]];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the entity at the given location
|
* Creates the entity at the given location
|
||||||
* @param {Entity} entity
|
* @param {Entity} entity
|
||||||
|
@ -15,14 +15,19 @@ export class HUDBaseToolbar extends BaseHUDPart {
|
|||||||
* @param {Array<typeof MetaBuilding>=} param0.secondaryBuildings
|
* @param {Array<typeof MetaBuilding>=} param0.secondaryBuildings
|
||||||
* @param {function} param0.visibilityCondition
|
* @param {function} param0.visibilityCondition
|
||||||
* @param {string} param0.htmlElementId
|
* @param {string} param0.htmlElementId
|
||||||
|
* @param {Layer=} param0.layer
|
||||||
*/
|
*/
|
||||||
constructor(root, { primaryBuildings, secondaryBuildings = [], visibilityCondition, htmlElementId }) {
|
constructor(
|
||||||
|
root,
|
||||||
|
{ primaryBuildings, secondaryBuildings = [], visibilityCondition, htmlElementId, layer = "regular" }
|
||||||
|
) {
|
||||||
super(root);
|
super(root);
|
||||||
|
|
||||||
this.primaryBuildings = primaryBuildings;
|
this.primaryBuildings = primaryBuildings;
|
||||||
this.secondaryBuildings = secondaryBuildings;
|
this.secondaryBuildings = secondaryBuildings;
|
||||||
this.visibilityCondition = visibilityCondition;
|
this.visibilityCondition = visibilityCondition;
|
||||||
this.htmlElementId = htmlElementId;
|
this.htmlElementId = htmlElementId;
|
||||||
|
this.layer = layer;
|
||||||
|
|
||||||
/** @type {Object.<string, {
|
/** @type {Object.<string, {
|
||||||
* metaBuilding: MetaBuilding,
|
* metaBuilding: MetaBuilding,
|
||||||
@ -67,7 +72,13 @@ export class HUDBaseToolbar extends BaseHUDPart {
|
|||||||
|
|
||||||
for (let i = 0; i < allBuildings.length; ++i) {
|
for (let i = 0; i < allBuildings.length; ++i) {
|
||||||
const metaBuilding = gMetaBuildingRegistry.findByClass(allBuildings[i]);
|
const metaBuilding = gMetaBuildingRegistry.findByClass(allBuildings[i]);
|
||||||
const binding = actionMapper.getBinding(KEYMAPPINGS.buildings[metaBuilding.getId()]);
|
|
||||||
|
let rawBinding = KEYMAPPINGS.buildings[metaBuilding.getId() + "_" + this.layer];
|
||||||
|
if (!rawBinding) {
|
||||||
|
rawBinding = KEYMAPPINGS.buildings[metaBuilding.getId()];
|
||||||
|
}
|
||||||
|
|
||||||
|
const binding = actionMapper.getBinding(rawBinding);
|
||||||
|
|
||||||
const itemContainer = makeDiv(
|
const itemContainer = makeDiv(
|
||||||
this.primaryBuildings.includes(allBuildings[i]) ? rowPrimary : rowSecondary,
|
this.primaryBuildings.includes(allBuildings[i]) ? rowPrimary : rowSecondary,
|
||||||
|
@ -119,7 +119,15 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
|||||||
this.buildingInfoElements.label.innerHTML = T.buildings[metaBuilding.id][variant].name;
|
this.buildingInfoElements.label.innerHTML = T.buildings[metaBuilding.id][variant].name;
|
||||||
this.buildingInfoElements.descText.innerHTML = T.buildings[metaBuilding.id][variant].description;
|
this.buildingInfoElements.descText.innerHTML = T.buildings[metaBuilding.id][variant].description;
|
||||||
|
|
||||||
const binding = this.root.keyMapper.getBinding(KEYMAPPINGS.buildings[metaBuilding.getId()]);
|
const layer = this.root.currentLayer;
|
||||||
|
|
||||||
|
let rawBinding = KEYMAPPINGS.buildings[metaBuilding.getId() + "_" + layer];
|
||||||
|
if (!rawBinding) {
|
||||||
|
rawBinding = KEYMAPPINGS.buildings[metaBuilding.getId()];
|
||||||
|
}
|
||||||
|
|
||||||
|
const binding = this.root.keyMapper.getBinding(rawBinding);
|
||||||
|
|
||||||
this.buildingInfoElements.hotkey.innerHTML = T.ingame.buildingPlacement.hotkeyLabel.replace(
|
this.buildingInfoElements.hotkey.innerHTML = T.ingame.buildingPlacement.hotkeyLabel.replace(
|
||||||
"<key>",
|
"<key>",
|
||||||
"<code class='keybinding'>" + binding.getKeyCodeString() + "</code>"
|
"<code class='keybinding'>" + binding.getKeyCodeString() + "</code>"
|
||||||
|
@ -16,16 +16,17 @@ export class HUDWiresToolbar extends HUDBaseToolbar {
|
|||||||
MetaWireBuilding,
|
MetaWireBuilding,
|
||||||
MetaWireTunnelBuilding,
|
MetaWireTunnelBuilding,
|
||||||
MetaConstantSignalBuilding,
|
MetaConstantSignalBuilding,
|
||||||
|
MetaLeverBuilding,
|
||||||
MetaTransistorBuilding,
|
MetaTransistorBuilding,
|
||||||
MetaLogicGateBuilding,
|
MetaLogicGateBuilding,
|
||||||
MetaAnalyzerBuilding,
|
MetaAnalyzerBuilding,
|
||||||
MetaLeverBuilding,
|
|
||||||
MetaVirtualProcessorBuilding,
|
MetaVirtualProcessorBuilding,
|
||||||
MetaComparatorBuilding,
|
MetaComparatorBuilding,
|
||||||
],
|
],
|
||||||
visibilityCondition: () =>
|
visibilityCondition: () =>
|
||||||
!this.root.camera.getIsMapOverlayActive() && this.root.currentLayer === "wires",
|
!this.root.camera.getIsMapOverlayActive() && this.root.currentLayer === "wires",
|
||||||
htmlElementId: "ingame_HUD_wires_toolbar",
|
htmlElementId: "ingame_HUD_wires_toolbar",
|
||||||
|
layer: "wires",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,11 +67,12 @@ export const KEYMAPPINGS = {
|
|||||||
wire: { keyCode: key("1") },
|
wire: { keyCode: key("1") },
|
||||||
wire_tunnel: { keyCode: key("2") },
|
wire_tunnel: { keyCode: key("2") },
|
||||||
constant_signal: { keyCode: key("3") },
|
constant_signal: { keyCode: key("3") },
|
||||||
transistor: { keyCode: key("6") },
|
lever_wires: { keyCode: key("4") },
|
||||||
logic_gate: { keyCode: key("4") },
|
logic_gate: { keyCode: key("5") },
|
||||||
virtual_processor: { keyCode: key("5") },
|
virtual_processor: { keyCode: key("6") },
|
||||||
analyzer: { keyCode: key("7") },
|
transistor: { keyCode: key("7") },
|
||||||
comparator: { keyCode: key("8") },
|
analyzer: { keyCode: key("8") },
|
||||||
|
comparator: { keyCode: key("9") },
|
||||||
},
|
},
|
||||||
|
|
||||||
placement: {
|
placement: {
|
||||||
|
@ -584,7 +584,7 @@ buildings:
|
|||||||
lever:
|
lever:
|
||||||
default:
|
default:
|
||||||
name: &lever Switch
|
name: &lever Switch
|
||||||
description: Can be toggled to emit a boolean signal, which can then be used to control for example an item filter.
|
description: Can be toggled to emit a boolean signal (1 / 0) on the wires layer, which can then be used to control for example an item filter.
|
||||||
|
|
||||||
logic_gate:
|
logic_gate:
|
||||||
default:
|
default:
|
||||||
@ -612,7 +612,7 @@ buildings:
|
|||||||
filter:
|
filter:
|
||||||
default:
|
default:
|
||||||
name: &filter Filter
|
name: &filter Filter
|
||||||
description: Connect with a signal to route all matching items to the top and the remaining to the right. Can be controlled with boolean signals too.
|
description: Connect a signal to route all matching items to the top and the remaining to the right. Can be controlled with boolean signals too.
|
||||||
|
|
||||||
display:
|
display:
|
||||||
default:
|
default:
|
||||||
@ -758,7 +758,8 @@ storyRewards:
|
|||||||
reward_constant_signal:
|
reward_constant_signal:
|
||||||
title: Constant Signal
|
title: Constant Signal
|
||||||
desc: >-
|
desc: >-
|
||||||
You can now emit a <strong>constant signal</strong> on the wires layer! This is useful to connect it to <strong>item filters</strong> for example!
|
You unlocked the <strong>constant signal</strong> building on the wires layer! This is useful to connect it to <strong>item filters</strong> for example.<br><br>
|
||||||
|
The constant signal can emit a <strong>shape</strong>, <strong>color</strong> or <strong>boolean</strong> (1 / 0).
|
||||||
|
|
||||||
reward_logic_gates:
|
reward_logic_gates:
|
||||||
title: Logic Gates
|
title: Logic Gates
|
||||||
@ -1035,7 +1036,8 @@ keybindings:
|
|||||||
wire: *wire
|
wire: *wire
|
||||||
constant_signal: *constant_signal
|
constant_signal: *constant_signal
|
||||||
logic_gate: Logic Gate
|
logic_gate: Logic Gate
|
||||||
lever: *lever
|
lever: Switch (regular)
|
||||||
|
lever_wires: Switch (wires)
|
||||||
filter: *filter
|
filter: *filter
|
||||||
wire_tunnel: *wire_tunnel
|
wire_tunnel: *wire_tunnel
|
||||||
display: *display
|
display: *display
|
||||||
|
Loading…
Reference in New Issue
Block a user