mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Processors speed upgrades
This commit is contained in:
parent
6612a58ff5
commit
4899651ebd
@ -192,7 +192,9 @@ export async function initMods() {
|
|||||||
if (mod.processors) {
|
if (mod.processors) {
|
||||||
mod_infos += `${mod.processors.length} processors, `;
|
mod_infos += `${mod.processors.length} processors, `;
|
||||||
for (const processor of mod.processors) {
|
for (const processor of mod.processors) {
|
||||||
ModProcessors[processor.getType()] = processor;
|
const type = processor.getType();
|
||||||
|
ModProcessors[type] = processor;
|
||||||
|
globalConfig.buildingSpeeds[type] = processor.getBaseSpeed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,9 +242,9 @@ export async function initMods() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
logger.log(mod_infos);
|
logger.log(mod_infos);
|
||||||
}
|
}
|
||||||
|
|
||||||
initShapes();
|
initShapes();
|
||||||
|
|
||||||
logger.log(`${Mods.length} mods loaded`);
|
logger.log(`${Mods.length} mods loaded`);
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import { GameRoot } from "./root";
|
|||||||
import { ShapeDefinition, ShapeLayer } from "./shape_definition";
|
import { ShapeDefinition, ShapeLayer } from "./shape_definition";
|
||||||
import { enumHubGoalRewards, tutorialGoals } from "./tutorial_goals";
|
import { enumHubGoalRewards, tutorialGoals } from "./tutorial_goals";
|
||||||
import { UPGRADES } from "./upgrades";
|
import { UPGRADES } from "./upgrades";
|
||||||
|
import { ModProcessors } from "../GeoZ/main";
|
||||||
|
|
||||||
export class HubGoals extends BasicSerializableObject {
|
export class HubGoals extends BasicSerializableObject {
|
||||||
static getId() {
|
static getId() {
|
||||||
@ -440,8 +441,17 @@ export class HubGoals extends BasicSerializableObject {
|
|||||||
globalConfig.buildingSpeeds[processorType]
|
globalConfig.buildingSpeeds[processorType]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
default:
|
default: {
|
||||||
|
if (ModProcessors[processorType]) {
|
||||||
|
return (
|
||||||
|
globalConfig.beltSpeedItemsPerSecond *
|
||||||
|
this.upgradeImprovements.processors *
|
||||||
|
globalConfig.buildingSpeeds[processorType]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
assertAlways(false, "invalid processor type: " + processorType);
|
assertAlways(false, "invalid processor type: " + processorType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1 / globalConfig.beltSpeedItemsPerSecond;
|
return 1 / globalConfig.beltSpeedItemsPerSecond;
|
||||||
|
Loading…
Reference in New Issue
Block a user