Пример #1
0
 private void OnControllerColliderHit(ControllerColliderHit _hit)
 {
     if (_falling && !_landed)
     {
         LandEvent?.Invoke(transform.position);
         _landed = true;
     }
 }
        private void OnLand(EntityUid uid, ForcefeedOnCollideComponent component, LandEvent args)
        {
            if (!component.RemoveOnThrowEnd)
            {
                return;
            }

            EntityManager.RemoveComponent(uid, component);
        }
Пример #3
0
        /// <summary>
        /// Creates a plane that is taken as parameter in landevent
        /// </summary>
        /// <returns></returns>
        public LandEvent Land()
        {
            takeoffBtn.IsEnabled        = true;
            changeRouteCmbBox.IsEnabled = false;
            landBtn.IsEnabled           = false;
            Plane     p    = new Plane(this.Title, "landed", DateTime.Now.ToString("hh:mm:ss"));
            LandEvent land = new LandEvent(p);

            this.Close();
            return(land);
        }
Пример #4
0
        private void DamageOnLand(EntityUid uid, DamageOnLandComponent component, LandEvent args)
        {
            var dmg = _damageableSystem.TryChangeDamage(uid, component.Damage, component.IgnoreResistances);

            if (dmg == null)
            {
                return;
            }

            _logSystem.Add(LogType.Landed, $"{ToPrettyString(component.Owner):entity} received {dmg.Total:damage} damage from landing");
        }
Пример #5
0
        private void HandleLand(EntityUid uid, DrinkComponent component, LandEvent args)
        {
            if (component.Pressurized &&
                !component.Opened &&
                _random.Prob(0.25f) &&
                _solutionContainerSystem.TryGetDrainableSolution(uid, out var interactions))
            {
                component.Opened = true;
                UpdateAppearance(component);

                var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable);
                _spillableSystem.SpillAt(uid, solution, "PuddleSmear");

                SoundSystem.Play(Filter.Pvs(uid), component.BurstSound.GetSound(), uid, AudioParams.Default.WithVolume(-4));
            }
        }
Пример #6
0
    private void SpillOnLand(EntityUid uid, SpillableComponent component, LandEvent args)
    {
        if (!_solutionContainerSystem.TryGetSolution(uid, component.SolutionName, out var solution))
        {
            return;
        }

        if (args.User != null)
        {
            _logSystem.Add(LogType.Landed,
                           $"{ToPrettyString(uid):entity} spilled a solution {SolutionContainerSystem.ToPrettyString(solution):solution} on landing");
        }

        var drainedSolution = _solutionContainerSystem.Drain(uid, solution, solution.DrainAvailable);

        SpillAt(drainedSolution, EntityManager.GetComponent <TransformComponent>(uid).Coordinates, "PuddleSmear");
    }
Пример #7
0
 void LandedOnGround(bool land)
 {
     LandEvent?.Invoke(land);
 }
Пример #8
0
 private void OnLand(EntityUid uid, DiceComponent component, LandEvent args)
 {
     Roll(uid, component);
 }
Пример #9
0
 private void HandleEmitSoundOnLand(EntityUid eUI, BaseEmitSoundComponent component, LandEvent arg)
 {
     TryEmitSound(component);
 }
 void TriggerGrounded()
 {
     airJumpsRemaining = airJumps;
     //jumpedSteps = 0;
     LandEvent.Invoke();
 }
 private void OnCreamPieLand(EntityUid uid, CreamPieComponent component, LandEvent args)
 {
     SplatCreamPie(uid, component);
 }
Пример #12
0
 /// <summary>
 /// Adds landevent into the list when the button land in FlightWindow is clicked
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="le"></param>
 public void OnLand(object sender, LandEvent le)
 {
     flightDataLst.Items.Add(le);
 }
Пример #13
0
 private void DamageOnLand(EntityUid uid, DamageOnLandComponent component, LandEvent args)
 {
     _damageableSystem.TryChangeDamage(uid, component.Damage, component.IgnoreResistances);
 }
        private void HandleEmitSoundOnLand(EntityUid eUI, BaseEmitSoundComponent component, LandEvent arg)
        {
            if (!TryComp <TransformComponent>(eUI, out var xform) ||
                !_mapManager.TryGetGrid(xform.GridUid, out var grid))
            {
                return;
            }

            var tile = grid.GetTileRef(xform.Coordinates);

            if (tile.IsSpace(_tileDefMan))
            {
                return;
            }

            TryEmitSound(component);
        }
Пример #15
0
 private void HandleLand(EntityUid uid, LightBulbComponent bulb, LandEvent args)
 {
     PlayBreakSound(uid, bulb);
     SetState(uid, LightBulbState.Broken, bulb);
 }
Пример #16
0
 private void HandleLand(EntityUid uid, LightBulbComponent component, LandEvent args)
 {
     component.PlayBreakSound();
     component.State = LightBulbState.Broken;
 }
Пример #17
0
        public override Event Action()
        {
            Event e = new LandEvent(this.name, this.price, this.owner) as Event;

            return(e);
        }