Update circuitcore.js

This commit is contained in:
redbirdly 2025-02-22 18:05:00 +08:00 committed by GitHub
parent 8d6c21962d
commit 9cc1fb579a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 125 additions and 125 deletions

View File

@ -223,16 +223,16 @@ elements.four_bit_selector_circuit = {
cc_stableTick: function(pixel) {
var pins = [
// First 4-bit input (A)
[-1, -2, true], // A0
[-3, -2, true], // A1
[-5, -2, true], // A2
[-7, -2, true], // A3
[-7, -2, true], // A0
[-5, -2, true], // A1
[-3, -2, true], // A2
[-1, -2, true], // A3
// Second 4-bit input (B)
[7, -2, true], // B0
[5, -2, true], // B1
[3, -2, true], // B2
[1, -2, true], // B3
[1, -2, true], // B0
[3, -2, true], // B1
[5, -2, true], // B2
[7, -2, true], // B3
// Selection pin (Sel)
[9, 0, true], // Selection (Sel)
@ -1930,7 +1930,7 @@ document.addEventListener('keydown', function(event) {
}
});
function drawCircuitExtras() {
function drawCircuitExtras(ctx) {
if (elements[currentElement].isCircuitCore && elements[currentElement].previewSize) {
var circuitWidth = elements[currentElement].previewSize[0];
var circuitHeight = elements[currentElement].previewSize[1];
@ -1983,7 +1983,7 @@ function runLogicTick() {
}
function stabilizeLogicGates() {
var logicgatesElements = ["output","logic_wire","not_gate","and_gate","xor_gate","or_gate","nand_gate","nor_gate","nxor_gate","E2L_lever","E2L_button","L2E_constant","logic_transmitter","logic_receiver","logic_shock","logic_unshock"]
var logicgatesElements = ["output","logic_wire","not_gate","and_gate","xor_gate","or_gate","nand_gate","nor_gate","nxor_gate","E2L_lever","E2L_button","L2E_constant","logic_shock","logic_unshock"]
for (var i = 0;i < logicgatesElements.length;i++) {
elements[logicgatesElements[i]].cc_stableTick = elements[logicgatesElements[i]].tick;