[Quest API] Add RandomizeFeature() overloads to Perl/Lua. (#2532)

# Perl
- Add `$mob->RandomizeFeatures()` to Perl.
- Add `$mob->RandomizeFeatures(send_illusion)` to Perl.
- Add `$mob->RandomizeFeatures(send_illusion, set_variables)` to Perl.

# Lua
- Add `mob:RandomizeFeatures()` to Lua.
- Add `mob:RandomizeFeatures(send_illusion)` to Lua.
- Add `mob:RandomizeFeatures(send_illusion, set_variables)` to Lua.

# Notes
- Previous overload required `send_illusion` and `set_variables` despite both default values being `true`, this will allow you to just send nothing if you want both to be `true`.
- Change `RandomizeFeatures()` type to `bool` from `void` to match source method, returns `false` when used on a race that has no features to randomize.
- This allows operators to do something different if the NPC can't use this method.
This commit is contained in:
Kinglykrab
2022-11-14 16:59:17 -05:00
committed by GitHub
parent fd2fc76706
commit e72ec4ae56
3 changed files with 39 additions and 13 deletions
+3 -1
View File
@@ -76,7 +76,9 @@ public:
void DoAnim(int anim_num, int type, bool ackreq, int filter);
void ChangeSize(double in_size);
void ChangeSize(double in_size, bool no_restriction);
void RandomizeFeatures(bool send_illusion, bool save_variables);
bool RandomizeFeatures();
bool RandomizeFeatures(bool send_illusion);
bool RandomizeFeatures(bool send_illusion, bool save_variables);
void GMMove(double x, double y, double z);
void GMMove(double x, double y, double z, double heading);
void TryMoveAlong(float distance, float heading);