Fix black buttons to /always/ separate horizontal and vertical wires

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-28 06:53:19 -07:00
parent b72e20a4a5
commit dee46b77df
2 changed files with 7 additions and 2 deletions

View File

@ -30,9 +30,13 @@ export function trace_floor_circuit(level, start_cell, start_edge, on_wire, on_d
else if (terrain.type.wire_propagation_mode === 'none') {
// The wires in this tile never connect to each other
}
else if (terrain.wire_directions === 0x0f && terrain.type.wire_propagation_mode !== 'all') {
else if (terrain.type.wire_propagation_mode === 'cross' ||
(terrain.wire_directions === 0x0f && terrain.type.wire_propagation_mode !== 'all'))
{
// This is a cross pattern, so only opposite edges connect
connections |= edgeinfo.opposite_bit;
if (terrain.wire_directions & edgeinfo.opposite_bit) {
connections |= edgeinfo.opposite_bit;
}
}
else {
// Everything connects

View File

@ -1585,6 +1585,7 @@ const TILE_TYPES = {
button_black: {
draw_layer: DRAW_LAYERS.terrain,
is_power_source: true,
wire_propagation_mode: 'cross',
get_emitting_edges(me, level) {
// We emit current as long as there's NOT an actor fully on us
if (! me.cell.some(tile => tile.type.is_actor && tile.movement_cooldown === 0)) {