Fix black buttons to /always/ separate horizontal and vertical wires
This commit is contained in:
parent
b72e20a4a5
commit
dee46b77df
@ -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
|
||||
|
||||
@ -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)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user