exaV / screeps-kotlin-types

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

moveByPath with array of room positions #71

Closed wesleyhall closed 3 years ago

wesleyhall commented 3 years ago

This should be a fix for: https://github.com/exaV/screeps-kotlin-types/issues/70 but I am not sure how to test changes locally.

wesleyhall commented 3 years ago

I also don't really understand how that other commit found it's way into this PR. I only changed the first one...

exaV commented 3 years ago

Here's how to test locally: Install the library locally

  1. Set a version in the build.gradle.kts of your fork e.g. version = 0.1-SNAPSHOT
  2. Run ./gradlew publishKotlinPublicationToMavenLocal to install the library locally on your machine
  3. add mavenLocal() to the repositories section of your bots build.gradle.kts (see https://github.com/exaV/screeps-kotlin-starter/blob/master/build.gradle.kts)
  4. add the local version of the libary to the dependencies block of your bot e.g. implementation("ch.delconte.screeps-kotlin:screeps-kotlin-types:0.1-SNAPSHOT")

OR Using https://jitpack.io/

  1. Add maven( url="https://jitpack.io") to the repositories section of your bots build.gradle
  2. Add the branch or last commit of your PR as a dependency to your bot implementation("com.github.wesleyhall:screeps-kotlin-types:moveByPath-positions-SNAPSHOT")

Let me know how it goes

wesleyhall commented 3 years ago

Hi @exaV

Thank you for this info. I have just tested the change locally and can confirm that it works great. Creeps happy trundle along when moveByPath(Array) is called.

I made a small change, and reordered the functions in the interface to put the two Array ones next to each other. Purely cosmetic, but other than that, I think it's good to go if you are happy with it.

I have another PR pending that documents the above information with a small change, stand by for that.