remove code and memory from luacontroller

This commit is contained in:
NatureFreshMilk 2019-06-11 13:30:36 +02:00
parent 778faec22f
commit 043a857cee
2 changed files with 4 additions and 4 deletions

View File

@ -12,8 +12,8 @@ func (this *LuaControllerBlock) onMapObject(x, y, z int, block *mapblockparser.M
nodename := block.GetNodeName(x, y, z)
o := mapobjectdb.NewMapObject(block.Pos, x, y, z, "luacontroller")
o.Attributes["code"] = md["code"]
o.Attributes["lc_memory"] = md["lc_memory"]
//o.Attributes["code"] = md["code"]
//o.Attributes["lc_memory"] = md["lc_memory"]
if nodename == "mesecons_luacontroller:luacontroller_burnt" {
o.Attributes["burnt"] = "1"

View File

@ -23,13 +23,13 @@ var LuacontrollerOverlay = AbstractIconOverlay.extend({
},
getIcon: function(ctrl){
if (ctrl.burnt)
if (ctrl.attributes.burnt)
return LuacontrollerBurntIcon;
else
return LuacontrollerIcon;
},
createPopup: function(ctrl){
return "<pre>" + ctrl.attributes.code + "</pre>";
return "LuaController" + (ctrl.attributes.burnt ? "(Burnt)" : "");
}
});