pyscreeps-arena 0.5.9.2__py3-none-any.whl → 0.6.0.1__py3-none-any.whl
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.
- pyscreeps_arena/compiler.py +53 -7
- pyscreeps_arena/core/const.py +3 -3
- pyscreeps_arena/project.7z +0 -0
- {pyscreeps_arena-0.5.9.2.dist-info → pyscreeps_arena-0.6.0.1.dist-info}/METADATA +1 -1
- {pyscreeps_arena-0.5.9.2.dist-info → pyscreeps_arena-0.6.0.1.dist-info}/RECORD +8 -8
- {pyscreeps_arena-0.5.9.2.dist-info → pyscreeps_arena-0.6.0.1.dist-info}/WHEEL +1 -1
- {pyscreeps_arena-0.5.9.2.dist-info → pyscreeps_arena-0.6.0.1.dist-info}/entry_points.txt +0 -0
- {pyscreeps_arena-0.5.9.2.dist-info → pyscreeps_arena-0.6.0.1.dist-info}/top_level.txt +0 -0
pyscreeps_arena/compiler.py
CHANGED
|
@@ -166,8 +166,21 @@ class GameConstructionBoost{{
|
|
|
166
166
|
constructor(){{
|
|
167
167
|
}}
|
|
168
168
|
}};
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
class GameBodyPart{{
|
|
170
|
+
constructor(){{
|
|
171
|
+
}}
|
|
172
|
+
}};
|
|
173
|
+
|
|
174
|
+
// import {{ Portal as GamePortal}} from 'arena/season_{config.season}/{const.ARENA_GREEN}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/prototypes';
|
|
175
|
+
class GamePortal{{
|
|
176
|
+
constructor(){{
|
|
177
|
+
}}
|
|
178
|
+
}};
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
import {{ BonusFlag as GameBonusFlag }} from 'arena/season_{config.season}/{const.ARENA_GREEN}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/prototypes';
|
|
183
|
+
""",
|
|
171
184
|
# import {Portal} from 'arena/season_1/portal_exploration/basic/prototypes';
|
|
172
185
|
|
|
173
186
|
const.ARENA_BLUE: lambda: f"""
|
|
@@ -181,21 +194,34 @@ class GamePortal{{
|
|
|
181
194
|
constructor(){{
|
|
182
195
|
}}
|
|
183
196
|
}};
|
|
197
|
+
class GameBonusFlag{{
|
|
198
|
+
constructor(){{
|
|
199
|
+
}}
|
|
200
|
+
}};
|
|
184
201
|
class GameConstructionBoost{{
|
|
185
202
|
constructor(){{
|
|
186
203
|
}}
|
|
187
204
|
}};
|
|
188
|
-
|
|
205
|
+
import {{ BodyPart as GameBodyPart }} from 'arena/season_{config.season}/{const.ARENA_BLUE}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/prototypes';
|
|
206
|
+
""",
|
|
189
207
|
const.ARENA_RED: lambda: f"""
|
|
190
208
|
const ARENA_COLOR_TYPE = "RED";
|
|
191
209
|
class GamePortal{{
|
|
192
210
|
constructor(){{
|
|
193
211
|
}}
|
|
194
212
|
}};
|
|
213
|
+
class GameBodyPart{{
|
|
214
|
+
constructor(){{
|
|
215
|
+
}}
|
|
216
|
+
}};
|
|
217
|
+
class GameBonusFlag{{
|
|
218
|
+
constructor(){{
|
|
219
|
+
}}
|
|
220
|
+
}};
|
|
195
221
|
import {{ ConstructionBoost as GameConstructionBoost, AreaEffect as GameAreaEffect }} from 'arena/season_{config.season}/{const.ARENA_RED}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/prototypes';
|
|
196
222
|
import {{ EFFECT_CONSTRUCTION_BOOST, EFFECT_SLOWDOWN }} from 'arena/season_{config.season}/{const.ARENA_RED}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/constants';
|
|
197
223
|
|
|
198
|
-
|
|
224
|
+
""",
|
|
199
225
|
const.ARENA_GRAY: lambda: f"""
|
|
200
226
|
const ARENA_COLOR_TYPE = "GRAY";
|
|
201
227
|
class GameAreaEffect{{
|
|
@@ -206,11 +232,19 @@ class GamePortal{{
|
|
|
206
232
|
constructor(){{
|
|
207
233
|
}}
|
|
208
234
|
}};
|
|
235
|
+
class GameBodyPart{{
|
|
236
|
+
constructor(){{
|
|
237
|
+
}}
|
|
238
|
+
}};
|
|
239
|
+
class GameBonusFlag{{
|
|
240
|
+
constructor(){{
|
|
241
|
+
}}
|
|
242
|
+
}};
|
|
209
243
|
class GameConstructionBoost{{
|
|
210
244
|
constructor(){{
|
|
211
245
|
}}
|
|
212
246
|
}};
|
|
213
|
-
|
|
247
|
+
""",
|
|
214
248
|
}
|
|
215
249
|
|
|
216
250
|
|
|
@@ -1284,6 +1318,16 @@ class Compiler(CompilerBase):
|
|
|
1284
1318
|
"""
|
|
1285
1319
|
return re.sub(r'import[^\n]*\n', '', raw)
|
|
1286
1320
|
|
|
1321
|
+
@staticmethod
|
|
1322
|
+
def remove_transcrypt_comments(raw) -> str:
|
|
1323
|
+
"""
|
|
1324
|
+
将日期替换为固定日期,确保输出一致
|
|
1325
|
+
匹配模式: ... 2026-02-03 11:11:15 ... -> ... 1990-01-01 00:00:00 ...
|
|
1326
|
+
:param raw:
|
|
1327
|
+
:return:
|
|
1328
|
+
"""
|
|
1329
|
+
return re.sub(r"\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}", '2099-01-01 00:00:00', raw)
|
|
1330
|
+
|
|
1287
1331
|
def generate_total_js(self, usr_modules, t_imps: list[str], f_sorts, f_replaces, g_replaces, min_js_files=None) -> str:
|
|
1288
1332
|
"""
|
|
1289
1333
|
生成总的main.js
|
|
@@ -1312,8 +1356,8 @@ const __PYTHON_VERSION__ = '{python_version_info}';""" + self.TOTAL_INSERT_AT_HE
|
|
|
1312
1356
|
export var LANGUAGE = '{config.language}';
|
|
1313
1357
|
"""
|
|
1314
1358
|
|
|
1315
|
-
total_js += f"export var TIMESTAMP = {timestamp_ms};\n"
|
|
1316
|
-
total_js += f"export var TIMESTRING = '{timestring}';\n"
|
|
1359
|
+
# total_js += f"export var TIMESTAMP = {timestamp_ms};\n"
|
|
1360
|
+
# total_js += f"export var TIMESTRING = '{timestring}';\n"
|
|
1317
1361
|
total_js += f"""const __AUTHOR__ = '{const.AUTHOR}';
|
|
1318
1362
|
const __AUTHOR_CN__ = '{const.BILIBILI_NAME}';"""
|
|
1319
1363
|
|
|
@@ -1339,6 +1383,7 @@ const __AUTHOR_CN__ = '{const.BILIBILI_NAME}';"""
|
|
|
1339
1383
|
for module in usr_modules:
|
|
1340
1384
|
content = self.auto_read(os.path.join(self.target_dir, module))
|
|
1341
1385
|
content = self.remove_js_import(content)
|
|
1386
|
+
content = self.remove_transcrypt_comments(content)
|
|
1342
1387
|
for old, new in f_replaces.get(module, {}).items():
|
|
1343
1388
|
content = re.sub(old, new, content)
|
|
1344
1389
|
for old, new in self.TRANSCRYPT_ERROR_REPLACE.items():
|
|
@@ -1351,6 +1396,7 @@ const __AUTHOR_CN__ = '{const.BILIBILI_NAME}';"""
|
|
|
1351
1396
|
|
|
1352
1397
|
# write main.js
|
|
1353
1398
|
content = self.auto_read(self.target_js)
|
|
1399
|
+
content = self.remove_transcrypt_comments(content)
|
|
1354
1400
|
for old, new in self.TRANSCRYPT_ERROR_REPLACE.items():
|
|
1355
1401
|
content = re.sub(old, new, content)
|
|
1356
1402
|
total_js += content
|
pyscreeps_arena/core/const.py
CHANGED
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
#
|
|
10
10
|
import re
|
|
11
11
|
|
|
12
|
-
VERSION = "0.
|
|
12
|
+
VERSION = "0.6.0.1"
|
|
13
13
|
AUTHOR = "●ω<🤍♪"
|
|
14
14
|
STEAM_ID = "1029562896"
|
|
15
15
|
GITHUB_NAME = "EagleBaby"
|
|
16
16
|
BILIBILI_NAME = "我阅读理解一直可以的"
|
|
17
17
|
|
|
18
|
-
ARENA_GREEN = "
|
|
19
|
-
ARENA_BLUE = "
|
|
18
|
+
ARENA_GREEN = "power_split"
|
|
19
|
+
ARENA_BLUE = "capture_the_flag"
|
|
20
20
|
ARENA_RED = "construct_and_control"
|
|
21
21
|
ARENA_GRAY = "tutorial"
|
|
22
22
|
|
pyscreeps_arena/project.7z
CHANGED
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
pyscreeps_arena/__init__.py,sha256=GWrCpZnrzPwbBzhNqk8gTvV4VSwkP2DbxK8lR0E_SzY,3223
|
|
2
2
|
pyscreeps_arena/build.py,sha256=DQeGLnID2FjpsWTbnqwt2cOp28olWK68U67bfbFJSOU,177
|
|
3
|
-
pyscreeps_arena/compiler.py,sha256=
|
|
3
|
+
pyscreeps_arena/compiler.py,sha256=5flVHwjuSxj_8KnRkgdGtQq8zBJPLdBjAzv032bFic4,71968
|
|
4
4
|
pyscreeps_arena/localization.py,sha256=Dr0G6n8DvT6syfC0urqwjccYpEPEfcwYyJx3f9s-6a8,6031
|
|
5
|
-
pyscreeps_arena/project.7z,sha256=
|
|
5
|
+
pyscreeps_arena/project.7z,sha256=P4ki7jOeQK_stZVkWZEG4K7XooeuBAtxWgf_wREJZhI,622114
|
|
6
6
|
pyscreeps_arena/afters/__init__.py,sha256=Ze8NKQoMEzIJ3WlyR8Jhhdq21gSXJUtGoINzB8iaQyE,254
|
|
7
7
|
pyscreeps_arena/afters/after_config.py,sha256=Tw8Qry0KAM3hDasmXArKoS1crPuwfiAfWiEeAcKrPdo,2455
|
|
8
8
|
pyscreeps_arena/afters/after_custom.py,sha256=pgI5xkY4X7w_NHFufQ5PUGxpCrv9Ayw6VWFwVJCHLFw,3226
|
|
@@ -11,7 +11,7 @@ pyscreeps_arena/afters/after_prefab.py,sha256=H_2LJbr_7e2yCtxWStxze259-py3TXQlyP
|
|
|
11
11
|
pyscreeps_arena/core/__init__.py,sha256=qoP_rx1TpbDLJoTm5via4XPwEPaV1FXr1SYvoVoHGms,41
|
|
12
12
|
pyscreeps_arena/core/basic.py,sha256=DFvyDTsTXf2bQtnS9s254TrkshvRwajaHcvTyVvJyqw,2790
|
|
13
13
|
pyscreeps_arena/core/config.py,sha256=x_JhVHlVZqB3qA7UyACVnwZjg2gZU-BIs49UxZzwCoE,637
|
|
14
|
-
pyscreeps_arena/core/const.py,sha256=
|
|
14
|
+
pyscreeps_arena/core/const.py,sha256=CWL7jVeNy2es5_qw08rNj7G1aqy0NLHP37qgoFv-gBM,587
|
|
15
15
|
pyscreeps_arena/core/core.py,sha256=3Nty8eLKPNgwnYk_sVNBPrWuKxBXI2od8nfEezsEAZQ,5157
|
|
16
16
|
pyscreeps_arena/core/main.py,sha256=-FNSOEjksNlDfCbUqsjtPSUW8vT3qxEdfzXqT5Tdsik,170
|
|
17
17
|
pyscreeps_arena/core/utils.py,sha256=N9OOkORvrqnJakayaFp9qyS0apWhB9lBK4xyyYkhFdo,215
|
|
@@ -49,8 +49,8 @@ pyscreeps_arena/ui/qprefabs/test.py,sha256=9D9sKTYnXM2CU8oavQlM8A-4AHgLu0wLoRQnA
|
|
|
49
49
|
pyscreeps_arena/ui/qrecipe/__init__.py,sha256=2Guvr9k5kGkZboiVC0aNF4u48LRbmcCm2dqOhEF52Tw,59
|
|
50
50
|
pyscreeps_arena/ui/qrecipe/model.py,sha256=s3lr_DXtsBgt8bVg1_wLz-dX88QKi77mNkqM5VJsGwE,13200
|
|
51
51
|
pyscreeps_arena/ui/qrecipe/qrecipe.py,sha256=z57VLmlpMripdpGtVCkKR0csJQhw5-WpocZK5l2xTVg,39398
|
|
52
|
-
pyscreeps_arena-0.
|
|
53
|
-
pyscreeps_arena-0.
|
|
54
|
-
pyscreeps_arena-0.
|
|
55
|
-
pyscreeps_arena-0.
|
|
56
|
-
pyscreeps_arena-0.
|
|
52
|
+
pyscreeps_arena-0.6.0.1.dist-info/METADATA,sha256=BuD59JzmRK0y9RNHfXLbdxu1WBth02SgJZWm4xaw__o,2356
|
|
53
|
+
pyscreeps_arena-0.6.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
54
|
+
pyscreeps_arena-0.6.0.1.dist-info/entry_points.txt,sha256=pnpuPPadwQsxQPaR1rXzUo0fUvhOcC7HTHlf7TYXr7M,141
|
|
55
|
+
pyscreeps_arena-0.6.0.1.dist-info/top_level.txt,sha256=l4uLyMR2NOy41ngBMh795jOHTFk3tgYKy64-9cgjVng,16
|
|
56
|
+
pyscreeps_arena-0.6.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|