diff --git a/game/engine/Zone.lua b/game/engine/Zone.lua index b08ec230e596003866879f0c2b447d351bc77298..e6eb9ea9febb6a02fa74d790d445ef1c02baa450 100644 --- a/game/engine/Zone.lua +++ b/game/engine/Zone.lua @@ -302,6 +302,7 @@ function _M:addEntity(level, e, typ, x, y) end function _M:load(dynamic) + local ret = true -- Try to load from a savefile local save = Savefile.new(game.save_name) local data = save:loadZone(self.short_name) @@ -311,10 +312,13 @@ function _M:load(dynamic) local f, err = loadfile("/data/zones/"..self.short_name.."/zone.lua") if err then error(err) end data = f() + ret = false elseif not data and dynamic then data = dynamic + ret = false end for k, e in pairs(data) do self[k] = e end + return ret end local recurs = function(t) diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index b04b82a773c7f0c691369efcc3102f88af662452..1f4435c85c3fc02d40ed65708e56c385b5be812d 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -279,7 +279,7 @@ function _M:changeLevel(lev, zone) self.zone:getLevel(self, lev, old_lev) -- Decay level ? - if self.level.last_turn and self.level.data.decay and self.level.last_turn + self.level.data.decay[1] < game.turn * 10 then + if self.level.last_turn and self.level.data.decay and self.level.last_turn + self.level.data.decay[1] * 10 < game.turn then local nb_actor, remain_actor = self.level:decay(Map.ACTOR, function(e) return not e.unique and self.level.last_turn + rng.range(self.level.data.decay[1], self.level.data.decay[2]) < game.turn * 10 end) local nb_object, remain_object = self.level:decay(Map.OBJECT, function(e) return not e.unique and self.level.last_turn + rng.range(self.level.data.decay[1], self.level.data.decay[2]) < game.turn * 10 end) diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index cc9b774b8fbf80c9bd6c9cf1eacdb69713e28aff..01bfad3a60d0aa6e1a16c9de82ba86e9caea97a7 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -18,6 +18,7 @@ -- darkgod@te4.org setAuto("subclass", false) +setAuto("subrace", false) newBirthDescriptor{ type = "base", diff --git a/game/modules/tome/data/talents/cunning/survival.lua b/game/modules/tome/data/talents/cunning/survival.lua index b47cedfd4163afe953d7da5034dca290c52f4ceb..5d31c1633b9ad8205683feae1ba3d014d81b273a 100644 --- a/game/modules/tome/data/talents/cunning/survival.lua +++ b/game/modules/tome/data/talents/cunning/survival.lua @@ -36,11 +36,11 @@ newTalent{ mode = "passive", points = 5, on_learn = function(self, t) - self.heightened_senses = 2 + math.ceil(self:getTalentLevel(t)) + self.heightened_senses = 4 + math.ceil(self:getTalentLevel(t)) end, on_unlearn = function(self, t) if self:knowTalent(t) then - self.heightened_senses = 2 + math.ceil(self:getTalentLevel(t)) + self.heightened_senses = 4 + math.ceil(self:getTalentLevel(t)) else self.heightened_senses = nil end @@ -48,7 +48,7 @@ newTalent{ info = function(self, t) return ([[You notice the small things others do not notice, allowing you to "see" creatures in a %d radius even outside of light radius. This is not telepathy though and is still limited to line of sight.]]): - format(2 + math.ceil(self:getTalentLevel(t))) + format(4 + math.ceil(self:getTalentLevel(t))) end, } diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 56e18084d67eefb6f346d180fc9fec8117152fd6..140e8c5534afe226ff17d9b95dbb8cce31ad7671 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -31,6 +31,7 @@ local ActorLevel = require "engine.interface.ActorLevel" local Birther = require "engine.Birther" local Store = require "mod.class.Store" local WorldAchievements = require "engine.interface.WorldAchievements" +local Quest = require "engine.Quest" config.settings.tome = config.settings.tome or {} profile.mod.allow_build = profile.mod.allow_build or {} diff --git a/src/main.c b/src/main.c index 8a6bbe314bb278163767d6830d0714e1ea84c22d..03ab30b7fde80597cb8f50949969ac77e6e37c02 100644 --- a/src/main.c +++ b/src/main.c @@ -404,7 +404,7 @@ int resizeWindow(int width, int height) ratio = ( GLfloat )width / ( GLfloat )height; - glActiveTexture(GL_TEXTURE0); +// glActiveTexture(GL_TEXTURE0); glEnable(GL_TEXTURE_2D); /* Setup our viewport. */ diff --git a/src/map.c b/src/map.c index f6b865c6ebc5eb268443362038347b79f5208de4..7998ce33e83192b4c2b8e632c31f84df19a35866 100644 --- a/src/map.c +++ b/src/map.c @@ -460,6 +460,20 @@ static int map_to_screen(lua_State *L) { a = map->obscure_a; if (map->grids_terrain[i][j]) display_map_quad(map, dx, dy, map->grids_terrain[i][j], i, j, a, TRUE); + /* + a = map->obscure_a; + if (map->multidisplay) + { + if (map->grids_terrain[i][j]) display_map_quad(map, dx, dy, map->grids_terrain[i][j], i, j, a, TRUE); + if (map->grids_trap[i][j]) display_map_quad(map, dx, dy, map->grids_trap[i][j], i, j, a, TRUE); + if (map->grids_object[i][j]) display_map_quad(map, dx, dy, map->grids_object[i][j], i, j, a, TRUE); + } + else + { + if (map->grids_object[i][j]) display_map_quad(map, dx, dy, map->grids_object[i][j], i, j, a, TRUE); + else if (map->grids_trap[i][j]) display_map_quad(map, dx, dy, map->grids_trap[i][j], i, j, a, TRUE); + else if (map->grids_terrain[i][j]) display_map_quad(map, dx, dy, map->grids_terrain[i][j], i, j, a, TRUE); + }*/ } } }