Esempio n. 1
0
        public override void OnLoad(ConfigNode node)
        {
            base.OnLoad(node);
            ConfigNode eqNode = node.GetNode(LabEquipment.CONFIG_NODE_NAME);

            if (eqNode != null)
            {
                setEquipment(LabEquipment.getLabEquipmentFromNode(eqNode, null));
            }
            else
            {
                setEquipment(LabEquipment.getNullObject());
            }
        }
Esempio n. 2
0
        public static LabEquipmentSlot getLabEquipmentSlotFromConfigNode(ConfigNode node, Lab lab)
        {
            if (node == null || node.name != CONFIG_NODE_NAME)
            {
                NE_Helper.logError("getLabEquipmentFromNode: invalid Node: " + node == null? "NULL" : node.name);
                return(new LabEquipmentSlot(EquipmentRacks.NONE));
            }
            EquipmentRacks type   = EquipmentRacksFactory.getType(node.GetValue(TYPE_VALUE));
            LabEquipment   le     = null;
            ConfigNode     leNode = node.GetNode(LabEquipment.CONFIG_NODE_NAME);

            if (leNode != null)
            {
                le = LabEquipment.getLabEquipmentFromNode(leNode, lab);
            }
            return(new LabEquipmentSlot(type, le));
        }