Merge pull request #1451 from RimBlock/master

Config files - Added fuel capacity variable.  DB Backup improved script.
This commit is contained in:
vbawol
2014-07-25 12:00:52 -05:00
15 changed files with 74 additions and 16 deletions

View File

@@ -70,6 +70,7 @@ class AH6X_DZ: AH6_Base_EP1 {
transportMaxWeapons = 3;
transportMaxMagazines = 10;
transportmaxbackpacks = 2;
fuelCapacity = 242;
class Turrets {};
};
class MH6J_DZ: AH6_Base_EP1 {
@@ -98,4 +99,4 @@ class MH6J_DZ: AH6_Base_EP1 {
transportMaxMagazines = 20;
transportmaxbackpacks = 5;
class Turrets {};
};
};

View File

@@ -20,4 +20,5 @@ class AN2_DZ: An2_Base_EP1
transportMaxWeapons = 10;
transportMaxMagazines = 80;
transportmaxbackpacks = 15;
};
fuelCapacity = 757;
};

View File

@@ -9,4 +9,5 @@ class BAF_Merlin_DZE : BAF_Merlin_HC3_D {
transportMaxWeapons = 15;
transportMaxMagazines = 150;
transportmaxbackpacks = 5;
};
fuelCapacity = 3222;
};

View File

@@ -3,4 +3,5 @@ class C130J_US_EP1_DZ: C130J_US_EP1 {
transportMaxWeapons = 50;
transportMaxMagazines = 400;
transportmaxbackpacks = 20;
};
fuelCapacity = 34095;
};

View File

@@ -117,6 +117,7 @@ class CH47_base_EP1: Helicopter
irScanRangeMin = 100;
irScanRangeMax = 1000;
irScanToEyeFactor = 2;
fuelCapacity = 4043;
};
class CH_47F_EP1;
@@ -278,4 +279,4 @@ class CH_47F_EP1_DZE: CH47_base_EP1
weapon = "M134_2";
};
};
};
};

View File

@@ -27,4 +27,5 @@ class CH53_DZE : USEC_ch53_E {
transportMaxWeapons = 25;
transportMaxMagazines = 80;
transportmaxbackpacks = 15;
fuelCapacity = 3849;
};

View File

@@ -11,4 +11,5 @@ class MV22_DZ : MV22 {
transportMaxWeapons = 20;
transportMaxMagazines = 400;
transportmaxbackpacks = 10;
};
fuelCapacity = 6513;
};

View File

