dashcode 1.2.8__tar.gz → 1.3.0__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.8 → dashcode-1.3.0}/PKG-INFO +5 -6
- {dashcode-1.2.8 → dashcode-1.3.0}/README.md +4 -5
- {dashcode-1.2.8 → dashcode-1.3.0}/dashcode/core.py +34 -15
- {dashcode-1.2.8 → dashcode-1.3.0}/dashcode.egg-info/PKG-INFO +5 -6
- {dashcode-1.2.8 → dashcode-1.3.0}/setup.py +1 -1
- {dashcode-1.2.8 → dashcode-1.3.0}/dashcode/__init__.py +0 -0
- {dashcode-1.2.8 → dashcode-1.3.0}/dashcode.egg-info/SOURCES.txt +0 -0
- {dashcode-1.2.8 → dashcode-1.3.0}/dashcode.egg-info/dependency_links.txt +0 -0
- {dashcode-1.2.8 → dashcode-1.3.0}/dashcode.egg-info/top_level.txt +0 -0
- {dashcode-1.2.8 → dashcode-1.3.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dashcode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A library for Geometry Dash level generation using .gmd files
|
|
5
5
|
Author: IWiterI
|
|
6
6
|
Project-URL: Homepage, https://github.com/ISviterI/dashcode
|
|
@@ -38,11 +38,10 @@ Dashcode is a specialized Python library for the programmatic generation of Geom
|
|
|
38
38
|
* **Timelines**: You can make a list of actions and objects like spawn or create to build easier using `build_timeline()`
|
|
39
39
|
|
|
40
40
|
## Examples
|
|
41
|
-
Check the `/examples`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
Check the `/examples` in wiki for advanced usage of:
|
|
42
|
+
Object placement
|
|
43
|
+
Prefabs
|
|
44
|
+
Timelines
|
|
46
45
|
|
|
47
46
|
## Installation
|
|
48
47
|
|
|
@@ -14,11 +14,10 @@ Dashcode is a specialized Python library for the programmatic generation of Geom
|
|
|
14
14
|
* **Timelines**: You can make a list of actions and objects like spawn or create to build easier using `build_timeline()`
|
|
15
15
|
|
|
16
16
|
## Examples
|
|
17
|
-
Check the `/examples`
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
Check the `/examples` in wiki for advanced usage of:
|
|
18
|
+
Object placement
|
|
19
|
+
Prefabs
|
|
20
|
+
Timelines
|
|
22
21
|
|
|
23
22
|
## Installation
|
|
24
23
|
|
|
@@ -2,6 +2,7 @@ import base64
|
|
|
2
2
|
import gzip
|
|
3
3
|
from operator import index
|
|
4
4
|
|
|
5
|
+
timelineY = 3
|
|
5
6
|
obj_string = ""
|
|
6
7
|
lvlname = ""
|
|
7
8
|
|
|
@@ -60,7 +61,6 @@ class Dashcode:
|
|
|
60
61
|
"square": {"SQ":0},
|
|
61
62
|
"corridor": {"X":1},
|
|
62
63
|
}
|
|
63
|
-
self.timeline = {}
|
|
64
64
|
def setobjects(self, objs:dict):
|
|
65
65
|
self.objectids = objs
|
|
66
66
|
def export_gmd(self, filedata, filename:str="Level"):
|
|
@@ -182,20 +182,39 @@ class Dashcode:
|
|
|
182
182
|
place(base_x, base_y + i)
|
|
183
183
|
place(base_x + ex, base_y + i)
|
|
184
184
|
return placed
|
|
185
|
-
def build_timeline(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
self.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
185
|
+
def build_timeline(dcself):
|
|
186
|
+
class Timeline:
|
|
187
|
+
def __init__(self):
|
|
188
|
+
self.timeline = []
|
|
189
|
+
self.delay = 0
|
|
190
|
+
self.spawn_trigger_enabled = False
|
|
191
|
+
self.spawn_group = dcself.get_free_group()
|
|
192
|
+
self.x_position = -1
|
|
193
|
+
self.x2_position = -1
|
|
194
|
+
self.spawn_trigger_on_objects = False
|
|
195
|
+
def spawn(self, group:int):
|
|
196
|
+
if self.spawn_trigger_enabled:
|
|
197
|
+
dcself.addobject("spawn", {"X": self.x_position, "Y": 6, "Delay": str(self.delay), "TGroup": str(group),"SpawnTrigger":1,"MultiTrigger":1})
|
|
198
|
+
else:
|
|
199
|
+
dcself.addobject("spawn", {"X": self.x_position, "Y": 6, "Delay": str(self.delay), "TGroup": str(group)})
|
|
200
|
+
self.timeline.append(["spawn",str(group)])
|
|
201
|
+
self.x_position += -1
|
|
202
|
+
def wait(self, seconds:float):
|
|
203
|
+
self.delay += seconds
|
|
204
|
+
self.timeline.append(["wait",str(seconds)])
|
|
205
|
+
def create_object(self, obj:str, params:dict):
|
|
206
|
+
dcself.addobject(obj, params)
|
|
207
|
+
if params.get("X") is None and params.get("Y") is None:
|
|
208
|
+
params["X"] = self.x2_position
|
|
209
|
+
self.x2_position += -1
|
|
210
|
+
params["Y"] = 5
|
|
211
|
+
if self.spawn_trigger_on_objects:
|
|
212
|
+
params["SpawnTrigger"] = 1
|
|
213
|
+
params["MultiTrigger"] = 1
|
|
214
|
+
self.timeline.append([obj, params])
|
|
215
|
+
return Timeline()
|
|
216
|
+
|
|
217
|
+
|
|
199
218
|
def create_gmd_file(self, level_name, objects_string):
|
|
200
219
|
global lvlname
|
|
201
220
|
lvlname = level_name
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dashcode
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A library for Geometry Dash level generation using .gmd files
|
|
5
5
|
Author: IWiterI
|
|
6
6
|
Project-URL: Homepage, https://github.com/ISviterI/dashcode
|
|
@@ -38,11 +38,10 @@ Dashcode is a specialized Python library for the programmatic generation of Geom
|
|
|
38
38
|
* **Timelines**: You can make a list of actions and objects like spawn or create to build easier using `build_timeline()`
|
|
39
39
|
|
|
40
40
|
## Examples
|
|
41
|
-
Check the `/examples`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
Check the `/examples` in wiki for advanced usage of:
|
|
42
|
+
Object placement
|
|
43
|
+
Prefabs
|
|
44
|
+
Timelines
|
|
46
45
|
|
|
47
46
|
## Installation
|
|
48
47
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|