mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Improve visibility of color items
This commit is contained in:
parent
cf0f02826b
commit
12892dcf54
@ -31,6 +31,10 @@ export class MetaConstantSignalBuilding extends MetaBuilding {
|
|||||||
return new Vector(1, 1);
|
return new Vector(1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getRenderPins() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the entity at the given location
|
* Creates the entity at the given location
|
||||||
* @param {Entity} entity
|
* @param {Entity} entity
|
||||||
|
@ -9,6 +9,13 @@ import { Entity } from "../entity";
|
|||||||
import { GameSystemWithFilter } from "../game_system_with_filter";
|
import { GameSystemWithFilter } from "../game_system_with_filter";
|
||||||
import { MapChunkView } from "../map_chunk_view";
|
import { MapChunkView } from "../map_chunk_view";
|
||||||
|
|
||||||
|
/** @type {Object<ItemType, number>} */
|
||||||
|
const enumTypeToSize = {
|
||||||
|
boolean: 9,
|
||||||
|
shape: 9,
|
||||||
|
color: 14,
|
||||||
|
};
|
||||||
|
|
||||||
export class WiredPinsSystem extends GameSystemWithFilter {
|
export class WiredPinsSystem extends GameSystemWithFilter {
|
||||||
constructor(root) {
|
constructor(root) {
|
||||||
super(root, [WiredPinsComponent]);
|
super(root, [WiredPinsComponent]);
|
||||||
@ -142,9 +149,7 @@ export class WiredPinsSystem extends GameSystemWithFilter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
update() {
|
update() {}
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws a given entity
|
* Draws a given entity
|
||||||
@ -201,12 +206,13 @@ export class WiredPinsSystem extends GameSystemWithFilter {
|
|||||||
// Draw contained item to visualize whats emitted
|
// Draw contained item to visualize whats emitted
|
||||||
const value = slot.value;
|
const value = slot.value;
|
||||||
if (value) {
|
if (value) {
|
||||||
const offset = new Vector(0, -9).rotated(effectiveRotation);
|
const offset = new Vector(0, -9.1).rotated(effectiveRotation);
|
||||||
|
|
||||||
value.drawItemCenteredClipped(
|
value.drawItemCenteredClipped(
|
||||||
worldPos.x + offset.x,
|
worldPos.x + offset.x,
|
||||||
worldPos.y + offset.y,
|
worldPos.y + offset.y,
|
||||||
parameters,
|
parameters,
|
||||||
9
|
enumTypeToSize[value.getItemType()]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user