* Initial framework for pulling. * Make it possible to pull items via (temporary) keybind Ctrl+Click, make items follow the player correctly. * Make other objects pullable, implement functionality for moving an object being pulled, make only one object able to be pulled at a time. * Make sure that MoveTo won't allow collisions with the player * Update everything to work with the new physics engine * Update Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs Co-authored-by: ComicIronic <comicironic@gmail.com> * Physics update and convert to direct type casts * Add notnull checks * Add pull keybinds to the tutorial window * Move PullController to shared * Fix pulled items getting left behind * Fix moving pulled objects into walls * Remove flooring of coordinates when moving pulled objects * Add missing null check in PutInHand * Change pulling keybind to control and throwing to alt * Change PhysicsComponent references to IPhysicsComponent * Add trying to pull a pulled entity disabling the pull * Add pulled status effect * Fix merge conflicts * Merge fixes * Make players pullable * Fix being able to pull yourself * Change pull moving to use a velocity * Update pulled and pulling icons to not be buckle A tragedy * Make pulled and pulling icons more consistent * Remove empty not pulled and not pulling images * Pulled icon update * Pulled icon update * Add clicking pulling status effect to stop the pull * Fix spacewalking when pulling * Merge conflict fixes * Add a pull verb * Fix nullable error * Add pulling through the entity drop down menu Co-authored-by: Jackson Lewis <inquisitivepenguin@protonmail.com> Co-authored-by: ComicIronic <comicironic@gmail.com>
66 lines
1.8 KiB
C#
66 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.GameObjects.Components.Mobs
|
|
{
|
|
/// <summary>
|
|
/// Handles the icons on the right side of the screen.
|
|
/// Should only be used for player-controlled entities
|
|
/// </summary>
|
|
public abstract class SharedStatusEffectsComponent : Component
|
|
{
|
|
public override string Name => "StatusEffectsUI";
|
|
public override uint? NetID => ContentNetIDs.STATUSEFFECTS;
|
|
|
|
public abstract void ChangeStatusEffect(StatusEffect effect, string icon, ValueTuple<TimeSpan, TimeSpan>? cooldown);
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public class StatusEffectComponentState : ComponentState
|
|
{
|
|
public Dictionary<StatusEffect, StatusEffectStatus> StatusEffects;
|
|
|
|
public StatusEffectComponentState(Dictionary<StatusEffect, StatusEffectStatus> statusEffects) : base(ContentNetIDs.STATUSEFFECTS)
|
|
{
|
|
StatusEffects = statusEffects;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// A message that calls the click interaction on a status effect
|
|
/// </summary>
|
|
[Serializable, NetSerializable]
|
|
public class ClickStatusMessage : ComponentMessage
|
|
{
|
|
public readonly StatusEffect Effect;
|
|
|
|
public ClickStatusMessage(StatusEffect effect)
|
|
{
|
|
Directed = true;
|
|
Effect = effect;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public struct StatusEffectStatus
|
|
{
|
|
public string Icon;
|
|
public ValueTuple<TimeSpan, TimeSpan>? Cooldown;
|
|
}
|
|
|
|
// Each status effect is assumed to be unique
|
|
public enum StatusEffect
|
|
{
|
|
Health,
|
|
Hunger,
|
|
Thirst,
|
|
Stun,
|
|
Buckled,
|
|
Piloting,
|
|
Pulling,
|
|
Pulled
|
|
}
|
|
}
|