protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = false;//Doesnt matter if (theron.Hand == null) { if ((theron.Hand = Storage) == null) { return(false); } Storage = null; } else { if ((theron.Hand?.FactoryBase != Data) || Storage != null) { return(false); } Storage = theron.Hand; theron.Hand = null; } TriggerLocalEffect(theron, actuator, true); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */ if ((Effect == SensorEffect.C03_EFFECT_HOLD) && theron.Hand != null) { L0753_B_DoNotTriggerSensor = true; } else { L0753_B_DoNotTriggerSensor = false; } return(true); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = false; if (Effect == SensorEffect.C03_EFFECT_HOLD) { return(false); } return(true); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = ((Data == theron.Hand?.FactoryBase) == RevertEffect); if (!L0753_B_DoNotTriggerSensor) { theron.Hand = null; } return(true);; }
public async Task <IActuatorX> ParseActuatorX(IEnumerable <ActuatorItemData> data, List <IGrabableItem> items, Point pos) { var sensors = await Task.WhenAll(data .Where(x => x.ActuatorType != 5 && x.ActuatorType != 6) .Select(async x => await ParseSensor(x, items, pos))); var res = new WallActuator(sensors); res.Renderer = builder.Factories.RenderersSource.GetWallActuatorRenderer(res); return(res); }
public override bool TryTrigger(ILeader theron, WallActuator actuator, bool isLast) { if (!Empty) { GameConsole.Instance?.RunCommand(new ChampionCommand { Actuator = this }); return(true); } return(base.TryTrigger(theron, actuator, isLast)); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { if (!base.TryInteract(theron, actuator, isLast, out L0753_B_DoNotTriggerSensor)) return false; if (!L0753_B_DoNotTriggerSensor) { if (actuator.Sensors.Count == 1) return true; actuator.Sensors.Remove(this); } return true; }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { if (!base.TryInteract(theron, actuator, isLast, out L0753_B_DoNotTriggerSensor)) { return(false); } ; if (!L0753_B_DoNotTriggerSensor) { TriggerLocalEffect(theron, actuator, true); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */ } return(true); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = false;//Doesnt matter if (!isLast) { return(false); } L0753_B_DoNotTriggerSensor = theron.Hand != null; if (!L0753_B_DoNotTriggerSensor) { TriggerLocalEffect(theron, actuator, true); /* This will cause a rotation of the sensors at the specified cell on the specified square after all sensors have been processed */ theron.Hand = Data.CreateItem(); } return(true); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = false; //Doesnt matter if (!isLast) { /* If the sensor is not the last one of its type on the cell */ return(false); } //F162_afzz_DUNGEON_GetSquareFirstObject(); //TODO is it possible to put item from one side of the wall and take it from antoher ? if ((theron.Hand?.FactoryBase != Data) || (Storage == null)) { return(false); } var handItem = theron.Hand; theron.Hand = Storage; Storage = handItem; L0753_B_DoNotTriggerSensor = false; return(true); }
public virtual bool TryTrigger(ILeader theron, WallActuator actuator, bool isLast) { bool notTriggered; if (Disabled) { return(false); } if (!TryInteract(theron, actuator, isLast, out notTriggered)) { return(false); } var usedEffect = Effect; if (usedEffect == SensorEffect.C03_EFFECT_HOLD) { usedEffect = notTriggered ? SensorEffect.C01_EFFECT_CLEAR : SensorEffect.C00_EFFECT_SET; notTriggered = false; } if (!notTriggered) { if (Audible) { //TODO play audio //F064_aadz_SOUND_RequestPlay_COPYPROTECTIOND(C01_SOUND_SWITCH, G306_i_PartyMapX, G307_i_PartyMapY, C01_MODE_PLAY_IF_PRIORITIZED); } if (OnceOnly) { Disabled = true; } TriggerEffect(theron, actuator, usedEffect); } return(!notTriggered); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { throw new NotImplementedException(); }
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = ((theron.Hand == null) != RevertEffect); return(true); }
protected abstract bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor);
protected override bool TryInteract(ILeader theron, WallActuator actuator, bool isLast, out bool L0753_B_DoNotTriggerSensor) { L0753_B_DoNotTriggerSensor = !Graphics.Items.Any(); return(true); }
public virtual IRenderer GetWallActuatorRenderer(WallActuator res) { return(new WallActuatorRenderer(res)); }