From 631cdc0b106f8851c1d6f13dc4e399ab8be74380 Mon Sep 17 00:00:00 2001 From: NatureFreshMilk Date: Fri, 8 Feb 2019 09:11:25 +0100 Subject: [PATCH] luacontroller mapobjects --- server/mapobject/luacontroller.go | 3 +-- server/mapobject/setup.go | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/server/mapobject/luacontroller.go b/server/mapobject/luacontroller.go index e757453..9324aa7 100644 --- a/server/mapobject/luacontroller.go +++ b/server/mapobject/luacontroller.go @@ -11,9 +11,8 @@ func (this *LuaControllerBlock) onMapObject(x, y, z int, block *mapblockparser.M md := block.Metadata.GetMetadata(x, y, z) o := mapobjectdb.NewMapObject(block.Pos, x, y, z, "luacontroller") - - //TODO: is this private? o.Attributes["code"] = md["code"] + o.Attributes["lc_memory"] = md["lc_memory"] return o } diff --git a/server/mapobject/setup.go b/server/mapobject/setup.go index 37bb20b..55babf8 100644 --- a/server/mapobject/setup.go +++ b/server/mapobject/setup.go @@ -101,6 +101,27 @@ func Setup(ctx *app.App) { //digilines l.AddMapObject("digilines:lcd", &DigilineLcdBlock{}) + //mesecons + luac := &LuaControllerBlock{} + // mesecons_luacontroller:luacontroller0000 2^4=16 + l.AddMapObject("mesecons_luacontroller:luacontroller1111", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1110", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1100", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1010", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1000", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1101", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1001", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller1011", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0111", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0110", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0100", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0010", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0000", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0101", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0001", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller0011", luac) + l.AddMapObject("mesecons_luacontroller:luacontroller_burnt", luac) + //missions l.AddMapObject("missions:mission", &MissionBlock{})