Skip to content

Commit 6ee40d1

Browse files
committed
SetSeason now accepts season as argument
1 parent 688b651 commit 6ee40d1

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
[h: seasonList = json.append("[]","Early Spring","Late Spring","Early Summer","Late Summer","Early Autumn","Late Autumn","Early Winter","Late Winter")]
2-
[h: currentSeason = getLibProperty("season","Lib:ca.rlw")]
3-
[h: seasonIndex = json.indexOf(seasonList, currentSeason)]
4-
[h: test = input("setSeason|"+seasonList+"|Set Season|LIST|DELIMITER=JSON SELECT="+seasonIndex+" VALUE=STRING")]
5-
[h: abort(test)]
2+
[h, if(json.length(macro.args)==0 || macro.args==""), code:{
3+
[h: currentSeason = getLibProperty("season","Lib:ca.rlw")]
4+
[h: seasonIndex = json.indexOf(seasonList, currentSeason)]
5+
[h: test = input("setSeason|"+seasonList+"|Set Season|LIST|DELIMITER=JSON SELECT="+seasonIndex+" VALUE=STRING")]
6+
[h: abort(test)]
7+
};{
8+
[h: setSeason = json.get(macro.args, 0)]
9+
}]
610
[h: setLibProperty("season",setSeason,"Lib:ca.rlw")]
711
[h: ca.rlw.updateUI()]

0 commit comments

Comments
 (0)