Makes rotate chair less ass
Created by: Exxion
This pretty much just makes the rotate chair verb less awful and unpredictable at choosing which chair to rotate when there are multiple chairs adjacent to you. Other than looking at tiles for chairs in a predictable order, there is one change to the verb visible in-game: If there are chairs around you with different names, rotate chair will now just pick one to rotate like it would if all the adjacent chairs had the same name. This means that you no longer have to worry about accidentally opening a fuckload of windows if you try to rapidly spin a chair when there's another one with a different name nearby. I could change this back but I think it's better this way.
When used from the right click menu, it behaves exactly like it did before.
This is a pretty hacky fix, to be honest, but there's not a better way to do it within BYOND's verbs system, at least that I could think of. There are now actually two different rotate chair verbs. One is exactly what it was before except it doesn't show up in the verbs panel. This is what you access by right clicking and what the other one calls. The other is a mob verb that does show up in the Object panel but not in the right-click menu. This one handles the selection of a chair to rotate.
It rotates the first chair it finds, searching in this order:
- A chair you are buckled to
- Any chair on your tile
- Any chair on the tile to your north
- Any chair on the tile to your south
- Any chair on the tile to your east
- Any chair on the tile to your west
- Any chair on the tile to your northeast
- Any chair on the tile to your northwest
- Any chair on the tile to your southeast
- Any chair on the tile to your southwest
The order of the directional search is arbitrary and can be easily changed. It's just what I thought would be a good order, but if anyone else has a suggestion, go ahead. It could also be made to do the directional search in a smarter way than a hardcoded order if anyone has any suggestions.
Fixes #7662 (closed)