Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix_transformer_maintenance' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Dream-Master committed Jul 8, 2023
2 parents 582d9e5 + dcf5a0f commit c84b9e7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class GT_MetaTileEntity_EM_transformer extends GT_MetaTileEntity_Multiblo

@Override
public void onFirstTick_EM(IGregTechTileEntity aBaseMetaTileEntity) {
if (!isNeededMaintenanceChecks) turnOffMaintenance();
if (!mMachine) {
aBaseMetaTileEntity.disableWorking();
}
Expand Down Expand Up @@ -80,23 +81,13 @@ public IStructureDefinition<GT_MetaTileEntity_EM_transformer> getStructure_EM()

public GT_MetaTileEntity_EM_transformer(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
mWrench = true;
mScrewdriver = true;
mSoftHammer = true;
mHardHammer = true;
mSolderingTool = true;
mCrowbar = true;
turnOffMaintenance();
eDismantleBoom = true;
}

public GT_MetaTileEntity_EM_transformer(String aName) {
super(aName);
mWrench = true;
mScrewdriver = true;
mSoftHammer = true;
mHardHammer = true;
mSolderingTool = true;
mCrowbar = true;
turnOffMaintenance();
eDismantleBoom = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM
// if u need to force some things to be fixed - u might need to override doRandomMaintenanceDamage
protected byte minRepairStatus = 3;

public boolean isNeededMaintenanceChecks = true;

// is power pass cover present
public boolean ePowerPassCover = false;

Expand Down Expand Up @@ -3234,4 +3236,14 @@ public void draw(float partialTicks) {
}

// endregion

public void turnOffMaintenance() {
mWrench = true;
mScrewdriver = true;
mSoftHammer = true;
mHardHammer = true;
mSolderingTool = true;
mCrowbar = true;
isNeededMaintenanceChecks = false;
}
}

0 comments on commit c84b9e7

Please sign in to comment.