dashcode 1.2.4__tar.gz → 1.2.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.
- {dashcode-1.2.4 → dashcode-1.2.5}/PKG-INFO +1 -1
- {dashcode-1.2.4 → dashcode-1.2.5}/dashcode/core.py +21 -5
- {dashcode-1.2.4 → dashcode-1.2.5}/dashcode.egg-info/PKG-INFO +1 -1
- {dashcode-1.2.4 → dashcode-1.2.5}/setup.py +1 -1
- {dashcode-1.2.4 → dashcode-1.2.5}/README.md +0 -0
- {dashcode-1.2.4 → dashcode-1.2.5}/dashcode/__init__.py +0 -0
- {dashcode-1.2.4 → dashcode-1.2.5}/dashcode.egg-info/SOURCES.txt +0 -0
- {dashcode-1.2.4 → dashcode-1.2.5}/dashcode.egg-info/dependency_links.txt +0 -0
- {dashcode-1.2.4 → dashcode-1.2.5}/dashcode.egg-info/top_level.txt +0 -0
- {dashcode-1.2.4 → dashcode-1.2.5}/setup.cfg +0 -0
|
@@ -3,6 +3,8 @@ import gzip
|
|
|
3
3
|
obj_string = ""
|
|
4
4
|
lvlname = ""
|
|
5
5
|
|
|
6
|
+
print("Dashcode loaded! Have fun and also join our discord server please: https://discord.gg/MXv3KTFmPE")
|
|
7
|
+
|
|
6
8
|
class Dashcode:
|
|
7
9
|
def __init__(self):
|
|
8
10
|
self.objects = []
|
|
@@ -57,6 +59,19 @@ class Dashcode:
|
|
|
57
59
|
def setparams(self, params:dict):
|
|
58
60
|
self.params = params
|
|
59
61
|
|
|
62
|
+
def get_free_group(self):
|
|
63
|
+
used_groups = set()
|
|
64
|
+
for obj in self.objects:
|
|
65
|
+
if "57" in obj:
|
|
66
|
+
parsed = Dashcode().parse_object_string(obj)
|
|
67
|
+
for i,v in parsed.items():
|
|
68
|
+
#print(i,v,type(i))
|
|
69
|
+
if i == "57":
|
|
70
|
+
used_groups.add(int(v))
|
|
71
|
+
current_id = 1
|
|
72
|
+
while current_id in used_groups:
|
|
73
|
+
current_id += 1
|
|
74
|
+
return str(current_id)
|
|
60
75
|
def addobject(self, obj: str, params: dict):
|
|
61
76
|
objects = self.objects
|
|
62
77
|
if len(objects) <= 0:
|
|
@@ -64,11 +79,12 @@ class Dashcode:
|
|
|
64
79
|
f"1,1,2,{str(-10 * 30)},3,{str(-10 * 30)},12,1,13,1")
|
|
65
80
|
extraparams = ""
|
|
66
81
|
for param, value in params.items():
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
for i in self.params:
|
|
83
|
+
if param.startswith(i):
|
|
84
|
+
pid = self.params[param]
|
|
85
|
+
extraparams += f",{str(pid)},{value}"
|
|
86
|
+
else:
|
|
87
|
+
extraparams += f",{str(param)},{value}"
|
|
72
88
|
|
|
73
89
|
oid = self.objectids.get(obj, 1)
|
|
74
90
|
if oid:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|