dashcode 1.2.9__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.9 → dashcode-1.3.0}/PKG-INFO +1 -1
- {dashcode-1.2.9 → dashcode-1.3.0}/dashcode/core.py +34 -15
- {dashcode-1.2.9 → dashcode-1.3.0}/dashcode.egg-info/PKG-INFO +1 -1
- {dashcode-1.2.9 → dashcode-1.3.0}/setup.py +1 -1
- {dashcode-1.2.9 → dashcode-1.3.0}/README.md +0 -0
- {dashcode-1.2.9 → dashcode-1.3.0}/dashcode/__init__.py +0 -0
- {dashcode-1.2.9 → dashcode-1.3.0}/dashcode.egg-info/SOURCES.txt +0 -0
- {dashcode-1.2.9 → dashcode-1.3.0}/dashcode.egg-info/dependency_links.txt +0 -0
- {dashcode-1.2.9 → dashcode-1.3.0}/dashcode.egg-info/top_level.txt +0 -0
- {dashcode-1.2.9 → dashcode-1.3.0}/setup.cfg +0 -0
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|