small bugfix

master
Sokomine 2017-07-31 23:50:08 +02:00
parent 26e2122ac0
commit aeadb8ca8e
2 changed files with 2 additions and 7 deletions

View File

@ -498,7 +498,7 @@ mg_villages.inhabitants.print_house_info = function( village_to_add_data_bpos, h
people_str = minetest.formspec_escape( mg_villages.inhabitants.mob_get_full_name( owner, owner ).." owns this plot");
end
elseif( not( bpos.beds ) or #bpos.beds<1 and bpos.worker and bpos.worker.title) then
elseif( (not( bpos.beds ) or #bpos.beds<1) and bpos.worker and bpos.worker.title) then
if( not( bpos.worker.lives_at)) then
str = str.."WARNING: NO WORKER assigned to this plot.";
else

View File

@ -43,12 +43,7 @@ mg_villages.plotmarker_formspec = function( pos, formname, fields, player )
if( not( plot.btype ) or not( mg_villages.BUILDINGS[ plot.btype ] )
or not( mg_villages.BUILDINGS[ plot.btype ].mts_path )
or not( mg_villages.BUILDINGS[ plot.btype ].scm )) then
minetest.chat_send_player( pname, 'Error. Unkown building. btype: '..tostring( plot.btype ));
if( plot.btype and mg_villages.BUILDINGS[ plot.btype ] ) then
minetest.chat_send_player( pname, 'Further information: mts_path: '..
tostring( mg_villages.BUILDINGS[ plot.btype ].mts_path )..' scm: '..
tostring( mg_villages.BUILDINGS[ plot.btype ].scm )..'.');
end
minetest.chat_send_player( pname, 'Error. Unknown building. btype: '..tostring( plot.btype ));
return;
end
local building_name = mg_villages.BUILDINGS[ plot.btype ].mts_path..mg_villages.BUILDINGS[ plot.btype ].scm;