Skip to content

Commit

Permalink
Add back random sabotage
Browse files Browse the repository at this point in the history
  • Loading branch information
g0aty committed Apr 13, 2024
1 parent dc826fe commit abc2bd7
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions gui/tabs/sabotage_tab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,64 @@ namespace SabotageTab {
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Comms, 128));
}

if (ImGui::Button("Random Sabotage")) {
switch (State.mapType) {
case Settings::MapType::Pb:
{
int randIndex = randi(1, 3);
switch (randIndex) {
case 1:
{
for (size_t i = 0; i < 5; i++)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Electrical, i));
} break;
case 2: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Laboratory, 128)); break;
case 3: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Comms, 128)); break;
}
}
break;
case Settings::MapType::Airship:
{
int randIndex = randi(1, 3);
switch (randIndex) {
case 1:
{
for (size_t i = 0; i < 5; i++)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Electrical, i));
} break;
case 2: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::HeliSabotage, 128)); break;
case 3: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Comms, 128)); break;
}
}
break;
case Settings::MapType::Fungle:
{
int randIndex = randi(1, 3);
switch (randIndex) {
case 1: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::MushroomMixupSabotage, 1)); break;
case 2: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Reactor, 128)); break;
case 3: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Comms, 128)); break;
}
}
break;
default: //skeld and mira have same sabotages
{
int randIndex = randi(1, 4);
switch (randIndex) {
case 1:
{
for (size_t i = 0; i < 5; i++)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Electrical, i));
} break;
case 2: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Reactor, 128)); break;
case 3: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::LifeSupp, 128)); break;
case 4: State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Comms, 128)); break;
}
}
break;
}
}

if (State.mapType != Settings::MapType::Fungle && ImGui::Button("Sabotage Lights")) {
for (size_t i = 0; i < 5; i++)
State.rpcQueue.push(new RpcUpdateSystem(SystemTypes__Enum::Electrical, i));
Expand Down

0 comments on commit abc2bd7

Please sign in to comment.