private LogicUtilityNetworkLink AddNetworkLink(GameObject go)
    {
        LogicUtilityNetworkLink logicUtilityNetworkLink = go.AddOrGet <LogicUtilityNetworkLink>();

        logicUtilityNetworkLink.link1 = new CellOffset(-1, 0);
        logicUtilityNetworkLink.link2 = new CellOffset(1, 0);
        return(logicUtilityNetworkLink);
    }
    public override void DoPostConfigureComplete(GameObject go)
    {
        LogicUtilityNetworkLink logicUtilityNetworkLink = AddNetworkLink(go);

        logicUtilityNetworkLink.visualizeOnly = false;
        go.AddOrGet <BuildingCellVisualizer>();
        GeneratedBuildings.RegisterLogicPorts(go, INPUT_PORTS);
    }
Beispiel #3
0
    public override void DoPostConfigurePreview(BuildingDef def, GameObject go)
    {
        base.DoPostConfigurePreview(def, go);
        LogicUtilityNetworkLink logicUtilityNetworkLink = this.AddNetworkLink(go);

        logicUtilityNetworkLink.visualizeOnly = true;
        go.AddOrGet <BuildingCellVisualizer>();
        GeneratedBuildings.RegisterLogicPorts(go, ExtendedLogicWireBridgeConfig.INPUT_PORTS);
    }
    public override void DoPostConfigureUnderConstruction(GameObject go)
    {
        base.DoPostConfigureUnderConstruction(go);
        LogicUtilityNetworkLink logicUtilityNetworkLink = AddNetworkLink(go);

        logicUtilityNetworkLink.visualizeOnly = true;
        go.AddOrGet <BuildingCellVisualizer>();
        GeneratedBuildings.RegisterLogicPorts(go, INPUT_PORTS);
    }
    private LogicUtilityNetworkLink AddNetworkLink(GameObject go)
    {
        LogicUtilityNetworkLink logicUtilityNetworkLink = go.AddOrGet <LogicUtilityNetworkLink>();

        logicUtilityNetworkLink.bitDepth = LogicWire.BitDepth.OneBit;
        logicUtilityNetworkLink.link1    = new CellOffset(-1, 0);
        logicUtilityNetworkLink.link2    = new CellOffset(2, 0);
        return(logicUtilityNetworkLink);
    }