示例#1
0
        private byte getStateAtPos(Vec3i pos)
        {
            int id = wiring.GetWireIdAtPos(pos);

            if (id == -1)
            {
                return(0);
            }
            return(wiring.networks[id].state);
        }
示例#2
0
        public void GetBlockInfo(Vec3i pos, StringBuilder dsc)
        {
            int?networkId = wiring?.GetWireIdAtPos(pos);

            //byte? networkState = wiring?.networks[networkId]?.state;
            dsc.AppendLine(Lang.Get("Available Wire voxels: {0}", AvailableWireVoxels));
            dsc.AppendLine(Lang.Get("Number of wires: {0}", wiring?.networks.Count));
            if (networkId != null)
            {
                dsc.AppendLine(Lang.Get("Wire id: {0}", networkId));
            }
            //if (networkId != null) dsc.AppendLine(Lang.Get("Wire state: {0}", networkState));
        }