sm-blueprint-lib 0.0.4__tar.gz → 0.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/PKG-INFO +1 -1
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/pyproject.toml +1 -1
- sm_blueprint_lib-0.0.5/src/sm_blueprint_lib/__init__.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/bases/controllers/basecontroller.py +2 -2
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/bases/controllers/baselogiccontroller.py +1 -1
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/bases/controllers/logicgatecontroller.py +1 -1
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/bases/controllers/sensorcontroller.py +1 -1
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/bases/controllers/timercontroller.py +1 -1
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/blueprint.py +3 -3
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/body.py +2 -2
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/adder.py +4 -4
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/barrel_shifter.py +4 -4
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/clock40hz.py +4 -4
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/comparator.py +4 -4
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/counter.py +4 -4
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/decoder.py +4 -4
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/distance_sensor.py +6 -6
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/ram.py +5 -5
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/register.py +5 -5
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/rom.py +6 -6
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/timer_ram_cached.py +13 -13
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/timer_ram_multiclient.py +9 -9
- sm_blueprint_lib-0.0.4/src/sm_blueprint_lib/__init__.py → sm_blueprint_lib-0.0.5/src/sm_blueprint_lib/utils.py +6 -6
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/.gitattributes +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/.gitignore +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/LICENSE +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/README.md +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/bounds.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/constants.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/id.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/pos.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/test_connections.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/test_prebuilds.py +0 -0
- {sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/tests.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: sm_blueprint_lib
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
4
4
|
Summary: Scrap Mechanic Library for Blueprint manipulation.
|
5
5
|
Project-URL: Homepage, https://github.com/MauriceTZ/sm_blueprint_lib
|
6
6
|
Project-URL: Issues, https://github.com/MauriceTZ/sm_blueprint_lib/issues
|
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
1
|
from dataclasses import dataclass, field
|
2
2
|
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
3
|
+
from bases.parts.basepart import BasePart
|
4
|
+
from body import Body
|
5
|
+
from constants import VERSION
|
6
6
|
|
7
7
|
|
8
8
|
@dataclass
|
@@ -1,9 +1,9 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
7
|
|
8
8
|
|
9
9
|
def simple_adder_subtractor(bp: Blueprint,
|
{sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/barrel_shifter.py
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
7
|
|
8
8
|
|
9
9
|
def barrel_shifter(bp: Blueprint, bit_length: int, num_bit_shift: int, pos: Pos | Sequence = (0, 0, 0)):
|
{sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/clock40hz.py
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
7
|
|
8
8
|
|
9
9
|
def clock40hz(bp: Blueprint, bit_length: int, pos: Pos | Sequence = (0, 0, 0)):
|
{sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/comparator.py
RENAMED
@@ -1,9 +1,9 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
3
|
+
from utils import check_pos, connect
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
7
|
|
8
8
|
|
9
9
|
def comparator(bp: Blueprint,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
7
|
|
8
8
|
|
9
9
|
def counter(bp: Blueprint,
|
@@ -1,9 +1,9 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
7
|
|
8
8
|
|
9
9
|
def decoder(bp: Blueprint, num_address: int, pos: Pos | Sequence = (0, 0, 0),
|
{sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/distance_sensor.py
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import array, ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
8
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from parts.sensor import Sensor5
|
7
|
+
from parts.timer import Timer
|
8
|
+
from pos import Pos
|
9
9
|
|
10
10
|
|
11
11
|
def distance_sensor(bp: Blueprint,
|
@@ -1,11 +1,11 @@
|
|
1
1
|
from itertools import cycle
|
2
2
|
from typing import Sequence
|
3
3
|
from numpy import ndarray
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
8
|
-
from
|
4
|
+
from utils import get_bits_required, check_pos, connect
|
5
|
+
from blueprint import Blueprint
|
6
|
+
from parts.logicgate import LogicGate
|
7
|
+
from pos import Pos
|
8
|
+
from prebuilds.decoder import decoder
|
9
9
|
|
10
10
|
|
11
11
|
def ram(bp: Blueprint, bit_length: int, num_address: int, pos: Pos | Sequence = (0, 0, 0),
|
{sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/register.py
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
3
|
+
from utils import check_pos
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from pos import Pos
|
7
|
+
from prebuilds.counter import counter, counter_decrement
|
8
8
|
|
9
9
|
|
10
10
|
def register(bp: Blueprint,
|
@@ -2,12 +2,12 @@ from itertools import batched, cycle
|
|
2
2
|
from math import ceil
|
3
3
|
from typing import Sequence
|
4
4
|
from numpy import ndarray
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
8
|
-
from
|
9
|
-
from
|
10
|
-
from
|
5
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
6
|
+
from blueprint import Blueprint
|
7
|
+
from parts.logicgate import LogicGate
|
8
|
+
from prebuilds.decoder import decoder
|
9
|
+
from parts.timer import Timer
|
10
|
+
from pos import Pos
|
11
11
|
|
12
12
|
|
13
13
|
def rom(
|
{sm_blueprint_lib-0.0.4 → sm_blueprint_lib-0.0.5}/src/sm_blueprint_lib/prebuilds/timer_ram_cached.py
RENAMED
@@ -1,19 +1,19 @@
|
|
1
1
|
from itertools import cycle
|
2
2
|
from typing import Sequence
|
3
3
|
from numpy import array, clip, ndarray
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
8
|
-
from
|
9
|
-
from
|
10
|
-
from
|
11
|
-
from
|
12
|
-
from
|
13
|
-
from
|
14
|
-
from
|
15
|
-
from
|
16
|
-
from
|
4
|
+
from utils import get_bits_required, check_pos, connect, num_to_bit_list
|
5
|
+
from bases.parts.baseinteractablepart import BaseInteractablePart
|
6
|
+
from bases.parts.baselogicpart import BaseLogicPart
|
7
|
+
from blueprint import Blueprint
|
8
|
+
from constants import TICKS_PER_SECOND
|
9
|
+
from parts.logicgate import LogicGate
|
10
|
+
from parts.timer import Timer
|
11
|
+
from pos import Pos
|
12
|
+
from prebuilds.clock40hz import clock40hz
|
13
|
+
from prebuilds.counter import counter
|
14
|
+
from prebuilds.decoder import decoder
|
15
|
+
from prebuilds.ram import ram
|
16
|
+
from prebuilds.register import register
|
17
17
|
|
18
18
|
|
19
19
|
def timer_ram_cached(
|
@@ -1,14 +1,14 @@
|
|
1
1
|
from typing import Sequence
|
2
2
|
from numpy import ndarray
|
3
|
-
from
|
4
|
-
from
|
5
|
-
from
|
6
|
-
from
|
7
|
-
from
|
8
|
-
from
|
9
|
-
from
|
10
|
-
from
|
11
|
-
from
|
3
|
+
from utils import get_bits_required, check_pos, connect
|
4
|
+
from blueprint import Blueprint
|
5
|
+
from parts.logicgate import LogicGate
|
6
|
+
from parts.timer import Timer
|
7
|
+
from pos import Pos
|
8
|
+
from prebuilds.clock40hz import clock40hz
|
9
|
+
from prebuilds.decoder import decoder
|
10
|
+
from prebuilds.ram import ram
|
11
|
+
from prebuilds.register import register
|
12
12
|
|
13
13
|
|
14
14
|
def timer_ram_multiclient(bp: Blueprint, bit_length: int, num_address: int, num_clients=1, pos: Pos | Sequence = (0, 0, 0)):
|
@@ -4,12 +4,12 @@ from math import ceil, log2
|
|
4
4
|
|
5
5
|
from numpy import ndarray
|
6
6
|
|
7
|
-
from
|
8
|
-
from
|
9
|
-
from
|
10
|
-
from
|
11
|
-
from
|
12
|
-
from
|
7
|
+
from .bases.parts.baseinteractablepart import BaseInteractablePart
|
8
|
+
from .blueprint import Blueprint
|
9
|
+
from .parts.barrierblock import BarrierBlock
|
10
|
+
from .parts.logicgate import LogicGate
|
11
|
+
from .parts.timer import Timer
|
12
|
+
from .pos import Pos
|
13
13
|
|
14
14
|
|
15
15
|
def load_blueprint(path):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|