turntables can have wires run to them like blue teles

This commit is contained in:
Timothy Stiles 2021-02-16 16:44:38 +11:00
parent 5551e546de
commit e866710af6
5 changed files with 19 additions and 11 deletions

View File

@ -906,10 +906,12 @@ const TILE_ENCODING = {
}, },
0xef: { 0xef: {
name: 'turntable_cw', name: 'turntable_cw',
modifier: modifier_wire,
is_extension: true, is_extension: true,
}, },
0xf0: { 0xf0: {
name: 'turntable_ccw', name: 'turntable_ccw',
modifier: modifier_wire,
is_extension: true, is_extension: true,
}, },
}; };

View File

@ -1072,7 +1072,7 @@ class WireOperation extends DrawOperation {
// TODO probably a better way to do this // TODO probably a better way to do this
if (! tile) if (! tile)
continue; continue;
if (['floor', 'steel', 'button_pink', 'button_black', 'teleport_blue', 'teleport_red', 'light_switch_on', 'light_switch_off', 'circuit_block', 'teleport_blue_exit'].indexOf(tile.type.name) < 0) if (['floor', 'steel', 'button_pink', 'button_black', 'teleport_blue', 'teleport_red', 'light_switch_on', 'light_switch_off', 'circuit_block', 'teleport_blue_exit', 'turntable_cw', 'turntable_ccw'].indexOf(tile.type.name) < 0)
continue; continue;
tile = {...tile}; tile = {...tile};

View File

@ -1047,14 +1047,22 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, {
halo: [5, 43], halo: [5, 43],
fire_sticks: [6, 43], fire_sticks: [6, 43],
turntable_cw: { turntable_cw: {
__special__: 'visual-state', __special__: 'wires',
active: [7, 43], base: [0, 2],
inactive: [9, 43], wired: {
__special__: 'visual-state',
active: [7, 43],
inactive: [9, 43],
}
}, },
turntable_ccw: { turntable_ccw: {
__special__: 'visual-state', __special__: 'wires',
active: [8, 43], base: [0, 2],
inactive: [10, 43], wired: {
__special__: 'visual-state',
active: [8, 43],
inactive: [10, 43],
}
}, },
electrified_floor: { electrified_floor: {
__special__: 'visual-state', __special__: 'visual-state',

View File

@ -747,8 +747,7 @@ const TILE_TYPES = {
}, },
turntable_cw: { turntable_cw: {
layer: LAYERS.terrain, layer: LAYERS.terrain,
//note: should be wireable in exactly the same way as a transmogrifier wire_propagation_mode: 'all',
wire_propagation_mode: 'none',
on_begin(me, level) { on_begin(me, level) {
// TODO if wire destruction is ever allowed, this will need to update somehow // TODO if wire destruction is ever allowed, this will need to update somehow
me.is_wired = level.is_tile_wired(me, false); me.is_wired = level.is_tile_wired(me, false);
@ -778,8 +777,7 @@ const TILE_TYPES = {
}, },
turntable_ccw: { turntable_ccw: {
layer: LAYERS.terrain, layer: LAYERS.terrain,
//note: should be wireable in exactly the same way as a transmogrifier wire_propagation_mode: 'all',
wire_propagation_mode: 'none',
on_begin(me, level) { on_begin(me, level) {
// TODO if wire destruction is ever allowed, this will need to update somehow // TODO if wire destruction is ever allowed, this will need to update somehow
me.is_wired = level.is_tile_wired(me, false); me.is_wired = level.is_tile_wired(me, false);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 176 KiB