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

feat(mapper): add new terrain types #56

Merged
merged 9 commits into from
Feb 25, 2023
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@


<!-- PROJECT BADGES -->
[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/iLPdev/prs?include_prereleases&sort=semver&style=flat-square)](https://github.com/iLPdev/prs/releases/latest) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/iLPdev/prs?include_prereleases&sort=semver&style=flat-square)](https://github.com/iLPdev/prs/releases/latest) [![Issues][issues-shield]][issues-url] [![GPL License][license-shield]][license-url] [![standard-readme compliant][standard-readme-shield]][standard-readme-url]
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Mudlet/Mudlet?style=flat-square&label=client&sort=semver)](https://github.com/Mudlet/Mudlet/releases/latest) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END --> [![Issues][issues-shield]][issues-url] [![GPL License][license-shield]][license-url] [![standard-readme compliant][standard-readme-shield]][standard-readme-url]
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/Mudlet/Mudlet?style=flat-square&label=client&sort=semver)](https://github.com/Mudlet/Mudlet/releases/latest)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

<!-- SHORT DESCRIPTION -->
<p align="center">
Expand Down Expand Up @@ -211,7 +211,7 @@ This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.

The expectation is that our community group acts according to these guidelines, and that participants hold each other to these high standards. If you have any questions or are worried that the code isn't being followed, please contact the [maintainer](#maintainer) of this repository.

## Contributors
### Contributors

Thanks go to these amazing folks ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Expand Down
91 changes: 70 additions & 21 deletions prs-mapper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,76 @@ local defaults = {
}

local terrain_types = {
-- used to make rooms of different terrain types have different colors
-- add a new entry for each terrain type, and set the color with RGB values
-- each id value must be unique, terrain types not listed here will use mapper default color
-- not used if you define these in a map XML file
["Tall Grass"] = {id = 17, r = 0, g = 128, b = 0},
["Grass"] = {id = 18, r = 0, g = 255, b = 0},
["Shore"] = {id = 19, r = 128, g = 128, b = 0},
["Bridge"] = {id = 20, r = 255, g = 255, b = 255},
["Road"] = {id = 21, r = 0, g = 128, b = 128},
["Steppe"] = {id = 22, r = 255, g = 255, b = 0},
["Scrublands"] = {id = 23, r = 128, g = 128, b = 0},
["Wasteland"] = {id = 24, r = 128, g = 0, b = 0},
["Fence"] = {id = 25, r = 255, g = 255, b = 255},
["River"] = {id = 26, r = 0, g = 0, b = 255},
["Lake"] = {id = 27, r = 0, g = 0, b = 255},
["Fishing Pier"] = {id = 28, r = 0, g = 0, b = 255},
["Farmland"] = {id = 29, r = 255, g = 255, b = 0},
["Deep Water"] = {id = 30, r = 0, g = 0, b = 128},
["Gate"] = {id = 31, r = 255, g = 255, b = 0},
["Nexus"] = {id = 32, r = 128, g = 128, b = 128},
["Wall"] = {id = 33, r = 64, g = 64, b = 64},
-- used to make rooms of different terrain types have different colors
-- add a new entry for each terrain type, and set the color with RGB values
-- each id value must be unique, terrain types not listed here will use mapper default color
-- not used if you define these in a map XML file
["Tall Grass"] = {id = 17, r = 0, g = 128, b = 0},
["Grass"] = {id = 18, r = 0, g = 255, b = 0},
["Shore"] = {id = 19, r = 128, g = 128, b = 0},
["Bridge"] = {id = 20, r = 255, g = 255, b = 255},
["Road"] = {id = 21, r = 0, g = 128, b = 128},
["Steppe"] = {id = 22, r = 255, g = 255, b = 0},
["Scrublands"] = {id = 23, r = 128, g = 128, b = 0},
["Wasteland"] = {id = 24, r = 128, g = 0, b = 0},
["Fence"] = {id = 25, r = 255, g = 255, b = 255},
["River"] = {id = 26, r = 0, g = 0, b = 255},
["Lake"] = {id = 27, r = 0, g = 0, b = 255},
["Fishing Pier"] = {id = 28, r = 0, g = 0, b = 255},
["Farmland"] = {id = 29, r = 255, g = 255, b = 0},
["Deep Water"] = {id = 30, r = 0, g = 0, b = 128},
["Gate"] = {id = 31, r = 255, g = 255, b = 0},
["Nexus"] = {id = 32, r = 128, g = 128, b = 128},
["Wall"] = {id = 33, r = 64, g = 64, b = 64},
["Armor Shop"] = {id = 34, r = 255, g = 255, b = 255},
["Alchemist"] = {id = 35, r = 255, g = 0, b = 255},
["Farming Store"] = {id = 36, r = 0, g = 128, b = 0},
["Farmland"] = {id = 37, r = 128, g = 128, b = 0},
["Abandoned Mine"] = {id = 38, r = 255, g = 0, b = 0},
["Shrine"] = {id = 39, r = 255, g = 255, b = 255},
["Grocery Store"] = {id = 40, r = 128, g = 128, b = 0},
["Building"] = {id = 41, r = 255, g = 255, b = 0},
["Tool Shop"] = {id = 42, r = 128, g = 128, b = 0},
["Restaurant"] = {id = 43, r = 0, g = 255, b = 0},
["Clothing Shop"] = {id = 44, r = 0, g = 128, b = 128},
["Books Shop"] = {id = 45, r = 255, g = 255, b = 0},
["Book Shop"] = {id = 48, r = 255, g = 255, b = 0},
["Leatherworker's Shop"] = {id = 46, r = 0, g = 255, b = 255},
["Weapon Shop"] = {id = 47, r = 255, g = 0, b = 0},
["Altar"] = {id = 49, r = 255, g = 255, b = 255},
["Portal Shop"] = {id = 50, r = 128, g = 0, b = 128},
["Auction House"] = {id = 51, r = 128, g = 0, b = 0},
["Underworld Shop"] = {id = 52, r = 192, g = 192, b = 192},
["Hall of Scenarios"] = {id = 53, r = 255, g = 0, b = 0},
["Employment Office"] = {id = 54, r = 255, g = 255, b = 0},
["Hall of Lessons"] = {id = 55, r = 255, g = 0, b = 255},
["Bounty Board"] = {id = 56, r = 0, g = 255, b = 0},
["Vending Machine"] = {id = 57, r = 255, g = 0, b = 255},
["Tavern Stairs"] = {id = 58, r = 255, g = 255, b = 255},
["Great Plains Portal"] = {id = 59, r = 255, g = 0, b = 255},
["Hidden Grove Portal"] = {id = 60, r = 255, g = 0, b = 255},
["Endless Sands Portal"] = {id = 61, r = 255, g = 0, b = 255},
["Frozen Peaks Portal"] = {id = 62, r = 255, g = 0, b = 255},
["Dark Woods"] = {id = 63, r = 128, g = 128, b = 128},
["Thick Woods"] = {id = 64, r = 0, g = 128, b = 0},
["Obelisk"] = {id = 65, r = 128, g = 0, b = 128},
["Spider Cave"] = {id = 66, r = 0, g = 128, b = 0},
["Tempest Hideout"] = {id = 67, r = 128, g = 128, b = 128},
["Temple"] = {id = 68, r = 0, g = 255, b = 255},
["Sparse Woods"] = {id = 69, r = 0, g = 255, b = 0},
["Statue Shrine"] = {id = 70, r = 255, g = 255, b = 0},
["Desert"] = {id = 71, r = 255, g = 255, b = 0},
["Ravine"] = {id = 72, r = 128, g = 128, b = 128},
["Dunes"] = {id = 73, r = 255, g = 255, b = 0},
["Legion Fortress"] = {id = 74, r = 255, g = 0, b = 0},
["Plateau"] = {id = 75, r = 255, g = 0, b = 0},
["Canyon"] = {id = 76, r = 128, g = 0, b = 128},
["Oasis"] = {id = 77, r = 0, g = 155, b = 0},
["Summit"] = {id = 78, r = 255, g = 255, b = 255},
["Ravine"] = {id = 79, r = 128, g = 128, b = 128},
["Mountains"] = {id = 80, r = 0, g = 255, b = 255},
["Foothills"] = {id = 81, r = 128, g = 128, b = 0},
["Valley"] = {id = 82, r = 0, g = 128, b = 0},
}

-- list of possible movement directions and appropriate coordinate changes
Expand Down