Esempio n. 1
0
    private void OnComponentInit(EntityUid uid, EggLayerComponent component, ComponentInit args)
    {
        if (!_prototype.TryIndex <InstantActionPrototype>(component.EggLayAction, out var action))
        {
            return;
        }

        _actions.AddAction(uid, new InstantAction(action), uid);
        component.CurrentEggLayCooldown = _random.NextFloat(component.EggLayCooldownMin, component.EggLayCooldownMax);
    }
Esempio n. 2
0
 private void OnEggLayAction(EntityUid uid, EggLayerComponent component, EggLayInstantActionEvent args)
 {
     args.Handled = TryLayEgg(uid, component);
 }