New option: stringArrayIndexShift enables additional index shift for all string array calls

This commit is contained in:
sanex
2020-11-14 10:15:42 +03:00
parent 44ac6c3ec8
commit 4f33c76da1
25 changed files with 297 additions and 82 deletions
@@ -142,7 +142,8 @@ export class StringArrayCodeHelperGroup extends AbstractCustomCodeHelperGroup {
stringArrayCallsWrapperCodeHelper.initialize(
stringArrayName,
stringArrayCallsWrapperName
stringArrayCallsWrapperName,
this.stringArrayStorage.getIndexShiftAmount()
);
this.customCodeHelpers.set(stringArrayCallsWrapperCodeHelperName, stringArrayCallsWrapperCodeHelper);
@@ -151,9 +152,11 @@ export class StringArrayCodeHelperGroup extends AbstractCustomCodeHelperGroup {
// stringArrayRotateFunction helper initialize
const stringArrayRotateFunctionCodeHelper: ICustomCodeHelper<TInitialData<StringArrayRotateFunctionCodeHelper>> =
this.customCodeHelperFactory(CustomCodeHelper.StringArrayRotateFunction);
const stringArrayRotationAmount: number = this.stringArrayStorage.getRotationAmount();
stringArrayRotateFunctionCodeHelper.initialize(stringArrayName, stringArrayRotationAmount);
stringArrayRotateFunctionCodeHelper.initialize(
stringArrayName,
this.stringArrayStorage.getRotationAmount()
);
if (this.options.rotateStringArray) {
this.customCodeHelpers.set(CustomCodeHelper.StringArrayRotateFunction, stringArrayRotateFunctionCodeHelper);