@@ -26,6 +26,7 @@ class Mi17_DZ: Mi17_base {
transportMaxWeapons = 10;
transportMaxMagazines = 50;
transportmaxbackpacks = 10;
fuelCapacity = 1870;
class Turrets : Turrets {
class MainTurret : MainTurret {
@@ -64,4 +65,4 @@ class Mi17_Civilian_DZ: Mi17_Civilian {
transportMaxWeapons = 10;
transportMaxMagazines = 50;
transportmaxbackpacks = 10;
};
};

View File

@@ -28,6 +28,7 @@ class UH1Y_DZ: UH1_Base {
transportmaxbackpacks = 4;
weapons[] = {};
magazines[] = {};
fuelCapacity = 1333;
class Turrets : Turrets {
class MainTurret : MainTurret {
magazines[] = {"2000Rnd_762x51_M134"};
@@ -73,6 +74,7 @@ class UH1H_DZ: UH1H_base {
transportMaxWeapons = 5;
transportMaxMagazines = 25;
transportmaxbackpacks = 4;
fuelCapacity = 1333;
class Turrets : Turrets {
class MainTurret : MainTurret {
magazines[] = {"100Rnd_762x51_M240"};
@@ -91,4 +93,4 @@ class UH1H_DZE: UH1H_DZ {
magazines[] = {};
};
};
};
};

View File

@@ -11,6 +11,7 @@ class UH60_Base: Helicopter {
magazines[] = {"60Rnd_CMFlareMagazine"};
lockDetectionSystem = "8 + 4";
incommingMisslieDetectionSystem = 0;
fuelCapacity = 2760;
};
class MH60S_DZ : UH60_Base {
crew = "";
@@ -247,14 +248,13 @@ class UH60M_base_EP1: UH60_Base {
icon = "\ca\air_e\data\UI\Icon_uh60m_CA.paa";
mapSize = 17;
class Library {
libTextDesc = "The Blackhawk is the US Army<6D>s front-line utility helicopter used for transport roles, medical evacuation and even air support.<br />It is capable of carrying 11 combat-equipped soldiers. Easy to maintain in the field, the Blackhawk performs well in a variety of roles including air assault and medical evacuation.";
libTextDesc = "The Blackhawk is the US Army<6D>s front-line utility helicopter used for transport roles, medical evacuation and even air support.<br />It is capable of carrying 11 combat-equipped soldiers. Easy to maintain in the field, the Blackhawk performs well in a variety of roles including air assault and medical evacuation.";
};
crew = "US_Soldier_Pilot_EP1";
typicalCargo[] = {"US_Soldier_Pilot_EP1","US_Soldier_Pilot_EP1"};
gunnerAction = "ManActTestDriver";
transportMaxBackpacks = 10;
transportSoldier = 13;
fuelCapacity = 600;
maxSpeed = 295;
mainRotorSpeed = 1.2;
backRotorSpeed = 6.1;
@@ -549,4 +549,4 @@ class UH60M_EP1_DZE: UH60M_US_base_EP1 {
weapon = "M134_2";
};
};
};
};

View File

@@ -24,5 +24,5 @@ class KamazRefuel_DZ: KamazRefuel {
class TransportMagazines{};
class TransportWeapons{};
transportFuel = 0;
fuelCapacity = 10000;
};
fuelCapacity = 10400;
};

View File

@@ -26,4 +26,5 @@ class PBX: RubberBoat {
transportMaxMagazines = 50;
transportMaxWeapons = 5;
transportMaxBackpacks = 1;
};
fuelCapacity = 23;
};

View File

@@ -17,7 +17,7 @@ class Ship : AllVehicles
maxSpeed = 30;
simulation = "ship";
audible = 6;
fuelCapacity = 100;
fuelCapacity = 250;
formationX = 50;
formationZ = 100;
brakeDistance = 50;
@@ -569,4 +569,4 @@ class RHIB_DZ : Boat
"ca\water\data\rhib_dash_destruct.rvmat"
};
};
};
};

View File

@@ -0,0 +1,25 @@
@REM *** PARAMETERS/VARIABLES ***
SET BackupDir="[Where you want to save the backups]"
SET mysqldir="C:\Program Files\MySQL\MySQL Server 5.6\bin"
SET mysqlschema=[Your DB schema name]
SET mysqlpassword=[your DB password]
SET mysqluser=[your DB user login]
SET housekeepafter=5
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a.%%b)
set hour=%time:~0,2%
if "%time:~0,1%"==" " set hour=0%time:~1,1%
set datestamp=%date:~10,4%-%date:~4,2%-%date:~7,2%_%hour%%time:~3,2%
@REM *** EXECUTION ***
@REM Change to mysqldir
c:
cd %mysqldir%
@REM dump/backup ALL database, this is all in one line
mysqldump -u %mysqluser% -p%mysqlpassword% --databases %mysqlschema% >%BackupDir%\%mysqlschema%_backup.%datestamp%.sql
@REM - Housekeeping
forfiles -p %BackupDir% -s -m *.sql -d -%housekeepafter% -c "cmd /c del @path"

View File

@@ -0,0 +1,22 @@
RimBlocks basic MySQL DB backup.
This batch (.bat) file will connect to your MySQL server and create a dump of the sql code required to recreate the DB you have selected. mysqldump.exe has other options you can supply so you could talior the basic script fairly easily to fit your individual need.
How to use Backup_DB.bat
Input your DB connection details and desired backup save location. All details that need changing are in []. Make the changes without the [].
e.g.
SET mysqlschema=[Your DB schema name]
may change to
SET mysqlschema=EpochDB
SET BackupDir="[Where you want to save the backups]"
May change to
SET BackupDir="c:\DB-Backups"
Housekeeping will clear any .sql files that are over housekeepafter number of days old.
You may need to confirm the MySQL path for the mysqldump exe as it may depend on your provider.
Add "pause" (without "") at the end of the file to require an input for debugging. This allows you to check the test backup is ok and troubleshoot any issues. Remove it when automating or the .bat file will never close. Automation can be done via Windows task scheduler. Create a basic task and then edit the tasks parameters after creating if you want to backup more than once a day. The option is only available after the task is created.