Allow color inverter to process colors as well
@ -1383,6 +1383,6 @@
|
|||||||
"format": "RGBA8888",
|
"format": "RGBA8888",
|
||||||
"size": {"w":690,"h":127},
|
"size": {"w":690,"h":127},
|
||||||
"scale": "0.1",
|
"scale": "0.1",
|
||||||
"smartupdate": "$TexturePacker:SmartUpdate:402faa0126e6dcd814be979d8e838c46:68488838c03e95969cf7c09daf42f69a:f159918d23e5952766c6d23ab52278c6$"
|
"smartupdate": "$TexturePacker:SmartUpdate:4e5fb3bd7f1e5423e4fcea2215debe11:0c5d091d0b928944c68553dcc592c801:f159918d23e5952766c6d23ab52278c6$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 217 KiB After Width: | Height: | Size: 216 KiB |
Before Width: | Height: | Size: 520 KiB After Width: | Height: | Size: 515 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 976 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
@ -94,9 +94,7 @@ export class MetaAdvancedProcessorBuilding extends MetaBuilding {
|
|||||||
{
|
{
|
||||||
pos: new Vector(0, 1),
|
pos: new Vector(0, 1),
|
||||||
directions: [enumDirection.left],
|
directions: [enumDirection.left],
|
||||||
filter: enumItemType.shape,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
pos: new Vector(0, 0),
|
pos: new Vector(0, 0),
|
||||||
directions: [enumDirection.top],
|
directions: [enumDirection.top],
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { globalConfig } from "../../core/config";
|
import { globalConfig } from "../../core/config";
|
||||||
import { BaseItem } from "../base_item";
|
import { BaseItem, enumItemType } from "../base_item";
|
||||||
import { enumColorMixingResults } from "../colors";
|
import { enumColorMixingResults, enumInvertedColors } from "../colors";
|
||||||
import { enumItemProcessorTypes, ItemProcessorComponent } from "../components/item_processor";
|
import { enumItemProcessorTypes, ItemProcessorComponent } from "../components/item_processor";
|
||||||
import { Entity } from "../entity";
|
import { Entity } from "../entity";
|
||||||
import { GameSystemWithFilter } from "../game_system_with_filter";
|
import { GameSystemWithFilter } from "../game_system_with_filter";
|
||||||
import { ColorItem } from "../items/color_item";
|
import { ColorItem } from "../items/color_item";
|
||||||
import { ShapeItem } from "../items/shape_item";
|
import { ShapeItem } from "../items/shape_item";
|
||||||
import { enumLayer } from "../root";
|
|
||||||
import { NEGATIVE_ENERGY_ITEM_SINGLETON } from "../items/negative_energy_item";
|
|
||||||
|
|
||||||
export class ItemProcessorSystem extends GameSystemWithFilter {
|
export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||||
constructor(root) {
|
constructor(root) {
|
||||||
@ -346,13 +344,29 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
|||||||
// ADVANCED PROCESSING
|
// ADVANCED PROCESSING
|
||||||
|
|
||||||
case enumItemProcessorTypes.advancedProcessor: {
|
case enumItemProcessorTypes.advancedProcessor: {
|
||||||
|
const item = items[0].item;
|
||||||
|
|
||||||
|
if (item.getItemType() === enumItemType.color) {
|
||||||
|
const colorItem = /** @type {ColorItem} */ (items[0].item);
|
||||||
|
const newColor = enumInvertedColors[colorItem.color];
|
||||||
|
outItems.push({
|
||||||
|
item: new ColorItem(newColor),
|
||||||
|
requiredSlot: 0,
|
||||||
|
});
|
||||||
|
} else if (item.getItemType() === enumItemType.shape) {
|
||||||
const shapeItem = /** @type {ShapeItem} */ (items[0].item);
|
const shapeItem = /** @type {ShapeItem} */ (items[0].item);
|
||||||
const newItem = this.root.shapeDefinitionMgr.shapeActionInvertColors(shapeItem.definition);
|
const newItem = this.root.shapeDefinitionMgr.shapeActionInvertColors(
|
||||||
|
shapeItem.definition
|
||||||
|
);
|
||||||
|
|
||||||
outItems.push({
|
outItems.push({
|
||||||
item: new ShapeItem(newItem),
|
item: new ShapeItem(newItem),
|
||||||
requiredSlot: 0,
|
requiredSlot: 0,
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
assertAlways(false, "Bad item type: " + item.getItemType() + " for advanced processor.");
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -467,8 +467,8 @@ buildings:
|
|||||||
|
|
||||||
wire:
|
wire:
|
||||||
default:
|
default:
|
||||||
name: &wire Wire
|
name: &wire Energy Wire
|
||||||
description: Allows you to transport energy
|
description: Allows you to transport energy.
|
||||||
|
|
||||||
miner: # Internal name for the Extractor
|
miner: # Internal name for the Extractor
|
||||||
default:
|
default:
|
||||||
@ -511,8 +511,8 @@ buildings:
|
|||||||
|
|
||||||
advanced_processor:
|
advanced_processor:
|
||||||
default:
|
default:
|
||||||
name: &advanced_processor Advanced Processor
|
name: &advanced_processor Color Inverter
|
||||||
description: Advanced shape processing
|
description: Accepts a color or shape and inverts it.
|
||||||
|
|
||||||
rotater:
|
rotater:
|
||||||
default:
|
default:
|
||||||
@ -565,16 +565,16 @@ buildings:
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
name: &energy_generator Energy Generator
|
name: &energy_generator Energy Generator
|
||||||
description: Generates energy by consuming shapes. Each energy generator requires a different shape.
|
description: Generates energy by consuming shapes.
|
||||||
|
|
||||||
wire_crossings:
|
wire_crossings:
|
||||||
default:
|
default:
|
||||||
name: &wire_crossings Wire Splitter
|
name: &wire_crossings Wire Splitter
|
||||||
description: Splits a wire into two
|
description: Splits a energy wire into two.
|
||||||
|
|
||||||
merger:
|
merger:
|
||||||
name: Wire Merger
|
name: Wire Merger
|
||||||
description: Merges two wires into one
|
description: Merges two energy wires into one.
|
||||||
|
|
||||||
storyRewards:
|
storyRewards:
|
||||||
# Those are the rewards gained from completing the store
|
# Those are the rewards gained from completing the store
|
||||||
@ -654,10 +654,6 @@ storyRewards:
|
|||||||
desc: >-
|
desc: >-
|
||||||
This level gave you no reward, but the next one will! <br><br> PS: Better don't destroy your existing factory - You need <strong>all</strong> those shapes later again to <strong>unlock upgrades</strong>!
|
This level gave you no reward, but the next one will! <br><br> PS: Better don't destroy your existing factory - You need <strong>all</strong> those shapes later again to <strong>unlock upgrades</strong>!
|
||||||
|
|
||||||
reward_wires:
|
|
||||||
title: Wires
|
|
||||||
desc: TODO
|
|
||||||
|
|
||||||
no_reward_freeplay:
|
no_reward_freeplay:
|
||||||
title: Next level
|
title: Next level
|
||||||
desc: >-
|
desc: >-
|
||||||
|