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

Method loadThirdHouse

code/main/Village.ts:133–163  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

131 }
132
133 private loadThirdHouse(x: number, y: number){
134 // If we have the key to the third house
135 if(Saving.loadBool("gridItemPossessedThirdHouseKey")){
136 // Buttons
137 this.renderArea.addMultipleAsciiButtons("mapVillageThirdHouseButton",
138 x+1, x+7, y,
139 x, x+8, y+1,
140 x-1, x+9, y+2,
141 x, x+8, y+3,
142 x, x+8, y+4);
143 // Comments
144 this.renderArea.addFullComment(x + 4, y + 5, Database.getText("mapVillageAHouseComment"), Database.getTranslatedText("mapVillageAHouseComment"), "mapVillageThirdHouseComment");
145 // Interactions
146 this.renderArea.addLinkOver(".mapVillageThirdHouseButton, .mapVillageThirdHouseComment", ".mapVillageThirdHouseComment");
147 this.renderArea.addLinkCall(".mapVillageThirdHouseButton, .mapVillageThirdHouseComment", new CallbackCollection(this.goToThirdHouse.bind(this)));
148 }
149 // Else, we don't have the key
150 else{
151 // Buttons
152 this.renderArea.addMultipleAsciiNinjaButtons("mapVillageThirdHouseButton",
153 x+1, x+7, y,
154 x, x+8, y+1,
155 x-1, x+9, y+2,
156 x, x+8, y+3,
157 x, x+8, y+4);
158 // Comments
159 this.renderArea.addFullComment(x + 4, y + 5, Database.getText("mapVillageLockedHouseComment"), Database.getTranslatedText("mapVillageLockedHouseComment"), "mapVillageThirdHouseComment");
160 // Interactions
161 this.renderArea.addLinkOver(".mapVillageThirdHouseButton, .mapVillageThirdHouseComment", ".mapVillageThirdHouseComment");
162 }
163 }
164
165 private loadForge(x: number, y: number){
166 // Buttons

Callers 1

updateMethod · 0.95

Calls 7

addFullCommentMethod · 0.80
addLinkOverMethod · 0.80
addLinkCallMethod · 0.80
bindMethod · 0.80
getTextMethod · 0.45

Tested by

no test coverage detected