9 m_Text =
"#connect_together";
12 override void CreateConditionComponents()
20 if (super.Can(player, target, item))
22 if (player.IsPlacingLocal())
26 player.GetHologramLocal().SetIsHidden(
true);
27 player.GetHologramLocal().GetProjectionEntity().HideAllSelections();
31 if (!super.Can(player, target, item))
37 player.GetHologramLocal().SetIsHidden(
false);
38 player.GetHologramLocal().GetProjectionEntity().ShowAllSelections();
42 return super.Can(player, target, item);
50 if (targetIB && targetIB.GetHierarchyRoot() == targetIB && item && targetIB.HasEnergyManager() && item.HasEnergyManager())
52 if (!targetIB.GetCompEM().IsPlugged() && item.GetCompEM().CanReceivePlugFrom(targetIB))
55 return targetIB.IsElectricAppliance();
61 MetalWire metalWire = MetalWire.Cast(item.GetCompEM().GetPluggedDevice());
63 if (metalWire && metalWire.GetCompEM().CanReceivePlugFrom(targetIB))
73 override bool IsDeploymentAction()
78 override void OnExecuteServer(
ActionData action_data)
83 override void OnExecuteClient(
ActionData action_data)
95 MetalWire metalWire = MetalWire.Cast(action_data.m_MainItem.GetCompEM().GetPluggedDevice());
97 targetIB.GetCompEM().PlugThisInto(metalWire);
102 targetIB.GetCompEM().PlugThisInto(action_data.m_MainItem);
106 if (Spotlight.CastTo(spotlight, targetIB))
109 targetIB.GetInventory().TakeEntityAsAttachment(
InventoryMode.LOCAL, action_data.m_MainItem);
110 action_data.m_Player.ServerDropEntity(action_data.m_MainItem);