Java Code Examples for net.runelite.api.ItemID#SEED_PACK

The following examples show how to use net.runelite.api.ItemID#SEED_PACK . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OverviewTabPanel.java    From plugins with GNU General Public License v3.0 5 votes vote down vote up
OverviewTabPanel(ItemManager itemManager, TimeTrackingConfig config, TimeTrackingPanel pluginPanel,
				FarmingTracker farmingTracker, BirdHouseTracker birdHouseTracker, ClockManager clockManager,
				FarmingContractManager farmingContractManager)
{
	this.config = config;
	this.farmingTracker = farmingTracker;
	this.birdHouseTracker = birdHouseTracker;
	this.clockManager = clockManager;
	this.farmingContractManager = farmingContractManager;

	setLayout(new GridLayout(0, 1, 0, 8));
	setBackground(ColorScheme.DARK_GRAY_COLOR);

	timerOverview = new OverviewItemPanel(itemManager, pluginPanel, Tab.CLOCK, "Timers");
	add(timerOverview);

	stopwatchOverview = new OverviewItemPanel(itemManager, pluginPanel, Tab.CLOCK, "Stopwatches");
	add(stopwatchOverview);

	birdHouseOverview = new OverviewItemPanel(itemManager, pluginPanel, Tab.BIRD_HOUSE, "Bird Houses");
	add(birdHouseOverview);

	farmingOverviews = Stream.of(Tab.FARMING_TABS)
		.filter(v -> v != Tab.OVERVIEW)
		.collect(ImmutableMap.toImmutableMap(
			Function.identity(),
			t ->
			{
				OverviewItemPanel p = new OverviewItemPanel(itemManager, pluginPanel, t, t.getName());
				add(p);
				return p;
			}
		));

	farmingContractOverview = new OverviewItemPanel(itemManager, () -> pluginPanel.switchTab(farmingContractManager.getContractTab()),
		farmingContractManager::hasContract, ItemID.SEED_PACK, "Farming Contract");
	add(farmingContractOverview);
}
 
Example 2
Source File: OverviewTabPanel.java    From runelite with BSD 2-Clause "Simplified" License 5 votes vote down vote up
OverviewTabPanel(ItemManager itemManager, TimeTrackingConfig config, TimeTrackingPanel pluginPanel,
	FarmingTracker farmingTracker, BirdHouseTracker birdHouseTracker, ClockManager clockManager,
	FarmingContractManager farmingContractManager)
{
	this.config = config;
	this.farmingTracker = farmingTracker;
	this.birdHouseTracker = birdHouseTracker;
	this.clockManager = clockManager;
	this.farmingContractManager = farmingContractManager;

	setLayout(new GridLayout(0, 1, 0, 8));
	setBackground(ColorScheme.DARK_GRAY_COLOR);

	timerOverview = new OverviewItemPanel(itemManager, pluginPanel, Tab.CLOCK, "Timers");
	add(timerOverview);

	stopwatchOverview = new OverviewItemPanel(itemManager, pluginPanel, Tab.CLOCK, "Stopwatches");
	add(stopwatchOverview);

	birdHouseOverview = new OverviewItemPanel(itemManager, pluginPanel, Tab.BIRD_HOUSE, "Bird Houses");
	add(birdHouseOverview);

	farmingOverviews = Stream.of(Tab.FARMING_TABS)
		.filter(v -> v != Tab.OVERVIEW)
		.collect(ImmutableMap.toImmutableMap(
			Function.identity(),
			t ->
			{
				OverviewItemPanel p = new OverviewItemPanel(itemManager, pluginPanel, t, t.getName());
				add(p);
				return p;
			}
		));

	farmingContractOverview = new OverviewItemPanel(itemManager, () -> pluginPanel.switchTab(farmingContractManager.getContractTab()),
		farmingContractManager::hasContract, ItemID.SEED_PACK, "Farming Contract");
	add(farmingContractOverview);
}
 
Example 3
Source File: LootTrackerPlugin.java    From runelite with BSD 2-Clause "Simplified" License 5 votes vote down vote up
@Subscribe
public void onMenuOptionClicked(MenuOptionClicked event)
{
	// There are some pickpocket targets who show up in the chat box with a different name (e.g. H.A.M. members -> man/woman)
	// We use the value selected from the right-click menu as a fallback for the event lookup in those cases.
	if (event.getMenuOption().equals("Pickpocket"))
	{
		lastPickpocketTarget = Text.removeTags(event.getMenuTarget());
	}

	if (event.getMenuOption().equals("Take") && event.getId() == ItemID.SEED_PACK)
	{
		eventType = SEEDPACK_EVENT;
		lootRecordType = LootRecordType.EVENT;
		takeInventorySnapshot();
	}

	if (event.getMenuOption().equals("Open") && SHADE_CHEST_OBJECTS.containsKey(event.getId()))
	{
		eventType = SHADE_CHEST_OBJECTS.get(event.getId());
		lootRecordType = LootRecordType.EVENT;
		takeInventorySnapshot();
	}

	if (event.getMenuOption().equals("Open") && event.getId() == ItemID.CASKET)
	{
		eventType = CASKET_EVENT;
		lootRecordType = LootRecordType.EVENT;
		takeInventorySnapshot();
	}
}
 
Example 4
Source File: LootTrackerPlugin.java    From plugins with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe
private void onMenuOptionClicked(MenuOptionClicked event)
{
	// There are some pickpocket targets who show up in the chat box with a different name (e.g. H.A.M. members -> man/woman)
	// We use the value selected from the right-click menu as a fallback for the event lookup in those cases.
	if (event.getOption().equals("Pickpocket"))
	{
		lastPickpocketTarget = Text.removeTags(event.getTarget());
	}

	if (event.getOption().equals("Take") && event.getIdentifier() == ItemID.SEED_PACK)
	{
		eventType = SEEDPACK_EVENT;
		lootRecordType = LootRecordType.EVENT;
		takeInventorySnapshot();
	}

	if (event.getParam1() != WidgetInfo.INVENTORY.getId())
	{
		return;
	}

	int itemId = event.getIdentifier();

	if (itemId == -1)
	{
		return;
	}

	String option = event.getOption();
	ItemDefinition itemComposition = client.getItemDefinition(itemId);

	if (option.equals("Open") && itemComposition.getName().equals("Supply crate"))
	{
		eventType = WINTERTODT_EVENT;
		takeInventorySnapshot();
	}

	if (option.equals("Open") && SHADE_CHEST_OBJECTS.containsKey(event.getIdentifier()))
	{
		eventType = SHADE_CHEST_OBJECTS.get(event.getIdentifier());
		lootRecordType = LootRecordType.EVENT;
		takeInventorySnapshot();
	}

	if (option.equals("Open") && itemId == ItemID.CASKET)
	{
		eventType = CASKET_EVENT;
		lootRecordType = LootRecordType.EVENT;
		takeInventorySnapshot();
	}
}