pyscreeps-arena 0.4.1.1__tar.gz → 0.5.0.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.
Files changed (22) hide show
  1. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/PKG-INFO +1 -1
  2. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/compiler.py +26 -33
  3. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/config.py +1 -1
  4. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/const.py +4 -4
  5. pyscreeps_arena-0.5.0.0/pyscreeps_arena/project.7z +0 -0
  6. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena.egg-info/PKG-INFO +1 -1
  7. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/setup.py +1 -1
  8. pyscreeps_arena-0.4.1.1/pyscreeps_arena/project.7z +0 -0
  9. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/__init__.py +0 -0
  10. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/build.py +0 -0
  11. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/__init__.py +0 -0
  12. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/basic.py +0 -0
  13. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/core.py +0 -0
  14. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/main.py +0 -0
  15. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/core/utils.py +0 -0
  16. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena/localization.py +0 -0
  17. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena.egg-info/SOURCES.txt +0 -0
  18. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena.egg-info/dependency_links.txt +0 -0
  19. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena.egg-info/entry_points.txt +0 -0
  20. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena.egg-info/requires.txt +0 -0
  21. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/pyscreeps_arena.egg-info/top_level.txt +0 -0
  22. {pyscreeps_arena-0.4.1.1 → pyscreeps_arena-0.5.0.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyscreeps-arena
3
- Version: 0.4.1.1
3
+ Version: 0.5.0.0
4
4
  Summary: Python api|interface to play game: Screeps: Arena.
5
5
  Author-email: 2229066748@qq.com
6
6
  Maintainer: Eagle'sBaby
@@ -43,7 +43,7 @@ class Compiler_Const:
43
43
 
44
44
  TOTAL_INSERT_AT_HEAD = """
45
45
  import { createConstructionSite, findClosestByPath, findClosestByRange, findInRange, findPath, getCpuTime, getDirection, getHeapStatistics, getObjectById, getObjects, getObjectsByPrototype, getRange, getTerrainAt, getTicks,} from 'game/utils';
46
- import { ConstructionSite as GameConstructionSite, Creep as GameCreep, GameObject as GameObjectProto, OwnedStructure, Resource as GameResource, Source as GameSource, Structure as GameStructure, StructureContainer as GameStructureContainer, StructureExtension as GameStructureExtension, StructureRampart as GameStructureRampart, StructureRoad as GameStructureRoad, StructureSpawn as GameStructureSpawn, StructureWall as GameStructureWall, StructureTower as GameStructureTower} from 'game/prototypes';
46
+ import { ConstructionSite as GameConstructionSite, Creep as GameCreep, GameObject as GameObjectProto, OwnedStructure, Resource as GameResource, Source as GameSource, Structure as GameStructure, StructureContainer as GameStructureContainer, StructureExtension as GameStructureExtension, StructureRampart as GameStructureRampart, StructureRoad as GameStructureRoad, StructureSpawn as GameStructureSpawn, StructureWall as GameStructureWall, StructureTower as GameStructureTower, Flag as GameFlag} from 'game/prototypes';
47
47
  import { ATTACK, ATTACK_POWER, BODYPART_COST, BODYPART_HITS, BOTTOM, BOTTOM_LEFT, BOTTOM_RIGHT, BUILD_POWER, CARRY, CARRY_CAPACITY, CONSTRUCTION_COST, CONSTRUCTION_COST_ROAD_SWAMP_RATIO, CONSTRUCTION_COST_ROAD_WALL_RATIO, CONTAINER_CAPACITY, CONTAINER_HITS, CREEP_SPAWN_TIME, DISMANTLE_COST, DISMANTLE_POWER, ERR_BUSY, ERR_FULL, ERR_INVALID_ARGS, ERR_INVALID_TARGET, ERR_NAME_EXISTS, ERR_NOT_ENOUGH_ENERGY, ERR_NOT_ENOUGH_EXTENSIONS, ERR_NOT_ENOUGH_RESOURCES, ERR_NOT_FOUND, ERR_NOT_IN_RANGE, ERR_NOT_OWNER, ERR_NO_BODYPART, ERR_NO_PATH, ERR_TIRED, EXTENSION_ENERGY_CAPACITY, EXTENSION_HITS, HARVEST_POWER, HEAL, HEAL_POWER, LEFT, MAX_CONSTRUCTION_SITES, MAX_CREEP_SIZE, MOVE, OBSTACLE_OBJECT_TYPES, OK, RAMPART_HITS, RAMPART_HITS_MAX, RANGED_ATTACK, RANGED_ATTACK_DISTANCE_RATE, RANGED_ATTACK_POWER, RANGED_HEAL_POWER, REPAIR_COST, REPAIR_POWER, RESOURCES_ALL, RESOURCE_DECAY, RESOURCE_ENERGY, RIGHT, ROAD_HITS, ROAD_WEAROUT, SOURCE_ENERGY_REGEN, SPAWN_ENERGY_CAPACITY, SPAWN_HITS, STRUCTURE_PROTOTYPES, TERRAIN_PLAIN, TERRAIN_SWAMP, TERRAIN_WALL, TOP, TOP_LEFT, TOP_RIGHT, TOUGH, TOWER_CAPACITY, TOWER_COOLDOWN, TOWER_ENERGY_COST, TOWER_FALLOFF, TOWER_FALLOFF_RANGE, TOWER_HITS, TOWER_OPTIMAL_RANGE, TOWER_POWER_ATTACK, TOWER_POWER_HEAL, TOWER_POWER_REPAIR, TOWER_RANGE, WALL_HITS, WALL_HITS_MAX, WORK} from 'game/constants';
48
48
 
49
49
  import {arenaInfo} from "game";
@@ -126,65 +126,58 @@ export var loop = function () {
126
126
 
127
127
  ARENA_IMPORTS_GETTER = {
128
128
  const.ARENA_GREEN: lambda: f"""
129
- class GameBodyPart{{
130
- constructor(){{
131
- }}
132
- }};
129
+ const ARENA_COLOR_TYPE = "green";
133
130
  class GameAreaEffect{{
134
131
  constructor(){{
135
132
  }}
136
133
  }};
137
- class GameFlag{{
134
+ class GameConstructionBoost{{
138
135
  constructor(){{
139
136
  }}
140
137
  }};
141
- const GameScoreCollector = GameStructureSpawn;
142
- const RESOURCE_SCORE = "undefined";
143
- const RESOURCE_SCORE_X = "undefined";
144
- const RESOURCE_SCORE_Y = "undefined";
145
- const RESOURCE_SCORE_Z = "undefined";
138
+ import {{ Portal as GamePortal}} from 'arena/season_{config.season}/{const.ARENA_GREEN}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/prototypes';
139
+
146
140
  """,
147
141
  const.ARENA_BLUE: lambda: f"""
142
+ const ARENA_COLOR_TYPE = "BLUE";
148
143
  const GameScoreCollector = GameStructureSpawn;
149
144
  class GameAreaEffect{{
150
145
  constructor(){{
151
146
  }}
152
147
  }};
153
- const RESOURCE_SCORE = "undefined";
154
- const RESOURCE_SCORE_X = "undefined";
155
- const RESOURCE_SCORE_Y = "undefined";
156
- const RESOURCE_SCORE_Z = "undefined";
157
- import {{ Flag as GameFlag, BodyPart as GameBodyPart}} from 'arena/season_{config.season}/capture_the_flag/{"advanced" if config.level in ["advance", "advanced"] else "basic"}';
158
- """,
159
- const.ARENA_RED: lambda: f"""
160
- class GameBodyPart{{
161
- constructor(){{
148
+ class GamePortal{{
149
+ constructor(){{
162
150
  }}
163
151
  }};
164
- class GameFlag{{
152
+ class GameConstructionBoost{{
165
153
  constructor(){{
166
154
  }}
167
155
  }};
168
- import {{ ScoreCollector as GameScoreCollector, AreaEffect as GameAreaEffect, EFFECT_DAMAGE, EFFECT_FREEZE }} from 'arena/season_{config.season}/collect_and_control/{"advanced" if config.level in ["advance", "advanced"] else "basic"}';
169
-
170
- {f"import {{ RESOURCE_SCORE_X, RESOURCE_SCORE_Y, RESOURCE_SCORE_Z }} from 'arena/season_{config.season}/collect_and_control/advanced';" if config.level in ["advance", "advanced"] else 'const RESOURCE_SCORE_X = "undefined"; const RESOURCE_SCORE_Y = "undefined"; const RESOURCE_SCORE_Z = "undefined";'}
156
+ """,
157
+ const.ARENA_RED: lambda: f"""
158
+ const ARENA_COLOR_TYPE = "RED";
159
+ class GamePortal{{
160
+ constructor(){{
161
+ }}
162
+ }};
163
+ 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';
164
+ import {{ EFFECT_CONSTRUCTION_BOOST, EFFECT_SLOWDOWN }} from 'arena/season_{config.season}/{const.ARENA_RED}/{"advanced" if config.level in ["advance", "advanced"] else "basic"}/constants';
171
165
 
172
- {"const RESOURCE_SCORE = 'undefined';" if config.level in ["advance", "advanced"] else f"import {{ RESOURCE_SCORE }} from 'arena/season_{config.season}/collect_and_control/basic';"}
173
166
  """,
174
167
  const.ARENA_GRAY: lambda: f"""
175
- class GameBodyPart{{
176
- constructor(){{
168
+ const ARENA_COLOR_TYPE = "GRAY";
169
+ class GameAreaEffect{{
170
+ constructor(){{
177
171
  }}
178
172
  }};
179
- class GameAreaEffect{{
173
+ class GamePortal{{
174
+ constructor(){{
175
+ }}
176
+ }};
177
+ class GameConstructionBoost{{
180
178
  constructor(){{
181
179
  }}
182
180
  }};
183
- const GameScoreCollector = GameStructureSpawn;
184
- const RESOURCE_SCORE = "undefined";
185
- const RESOURCE_SCORE_X = "undefined";
186
- const RESOURCE_SCORE_Y = "undefined";
187
- const RESOURCE_SCORE_Z = "undefined";
188
181
  let GameFlag = GameStructureSpawn;
189
182
  import * as GAME_PROTO_MODULE from 'game/prototypes';
190
183
  if (GAME_PROTO_MODULE.Flag){{
@@ -15,5 +15,5 @@ season = "beta"
15
15
  language = 'cn'
16
16
  # 默认路径: 用户 + ScreepsArena + beta-spawn_and_swamp + main.mjs
17
17
  target = None
18
- TARGET_GETTER = lambda: os.path.join(os.path.expanduser('~'), 'ScreepsArena', f'{season}-{const.ARENA_NAMES.get(arena, "spawn_and_swamp")}{"-advanced" if level in ["advance", "advanced"] else ""}', 'main.mjs')
18
+ TARGET_GETTER = lambda: os.path.join(os.path.expanduser('~'), 'ScreepsArena', f'{("season" + season) if season.isdigit() else season}-{const.ARENA_NAMES.get(arena, "spawn_and_swamp")}{"-advanced" if level in ["advance", "advanced"] else ""}', 'main.mjs')
19
19
 
@@ -9,15 +9,15 @@
9
9
  #
10
10
  import re
11
11
 
12
- VERSION = "0.4.1"
12
+ VERSION = "0.5.0.0"
13
13
  AUTHOR = "●ω<🤍♪"
14
14
  STEAM_ID = "1029562896"
15
15
  GITHUB_NAME = "EagleBaby"
16
16
  BILIBILI_NAME = "我阅读理解一直可以的"
17
17
 
18
- ARENA_GREEN = "spawn_and_swamp"
19
- ARENA_BLUE = "capture_the_flag"
20
- ARENA_RED = "collect_and_control"
18
+ ARENA_GREEN = "portal_exploration"
19
+ ARENA_BLUE = "spawn_strike"
20
+ ARENA_RED = "construct_and_control"
21
21
  ARENA_GRAY = "tutorial"
22
22
 
23
23
  ARENA_NAMES = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyscreeps-arena
3
- Version: 0.4.1.1
3
+ Version: 0.5.0.0
4
4
  Summary: Python api|interface to play game: Screeps: Arena.
5
5
  Author-email: 2229066748@qq.com
6
6
  Maintainer: Eagle'sBaby
@@ -7,7 +7,7 @@ with open(r"T:\New_PC\Import_Project\uploads\pyscreeps-arena_upload\pyscreeps-ar
7
7
  long_description = f.read()
8
8
  setup(
9
9
  name='pyscreeps-arena',
10
- version='0.4.1.1',
10
+ version='0.5.0.0',
11
11
  description='Python api|interface to play game: Screeps: Arena.',
12
12
  long_description=long_description,
13
13
  long_description_content_type='text/markdown',