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

Require %CONTINUE% to process multiple map commands #42

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

youbetterdont
Copy link

@youbetterdont youbetterdont commented Mar 13, 2020

Require %CONTINUE% to be used to continue processing map commands from different lines. This makes the map commands behave identically to the name commands.

Example:

ItemDisplay[CHEST NMAG ETH !SUP SOCK=0 DEF>866]: %PURPLE%0%MAP% %NAME%
ItemDisplay[CHEST NMAG ETH !SUP SOCK=0 DEF>666]: %WHITE%0%MAP% %NAME%

Before the change, an armor matching the first line gets a purple 0 but a white map box. The name is taken from the first line, but the map condition is taken from the second (effectively).

After the change, an armor matching the first condition gets a purple 0 and a purple map box. The map condition and name are both taken from the same line.

To restore the original behavior:

ItemDisplay[CHEST NMAG ETH !SUP SOCK=0 DEF>866]: %PURPLE%0%MAP% %NAME%%CONTINUE%
ItemDisplay[CHEST NMAG ETH !SUP SOCK=0 DEF>666 DEF<867]: %WHITE%0 %NAME%%CONTINUE%
ItemDisplay[CHEST NMAG ETH !SUP SOCK=0 DEF>666]: %WHITE%%MAP% %NAME%

It's ugly because it's probably not what you meant to do in the first place.

This will require changes to existing config files for anyone relying on all %MAP%, %border%, etc. actions to be processed regardless of %CONTINUE%. We could add a toggle for legacy support, but I think that it might be better to just force the use of %CONTINUE%.

Here's an example from @planqi's config:

// Add border to all but really low runes
ItemDisplay[RUNE>12]: %name%%border-d0%%CONTINUE%
//No Indicator, White text, no map
ItemDisplay[RUNE<13]: %WHITE%* %RUNENAME% * (%RUNENUM%)//%dot-20%
//Put lower runes on map when lower clvl
ItemDisplay[RUNE<13 CLVL<70]: %name%%dot-20%
//Grey Indicator, Orange text, grey map
ItemDisplay[RUNE<20 RUNE>12]: %GRAY%0 %ORANGE%* %RUNENAME% * (%RUNENUM%)
//Lem - Gul: Red Indicator, Orange text, red map dot
ItemDisplay[RUNE>19 RUNE<26]: %RED%0 %ORANGE%* %RUNENAME% * (%RUNENUM%)%dot-0a%
//Vex - Zod: Purple Indicator, Orange text, purple map dot
ItemDisplay[RUNE>25]: %PURPLE%0 %ORANGE%* %RUNENAME% * (%RUNENUM%)%dot-9b%

This line needs continue: Correction: This scenario actually does not require CONTINUE because the first matching RUNE<13 line does not have any map commands (e.g., map, border, etc.). If this line had its own map commands already, the use of CONTINUE is required.

ItemDisplay[RUNE<13]: %WHITE%* %RUNENAME% * (%RUNENUM%)%CONTINUE%//%dot-20%

… makes the map commands behave identically to the name commands.
@planqi planqi merged commit 401eae9 into planqi:master Mar 17, 2020
@youbetterdont youbetterdont deleted the feature/map-require-continue branch March 18, 2020 01:40
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