function cheat()
{
   // GIVE ME EVERYTHING!!
   increaseAll(10000);
   ActivateAllExperience();
}
// Free Dynamite! Dont tell Tim
function cheatdynamite()
{
   //Increase players Dynamite count by 1
   %slot = invGetSlotForItem(ClientGroup.getObject( 0 ), $INV_DYNAMITE);
   if(%slot >= 0 )
   {
      if(invCanPushItem(ClientGroup.getObject( 0 ), %slot))
      {
         invPushItemInInventory(ClientGroup.getObject( 0 ), %slot);
      }
   }
}

function cheatLoadScenario(%scenarioname)
{
   switch$(%scenarioname) {
      case "whitewong":
         if(isObject(LoadWhiteWong)) {
            LoadWhiteWong.onExit();
         }
      case "snakevalley":
         if(isObject(LoadSnakeValley)) {
            LoadSnakeValley.onExit();
         }
      case "madrussian":
         if(isObject(MadRussianCaptureTrigger)) {
            MadRussianCaptureTrigger.onExit();
         }
      case "madrussianLoad":
         if(isObject(LoadMadRussianTask)) {
            LoadMadRussianTask.onExit();
         }
      case "final":
         if(isObject(FinalShowdownTrigger)) {
            FinalShowdownTrigger.onEnter();
         }
      case "Hoperescue":
         if(isObject(LoadHRRescue)) {
            LoadHRRescue.onExit();
         }
      case "BadSeed":
         if(isObject(LoadBadSeed)) {
            LoadBadSeed.onExit();
         }
      case "BridgeDefense":
         if(isObject(BridgeDefenseTrigger)) {
            BridgeDefenseTrigger.onExit();
         }
      case "DeadMine":
         if(isObject(LoadDeadmine)) {
            LoadDeadmine.onExit();
         }
      case "FireTutorial":
         if(isObject(LoadFireTutorial)) {
            LoadFireTutorial.onExit();
         }
      case "BridgeTutorial":
         if(isObject(Bridgetutload)) {
            Bridgetutload.onExit();
         }
      case "Escort":
         if(isObject(EscortLoad)) {
            EscortLoad.onExit();
         }
      case "BanditSpy":
         if(isObject(BanditSpyLoad)) {
            BanditSpyLoad.onExit();
         }
      case "Campaign2":
         if(isObject(LoadMap2Campaign)) {
            LoadMap2Campaign.onExit();
         }
      case "TownhallDefense":
         if(isObject(LoadTownhallDefense)) {
            LoadTownhallDefense.onExit();
         }
      case "Bakeoff":
         if(isObject(LoadBakeOff)) {
            LoadBakeOff.onExit();
         }
      case "Outpostunlock":
         if(isObject(Platformupgrade)) {
            Platformupgrade.onExit();
         }
      case "Famine":
         if(isObject(LoadFamineMap)) {
            LoadFamineMap.onExit();
         }
      case "TornadoValley":
         if(isObject(LoadTornadoValley)) {
            LoadTornadoValley.onExit();
         }
      case "AnimalTrap":
         if(isObject(LoadAnimalTrap)) {
            LoadAnimalTrap.onExit();
         }         
         
   }
}

function cheatFireAll()
{
   %bldgs = slgGetServerBuildingList();
   for(%i = 0; %i < %bldgs.getSize(); %i++) {
      %bldg = %bldgs.getID(%i);
      if(!%bldg.isOnTeam($OST_PLAYER)) {
         continue;
      }
      %cmpBldg = slgQueryInterface(%bldg, $CID_BUILDING);
      if(%cmpBldg.getEmployeeMax() == 0) {
         continue;
      }
      while(%cmpBldg.getEmployeeCount() > 0) {
         slgUnemployObject(%cmpBldg.getEmployee(0));
      }
   }
}
