The source project of this merge request has been removed.
MQ2Rez - Rearrange, extend setcommand, reduce duplicate code
- Rearranged file to remove the need for forward declarations
- /rez setcommand no longer requires quotes for commands with spaces
- Settings (except command) will persist between characters for newly generated inis
- Changed /rez setting options to match how the ini functions
- Removed #pragma once since this isn't a header
- Removed PLUGIN_NAME define since it was only used in one place
- Switched PLUGINMSG to constexpr
- Replaced VERSION float with the existing MQ2Version
- Changed DoCommand variable to bDoCommand to avoid confusion with the function of the same name
- Moved Pulse and Pulse Delay variables into OnPulse
- Changed AutoRezPct initialization to match default INI setting (96%)
- Removed unused RezDelay items
- Revert dataRez return from true to TRUE (function returns int)
- Removed VerifyINI which was doubling up on read calls
- Modified DoINIThings to accept an Operation (ReadOnly, WriteOnly, ReadAndWrite)
- Reorganized TheRezCommand to reduce duplicate code and move Write call to DoINIThings
- InGame() was only used in one place, moved the relevant logic into OnPulse
- Removed the ShowSettings() on each initialization
- Added a check in OnPulse to confirm initialization