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

Function reloadEverythingFromFile

code/main/main.ts:21–34  ·  view source on GitHub ↗
(fileContent: string)

Source from the content-addressed store, hash-verified

19 }
20
21 export function reloadEverythingFromFile(fileContent: string): void{
22 // Clear intervals for the current game
23 game.clearAllIntervals();
24 // Set the loading type
25 loadingType = MainLoadingType.FILE;
26 // Set the loading string
27 loadingString = fileContent;
28 // Set the gamemode (null so that it is set from loading)
29 gameMode = null;
30 // We can't register anymore
31 Saving.canRegister = false;
32 // Finally start (this will erase the current game)
33 start();
34 }
35
36 export function setUrlData(urlData: string): void{
37 // Create some variables

Callers

nothing calls this directly

Calls 2

startFunction · 0.85
clearAllIntervalsMethod · 0.80

Tested by

no test coverage detected