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

Replace u/npc_has_var with compare_string #76036

Merged
merged 2 commits into from
Aug 31, 2024

Conversation

GuardianDll
Copy link
Member

Summary

None

Purpose of change

Got told that u/npc_has_var is on a chopping block, because it does the same thing as compare_string, but limited to only two scopes out of four
Well if it's on a chopping block, let's chop it

Describe the solution

Use regex to replace all uses of u/npc_has_var with compare_string
Fix manually the rest that was not hit with regex

Testing

TBD

Additional context

Regex used:

"npc_has_var": "([A-Za-z0-9_-]*)",[\n 	]* "value": "([A-Za-z0-9_-]*)"

"compare_string": [ "$2", { "npc_val": "$1" } ]
"u_has_var": "([A-Za-z0-9_-]*)",[\n 	]* "value": "([A-Za-z0-9_-]*)"

"compare_string": [ "$2", { "u_val": "$1" } ]

copy of #76006 without conflicts with #75392

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Missions Quests and missions Bionics CBM (Compact Bionic Modules) Map / Mapgen Overmap, Mapgen, Map extras, Map display Items: Food / Vitamins Comestibles and drinks Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Aftershock Anything to do with the Aftershock mod Mods: Dark Days of the Dead Anything related to the DDotD mod (classic style zombies) Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Defense Mode Anything to do with the Defense Mode mod EOC: Effects On Condition Anything concerning Effects On Condition Mods: Innawood 🌲 Anything to do with Innawood mod Mods: Xedra Evolved Anything to do with Xedra Evolved Mods: Bombastic Perks Mods: Mind Over Matter astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Aug 29, 2024
@Maleclypse Maleclypse merged commit 3234e8c into CleverRaven:master Aug 31, 2024
28 of 29 checks passed
@GuardianDll GuardianDll deleted the _has_var_no_foot_shooting branch August 31, 2024 09:27
@GuardianDll GuardianDll mentioned this pull request Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. EOC: Effects On Condition Anything concerning Effects On Condition Items: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs Missions Quests and missions Mods: Aftershock Anything to do with the Aftershock mod Mods: Bombastic Perks Mods: Dark Days of the Dead Anything related to the DDotD mod (classic style zombies) Mods: Defense Mode Anything to do with the Defense Mode mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Innawood 🌲 Anything to do with Innawood mod Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Mind Over Matter Mods: Xedra Evolved Anything to do with Xedra Evolved NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants