explicit interface go brrrr
This commit is contained in:
@@ -72,7 +72,7 @@ namespace Content.Server.GameObjects.Components.Items.Clothing
|
||||
return new ClothingComponentState(ClothingEquippedPrefix, EquippedPrefix);
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
if (!_quickEquipEnabled) return false;
|
||||
if (!eventArgs.User.TryGetComponent(out InventoryComponent inv)
|
||||
|
||||
@@ -12,22 +12,23 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
public class DebugEquipComponent : Component, IEquipped, IEquippedHand, IUnequipped, IUnequippedHand
|
||||
{
|
||||
public override string Name => "DebugEquip";
|
||||
public void Equipped(EquippedEventArgs eventArgs)
|
||||
|
||||
void IEquipped.Equipped(EquippedEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("equipped " + Owner.Name);
|
||||
}
|
||||
|
||||
public void EquippedHand(EquippedHandEventArgs eventArgs)
|
||||
void IEquippedHand.EquippedHand(EquippedHandEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("equipped hand " + Owner.Name);
|
||||
}
|
||||
|
||||
public void Unequipped(UnequippedEventArgs eventArgs)
|
||||
void IUnequipped.Unequipped(UnequippedEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("unequipped " + Owner.Name);
|
||||
}
|
||||
|
||||
public void UnequippedHand(UnequippedHandEventArgs eventArgs)
|
||||
void IUnequippedHand.UnequippedHand(UnequippedHandEventArgs eventArgs)
|
||||
{
|
||||
eventArgs.User.PopupMessage("unequipped hand" + Owner.Name);
|
||||
}
|
||||
|
||||
@@ -64,18 +64,18 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
Roll();
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
Roll();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Land(LandEventArgs eventArgs)
|
||||
void ILand.Land(LandEventArgs eventArgs)
|
||||
{
|
||||
Roll();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f));
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true)) return;
|
||||
if (!Owner.TryGetComponent(out StackComponent stack)) return;
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
message.AddMarkup(Loc.GetString("It holds {0} charges.", refillAmmo));
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
if (eventArgs.Target == null || !eventArgs.Target.TryGetComponent(out RCDComponent rcdComponent) || !eventArgs.User.TryGetComponent(out IHandsComponent hands))
|
||||
{
|
||||
|
||||
@@ -68,8 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
///<summary>
|
||||
/// Method called when the RCD is clicked in-hand, this will cycle the RCD mode.
|
||||
///</summary>
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
SwapMode(eventArgs);
|
||||
return true;
|
||||
@@ -94,7 +93,7 @@ namespace Content.Server.GameObjects.Components.Items.RCD
|
||||
message.AddMarkup(Loc.GetString("It's currently on {0} mode, and holds {1} charges.",_mode.ToString(), _ammo));
|
||||
}
|
||||
|
||||
public async Task AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
async Task IAfterInteract.AfterInteract(AfterInteractEventArgs eventArgs)
|
||||
{
|
||||
//No changing mode mid-RCD
|
||||
var startingMode = _mode;
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
return user.InRangeUnobstructed(Owner, ignoreInsideBlocker: true, popup: true);
|
||||
}
|
||||
|
||||
public bool InteractHand(InteractHandEventArgs eventArgs)
|
||||
bool IInteractHand.InteractHand(InteractHandEventArgs eventArgs)
|
||||
{
|
||||
if (!CanPickup(eventArgs.User)) return false;
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
||||
public string GroupId;
|
||||
public int Amount;
|
||||
|
||||
public void ExposeData(ObjectSerializer serializer)
|
||||
void IExposeData.ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
serializer.DataField(ref PrototypeName, "name", null);
|
||||
serializer.DataField(ref Amount, "amount", 1);
|
||||
|
||||
@@ -45,17 +45,18 @@ namespace Content.Server.GameObjects.Components.Items
|
||||
}
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
void IActivate.Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
Squeak();
|
||||
}
|
||||
|
||||
public bool UseEntity(UseEntityEventArgs eventArgs)
|
||||
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
|
||||
{
|
||||
Squeak();
|
||||
return false;
|
||||
}
|
||||
public void Land(LandEventArgs eventArgs)
|
||||
|
||||
void ILand.Land(LandEventArgs eventArgs)
|
||||
{
|
||||
Squeak();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user