Skip to content

Commit

Permalink
Merge pull request #45 from NikoCat233/KeepWithMain
Browse files Browse the repository at this point in the history
  • Loading branch information
scp222thj authored Dec 26, 2023
2 parents 61f8e81 + 9cf0d53 commit 392c2b5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/Sabotage/SabotagePatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,18 @@ public static void Postfix(ShipStatus __instance)

}else if (currentMapID == 4){ //Airship uses HeliSabotageSystem to sabotage reactor

var reactSystem = __instance.Systems[SystemTypes.Reactor].Cast<HeliSabotageSystem>();
var HeliSystem = __instance.Systems[SystemTypes.HeliSabotage].Cast<HeliSabotageSystem>();

if (reactSystem.IsActive){
if (HeliSystem.IsActive){

//Repair reactor
__instance.RpcUpdateSystem(SystemTypes.Reactor, 16 | 0);
__instance.RpcUpdateSystem(SystemTypes.Reactor, 16 | 1);
__instance.RpcUpdateSystem(SystemTypes.HeliSabotage, 16 | 0);
__instance.RpcUpdateSystem(SystemTypes.HeliSabotage, 16 | 1);

}else{

//Sabotage reactor
__instance.RpcUpdateSystem(SystemTypes.Reactor, 128 | 0);
__instance.RpcUpdateSystem(SystemTypes.Reactor, 128 | 1);
__instance.RpcUpdateSystem(SystemTypes.HeliSabotage, 128);

}

Expand Down Expand Up @@ -75,7 +74,6 @@ public static void Postfix(ShipStatus __instance)
CheatSettings.oxygenSab = false; //Button behaviour

}else if (CheatSettings.mushSab){

if (currentMapID == 5){ //MushroomMixup only works on Fungle
__instance.RpcUpdateSystem(SystemTypes.MushroomMixupSabotage, 1); //Sabotage MushroomMixup
}else{
Expand Down

0 comments on commit 392c2b5

Please sign in to comment.