diff --git a/build.sh b/build.sh index 013dbe6..928ab0d 100755 --- a/build.sh +++ b/build.sh @@ -2,4 +2,4 @@ # add -mac, -windows, -linux, or -html if you only want one target rm -r build/* amulet export -r -d build/ -a . -amulet export -r -d build/ -a -html . +amulet export -r -d build/ -html . diff --git a/conf.lua b/conf.lua index 19793f7..79ade98 100644 --- a/conf.lua +++ b/conf.lua @@ -9,5 +9,5 @@ copyright_message = "Copyright © nick hayashi" dev_region = "en" supported_languages = "en" -luavm = "luajit" +--luavm = "lua51" diff --git a/lib/random.lua b/lib/random.lua index 18908dc..b764c79 100644 --- a/lib/random.lua +++ b/lib/random.lua @@ -39,13 +39,9 @@ local function randomseed2(seed) X2 = v + 1 end +local R = math.random local RS = math.randomseed -math.randomseed = function(seed) - RANDOM_CALLS_COUNT = 0 - RS(seed) -end -local R = math.random local function random(n, m) RANDOM_CALLS_COUNT = RANDOM_CALLS_COUNT + 1 @@ -63,6 +59,12 @@ local function random(n, m) return r end +math.randomseed = function(seed) + RANDOM_CALLS_COUNT = 0 + R = am.rand(seed) + math.random = random +end + -- whenever we refer to math.random, actually use the function 'random' above math.random = random diff --git a/main.lua b/main.lua index 26da753..b9ebdf2 100644 --- a/main.lua +++ b/main.lua @@ -26,7 +26,7 @@ win = am.window{ height = SETTINGS.window_height, title = "", mode = SETTINGS.fullscreen and "fullscreen" or "windowed", - resizable = false, + resizable = true, -- as long as the aspect ratio is maintained via letterboxing highdpi = true, letterbox = true, show_cursor = true, diff --git a/src/game.lua b/src/game.lua index 69834e3..b5e3d65 100644 --- a/src/game.lua +++ b/src/game.lua @@ -66,8 +66,8 @@ local game_scene_menu_options = { } local function get_initial_game_state(seed) - --local STARTING_MONEY = 75 - local STARTING_MONEY = 10000 + local STARTING_MONEY = 75 + --local STARTING_MONEY = 10000 local map = random_map(seed) local world = make_hex_grid_scene(map, true)