summaryrefslogtreecommitdiff
path: root/extractor/version.gd
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/version.gd')
-rw-r--r--extractor/version.gd20
1 files changed, 20 insertions, 0 deletions
diff --git a/extractor/version.gd b/extractor/version.gd
index 679a8f0..ae97a10 100644
--- a/extractor/version.gd
+++ b/extractor/version.gd
@@ -11,5 +11,25 @@ var major: int
var minor: int
+func lower_than(compare_major: int, compare_minor: int) -> bool:
+ if (major > compare_major):
+ return false
+
+ if (major == compare_major):
+ return minor < compare_minor
+
+ return true
+
+
+func higher_than(compare_major: int, compare_minor: int) -> bool:
+ if (major > compare_major):
+ return true
+
+ if (major == compare_major):
+ return minor > compare_minor
+
+ return false
+
+
func _to_string() -> String:
return "%s.%s" % [major, minor]