5 static const string SEL_CORD_FOLDED =
"cord_folded";
6 static const string SEL_CORD_PLUGGED =
"cord_plugged";
10 m_ForceIntoHands =
false;
11 RegisterNetSyncVariableBool(
"m_IsSoundSynchRemote");
12 RegisterNetSyncVariableBool(
"m_IsPlaceSound");
15 override bool IsElectricAppliance()
22 m_ForceIntoHands =
true;
23 player.LocalTakeEntityToHands(
this);
24 m_ForceIntoHands =
false;
29 if ( !super.CanPutInCargo(parent) ) {
return false;}
30 EntityAI owner_EAI = GetHierarchyParent();
31 if ( owner_EAI && owner_EAI.IsKindOf(
"Fence"))
36 bool allow_into_inv = !GetCompEM().IsPlugged();
37 return allow_into_inv;
42 if ( !super.CanPutIntoHands( parent ) )
46 if ( m_ForceIntoHands )
52 EntityAI owner_EAI = GetHierarchyParent();
53 if ( owner_EAI && owner_EAI.IsKindOf(
"Fence"))
65 super.OnInventoryEnter(player);
68 Class.CastTo(player_PB, player);
69 if (player_PB.GetItemInHands() ==
this && GetCompEM().IsPlugged())
75 GetCompEM().UnplugAllDevices();
77 if (!player_PB.IsPlacingLocal())
78 GetCompEM().UnplugThis();
88 super.OnVariablesSynchronized();
102 super.OnPlacementStarted(player);
111 playerPB.GetHologramServer().SetSelectionToRefresh(selections);
113 if (playerPB.GetHologramLocal())
114 playerPB.GetHologramLocal().SetSelectionToRefresh(selections);
119 super.OnPlacementComplete( player, position, orientation );
126 return "placeCableReel_SoundSet";