python-sc2 icon indicating copy to clipboard operation
python-sc2 copied to clipboard

Wiki development

Open Vakorg opened this issue 7 years ago • 1 comments

I think that need to use code samples in the wiki, such as here https://docs.screeps.com/api/

Vakorg avatar Sep 16 '18 06:09 Vakorg

That's a great idea! In my opinion, the wiki needs a huge rework anyway. Lots of Units filters and Unit properties were added. I suppose small code samples should be added to the wiki, but adding all filters and properties would be too much. I will try to edit the wiki when I have spare time.

Do you know a good way to do type annotation in python code samples? For example:

for my_structure in self.units.structure.not_ready:
    print("This structure {} is still in construction: {}%".format(my_structure, round(my_structure.build_progress * 100, 1)))

Here, my_structure is of type Unit which would be good to know.

PS: Screeps is an awesome game, too bad I dislike javascript :(

BurnySc2 avatar Sep 16 '18 12:09 BurnySc2