forked from challenge-project/challenge-sandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheckpointless.Script.txt
49 lines (41 loc) · 1.11 KB
/
Checkpointless.Script.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
***Metadata***
***
Script.Name = "Checkpointless";
Script.AuthorLogin = "bigbang1112";
Script.Description = "{{{{CHECKPOINTLESS_DESCRIPTION}}}}";
***
SChProblem Problem_CannotRemoveCheckpoint(SChAnchor _Anchor) {
declare SChProblem Problem;
Problem.Name = "CannotRemoveCheckpoint";
Problem.Anchor = _Anchor;
return Problem;
}
***Main***
***
declare Checkpoints = GetCheckpoints();
for(i,0,Checkpoints.count-1) {
declare Anchor = Checkpoints[i];
if(Anchor.DefaultTag == "Checkpoint") {
if(Anchor.IsBlock) {
SetStatusMessage("{{{{CHECKPOINT_FOUND}}}} " ^ Anchor.Block.Name);
}
else if(Anchor.IsItem) {
SetStatusMessage("{{{{CHECKPOINT_FOUND}}}} " ^ Anchor.Item.Position);
}
SetStatusProgress((i+1.0)/(Checkpoints.count));
declare Removed = RemoveAnchor(Anchor);
if(!Removed) Problem(Problem_CannotRemoveCheckpoint(Anchor)); // Announce the problem to the Modifier
}
yield;
}
***
***Main_Fast***
***
foreach(Anchor,GetCheckpoints())
if(!RemoveAnchor(Anchor)) Problem(Problem_CannotRemoveCheckpoint(Anchor)); // Announce the problem to the Modifier
***
***Problems***
***
foreach(Problem,Problems) {
}
***