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

Commit

Permalink
fix transformer maintenance status
Browse files Browse the repository at this point in the history
  • Loading branch information
Zereff06 authored and Zereff06 committed Jul 8, 2023
1 parent 16a2258 commit dcf5a0f
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 @@ -43,6 +43,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 @@ -76,23 +77,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 @@ -195,6 +195,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 @@ -3210,4 +3212,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 dcf5a0f

Please sign in to comment.