Skip to content
Snippets Groups Projects
Commit 8420a752 authored by DarkGod's avatar DarkGod
Browse files

TEST

Removed max level on all fixed artifacts. Material level already restrains them
TEST
parent b7a701c0
No related branches found
No related tags found
No related merge requests found
......@@ -1192,6 +1192,7 @@ function _M:loadList(file, no_default, res, mod, loaded)
local e = newenv.class.new(t, no_default)
if type(mod) == "function" then mod(e) end
if _M.alter_entity_load then _M.alter_entity_load(e) end
res[#res+1] = e
if t.define_as then res[t.define_as] = e end
......@@ -1200,6 +1201,7 @@ function _M:loadList(file, no_default, res, mod, loaded)
importEntity = function(t)
local e = t:cloneFull()
if mod then mod(e) end
if _M.alter_entity_load then _M.alter_entity_load(e) end
res[#res+1] = e
if t.define_as then res[t.define_as] = e end
end,
......
......@@ -45,6 +45,7 @@ local Actor = require "mod.class.Actor"
local Party = require "mod.class.Party"
local Player = require "mod.class.Player"
local NPC = require "mod.class.NPC"
local Entity = require "engine.Entity"
local DebugConsole = require "engine.DebugConsole"
local FlyingText = require "engine.FlyingText"
......@@ -413,6 +414,12 @@ function _M:loaded()
Zone.alter_filter = function(...) return self.state:entityFilterAlter(...) end
Zone.post_filter = function(...) return self.state:entityFilterPost(...) end
Zone.ego_filter = function(...) return self.state:egoFilter(...) end
Entity.alter_entity_load = function(e)
if e:getEntityKind() == "object" and e.unique and not e.randart and e.level_range and not e.force_max_level_range then
e.level_range = table.clone(e.level_range)
e.level_range[2] = nil
end
end
self.uiset = (require("mod.class.uiset."..(config.settings.tome.uiset_mode or "Minimalist"))).new()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment