Spawner: Add workplaces properly to the usable nodes.

This commit is contained in:
Hector Franqui 2017-09-01 14:14:35 -04:00
parent 40ac2a55a1
commit 939181284b
1 changed files with 1 additions and 1 deletions

View File

@ -506,7 +506,7 @@ function npc.spawner.assign_places(self, entrance, node_data, pos)
if node_data.workplace_type[i].occupation
and node_data.workplace_type[i].occupation == self.occupation_name then
-- Found the node. Assign only this node to the NPC.
npc.places.add_shared_accessible_place(self, node_data.workplace_type[i],
npc.places.add_shared_accessible_place(self, {node_data.workplace_type[i]},
npc.places.PLACE_TYPE.WORKPLACE.PRIMARY)
-- Edit metadata of this workplace node to not allow it for other NPCs
local meta = minetest.get_meta(node_data.workplace_type[i].node_pos)