Skip to content

Commit

Permalink
Merge pull request #138 from PiatraAlatyr/patch-3
Browse files Browse the repository at this point in the history
Powderbarrel for Seismic Prospector
  • Loading branch information
AndreySolodovnikov authored Nov 17, 2020
2 parents b8c6ce8 + c25268b commit aaa46ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,13 @@ public GT_MetaTileEntity_AdvSeismicProspector(int aID, String aName, String aNam

public String[] getDescription() {
return new String[]{
"Place, activate with explosives ("
+ "8 Glyceryl, "
+ "32 TNT or "
+ "16 ITNT), use Data Stick",
"Activate with explosives:",
"32 TNT, 16 Industrial TNT, 8 Glyceryl",
"Use Data Stick for save data",
"Ore prospection area 191x191 blocks",
"Oil prospection area 3x3 oilfields"};
}

protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures,
String aGUIName, String aNEIName, int aNear, int aMiddle, int aRadius, int aStep) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
radius = aRadius;
near = aNear;
middle = aMiddle;
step = aStep;
}

protected GT_MetaTileEntity_AdvSeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures,
String aGUIName, String aNEIName, int aNear, int aMiddle, int aRadius, int aStep) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
boolean ready = false;

public GT_MetaTileEntity_SeismicProspector(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 1, "Place, activate with explosives(8 Dynamite, 1 Glyceryl, 4 TNT or 2 ITNT), use Data Stick", 1, 1, "Default.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)});
super(aID, aName, aNameRegional, aTier, 1, "", 1, 1, "Default.png", "", new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER)});
}

public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
public String[] getDescription() {
return new String[]{
"Activate with explosives:",
"8 Dynamite or Powderbarrel, 4 TNT, 2 Industrial TNT, 1 Glyceryl",
"Use Data Stick for save data"};
}

public GT_MetaTileEntity_SeismicProspector(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
Expand All @@ -52,14 +55,17 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye
if (aBaseMetaTileEntity.isServerSide()) {
ItemStack aStack = aPlayer.getCurrentEquippedItem();
if (!ready && (aStack != null) && (
(aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) && aStack.stackSize > 3 ) ||
(aStack.getItem() == Item.getItemFromBlock(Blocks.tnt) && aStack.stackSize > 3 ) ||
(aStack.getItem() == ItemList.Block_Powderbarrel.getItem() && aStack.stackSize > 7 ) ||
(aStack.getItem() == Ic2Items.industrialTnt.getItem() && aStack.stackSize > 1 ) ||
(aStack.getItem() == Ic2Items.dynamite.getItem() && aStack.stackSize > 7 ) ||
(GT_OreDictUnificator.getItemData(aStack).mMaterial.mMaterial == Materials.Glyceryl && aStack.stackSize > 0 )
) ) {
if ((!aPlayer.capabilities.isCreativeMode) && (aStack.stackSize != 111)) {
if(aStack.getItem() == Item.getItemFromBlock(Blocks.tnt)){
aStack.stackSize -= 4;
}else if(aStack.getItem() == ItemList.Block_Powderbarrel.getItem()){
aStack.stackSize -= 8;
}else if(aStack.getItem() == Ic2Items.industrialTnt.getItem()){
aStack.stackSize -= 2;
}else if(aStack.getItem() == Ic2Items.dynamite.getItem()){
Expand Down

0 comments on commit aaa46ef

Please sign in to comment.