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

Various fixes #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

RollanzMushing
Copy link

I noticed the mapper wasn't using terrain colours and did something about that, and fixed some other minor issues while I was at it:

  • not all possible room.info is associated with a colour (e.g. indoors, wilderness), so I made it so that terrain colours always apply if room.info colour doesn't
  • mapper adding wilderness rooms isn't helpful because exits aren't part of the GMCP data for those. I added an alias to ignore those
  • added default colours for all terrain types I have in my database, changed the logic slightly and added a metatable to colour_lookup so that non-ANSI colours can be used in the terrain_colours table
  • Achaea sends "Flying above <room_name>" and "In the trees above <room_name>" instead of the actual room name if you are not moving at ground height. I strip those so that the extraneous substring isn't messing up the database

RollanzMushing and others added 5 commits June 7, 2021 20:38
Use environment colour if the info entry is empty string
- For Achaea,  the details subfield of `Room.Info` GMCP message is always sent even if it's just an empty array
  - Results in a `got_info("")` call, which overwrites a `NULL` value in the `info` column with a blank string
- Add `mapper skipSpecial` alias to ignore rooms in Area 0
  - Area 0 is for special rooms such as wilderness, ships, etc.
- Remove coercion of `terrain_colours` entries to numbers
  - Add `__index` metamethod to `colour_lookup` to convert to RGB if needed
- Strip standard elevation string (e.g."Flying above") from room name
- Add default colours to terrains I have on record
- automatically add area uid/name information to the `areas` table
  - this uses __newindex metamethod
  - parsing rows from `areas` SQL table into `areas` Lua table now uses rawset
- explicitly parse current area id from coords into `current_areaid`
  - `areas` table now indexed with `current_areaid` to ensure uniform behaviour
- fix skipSpecial logic
- change room colouring logic
  - use terrain colours if didn't already set colour based on `room.info`
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.

1 participant