exaV / screeps-kotlin-types

Screep's Kotlin type definitions
MIT License
17 stars 18 forks source link

Possibility of fractional values for RoomVisuals #33

Closed AWRyder closed 5 years ago

AWRyder commented 5 years ago

There is a RoomVisual method that accepts an X and Y positions, however it's expecting an int while the documentation states:

All draw coordinates are measured in game coordinates and centered to tile centers, i.e. (10,10) will point to the center of the creep at x:10; y:10 position. Fractional coordinates are allowed.

Relevant line: fun text(text: String, x: Int, y: Int, style: TextStyle = definedExternally): RoomVisual

Suggestion: Changing the type to one that allows fractional values.

exaV commented 5 years ago

I probably didn't catch that when I skimmed the docs. I'm all for it.