diff --git a/game/engines/default/data/gfx/ui/button-left-sel.png b/game/engines/default/data/gfx/ui/button-left-sel.png deleted file mode 100644 index 532f8c461f0ee3e525972c049655df5cab07ce48..0000000000000000000000000000000000000000 Binary files a/game/engines/default/data/gfx/ui/button-left-sel.png and /dev/null differ diff --git a/game/engines/default/data/gfx/ui/button-left.png b/game/engines/default/data/gfx/ui/button-left.png deleted file mode 100644 index 872652d716dce2232c9fd4842ee9070eedcd0068..0000000000000000000000000000000000000000 Binary files a/game/engines/default/data/gfx/ui/button-left.png and /dev/null differ diff --git a/game/engines/default/data/gfx/ui/button-middle-sel.png b/game/engines/default/data/gfx/ui/button-middle-sel.png deleted file mode 100644 index 306f7cf1d62dd567a18886ce863286f842fe139e..0000000000000000000000000000000000000000 Binary files a/game/engines/default/data/gfx/ui/button-middle-sel.png and /dev/null differ diff --git a/game/engines/default/data/gfx/ui/button-middle.png b/game/engines/default/data/gfx/ui/button-middle.png deleted file mode 100644 index 4bcd9226f3682b41641558cc15d5f751dc78fd3b..0000000000000000000000000000000000000000 Binary files a/game/engines/default/data/gfx/ui/button-middle.png and /dev/null differ diff --git a/game/engines/default/data/gfx/ui/button-right-sel.png b/game/engines/default/data/gfx/ui/button-right-sel.png deleted file mode 100644 index 8a2d303027939a896fda6fff73b25fc339732910..0000000000000000000000000000000000000000 Binary files a/game/engines/default/data/gfx/ui/button-right-sel.png and /dev/null differ diff --git a/game/engines/default/data/gfx/ui/button-right.png b/game/engines/default/data/gfx/ui/button-right.png deleted file mode 100644 index 6a7c2386566c5bf75d208ae6d98da69e50d011eb..0000000000000000000000000000000000000000 Binary files a/game/engines/default/data/gfx/ui/button-right.png and /dev/null differ diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index 7e2b8fcd9a6b89e52f16336094ef7a8225cb1c74..4310836bae3e8e8f323254abb884d257142839a8 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -481,6 +481,17 @@ end --- Compute a day/night cycle -- Works by changing the tint of the map gradualy function _M:dayNightCycle() + local map = game.level.map + local shown = map.color_shown + local obscure = map.color_obscure + + if not config.settings.tome.daynight then + -- Restore defaults + map._map:setShown(unpack(shown)) + map._map:setObscure(unpack(obscure)) + return + end + local hour, minute = game.calendar:getTimeOfDay(game.turn) hour = hour + (minute / 60) local tint = {r = 0.1, g = 0.1, b = 0.1} @@ -505,9 +516,6 @@ function _M:dayNightCycle() endTint = { r = 0.1, g = 0.1, b = 0.1 } tint = doTint(startTint, endTint, (hour - 18) / 6) end - local map = game.level.map - local shown = map.color_shown - local obscure = map.color_obscure map._map:setShown(shown[1] * (tint.r+0.4), shown[2] * (tint.g+0.4), shown[3] * (tint.b+0.4), shown[4]) map._map:setObscure(obscure[1] * (tint.r+0.2), obscure[2] * (tint.g+0.2), obscure[3] * (tint.b+0.2), obscure[4]) end diff --git a/game/modules/tome/data/quests/lightning-overload.lua b/game/modules/tome/data/quests/lightning-overload.lua index af4f357a83f8aedac61e2fb1c833904f5cb1f416..d86b654b31e2f9228375a1c28b1c5f46dbeb68bf 100644 --- a/game/modules/tome/data/quests/lightning-overload.lua +++ b/game/modules/tome/data/quests/lightning-overload.lua @@ -58,11 +58,12 @@ on_grant = function(self, who) local m = game.zone:makeEntity(game.level, "actor", {special_rarity="derth_rarity"}, nil, true) local spot = game.level:pickSpot{type="npc", subtype="elemental"} if m and spot then + local x, y = util.findFreeGrid(spot.x, spot.y, 5, true, {[engine.Map.ACTOR]=true}) m.quest = true m.on_die = function(self) game.player:resolveSource():hasQuest("lightning-overload"):kill_one() end - game.zone:addEntity(game.level, m, "actor", spot.x, spot.y) + game.zone:addEntity(game.level, m, "actor", x, y) self.max_count = self.max_count + 1 end end diff --git a/game/modules/tome/dialogs/GameOptions.lua b/game/modules/tome/dialogs/GameOptions.lua index c2668d295d59e158ef407f249cb1a8e96b072421..ced055a1cfe610e06d6988a876870e23641733ed 100644 --- a/game/modules/tome/dialogs/GameOptions.lua +++ b/game/modules/tome/dialogs/GameOptions.lua @@ -110,6 +110,15 @@ function _M:generateList() self.c_list:drawItem(item) end,} + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables of disables day/night light variations effects..#WHITE#"} + list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Day/night light cycle#WHITE##{normal}#", status=function(item) + return tostring(config.settings.tome.daynight and "enabled" or "disabled") + end, fct=function(item) + config.settings.tome.daynight = not config.settings.tome.daynight + game:saveSettings("tome.daynight", ("tome.daynight = %s\n"):format(tostring(config.settings.tome.daynight))) + self.c_list:drawItem(item) + end,} + local zone = Textzone.new{width=self.c_desc.w, height=self.c_desc.h, text=string.toTString"Enables smooth fog-of-war.\nDisabling it will make the fog of war look 'blocky' but might gain a slight performance increase.#WHITE#"} list[#list+1] = { zone=zone, name=string.toTString"#GOLD##{bold}#Smooth fog of war#WHITE##{normal}#", status=function(item) return tostring(config.settings.tome.smooth_fov and "enabled" or "disabled") diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 5652daa9f90243bf208400f7e32c8a450e61517f..ac727484b938184978546791291c7d0bf892b7a4 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -198,6 +198,7 @@ if not config.settings.tome.smooth_move then config.settings.tome.smooth_move = if not config.settings.tome.gfx then config.settings.tome.gfx = {size="32x32", tiles="mushroom"} end if type(config.settings.tome.weather_effects) == "nil" then config.settings.tome.weather_effects = true end if type(config.settings.tome.smooth_fov) == "nil" then config.settings.tome.smooth_fov = true end +if type(config.settings.tome.daynight) == "nil" then config.settings.tome.daynight = true end Map.smooth_scroll = config.settings.tome.smooth_move return {require "mod.class.Game", require "mod.class.World"}