├── .gitignore ├── LICENSE ├── README.md ├── config.json ├── examples ├── example-room.png └── old-example-room.png ├── imgs ├── H.png ├── K.png ├── L.png ├── O.png ├── U.png ├── X.png ├── Z.png ├── bg.png ├── constructedWall.png ├── container.png ├── controller.png ├── down.png ├── extension.png ├── extension_empty.png ├── factory.png ├── lab.png ├── left.png ├── link.png ├── link_empty.png ├── models │ └── road.json ├── nuker.png ├── nuker_empty.png ├── observer.png ├── powerSpawn.png ├── rampart.png ├── rampart_b.png ├── rcl1.png ├── rcl2.png ├── rcl3.png ├── rcl4.png ├── rcl5.png ├── rcl6.png ├── rcl7.png ├── rcl8.png ├── right.png ├── road.png ├── road_EN-WS.png ├── road_N-S.png ├── road_W-E.png ├── road_WN-ES.png ├── road_dot.png ├── road_down.png ├── road_left.png ├── road_left_down.png ├── road_left_up.png ├── road_right.png ├── road_right_down.png ├── road_right_up.png ├── road_up.png ├── sbg.png ├── source.png ├── source_empty.png ├── spawn.png ├── storage.png ├── swamp.png ├── terminal.png ├── tower.png ├── tower_empty.png ├── up.png └── wall.png ├── main.py ├── requirements.txt └── resourcepacks ├── 16x ├── road_EN-WS.png ├── road_N-S.png ├── road_W-E.png ├── road_WN-ES.png └── road_dot.png ├── 64x └── textures │ ├── container.png │ ├── controller_0.png │ ├── controller_1.png │ ├── controller_2.png │ ├── controller_3.png │ ├── controller_4.png │ ├── controller_5.png │ ├── controller_6.png │ ├── controller_7.png │ ├── controller_8.png │ ├── cwall.png │ ├── ext.png │ ├── ext_empty.png │ ├── factory.png │ ├── lab.png │ ├── link.png │ ├── nuker.png │ ├── ob.png │ ├── pb.png │ ├── plain.png │ ├── road_EN-WS.png │ ├── road_N-S.png │ ├── road_W-E.png │ ├── road_WN-ES.png │ ├── road_dot.png │ ├── source.png │ ├── source_empty.png │ ├── storage.png │ ├── storage_empty.png │ ├── swamp.png │ ├── terminal.png │ ├── tower.png │ ├── tower_empty.png │ └── wall.png └── default ├── models ├── controller_0.json ├── controller_1.json ├── controller_2.json ├── controller_3.json ├── controller_4.json ├── controller_5.json ├── controller_6.json ├── controller_7.json ├── controller_8.json ├── factory.json ├── mineral_H.json ├── mineral_K.json ├── mineral_L.json ├── mineral_O.json ├── mineral_U.json ├── mineral_X.json ├── mineral_Z.json ├── powerspawn.json ├── road.json ├── swamp.json └── wall.json └── textures ├── bg.png ├── constructedWall.png ├── container.png ├── controller_0.png ├── controller_1.png ├── controller_2.png ├── controller_3.png ├── controller_4.png ├── controller_5.png ├── controller_6.png ├── controller_7.png ├── controller_8.png ├── down.png ├── extension.png ├── extension_empty.png ├── factory.png ├── lab.png ├── left.png ├── link.png ├── link_empty.png ├── mineral_H.png ├── mineral_K.png ├── mineral_L.png ├── mineral_O.png ├── mineral_U.png ├── mineral_X.png ├── mineral_Z.png ├── nuker.png ├── nuker_empty.png ├── observer.png ├── powerSpawn.png ├── rampart.png ├── rampart_b.png ├── right.png ├── road.png ├── road_EN-WS.png ├── road_N-S.png ├── road_W-E.png ├── road_WN-ES.png ├── road_dot.png ├── sbg.png ├── source.png ├── source_empty.png ├── spawn.png ├── storage.png ├── swamp.png ├── terminal.png ├── tower.png ├── tower_empty.png ├── up.png └── wall.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Screeps-blockVisual 2 | Block style image generator for Screeps room visual. 3 | Use Screeps' API to get the data of the room. 4 | 5 | ![example](examples/example-room.png) 6 | 7 | 8 | 9 | More functions are being developing, join us if interested! 10 | (BUGS to be fixed...) 11 | 12 | # TODO 13 | - [x] ~~Connect roads~~ 14 | - [ ] Connect ramparts 15 | - [x] ~~Fix the picture of the Controller~~ 16 | - [ ] Draw creeps 17 | - [ ] Fix the baby-size storage/terminal 18 | - [ ] Fix the size of the extensions 19 | - [ ] Add the function to generate worldmaps 20 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "token":"your-token" 3 | } 4 | -------------------------------------------------------------------------------- /examples/example-room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/examples/example-room.png -------------------------------------------------------------------------------- /examples/old-example-room.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/examples/old-example-room.png -------------------------------------------------------------------------------- /imgs/H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/H.png -------------------------------------------------------------------------------- /imgs/K.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/K.png -------------------------------------------------------------------------------- /imgs/L.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/L.png -------------------------------------------------------------------------------- /imgs/O.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/O.png -------------------------------------------------------------------------------- /imgs/U.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/U.png -------------------------------------------------------------------------------- /imgs/X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/X.png -------------------------------------------------------------------------------- /imgs/Z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/Z.png -------------------------------------------------------------------------------- /imgs/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/bg.png -------------------------------------------------------------------------------- /imgs/constructedWall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/constructedWall.png -------------------------------------------------------------------------------- /imgs/container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/container.png -------------------------------------------------------------------------------- /imgs/controller.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/controller.png -------------------------------------------------------------------------------- /imgs/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/down.png -------------------------------------------------------------------------------- /imgs/extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/extension.png -------------------------------------------------------------------------------- /imgs/extension_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/extension_empty.png -------------------------------------------------------------------------------- /imgs/factory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/factory.png -------------------------------------------------------------------------------- /imgs/lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/lab.png -------------------------------------------------------------------------------- /imgs/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/left.png -------------------------------------------------------------------------------- /imgs/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/link.png -------------------------------------------------------------------------------- /imgs/link_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/link_empty.png -------------------------------------------------------------------------------- /imgs/models/road.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "dot": "road_dot.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | 0, 9 | 0 10 | ], 11 | "to": [ 12 | 16, 13 | 16 14 | ], 15 | "texture": "dot", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /imgs/nuker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/nuker.png -------------------------------------------------------------------------------- /imgs/nuker_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/nuker_empty.png -------------------------------------------------------------------------------- /imgs/observer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/observer.png -------------------------------------------------------------------------------- /imgs/powerSpawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/powerSpawn.png -------------------------------------------------------------------------------- /imgs/rampart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rampart.png -------------------------------------------------------------------------------- /imgs/rampart_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rampart_b.png -------------------------------------------------------------------------------- /imgs/rcl1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl1.png -------------------------------------------------------------------------------- /imgs/rcl2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl2.png -------------------------------------------------------------------------------- /imgs/rcl3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl3.png -------------------------------------------------------------------------------- /imgs/rcl4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl4.png -------------------------------------------------------------------------------- /imgs/rcl5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl5.png -------------------------------------------------------------------------------- /imgs/rcl6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl6.png -------------------------------------------------------------------------------- /imgs/rcl7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl7.png -------------------------------------------------------------------------------- /imgs/rcl8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/rcl8.png -------------------------------------------------------------------------------- /imgs/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/right.png -------------------------------------------------------------------------------- /imgs/road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road.png -------------------------------------------------------------------------------- /imgs/road_EN-WS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_EN-WS.png -------------------------------------------------------------------------------- /imgs/road_N-S.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_N-S.png -------------------------------------------------------------------------------- /imgs/road_W-E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_W-E.png -------------------------------------------------------------------------------- /imgs/road_WN-ES.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_WN-ES.png -------------------------------------------------------------------------------- /imgs/road_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_dot.png -------------------------------------------------------------------------------- /imgs/road_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_down.png -------------------------------------------------------------------------------- /imgs/road_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_left.png -------------------------------------------------------------------------------- /imgs/road_left_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_left_down.png -------------------------------------------------------------------------------- /imgs/road_left_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_left_up.png -------------------------------------------------------------------------------- /imgs/road_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_right.png -------------------------------------------------------------------------------- /imgs/road_right_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_right_down.png -------------------------------------------------------------------------------- /imgs/road_right_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_right_up.png -------------------------------------------------------------------------------- /imgs/road_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/road_up.png -------------------------------------------------------------------------------- /imgs/sbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/sbg.png -------------------------------------------------------------------------------- /imgs/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/source.png -------------------------------------------------------------------------------- /imgs/source_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/source_empty.png -------------------------------------------------------------------------------- /imgs/spawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/spawn.png -------------------------------------------------------------------------------- /imgs/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/storage.png -------------------------------------------------------------------------------- /imgs/swamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/swamp.png -------------------------------------------------------------------------------- /imgs/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/terminal.png -------------------------------------------------------------------------------- /imgs/tower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/tower.png -------------------------------------------------------------------------------- /imgs/tower_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/tower_empty.png -------------------------------------------------------------------------------- /imgs/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/up.png -------------------------------------------------------------------------------- /imgs/wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/imgs/wall.png -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | #引入文件 2 | # requirements:websocket-client,requests,pillow 3 | from websocket import create_connection 4 | import requests as req 5 | import json 6 | import time 7 | import os 8 | import random 9 | import sys 10 | from PIL import Image 11 | import re 12 | 13 | # 正则判断是否为数字 14 | def is_number(num): 15 | pattern = re.compile(r'^[-+]?[-0-9]\d*\.\d*|[-+]?\.?[0-9]\d*$') 16 | result = pattern.match(num) 17 | if result: 18 | return True 19 | else: 20 | return False 21 | 22 | # 命令行提示 23 | def help(e): 24 | print("This tools requires these following args:") 25 | print("shard: The shard name of your room") 26 | print("roomName: The name of your room") 27 | print("python main.py shard roomName") 28 | print("eg.") 29 | print("python main.py shard3 E10N10") 30 | if type(e)==IndexError: 31 | print('Missing critical args') 32 | else: 33 | print(e) 34 | exit() 35 | 36 | # 检查是否为标准房间名 37 | def checkRoomName(roomName): 38 | if (roomName[0] != 'N' and roomName[0] != 'S' and roomName[0] != 'W' and roomName[0] != 'E')or(roomName[3] != 'N' and roomName[3] != 'S' and roomName[3] != 'W' and roomName[3] != 'E'): 39 | return False 40 | num1=is_number(roomName[1:3]) 41 | num2=is_number(roomName[4:]) 42 | return num1 and num2 43 | 44 | def getRawFileList(path): 45 | files = [] 46 | names = [] 47 | for f in os.listdir(path): 48 | if not f.endswith("~") or not f == "": 49 | files.append(os.path.join(path, f)) 50 | names.append(f) 51 | return files, names 52 | 53 | # getTerrain(shard,roomName) 54 | # 获取房间地形json数据 55 | # shard:房间所在shard 56 | # roomName:房间名称 57 | def getTerrain(shard,roomName): 58 | return json.loads(req.get('https://screeps.com/api/game/room-terrain?room='+roomName+'&shard='+shard).text) 59 | 60 | # getToken(email,password) 61 | # 获取一个token(临时测试使用) 62 | # email:用户邮箱 63 | # password:用户密码 64 | def getToken(email,password): 65 | try: 66 | return json.loads(req.post('https://screeps.com/api/auth/signin',data={'email':email,'password':password}).text)['token'] 67 | except: 68 | return False 69 | 70 | # setMemory(mempath,mem,token) 71 | # 手动设置Memory 72 | # mempath:要设置的memory路径 73 | # mem:要设置的memory内容 74 | # token:用户token 75 | def setMemory(mempath,mem,token): 76 | try: 77 | path=mempath.split('/') 78 | cmd='' 79 | for d in path[:-1]: 80 | cmd+=' if(Memory.'+mempath[:mempath.index(d)+len(d)].replace('/','.')+'==undefined){ Memory.'+mempath[:mempath.index(d)+len(d)].replace('/','.')+'={} }' 81 | print(cmd+' Memory.'+mempath.replace('/','.')+'='+str(mem)) 82 | return req.post('https://screeps.com/api/user/console',headers={'X-Token':token},data={'shard':'shard3','expression':cmd+' Memory.'+mempath.replace('/','.')+'='+str(mem)}) 83 | except: 84 | return False 85 | 86 | def render(name, background, pos, size, dir: str = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'resourcepacks', 'default')): 87 | """pos is Obj.pos""" 88 | bg = background 89 | mddir = os.path.join(dir, 'models') 90 | txdir = os.path.join(dir, 'textures') 91 | x, y = pos 92 | try: 93 | with open(os.path.join(mddir, name + '.json')) as model_file: 94 | model = model_file.read() 95 | model = json.loads(model) 96 | textures = model['textures'] 97 | faces = model['faces'] 98 | render_rect = [-1, -1, -1, -1] 99 | for face in faces: 100 | if render_rect[0] == -1: 101 | render_rect[0] = face['from'][0] 102 | else: 103 | render_rect[0] = min(render_rect[0], face['from'][0]) 104 | if render_rect[1] == -1: 105 | render_rect[1] = face['from'][1] 106 | else: 107 | render_rect[1] = min(render_rect[1], face['from'][1]) 108 | if render_rect[2] == -1: 109 | render_rect[2] = face['to'][0] 110 | else: 111 | render_rect[2] = max(render_rect[2], face['to'][0]) 112 | if render_rect[3] == -1: 113 | render_rect[3] = face['to'][1] 114 | else: 115 | render_rect[3] = max(render_rect[3], face['to'][1]) 116 | render_rect[0] = int((render_rect[0] / 16.0 + x) * size) 117 | render_rect[1] = int((render_rect[1] / 16.0 + y) * size) 118 | render_rect[2] = int((render_rect[2] / 16.0 + x) * size) 119 | render_rect[3] = int((render_rect[3] / 16.0 + y) * size) 120 | img = Image.new('RGBA', (render_rect[2] - render_rect[0], render_rect[3] - render_rect[1])) 121 | raw_img = Image.open(os.path.join(txdir, textures[face['texture']])).convert('RGBA') 122 | w, h = img.size 123 | r_w, r_h = raw_img.size 124 | pix = img.load() 125 | r_pix = raw_img.load() 126 | for x in range(w): 127 | for y in range(h): 128 | rx = int((face['uv'][0] * (w - x) / w + face['uv'][2] * x / w) / 16.0 * r_w) 129 | ry = int((face['uv'][1] * (h - y) / h + face['uv'][3] * y / h) / 16.0 * r_h) 130 | pix[x, y] = r_pix[rx, ry] 131 | except: 132 | print("Render Error:\tModel <", name, "> not found. ") 133 | return 0 134 | tmp = bg.crop(render_rect).convert('RGBA') 135 | tmp.alpha_composite(img) 136 | bg.paste(tmp, render_rect) 137 | return bg 138 | 139 | if __name__=="__main__": 140 | rawConfig='' 141 | with open('config.json','r')as f: 142 | rawConfig=f.read() 143 | f.close() 144 | try: 145 | config=json.loads(rawConfig) 146 | except: 147 | sys.exit('Can\'t resolve config.json') 148 | token=config['token'] 149 | # 获取传入命令行参数 150 | try: 151 | shard=sys.argv[1] 152 | if not('shard' in shard): 153 | raise RuntimeError('Wrong shard name') 154 | roomName=sys.argv[2] 155 | if len(roomName)!=6 or (not checkRoomName(roomName)): 156 | raise RuntimeError('Wrong room name') 157 | except Exception as e: 158 | help(e) 159 | 160 | # 命令行参数检查完成, 161 | ws = create_connection('wss://screeps.com/socket/133/qwerasdf/websocket') 162 | for i in range(4): 163 | print("Debug:",ws.recv()[1:]) 164 | print('Login...') 165 | time.sleep(0.5) 166 | 167 | ws.send('["auth '+token+'"]') 168 | if ws.recv()[3:10] == 'auth ok': 169 | print('Token verify successfully') 170 | else: 171 | print('Wrong token') 172 | sys.exit() 173 | 174 | print('Loading data...') 175 | data = '' 176 | ws.send('"subscribe room:'+shard+'/'+roomName+'"') 177 | data = ws.recv() 178 | data = data[3:-2].replace('\\\\\\"', '"').replace('\\\\"', 179 | '"').replace('\\"', '"') 180 | try: 181 | if data[7:data.index(',')-1] != shard+'/'+roomName: 182 | data = ws.recv() 183 | data = data[3:-2].replace('\\\\\\"', 184 | '"').replace('\\\\"', '"').replace('\\"', '"') 185 | except: 186 | pass 187 | # print(data) 188 | try: 189 | data = data[:data.index(',"users"')]+'}' 190 | except: 191 | pass 192 | try: 193 | data = data[:data.index(',"visual"')]+'}' 194 | except: 195 | pass 196 | data = data[data.index(',')+1:] 197 | if data[-1] == ']': 198 | data = data[:-1] 199 | if data[-1] != '}': 200 | data += '}' 201 | try: 202 | data = json.loads(data) 203 | except: 204 | print(data) 205 | print('Failed') 206 | else: 207 | # Render! 208 | res_dir = "./imgs/" 209 | rpname = 'default' 210 | pixs = 16 211 | bg = Image.open('./resourcepacks/' + rpname + '/textures/bg.png').convert("RGBA") 212 | rampart_list = [] 213 | wall_list = {'up': [], 'down': [], 'left': [], 'right': []} 214 | files, names = getRawFileList(res_dir) 215 | roomTerrain = getTerrain(shard, roomName) 216 | row = [] 217 | road = [] 218 | for i in range(50): 219 | row.append(0) 220 | for i in range(50): 221 | road.append(row[:]) 222 | if 'ok' in roomTerrain: 223 | if roomTerrain['ok'] == 1: 224 | for terrain in roomTerrain['terrain']: 225 | if terrain['type'] == 'wall' or terrain['type'] == 'swamp': 226 | x = terrain['x']*pixs 227 | y = terrain['y']*pixs 228 | bg = render(terrain['type'], bg, (terrain['x'], terrain['y']), pixs) 229 | if terrain['x'] == 0: 230 | wall_list['left'].append(terrain['y']) 231 | if terrain['x'] == 49: 232 | wall_list['right'].append(terrain['y']) 233 | if terrain['y'] == 0: 234 | wall_list['up'].append(terrain['x']) 235 | if terrain['y'] == 49: 236 | wall_list['down'].append(terrain['x']) 237 | 238 | for direction in wall_list: 239 | if direction == 'up': 240 | up = Image.open(res_dir+'up.png').convert('RGBA') 241 | for i in range(49): 242 | if i not in wall_list[direction]: 243 | bg.paste(up, (i*pixs, 0, i*pixs+pixs, pixs)) 244 | if direction == 'down': 245 | down = Image.open(res_dir+'down.png').convert('RGBA') 246 | for i in range(49): 247 | if i not in wall_list[direction]: 248 | bg.paste(down, (i*pixs, 49*pixs, i*pixs+pixs, 50*pixs)) 249 | if direction == 'left': 250 | left = Image.open(res_dir+'left.png').convert('RGBA') 251 | for i in range(49): 252 | if i not in wall_list[direction]: 253 | bg.paste(left, (0, i*pixs, pixs, i*pixs+pixs)) 254 | if direction == 'right': 255 | right = Image.open(res_dir+'right.png').convert('RGBA') 256 | for i in range(49): 257 | if i not in wall_list[direction]: 258 | bg.paste(right, (49*pixs, i*pixs, 50*pixs, i*pixs+pixs)) 259 | 260 | for obj in data['objects'].values(): 261 | if 'x' not in obj: 262 | continue 263 | if 'y' not in obj: 264 | continue 265 | if 'type' not in obj: 266 | continue 267 | structure = obj['type'] 268 | x = obj['x']*pixs 269 | y = obj['y']*pixs 270 | if structure == 'rampart': 271 | rampart_list.append((x, y)) 272 | continue 273 | if structure == 'extension': 274 | tmp = bg.crop((x, y, x+pixs, y+pixs)).convert('RGBA') 275 | if obj['store']['energy'] < obj['storeCapacityResource']['energy']/3: 276 | structure_image = Image.open( 277 | res_dir+structure+"_empty.png").convert("RGBA") 278 | else: 279 | structure_image = Image.open( 280 | res_dir+structure+".png").convert("RGBA") 281 | tmp.alpha_composite(structure_image) 282 | bg.paste(tmp, (x, y, x+pixs, y+pixs)) 283 | continue 284 | if structure == 'controller': 285 | bg = render('controller_' + str(obj['level']), bg, (obj['x'], obj['y']), pixs) 286 | continue 287 | if structure == 'powerSpawn' or structure == 'factory': 288 | bg = render(structure, bg, (obj['x'], obj['y']), pixs) 289 | continue 290 | 291 | if structure == 'road': 292 | road[obj['x']][obj['y']] = 1 293 | bg = render('road', bg, (obj['x'], obj['y']), pixs) 294 | 295 | elif structure == 'mineral': 296 | bg = render('mineral_' + obj['mineralType'], bg, (obj['x'], obj['y']), pixs) 297 | else: 298 | if structure+'.png' not in names: 299 | continue 300 | if (structure == 'tower' or structure == 'link') and obj['store']['energy'] < obj['storeCapacityResource']['energy']/3: 301 | structure_image = Image.open( 302 | res_dir+structure+"_empty.png").convert("RGBA") 303 | elif structure == 'nuker' and ('energy' not in obj['store'] or 'G' not in obj['store'] or obj['store']['energy'] != 300000 or obj['store']['G'] != 5000): 304 | structure_image = Image.open( 305 | res_dir+structure+"_empty.png").convert("RGBA") 306 | elif structure == 'source' and obj['energy'] == 0: 307 | structure_image = Image.open( 308 | res_dir+structure+"_empty.png").convert("RGBA") 309 | else: 310 | structure_image = Image.open( 311 | res_dir+structure+".png").convert("RGBA") 312 | tmp = bg.crop((x-structure_image.size[0]+pixs, y-structure_image.size[1]+pixs, x+pixs, y+pixs)) 313 | tmp.alpha_composite(structure_image) 314 | bg.paste(tmp, (x-structure_image.size[0]+pixs, y-structure_image.size[1]+pixs, x+pixs, y+pixs)) 315 | 316 | res_dir = './resourcepacks/default/textures/' 317 | 318 | for x in range(1,49): 319 | for y in range(1,49): 320 | if road[x][y] == 1: 321 | if road[x - 1][y + 1] == 1: 322 | connection = Image.open(res_dir+'road_EN-WS.png').convert('RGBA') 323 | x0 = x - 0.5 324 | y0 = y + 0.5 325 | pix_x = int(x0 * pixs) 326 | pix_y = int(y0 * pixs) 327 | tmp = bg.crop((pix_x, pix_y, pix_x + pixs, pix_y + pixs)).convert('RGBA') 328 | tmp.alpha_composite(connection) 329 | bg.paste(tmp, (pix_x, pix_y, pix_x + pixs, pix_y + pixs)) 330 | if road[x][y + 1] == 1: 331 | connection = Image.open(res_dir+'road_N-S.png').convert('RGBA') 332 | x0 = x 333 | y0 = y + 0.5 334 | pix_x = int(x0 * pixs) 335 | pix_y = int(y0 * pixs) 336 | tmp = bg.crop((pix_x, pix_y, pix_x + pixs, pix_y + pixs)).convert('RGBA') 337 | tmp.alpha_composite(connection) 338 | bg.paste(tmp, (pix_x, pix_y, pix_x + pixs, pix_y + pixs)) 339 | if road[x + 1][y + 1] == 1: 340 | connection = Image.open(res_dir+'road_WN-ES.png').convert('RGBA') 341 | x0 = x + 0.5 342 | y0 = y + 0.5 343 | pix_x = int(x0 * pixs) 344 | pix_y = int(y0 * pixs) 345 | tmp = bg.crop((pix_x, pix_y, pix_x + pixs, pix_y + pixs)).convert('RGBA') 346 | tmp.alpha_composite(connection) 347 | bg.paste(tmp, (pix_x, pix_y, pix_x + pixs, pix_y + pixs)) 348 | if road[x + 1][y] == 1: 349 | connection = Image.open(res_dir+'road_W-E.png').convert('RGBA') 350 | x0 = x + 0.5 351 | y0 = y 352 | pix_x = int(x0 * pixs) 353 | pix_y = int(y0 * pixs) 354 | tmp = bg.crop((pix_x, pix_y, pix_x + pixs, pix_y + pixs)).convert('RGBA') 355 | tmp.alpha_composite(connection) 356 | bg.paste(tmp, (pix_x, pix_y, pix_x + pixs, pix_y + pixs)) 357 | 358 | res_dir = './imgs/' 359 | 360 | for pos in rampart_list: 361 | tmp = bg.crop((pos[0], pos[1], pos[0]+pixs, 362 | pos[1]+pixs)).convert('RGBA') 363 | rampart = Image.open(res_dir+"rampart.png").convert("RGBA") 364 | tmp.alpha_composite(rampart) 365 | bg.paste(tmp, (pos[0], pos[1], pos[0]+pixs, pos[1]+pixs)) 366 | 367 | ws.send('"unsubscribe room:'+shard+'/'+roomName+'"') 368 | ws.close() 369 | bg.save('./screeps-room-'+shard+'-'+roomName+'.png') 370 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Pillow==6.2.0 2 | requests==2.21.0 3 | websocket-client==0.56.0 4 | -------------------------------------------------------------------------------- /resourcepacks/16x/road_EN-WS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/16x/road_EN-WS.png -------------------------------------------------------------------------------- /resourcepacks/16x/road_N-S.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/16x/road_N-S.png -------------------------------------------------------------------------------- /resourcepacks/16x/road_W-E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/16x/road_W-E.png -------------------------------------------------------------------------------- /resourcepacks/16x/road_WN-ES.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/16x/road_WN-ES.png -------------------------------------------------------------------------------- /resourcepacks/16x/road_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/16x/road_dot.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/container.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_0.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_1.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_2.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_3.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_4.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_5.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_6.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_7.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/controller_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/controller_8.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/cwall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/cwall.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/ext.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/ext_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/ext_empty.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/factory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/factory.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/lab.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/link.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/nuker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/nuker.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/ob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/ob.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/pb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/pb.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/plain.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/road_EN-WS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/road_EN-WS.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/road_N-S.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/road_N-S.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/road_W-E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/road_W-E.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/road_WN-ES.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/road_WN-ES.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/road_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/road_dot.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/source.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/source_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/source_empty.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/storage.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/storage_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/storage_empty.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/swamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/swamp.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/terminal.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/tower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/tower.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/tower_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/tower_empty.png -------------------------------------------------------------------------------- /resourcepacks/64x/textures/wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/64x/textures/wall.png -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_0.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_0": "controller_0.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_0", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_1": "controller_1.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_1", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_2": "controller_2.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_2", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_3": "controller_3.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_3", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_4.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_4": "controller_4.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_4", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_5.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_5": "controller_5.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_5", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_6.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_6": "controller_6.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_6", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_7.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_7": "controller_7.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_7", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/controller_8.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "controller_8": "controller_8.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "controller_8", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/factory.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "factory": "factory.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "factory", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_H.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_H": "mineral_H.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_H", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_K.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_K": "mineral_K.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_K", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_L.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_L": "mineral_L.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_L", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_O.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_O": "mineral_O.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_O", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_U.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_U": "mineral_U.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_U", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_X.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_X": "mineral_X.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_X", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/mineral_Z.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "mineral_Z": "mineral_Z.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "mineral_Z", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/powerspawn.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "powerspawn": "powerspawn.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | -3, 9 | -3 10 | ], 11 | "to": [ 12 | 19, 13 | 19 14 | ], 15 | "texture": "powerspawn", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/road.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "dot": "road_dot.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | 0, 9 | 0 10 | ], 11 | "to": [ 12 | 16, 13 | 16 14 | ], 15 | "texture": "dot", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/swamp.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "swamp": "swamp.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | 0, 9 | 0 10 | ], 11 | "to": [ 12 | 16, 13 | 16 14 | ], 15 | "texture": "swamp", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/models/wall.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": { 3 | "wall": "wall.png" 4 | }, 5 | "faces": [ 6 | { 7 | "from": [ 8 | 0, 9 | 0 10 | ], 11 | "to": [ 12 | 16, 13 | 16 14 | ], 15 | "texture": "wall", 16 | "uv": [ 17 | 0, 18 | 0, 19 | 16, 20 | 16 21 | ] 22 | } 23 | ] 24 | } -------------------------------------------------------------------------------- /resourcepacks/default/textures/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/bg.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/constructedWall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/constructedWall.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/container.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_0.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_1.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_2.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_3.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_4.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_5.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_6.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_7.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/controller_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/controller_8.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/down.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/extension.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/extension.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/extension_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/extension_empty.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/factory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/factory.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/lab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/lab.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/left.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/link.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/link_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/link_empty.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_H.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_H.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_K.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_K.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_L.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_L.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_O.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_O.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_U.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_U.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_X.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_X.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/mineral_Z.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/mineral_Z.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/nuker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/nuker.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/nuker_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/nuker_empty.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/observer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/observer.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/powerSpawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/powerSpawn.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/rampart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/rampart.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/rampart_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/rampart_b.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/right.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/road.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/road_EN-WS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/road_EN-WS.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/road_N-S.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/road_N-S.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/road_W-E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/road_W-E.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/road_WN-ES.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/road_WN-ES.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/road_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/road_dot.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/sbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/sbg.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/source.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/source_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/source_empty.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/spawn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/spawn.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/storage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/storage.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/swamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/swamp.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/terminal.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/tower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/tower.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/tower_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/tower_empty.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/up.png -------------------------------------------------------------------------------- /resourcepacks/default/textures/wall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CraftKevin/Screeps-blockVisual/e98b10dd0f74d55c697af4eb68e98ab376647a17/resourcepacks/default/textures/wall.png --------------------------------------------------------------------------------