Skip to content
Snippets Groups Projects
Commit a6738cda authored by dg's avatar dg
Browse files

Can not use the stores in Zigur after attacking it

git-svn-id: http://svn.net-core.org/repos/t-engine4@2166 51575b47-30f0-44d4-a5cc-537603b46e54
parent f2707217
No related branches found
No related tags found
No related merge requests found
......@@ -112,7 +112,7 @@ function _M:onTakeHit(value, src)
-- Faction:setFactionReaction(self.faction, src.faction, Faction:factionReaction(self.faction, src.faction) - self.rank * 5, true)
-- end
-- Get angry if attacked by a friend
if src.resolveSource and src.faction and self:reactionToward(src) >= 0 then
if src ~= self and src.resolveSource and src.faction and self:reactionToward(src) >= 0 then
self:checkAngered(src, false, -50)
-- Call for help if we become hostile
......@@ -133,7 +133,7 @@ function _M:die(src)
end
-- Get angry if attacked by a friend
if src.resolveSource and src.faction then
if src ~= self and src.resolveSource and src.faction then
local rsrc = src:resolveSource()
local rid = rsrc.unique or rsrc.name
......
......@@ -35,9 +35,9 @@ defineTile("?", "OLD_FLOOR")
defineTile(":", "FLOOR")
quickEntity("'", {show_tooltip=true, name="Open gates", display="'", color=colors.UMBER, image="terrain/stone_store_open.png"})
quickEntity('1', {show_tooltip=true, name="Trainer", display='1', color=colors.UMBER, resolvers.chatfeature("zigur-trainer", "zigur"), image="terrain/stone_store_training.png"})
quickEntity('2', {show_tooltip=true, name="Armour Smith", display='2', color=colors.UMBER, resolvers.store("ARMOR", "zigur"), image="terrain/stone_store_armor.png"})
quickEntity('3', {show_tooltip=true, name="Weapon Smith", display='3', color=colors.UMBER, resolvers.store("WEAPON", "zigur"), image="terrain/stone_store_weapon.png"})
quickEntity('1', {show_tooltip=true, name="Trainer", display='1', color=colors.UMBER, chat_faction="zigur", resolvers.chatfeature("zigur-trainer", "zigur"), image="terrain/stone_store_training.png"})
quickEntity('2', {show_tooltip=true, name="Armour Smith", display='2', color=colors.UMBER, store_faction="zigur", resolvers.store("ARMOR", "zigur"), image="terrain/stone_store_armor.png"})
quickEntity('3', {show_tooltip=true, name="Weapon Smith", display='3', color=colors.UMBER, store_faction="zigur", resolvers.store("WEAPON", "zigur"), image="terrain/stone_store_weapon.png"})
startx = 24
starty = 49
......
......@@ -179,6 +179,7 @@ function resolvers.store(def, faction)
end
--- Actually resolve the drops creation
function resolvers.calc.store(t, e)
e.store_faction = t[2]
t = t[1]
e.on_move = function(self, x, y, who)
......@@ -189,7 +190,6 @@ function resolvers.calc.store(t, e)
end
end
e.store = game:getStore(t)
e.store_faction = t[2]
print("[STORE] created for entity", t, e, e.name)
-- Delete the origin field
......@@ -202,6 +202,7 @@ function resolvers.chatfeature(def, faction)
end
--- Actually resolve the drops creation
function resolvers.calc.chatfeature(t, e)
e.chat_faction = t[2]
t = t[1]
e.on_move = function(self, x, y, who)
......@@ -213,7 +214,6 @@ function resolvers.calc.chatfeature(t, e)
end
end
e.chat = t
e.chat_faction = t[2]
-- Delete the origin field
return nil
......
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