5 override bool CanBeShown(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
8 int selectedEntitiesCount = 0;
11 selectedEntitiesCount = selectedEntities.Count();
14 if (!hoveredEntity && selectedEntitiesCount == 0)
19 owner = hoveredEntity.GetOwner();
28 for (
int i = 0; i < selectedEntitiesCount; i++)
30 owner = selectedEntities[i].GetOwner();
38 override bool CanBePerformed(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags)
43 override void Perform(
SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,
int flags,
int param = -1)
46 PerformOn(hoveredEntity);
48 if (!selectedEntities)
51 int selectedEntitiesCount = selectedEntities.Count();
52 for (
int i = 0; i < selectedEntitiesCount; i++)
54 if (selectedEntities[i] == hoveredEntity)
57 PerformOn(selectedEntities[i]);
68 PlayerController pc =
GetGame().GetPlayerController();
73 SCR_CampaignNetworkComponent comp = SCR_CampaignNetworkComponent.Cast(pc.FindComponent(SCR_CampaignNetworkComponent));
78 comp.AddSuppliesFromContextMenu(base, 1000);