Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements Room.Terrain and room.getTerrain() #103

Merged
merged 3 commits into from
Oct 26, 2018

Conversation

pyrodogg
Copy link
Member

Brief Description

This PR implements the Room.Terrain interface which allows getting the RoomTerrain object for any room, regardless of room visibility.

const terrain = new Room.Terrain("W2N5");

It also implements the room.getTerrain() method which allows getting the RoomTerrain object for any room object.

const terrain = room.getTerrain();

Closes #102

It looks like prettier updated a bunch of random things in the screeps-test class.

I experienced a situation where tslint and prettier appeared to be fighting over a few instances of the 'newline-per-chained-call' rule in the screeps-tests.ts file. If I fixed the error to appease tslint, it would get auto-changed on save into an incorrect state again. I opted to disable the tslint rule for the 4 cases since eslint says, "[i]f you have conflicting rules...you can safely turn this rule off." It seems like adding prettier to the project is fairly recent. I'm open to feedback on better ways to improve this situation.

Checklists

  • Test passed
  • Coding style (indentation, etc)
  • Edits have been made to src/ files not index.d.ts
  • Run npm run dtslint to update index.d.ts

@resir014
Copy link
Member

We can leave the tslint-ignore as it is right now, since there's nothing on the Prettier side that we can do.

Otherwise, this looks good, thanks!

@resir014 resir014 merged commit da98868 into screepers:master Oct 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Room.getTerrain( ) is missing
2 participants