Fixed startup process from normal to creative

Fixed table access to new string value and added visual size to be set
on node construct.
master
Austin Shenk 2013-01-10 21:46:23 -05:00
parent d964b32077
commit 12127520c5
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,7 @@ minetest.register_on_joinplayer(function(obj)
else
file:close()
for pos,data in pairs(adventures.sourceData) do
adventures.sources[pos] = data[1]
adventures.sources[adventures.positionToString(pos)] = {name=data[1],pos={x=data[2],y=data[3],z=data[4]}}
end
end
adventures.started = true
@ -73,6 +73,7 @@ minetest.register_node("adventures:invincible_source" ,{
meta:set_string("formspec", updateInvincibleSourceFormspec(meta))
local area = minetest.env:add_entity(pos, "adventures:invincible_area")
area:setpos(adventures.snapPosition(meta, pos))
area:set_properties({visual_size={x=width,y=height}})
end,
on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.env:get_meta(pos)