Add quick interactions locally
This commit is contained in:
31
Quick Interactions/CSharp/Client/Layers/Logic/Fabricators.cs
Normal file
31
Quick Interactions/CSharp/Client/Layers/Logic/Fabricators.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
|
||||
using Barotrauma;
|
||||
using HarmonyLib;
|
||||
using Microsoft.Xna.Framework;
|
||||
using QIDependencyInjection;
|
||||
using Barotrauma.Items.Components;
|
||||
|
||||
namespace QuickInteractions
|
||||
{
|
||||
public partial class Fabricators
|
||||
{
|
||||
[Dependency] public FakeInput FakeInput { get; set; }
|
||||
|
||||
public void SelectItem(Item item)
|
||||
{
|
||||
if (Character.Controlled == null) return;
|
||||
|
||||
Character.Controlled.SelectedItem = item;
|
||||
if (GameMain.IsMultiplayer)
|
||||
{
|
||||
FakeInput.SendInteractPackage(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user