MCPcopy Create free account
hub / github.com/candybox2/candybox2.github.io / emptyAndFillSelectedEqItemsArray

Method emptyAndFillSelectedEqItemsArray

code/main/Game.ts:241–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239 }
240
241 public emptyAndFillSelectedEqItemsArray(): void{
242 // Empty
243 this.selectedEqItems = {};
244
245 // Fill
246 if(Saving.loadString("gameWeaponSelected") != "inventorySpecialNothingWeapon") this.selectedEqItems["weapon"] = this.weapons[Saving.loadString("gameWeaponSelected")];
247 if(Saving.loadString("gameHatSelected") != "inventorySpecialNothingHat") this.selectedEqItems["hat"] = this.hats[Saving.loadString("gameHatSelected")];
248 if(Saving.loadString("gameBodyArmourSelected") != "inventorySpecialNothingBodyArmour") this.selectedEqItems["bodyArmour"] = this.bodyArmours[Saving.loadString("gameBodyArmourSelected")];
249 if(Saving.loadString("gameGlovesSelected") != "inventorySpecialNothingGloves") this.selectedEqItems["gloves"] = this.gloves[Saving.loadString("gameGlovesSelected")];
250 if(Saving.loadString("gameBootsSelected") != "inventorySpecialNothingBoots") this.selectedEqItems["boots"] = this.boots[Saving.loadString("gameBootsSelected")];
251 }
252
253 public enableLocalAutosave(localAutosaveSlot: string): void{
254 this.localAutosaveEnabled = true;

Callers 3

postLoadMethod · 0.95
unequipIfEquippedMethod · 0.95
selectedEqItemMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected