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

Method foundGridOrEqItem

code/main/Quest.ts:577–592  ·  view source on GitHub ↗
(itemFound: QuestItemFound)

Source from the content-addressed store, hash-verified

575 }
576
577 public foundGridOrEqItem(itemFound: QuestItemFound): boolean{
578 // If we already have this item, we return false
579 if(Saving.loadBool(itemFound.getSavingName()) == true)
580 return false;
581
582 // If we already found this item during this quest, we return false
583 for(var i = 0; i < this.itemsFound.length; i++){
584 if(itemFound.getSavingName() == this.itemsFound[i].getSavingName())
585 return false;
586 }
587
588 // We add the item to our found array, tell it that we found it, and return true
589 this.itemsFound.push(itemFound);
590 this.itemsFound[this.itemsFound.length-1].found();
591 return true;
592 }
593
594 public forceMovingAllEntities(movement: Pos): void{
595 for(var i = 0; i < this.entities.length; i++){

Callers 15

willDieMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80
openChestMethod · 0.80
openChestMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80
willDieMethod · 0.80

Calls 2

foundMethod · 0.80
getSavingNameMethod · 0.45

Tested by

no test coverage detected