public class BaseSpecialItemPlugin extends java.lang.Object implements SpecialItemPlugin
Modifier and Type | Class and Description |
---|---|
protected static interface |
BaseSpecialItemPlugin.BlueprintLister |
static class |
BaseSpecialItemPlugin.ItemCostLabelData |
SpecialItemPlugin.SpecialItemRendererAPI
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
itemId |
protected SpecialItemSpecAPI |
spec |
protected CargoStackAPI |
stack |
Constructor and Description |
---|
BaseSpecialItemPlugin() |
Modifier and Type | Method and Description |
---|---|
protected void |
addBlueprintList(TooltipMakerAPI tooltip,
java.lang.String title,
java.util.List<java.lang.String> ids,
int max,
float opad,
BaseSpecialItemPlugin.BlueprintLister lister) |
protected void |
addCostLabel(TooltipMakerAPI tooltip,
float pad,
CargoTransferHandlerAPI transferHandler,
java.lang.Object stackSource) |
protected void |
addFighterList(TooltipMakerAPI tooltip,
java.lang.String title,
java.util.List<java.lang.String> wings,
int max,
float opad) |
protected void |
addShipList(TooltipMakerAPI tooltip,
java.lang.String title,
java.util.List<java.lang.String> hulls,
int max,
float opad) |
protected void |
addWeaponList(TooltipMakerAPI tooltip,
java.lang.String title,
java.util.List<java.lang.String> weapons,
int max,
float opad) |
void |
createTooltip(TooltipMakerAPI tooltip,
boolean expanded,
CargoTransferHandlerAPI transferHandler,
java.lang.Object stackSource) |
void |
createTooltip(TooltipMakerAPI tooltip,
boolean expanded,
CargoTransferHandlerAPI transferHandler,
java.lang.Object stackSource,
boolean useGray) |
protected BaseSpecialItemPlugin.ItemCostLabelData |
getCostLabelData(CargoStackAPI stack,
CargoTransferHandlerAPI transferHandler,
java.lang.Object stackSource) |
java.lang.String |
getDesignType() |
java.lang.String |
getId() |
protected float |
getItemPriceMult() |
java.lang.String |
getName() |
int |
getPrice(MarketAPI market,
SubmarketAPI submarket) |
SpecialItemSpecAPI |
getSpec() |
float |
getTooltipWidth() |
boolean |
hasRightClickAction() |
void |
init(CargoStackAPI stack) |
boolean |
isTooltipExpandable() |
void |
performRightClickAction() |
void |
render(float x,
float y,
float w,
float h,
float alphaMult,
float glowMult,
SpecialItemPlugin.SpecialItemRendererAPI renderer) |
java.lang.String |
resolveDropParamsToSpecificItemData(java.lang.String params,
java.util.Random random)
Return null to have this item turn into nothing, or an empty string if it has no parameters.
|
void |
setId(java.lang.String id)
Called before init().
|
boolean |
shouldRemoveOnRightClickAction() |
protected SpecialItemSpecAPI spec
protected CargoStackAPI stack
protected java.lang.String itemId
public java.lang.String getId()
public void setId(java.lang.String id)
SpecialItemPlugin
setId
in interface SpecialItemPlugin
public void init(CargoStackAPI stack)
init
in interface SpecialItemPlugin
public void performRightClickAction()
performRightClickAction
in interface SpecialItemPlugin
public boolean hasRightClickAction()
hasRightClickAction
in interface SpecialItemPlugin
public boolean shouldRemoveOnRightClickAction()
shouldRemoveOnRightClickAction
in interface SpecialItemPlugin
public void createTooltip(TooltipMakerAPI tooltip, boolean expanded, CargoTransferHandlerAPI transferHandler, java.lang.Object stackSource)
createTooltip
in interface SpecialItemPlugin
public void createTooltip(TooltipMakerAPI tooltip, boolean expanded, CargoTransferHandlerAPI transferHandler, java.lang.Object stackSource, boolean useGray)
public float getTooltipWidth()
getTooltipWidth
in interface SpecialItemPlugin
public boolean isTooltipExpandable()
isTooltipExpandable
in interface SpecialItemPlugin
public java.lang.String getName()
getName
in interface SpecialItemPlugin
public int getPrice(MarketAPI market, SubmarketAPI submarket)
getPrice
in interface SpecialItemPlugin
protected float getItemPriceMult()
public void render(float x, float y, float w, float h, float alphaMult, float glowMult, SpecialItemPlugin.SpecialItemRendererAPI renderer)
render
in interface SpecialItemPlugin
protected void addCostLabel(TooltipMakerAPI tooltip, float pad, CargoTransferHandlerAPI transferHandler, java.lang.Object stackSource)
protected BaseSpecialItemPlugin.ItemCostLabelData getCostLabelData(CargoStackAPI stack, CargoTransferHandlerAPI transferHandler, java.lang.Object stackSource)
public java.lang.String resolveDropParamsToSpecificItemData(java.lang.String params, java.util.Random random) throws JSONException
SpecialItemPlugin
resolveDropParamsToSpecificItemData
in interface SpecialItemPlugin
JSONException
protected void addShipList(TooltipMakerAPI tooltip, java.lang.String title, java.util.List<java.lang.String> hulls, int max, float opad)
protected void addWeaponList(TooltipMakerAPI tooltip, java.lang.String title, java.util.List<java.lang.String> weapons, int max, float opad)
protected void addFighterList(TooltipMakerAPI tooltip, java.lang.String title, java.util.List<java.lang.String> wings, int max, float opad)
protected void addBlueprintList(TooltipMakerAPI tooltip, java.lang.String title, java.util.List<java.lang.String> ids, int max, float opad, BaseSpecialItemPlugin.BlueprintLister lister)
public java.lang.String getDesignType()
getDesignType
in interface SpecialItemPlugin
public SpecialItemSpecAPI getSpec()
getSpec
in interface SpecialItemPlugin
Copyright © 2013 Fractal Softworks, LLC. All Rights Reserved.