diff --git a/js-web/KubeInvaders/archive/archive_files.json b/js-web/KubeInvaders/archive/archive_files.json index 4850f26..349dc6b 100644 --- a/js-web/KubeInvaders/archive/archive_files.json +++ b/js-web/KubeInvaders/archive/archive_files.json @@ -1 +1 @@ -{"content":[{"name":"game.projectc","size":2335,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":5488,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":290008,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":9710,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]} \ No newline at end of file +{"content":[{"name":"game.projectc","size":2335,"pieces":[{"name":"game.projectc0","offset":0}]},{"name":"game.arci","size":5488,"pieces":[{"name":"game.arci0","offset":0}]},{"name":"game.arcd","size":290036,"pieces":[{"name":"game.arcd0","offset":0}]},{"name":"game.dmanifest","size":9710,"pieces":[{"name":"game.dmanifest0","offset":0}]},{"name":"game.public.der","size":162,"pieces":[{"name":"game.public.der0","offset":0}]}]} \ No newline at end of file diff --git a/js-web/KubeInvaders/archive/game.arcd0 b/js-web/KubeInvaders/archive/game.arcd0 index 452b934..409c221 100644 Binary files a/js-web/KubeInvaders/archive/game.arcd0 and b/js-web/KubeInvaders/archive/game.arcd0 differ diff --git a/js-web/KubeInvaders/archive/game.arci0 b/js-web/KubeInvaders/archive/game.arci0 index c6b8464..bfe4939 100644 Binary files a/js-web/KubeInvaders/archive/game.arci0 and b/js-web/KubeInvaders/archive/game.arci0 differ diff --git a/js-web/KubeInvaders/archive/game.dmanifest0 b/js-web/KubeInvaders/archive/game.dmanifest0 index 7c3202e..6f56923 100644 Binary files a/js-web/KubeInvaders/archive/game.dmanifest0 and b/js-web/KubeInvaders/archive/game.dmanifest0 differ diff --git a/js-web/KubeInvaders/archive/game.public.der0 b/js-web/KubeInvaders/archive/game.public.der0 index 108922b..6927474 100644 Binary files a/js-web/KubeInvaders/archive/game.public.der0 and b/js-web/KubeInvaders/archive/game.public.der0 differ diff --git a/main/spaceship.script b/main/spaceship.script index e51819d..6f39930 100644 --- a/main/spaceship.script +++ b/main/spaceship.script @@ -11,6 +11,7 @@ automatic = false last_namespace_change = false last_hit_time = os.clock() alien_proximity_factor = 15 +hit_cpu_time_rate_limit = nil local timer = require ("main.timer") function get_help() @@ -250,10 +251,6 @@ function http_pod_result(self, _, response) distance_between_pods = 1000 / pod_items_size y_pos = 600 space_between_factor = 0 - - if conf['alien_proximity_factor'] ~= nil then - alien_proximity_factor = conf['alien_proximity_factor'] - end if pod_items_size <= alien_proximity_factor then space_between_factor = pod_items_size @@ -316,8 +313,15 @@ function init(self) conf["token"] = os.getenv("TOKEN") conf["endpoint"] = os.getenv("ENDPOINT") conf["namespace"] = os.getenv("NAMESPACE") - conf["hit_cpu_time_rate_limit"] = os.getenv("hit_cpu_time_rate_limit") - conf["alien_proximity_factor"] = os.getenv("alien_proximity_factor") + + if os.getenv("alien_proximity_factor") ~= nil then + alien_proximity_factor = os.getenv("alien_proximity_factor") + end + + if os.getenv("hit_cpu_time_rate_limit") ~= nil then + hit_cpu_time_rate_limit = os.getenv("hit_cpu_time_rate_limit") + end + end if conf["token"] == nil or conf["endpoint"] == nil or conf["namespace"] == nil then @@ -436,7 +440,7 @@ function on_input(self, action_id, action) current_hit_time = os.clock() if automatic == false then shot = true - if (conf["hit_cpu_time_rate_limit"] ~= nil) and (current_hit_time - last_hit_time < conf["hit_cpu_time_rate_limit"] ) then + if (hit_cpu_time_rate_limit ~= nil) and (current_hit_time - last_hit_time < hit_cpu_time_rate_limit) then shot = false end if shot == true then