Skip to content

Area#removeRoomFromMap#93

Open
ratacat wants to merge 1 commit into
RanvierMUD:masterfrom
ratacat:removeRoomFromMap
Open

Area#removeRoomFromMap#93
ratacat wants to merge 1 commit into
RanvierMUD:masterfrom
ratacat:removeRoomFromMap

Conversation

@ratacat

@ratacat ratacat commented Jul 23, 2019

Copy link
Copy Markdown
Contributor

Currently if you Area#addRoom() it adds the room to the floor map, but you if call Area#removeRoom, it removes it from the area, but leaves it in the floor map. Resulting in bad things, like crashes when a player tries to view adjacent rooms that lookup their implied exits through the floor map. Any suggestions on how this could better?

@shawncplus

Copy link
Copy Markdown
Member

Code looks solid, I'd really like a unit test for it though

@ratacat

ratacat commented Jul 24, 2019

Copy link
Copy Markdown
Contributor Author

I have absolutely no idea how to do that, but I'm willing to try =) Any examples I can look at?

@shawncplus

Copy link
Copy Markdown
Member

https://github.com/RanvierMUD/core/blob/master/test/unit/Attribute.js is a super simple example. I'm been really bad about adding tests so there aren't many but that's a good base to work off of, it's using mocha

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.

2 participants