Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d #92

Open
wants to merge 775 commits into
base: Development_main
Choose a base branch
from
Open

d #92

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
775 commits
Select commit Hold shift + click to select a range
e8e0be8
Refine the boomerang player/vehicle interactions
Jan 20, 2015
88da826
Add configs for boomerang
Jan 21, 2015
c2abc6f
Enable LCD on boomerang
Jan 21, 2015
53e88ce
Enable saving of boomerang devices
Jan 21, 2015
da09015
Remove fired near event handler after closing hud
Jan 22, 2015
525563f
Merge pull request #79 from micovery/Development_main_addons+Boomerang
Jan 22, 2015
b390a74
Forgot to remove extra debug log call
Jan 22, 2015
2bdde5a
Merge remote-tracking branch 'upstream/Development_main' into Develop…
Jan 22, 2015
df006ff
Merge branch 'Development_main' into Development_main_addons
Jan 22, 2015
d9de6c4
Merge remote-tracking branch 'upstream/Development_main_addons' into …
Jan 22, 2015
c873f14
Updated boomerang config.
Jan 22, 2015
d89269a
Reduced falling and vehicle collision player damage.
Jan 22, 2015
84b4d8c
Removed one repair kit and nvg. Added 3 chem lights.
Jan 22, 2015
d1bb9b6
Added UAVs to towing.
Jan 22, 2015
df42f45
Added UAVs and UGVs to saved vehicles.
Jan 22, 2015
eb77678
Added TS address to server credits.
Jan 22, 2015
f0f4185
Revamp resupply to work with UAVs, and Statics
Jan 23, 2015
2f4e675
Only remove the resupply action
Jan 23, 2015
bb60234
Add the vehicle name to the resupply action
Jan 23, 2015
e74011f
Restrict resupply to driver/gunner
Jan 23, 2015
4038f07
Possible 1.38 shake fix.
Jan 23, 2015
0af5c51
Hack to prevent UAVs from blowing up
Jan 23, 2015
51fc0f1
Merge branch 'Development_main' of https://github.com/A3Armory/ArmA3_…
Jan 23, 2015
fa1ad16
Resupply only 2 missiles to UAVs.
Jan 23, 2015
21273df
Enabled thermal equipment on loaded vehicles for UAVs and UGVs
Jan 23, 2015
32d6d40
Updated locked vehicles.
Jan 23, 2015
cc7cbcd
More reliable fix for UAV explosions
Jan 23, 2015
008de48
Updated sell vehicles.
Jan 23, 2015
c16bce9
Updated sell vehicles.
Jan 23, 2015
54512dc
Merge remote-tracking branch 'upstream/Development_main' into Develop…
Jan 23, 2015
ee9a176
Merge branch 'Development_main' into Development_main_addons
Jan 23, 2015
0bc5990
More reliable fix for UAV explosions
Jan 23, 2015
46d8b41
Offload player list saving to HC if available
Jan 24, 2015
c7e32de
Adjusted some spacing.
Jan 25, 2015
00639a5
Normalize config only on server side
Jan 25, 2015
459438b
Remove debug message
Jan 25, 2015
891db1b
Merge pull request #83 from micovery/Development_main+HC_Offload
Jan 25, 2015
bbd125f
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
8039190
Fix wrong check
Jan 25, 2015
16b6ee7
Merge remote-tracking branch 'micovery/Development_main_addons' into …
Jan 25, 2015
9fcd9a5
Refine unflip logic
Jan 25, 2015
00093cf
Updated MagRepack info.
Jan 25, 2015
3542fad
Merge remote-tracking branch 'micovery/Development_main_addons' into …
Jan 25, 2015
5070697
Offload object saving to HC if available
Jan 25, 2015
1e8cd2b
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
1348f2d
Broadcast lifetime variables
Jan 25, 2015
b2610d7
Broadcast lifetime variables
Jan 25, 2015
f1ec972
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
abe025d
Load default config on HC as well
Jan 25, 2015
8955fee
Refactor mine saving a bit to work with HC
Jan 25, 2015
0981a6d
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
8d21788
Cleanup arrays before offloading to HC
Jan 25, 2015
d7cfb3a
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
6b98a34
Merge remote-tracking branch 'micovery/Development_main_addons' into …
Jan 25, 2015
014b796
Added food and water to town invasion.
Jan 25, 2015
75e96e8
Updated class names.
Jan 25, 2015
ecaee48
Optimize syncing between server, and HC
Jan 25, 2015
1e4dd64
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
c587c94
Merge remote-tracking branch 'upstream/Development_main' into Develop…
Jan 25, 2015
8c73f56
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
c7a7fda
Clean object cache also when offloading to HC
Jan 25, 2015
d417e5b
Merge branch 'Development_main' into Development_main_addons
Jan 25, 2015
183774c
Merge remote-tracking branch 'micovery/Development_main_addons' into …
Jan 25, 2015
c3a9b98
Revert UGV thermal.
Jan 26, 2015
5b49cdc
Updated mission.sqm
Jan 26, 2015
9eacd77
Updated mission.sqm
Jan 26, 2015
5a6d52a
Merge remote-tracking branch 'upstream/Development_main' into Develop…
Jan 26, 2015
96efe32
Merge branch 'Development_main' into Development_main_addons
Jan 26, 2015
ce47dea
Merge remote-tracking branch 'micovery/Development_main_addons' into …
Jan 26, 2015
c3d1bb9
Updated mission.sqm
Jan 26, 2015
acd4af0
Offload vehicle saving to HC if available
Jan 26, 2015
2ca7d83
Merge branch 'Development_main' into Development_main_addons
Jan 26, 2015
580a990
Do not run 3rd party scripts on HC
Jan 26, 2015
258186b
Merge branch 'Development_main' into Development_main_addons
Jan 26, 2015
9582961
Redo of chem lights.
Jan 26, 2015
b345c76
Merge remote-tracking branch 'micovery/Development_main_addons' into …
Jan 26, 2015
c3eac25
Update init.sqf
Jan 26, 2015
489d955
Updated configs.
Feb 5, 2015
694be03
Merge remote-tracking branch 'origin/Development_main' into Developme…
Feb 5, 2015
6d58143
Changed some spelling.
Feb 5, 2015
eb74076
Make sure allow damage is set to true on objects at restart.
Feb 13, 2015
2bdd23e
Team kill punish set to 1 kill.
Feb 13, 2015
4781a1a
Changed some prices.
Feb 13, 2015
6bdce46
Fix for team kill tweak.
Feb 13, 2015
a6c4f53
Money limits and removed titan compact lock
Feb 23, 2015
f07e477
Money limits and removed titan compact lock
Feb 23, 2015
9428af8
Tweaks
Feb 23, 2015
e8e9395
Tweaks on Titan AT lock disable.
Feb 24, 2015
d703b1a
Made pick lock only work with toolkit.
Feb 24, 2015
5f82817
Changed some spelling.
Feb 24, 2015
22c599c
Removed and replaced Titan AT compact with PCML on missions and ai.
Feb 24, 2015
c2393c0
Reduced money on sunken treasure.
Feb 25, 2015
954145d
Increased static resupply price.
Feb 25, 2015
3bc76c7
Possible fix for exploding vehicles when a player first gets in and r…
Mar 11, 2015
1b5e6cf
Fixed Huron not saving, locking, or working with R3F and removed UAV …
Mar 12, 2015
fd757d4
Tweak for group only icons and add UAV quad copters to group restrict…
Mar 12, 2015
0003d18
Tweak for Huron fix.
Mar 12, 2015
61016a5
Added DLC's for all players.
Mar 12, 2015
f2d1e9c
Oops
Mar 12, 2015
4e3abba
Huron fix for DLC hack.
Mar 12, 2015
0a6c7b4
Tweak for get in vehicle explosion fix.
Mar 18, 2015
b3548ab
UAV resupply tweak.
Mar 25, 2015
a13b893
ATM dupe kludge.
Mar 28, 2015
9653e76
Revert 1.38 shake fix.
Mar 28, 2015
39f8f48
Fix Repack exploit on incapacitated.
Mar 29, 2015
a3c5982
Added sell vehicle to vehicle stores.
Mar 29, 2015
41b4102
Removed old sell vehicle points.
Mar 29, 2015
8b9d9ca
Improved resupply.
Mar 29, 2015
f3721ba
Tweaked main config and put max ATM money to $300,000.
Mar 29, 2015
21f2316
Merge remote-tracking branch 'ArmA3_Wasteland.Altis/Development_main'…
Apr 7, 2015
3dacf2b
Merge clean up.
Apr 7, 2015
9fb1ad3
lil fix.
Apr 7, 2015
2323d60
lil fix.
Apr 8, 2015
a00f17a
Added 50m object lock block to stores.
Apr 8, 2015
f785336
Main config tweak.
Apr 8, 2015
ba6de9c
Marksmen update!
Apr 8, 2015
6fb1941
Revert of improved spawning to prevent bugs.
Apr 9, 2015
23e2441
Tweak for get in vehicle explosion fix.
Apr 12, 2015
34410d5
Zafir LMG ammo fix.
Apr 12, 2015
ebe470a
Vehicle store fix.
Apr 12, 2015
6ab7aa1
Removed "Air" from A3W_fnc_setupAntiExplode.
Apr 12, 2015
1d62dc3
Removed UGV from A3W_fnc_setupAntiExplode.
Apr 12, 2015
292723b
Revert and tweak of A3W_fnc_setupAntiExplode.
Apr 13, 2015
2ded433
Oops
Apr 13, 2015
1afb0f5
Manual merge to avoid conflicts.
Apr 13, 2015
2afc03b
Merge fixes and minor fix attempt for player gear being reset after r…
Apr 13, 2015
b151ed9
Merge fixes and minor fix attempt for player gear being reset after r…
Apr 13, 2015
4d9b9bf
Merge remote-tracking branch 'ArmA3_Wasteland.Altis_main/Development_…
Apr 20, 2015
ebd69da
Optimized UAV addon
Apr 20, 2015
c70ce8e
Removed static laser from save and tweaked store config.
Apr 20, 2015
c929b97
Revert of UAV addon.
Apr 25, 2015
0a4be0f
Vehicles bought from stores are now indestructible for 60 seconds and…
Apr 26, 2015
5aec546
Fix for 1.38 "No entry" bug
Apr 26, 2015
8dc8d97
Merge remote-tracking branch 'ArmA3_Wasteland.Altis_main/Development_…
May 3, 2015
5806df4
Merge remote-tracking branch 'ArmA3_Wasteland.Altis_main/Development_…
May 6, 2015
04cc101
Fix for no font error for parking.
May 6, 2015
6a3d7bb
JTS messenger 1.2 update.
May 6, 2015
6795c33
Added kill to FAR revive.
May 6, 2015
d756555
Update FAR_revive_funcs.sqf
May 6, 2015
3d3892a
Added 20 more mission locations.
May 15, 2015
1856c43
Merge branch 'Development_main' of https://github.com/A3Armory/ArmA3_…
May 15, 2015
b30b6ee
Added one more convoy route.
May 15, 2015
cedc58c
Added 3 more missions.
May 15, 2015
cdaf63c
Quick fix for pull AI option on Darters.
May 15, 2015
b0fd6dc
Temporary fix for bunny invasion.
May 15, 2015
83e9680
Added max spawn beacon and delete beacon.
May 15, 2015
b654c74
Tentative fix for unflip vehicle.
May 15, 2015
1d91797
Add fix for cctv camera's not lockable.
May 15, 2015
837efff
Added cool down for town spawns.
May 16, 2015
94f4b41
Remove UNCONSCIOUS players from friendly/enemy count.
May 16, 2015
5635351
Another attempted fix for exploding vehicles.
May 16, 2015
d9d8ea2
Fix for smuggler mission.
May 16, 2015
c360c21
Updated to latest UAV_Control.
May 16, 2015
936a556
Enable spectator admin logging.
May 17, 2015
5c6f210
Placed enableEnvironment option in player menu.
May 17, 2015
5ac2b59
Added more vehicle textures.
May 17, 2015
dc08c89
Merge remote-tracking branch 'A3Wasteland/Development_main' into Deve…
May 17, 2015
1102c77
Fix.
May 17, 2015
1db9c80
Added UID to spectate log.
May 23, 2015
e09fd3a
infiSTAR added.
May 23, 2015
6bb9aa3
Updated admin panel.
May 24, 2015
44bf684
Fixes.
May 24, 2015
5830a1a
Changed admin notified.
May 24, 2015
f7f77b1
Blinking hud fix caused by scripts.txt.
May 26, 2015
7242c53
Mission update and tweaks.
May 26, 2015
3a0fe58
Added remove money logging and tweaked missions.
May 26, 2015
e487fb2
Update for FAR_Kill.
May 27, 2015
e2cc3d3
Update for admin panel.
May 31, 2015
7ca7db1
AI and mission tweaks.
Jun 1, 2015
98c50cd
Performance testing.
Jun 1, 2015
ffa09e7
Added R3F block to save actions.
Jun 2, 2015
d2ca242
Removed military patrol.
Jun 2, 2015
4409c9a
Removed military patrol. *Fix
Jun 3, 2015
eb9d2f5
Mission description change.
Jun 8, 2015
ac8ce95
Merge remote-tracking branch 'A3Wasteland/Development_main' into Deve…
Jun 8, 2015
7b02972
Merge fixes.
Jun 10, 2015
d607393
Merge fix.
Jun 10, 2015
3cb6e62
Added boxes to object load _allowDamage false.
Jun 10, 2015
6ffdb4a
Fix.
Jun 10, 2015
30f251f
Made disable environment off by default.
Jun 14, 2015
014e835
Fix.
Jun 15, 2015
c7e9fec
Server credits fix
Jun 19, 2015
1ef2320
Added some jets back with limited weapons.
Jun 26, 2015
c2a58d1
Added some jets back with limited weapons. *Fix
Jun 26, 2015
549aef9
Reduced HE mortar ammo.
Jun 26, 2015
c7717cf
Update fn_resupplytruck.sqf
Jun 26, 2015
9407ef2
Improved resupply and reduced HE mortar ammo fix.
Jun 26, 2015
f97d04a
Oops.
Jun 26, 2015
ba2ebe0
Update fn_resupplytruck.sqf
Jun 26, 2015
a1d0706
Removed addWeaponTurret because it wont save and add laser guided mor…
Jun 26, 2015
d49c23d
Added A-143 Buzzard CAS.
Jun 26, 2015
5d9cad6
Change max view distance to 4000m for dogfights.
Jun 26, 2015
82811d9
Removed Titan AT compact lock block because of joystick bypass. Remov…
Jun 26, 2015
538b9a3
Mortars now auto save when bought to avoid disassemble disappear bug.…
Jun 26, 2015
1eb5de2
Mortars now auto save when bought to avoid disassemble disappear bug.…
Jun 26, 2015
326db01
Fix.
Jun 26, 2015
c0ed57f
Added hex orca and ind cas to weapon restrictions.
Jun 30, 2015
aa8f65d
Updated admin notify.
Jun 30, 2015
db26356
Updated ind cas price.
Jun 30, 2015
5307f28
Fix O_Heli_Light_02_F weapon restriction for vehicle load.
Jun 30, 2015
a5e8a80
Update vFunctions.sqf
Jun 30, 2015
054d407
Expanded parking and storage. Reduced max wind speed.
Jun 30, 2015
57a9028
Expanded parking tweak.
Jun 30, 2015
017b198
Added hex orca and ind cas to weapon restrictions. *Fix
Jun 30, 2015
55c7df4
Map cleanup.
Jun 30, 2015
1fae7e9
Map cleanup, gun store warning fix.
Jul 1, 2015
5293710
Update createGunStoreMarkers.sqf
Jul 1, 2015
4649db7
Resupply fixes.
Jul 1, 2015
e2fc559
Buzzard CAS tweaks.
Jul 1, 2015
14457c3
Renabled improved spawning.
Jul 2, 2015
f6d7413
Update functions.sqf
Jul 2, 2015
94faa8e
Tweaks for weather and improved spawning.
Jul 9, 2015
9d43985
Tweaks for resupply.
Jul 9, 2015
8f6f32d
Tweaks for vehicle saving.
Jul 9, 2015
d3e3c75
Anti hack improvements.
Jul 9, 2015
432644c
Block script injection exploit.
Jul 9, 2015
dc307f0
Default config tweak.
Jul 9, 2015
129387f
AH fix.
Jul 9, 2015
3e09152
Added new 1.2 vehicle textures.
Jul 9, 2015
6559c3d
Added possibility to use external antihack payload.
Jul 10, 2015
6706591
Added possibility to use external antihack payload.
Jul 10, 2015
16c5604
Changed weather.
Jul 10, 2015
01d0ce8
Blocking of global voice to push-to-talk keys.
Jul 13, 2015
25c1b73
Fixed overlapping issues with HUD text.
Jul 13, 2015
22798cb
Fixed Ifrit rear-end not being painted.
Jul 13, 2015
1421880
Added adjustable nightvision by xx-LSD-xx.
Jul 13, 2015
c41bf2c
Added adjustable nightvision by xx-LSD-xx.
Jul 13, 2015
4626d8e
Fixed issue where landing on edge of step after jump caused death.
Jul 13, 2015
f88d0f1
Other minor fixes.
Jul 13, 2015
cd766e1
Fixed anim issues when injured while weapon is deployed or rested.
Jul 13, 2015
af2b1d1
Changed allPlayers to fn_allPlayers due to command added in A3 v1.47.
Jul 13, 2015
aa13a32
Changed allPlayers to fn_allPlayers due to command added in A3 v1.47.…
Jul 13, 2015
b7bcb87
Added "A3W_survivalSystem" option.
Jul 13, 2015
adcad97
Modified store scripts to be able to read item names from config.
Jul 13, 2015
c3a266a
Player hud fix.
Jul 13, 2015
d69b7ce
MagRepack A3W v1.2 version.
Jul 19, 2015
c051939
MagRepack A3W 1.2 version.
Jul 19, 2015
7d60e9a
MagRepack A3W 1.2 version. *Fix
Jul 19, 2015
d7bc1c0
MagRepack A3W 1.2 version. *Fix WTF Github
Jul 19, 2015
b73da18
Fix for TAW error.
Jul 19, 2015
7b3dbb4
Fix for TAW error tweak
Jul 19, 2015
dfa0f22
Fix for cctv font error.
Jul 19, 2015
21812de
Fix for cctv font error. *Fix
Jul 19, 2015
e018ae7
Reduced max view distance to 3600m.
Aug 2, 2015
4295fbc
Reduced attack heli ammo a bit.
Aug 2, 2015
9e0a618
HUD flicker fix.
Aug 2, 2015
62d6d8f
Fixed Sell button error in general store when no item is selected.
Aug 2, 2015
e95dd5a
v1.2 release.
Aug 2, 2015
2e76b58
Reduced attack heli ammo a bit. *Fix
Aug 2, 2015
887cfaf
Hellcat fix
mooneymoon Oct 9, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.gitignore
.idea
ArmA3_Wasteland.Altis.iml
163 changes: 163 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
###Contributing to this A3Wasteland fork###
This fork of A3Wasteland is an open source project and we love to receive contributions from the community — you! There are many ways to contribute, from writing tutorials or blog posts, improving the documentation, submitting bug reports and feature requests or writing code which can be incorporated into A3Wasteland itself.

####Why does this fork exist####
This fork exists to provide an alternate way of stats persistence that is more scalable than extDB, and iniDB, and that is easier to maintain and update due to its schemaless nature.

The fork maintains a main branch called *Development_main*, which closely follows the development of the the parent (official) A3Wasteland repository. The *Development_main* should not deviate feature-wise from the official A3Wasteland development.

The only changes that are allowed to go into the *Development_main* branch are those that are persistence related.

The fork also maintains a branch called *Development_main_addons*. This branch is where we put those features that are not accepted (or not being implemented) into the official A3Wasteland repository (for whatever reasons). Some examples of these features are:

* Private Storage
* Private Parking
* Extra vehicle actions (with locking/unlocking)
* ATMs
* Improved admin camera
* Water-edge glitch improvement
* Mine-saving
* Improved spawn experience


####Bug reports####


If you think you have found a bug in this fork of the A3Wasteland mission, first make sure that you test against [the official A3Wasteland vanilla mission](https://github.com/A3Wasteland/ArmA3_Wasteland.Altis) - If the issue exists over there, then please create the issue over there instead. Unless the issues are related to persistence, or to an addon, it's very likely that the issue exists as well in the vanilla mission.

Also, make sure to search our [issues list](https://github.com/micovery/ArmA3_Wasteland.Altis/issues) on GitHub in case a similar issue has already been opened.

It is very helpful if you can prepare a reproduction of the bug. In other words, provide a small test case (or series of steps) which we can do in order to consistently reproduce the bug. It makes it easier to find the problem and to fix it. Do not simply say "XYZ is not working", please explain how exactly is it not working (what is the expectation vs what is actually happening), and under what circumstances.

Provide as much information as you can. The easier it is for us to recreate your problem, the faster it is likely to be fixed.

####Addons and feature requests####

If you find yourself wishing for an addon or feature that doesn't exist in this fork of A3Wasteland, you are probably not alone. There are bound to be others out there with similar needs. Many of the addons and features in the "Development_main_addons" branch today have been added because admins and/or users saw the the need.
Open an issue on our [issues list](https://github.com/micovery/ArmA3_Wasteland.Altis/issues) on GitHub which describes the feature you would like to see, why you need it, and how it should work.

####Contributing code and documentation changes####

If you have a bugfix or new feature that you would like to contribute to this fork of A3Wasteland, please find or open an issue about it first. Talk about what you would like to do. It may be that somebody is already working on it, or that there are particular issues that you should know about before implementing the change.

We enjoy working with contributors to get their code accepted. There are many approaches to fixing a problem and it is important to find the best approach before writing too much code.

See more details below for the process of contributing code to this fork of A3Wasteland.

#### Fork and clone the repository ####

You will need to fork this repository and clone it to your local machine. See
[github help page](https://help.github.com/articles/fork-a-repo) for help.

**Repository:** [https://github.com/micovery/ArmA3_Wasteland.Altis](https://github.com/micovery/ArmA3_Wasteland.Altisb)

#### Submitting your changes ####

Once your changes and tests are ready to submit for review:

1. Test your changes

Load up the mission with your changes, and make sure that your feature actually works as expected, and that it does not negatively impact other areas.

2. Sign the Contributor License Agreement

Please make sure you have signed our [Contributor License Agreement](https://www.clahub.com/agreements/micovery/ArmA3_Wasteland.Altis). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only need to sign the CLA once.

3. Rebase your changes

Update your local repository with the most recent code from the main A3Wasteland (sock-rpc-stats) repository, and rebase your branch on top of the latest "Development_main" branch. We prefer your changes to be squashed into a single commit.

4. Submit a pull request

Push your local changes to your forked copy of the repository and [submit a pull request](https://help.github.com/articles/using-pull-requests). In the pull request, describe what your changes do and mention the number of the issue where discussion has taken place, eg "Closes #123".

Then sit back and wait. There will probably be discussion about the pull request and, if any changes are needed, we would love to work with you to get your pull request merged into A3Wasteland (sock-rpc-stats).


#### Follow these coding guidelines ####

* SQF indent is 2 spaces (no tabs)
* No unnecessary aligning of code to make it "Look nice". For example

```SQF
_foo = ".............";
_fooBar = ".............";
_fooBarWidgets = ".............";

```

* Use if statements, instead of switch statements. Do not do stuff like this:
```
switch (_foo) : {
case (<some expression>): {

}
case (<some other expression>): {

}
default: {

}
}
```

Instead, use the following format for if/else-if/else

```SQF

if (<some condition>) then {

}
else { if (<some other condition>) then {

}
else {

}};
```


* Avoid unnecessary nesting where possible. This is a subtle one. Sometimes you end with code that looks like this:

```SQF
{
if (<condition a) then {
if (<condition b>) then {
if (<condition c>) then {
//actual logic here
}
}
}
} forEach _someArray;
```

This is unnecessary, and makes the code hard to maintain and understand. Instead do this:

```SQF
{if (true) then {

if (!<condition a>) exitWith {};
if (!<condition b>) exitWith {};
if (!<condition c>) exitWith {};

//actual logic here

}} forEach _someArray;
```

The whole point of this is to try to keep the code as flat as possible, and thus improve readability and maintenance, and reduce chance of subtle bugs.

* Use functions and modularize as much as possible.
* Do not try to cram giant expressions into IF statements (create new functions if needed)
* Use underscore "_" instead of camel-casing for variable names, and function names.
* Always be coding on the defensive, do not assume that all the parameters passed into a function will always be initialized
* Use the utility macros from the macro.h file to help you out with type-checks, and processing of function arguments
* Line width is 140 characters
* Follow the Google [JavaScript style guidelines](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml)
* Do not re-format existing code. If there is legacy code form the A3Wasteland vanilla mission, do not reformat it. Follow the existing style instead.
* Wherever possible avoid making changes to the A3Wasteland vanilla files.
* Always define local variables before using them (use the "def", or "init" macros).
* Do not bulk-up local variable definitions all in one place.
* Try to define the local variable as close to the place where it's first used.
* Familiarize yourself with the "ARGV", and "ARGVX" macros for processing function parameters, and use them.
* Use the "init", and "def" macros instead of the "private" keyword
61 changes: 56 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,68 @@
*Wasteland.Altis* by Team Wasteland!
===================
###Wasteland.Altis (Sock-RPC-Stats fork) ###

ArmA 3 Wasteland is a harsh survival sandbox mission where 2 teams and independent players fight for survival.
This is a fork of the Wasteland mission with persistence support using the [sock-rpc-stats Node.js module](https://www.npmjs.org/package/sock-rpc-stats), and the [sock.dll / sock.so](https://bitbucket.org/micovery/sock.dll) Arma 3 extension.

The main mission itself is maintained by "Team Wasteland".

The mission is not ready yet, so for now it's just a placeholder :)
### PBOs ###

If you are looking for the prebuilt PBO files head over to the [Release Files](https://github.com/micovery/ArmA3_Wasteland.Altis/releases/).

*Team Wasteland* collaborators:
###Demo video tutorial (dedicated server)###


[![Demo Video](http://img.youtube.com/vi/-NIziTcKwok/0.jpg)](http://www.youtube.com/watch?v=-NIziTcKwok)

### Prerequisites ###
* Download and install [Node.js](http://nodejs.org/download/)
* Install Arma 3 dedicated server by following [these instructions](https://community.bistudio.com/wiki/Arma_3_Dedicated_Server) from the BIS Wiki


###Linux Setup Instructions (dedicated server)###

0. Install the stats server packages using npm
<pre>npm install -g sock-rpc-stats</pre>
0. Start the Stats server (example below using file system storage)
<pre>sock-rpc-stats --url=file://./stats --repl</pre>
0. Open a new terminal, and switch to the Arma 3 server directory
<pre>cd ~/steamcmd/arma3</pre>
0. Download and unzip the Wasteland saving pack
<pre>wget https://github.com/micovery/ArmA3_Wasteland.Altis/releases/download/v0.0.1/A3W_Saving_Pack-sock_v0.0.1.zip</pre>
<pre>unzip A3W_Saving_Pack-sock_v0.0.1.zip</pre>
0. Download misison file, and put it in the mpmissions directory
<pre>wget https://github.com/micovery/ArmA3_Wasteland.Altis/releases/download/v0.0.1/ArmA3_Wasteland_v0.9h-sock_v0.0.1.Altis.pbo</pre>
<pre>mv ArmA3_Wasteland_v0.9h-sock_v0.0.1.Altis.pbo mpmissions/</pre>
0. Modify your server config file to reference the Wasteland mission
<pre>
//excerpt from server.cfg
class Missions {
class Test {
template="ArmA3_Wasteland_v0.9h-sock_v0.0.1.Altis";
difficulty="regular";
};
};
</pre>
0. Start the Arma 3 server
<pre>./arma3server -sock_host=127.0.0.1 -sock_port=1337 -profiles=server -config=server/server.cfg -cfg=server/arma3.cfg -port=2302</pre>


###Help###


For defects related to the mission please visit their [forums](http://forums.a3wasteland.com/), or submit issues directly to their [github repository](https://github.com/A3Wasteland/ArmA3_Wasteland.Altis/issues)

For defects related to persistence, use the [issue tracker](https://github.com/micovery/ArmA3_Wasteland.Altis/issues) in this repository.



### *Team Wasteland* ###

GoT - JoSchaap
TPG - AgentRev
- MercyfulFate
KoS - His_Shadow
KoS - Bewilderbeest
404 - Del1te



108 changes: 108 additions & 0 deletions addons/Explosives-To-Vehicle/EtV.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/*
Stealthstick's "Explosive-To-Vehicle" Script
-Allows players to attach their explosive charges to any vehicle.
*/

EtV_ChargeCheck =
{
_charge = _this select 0;
_unit = _this select 1;
_hasIt = _charge in (magazines _unit);
_nearVehs = nearestObjects [_unit,["Plane","Ship","LandVehicle","Helicopter_Base_F"],5];
_return = (_hasIt && count _nearVehs > 0 && alive _unit);
_return
};

EtV_TouchOff =
{
_array = _this select 3;
_unit = _array select 0;
_explosives = _unit getVariable ["charges",[]];
{
if(alive _x) then
{
"HelicopterExploSmall" createVehicle (position _x);
deleteVehicle _x;
};
} forEach _explosives;
_unit setVariable ["charges",[]];
};

EtV_UnitCheck =
{
private "_return";
_unit = _this select 0;
_explosives = _unit getVariable ["charges",[]];
if(count _explosives > 0) then
{
_return = true;
}
else
{
_return = false;
};

_return
};

EtV_AttachCharge =
{
_array = _this select 3;
_charge = _array select 0;
_unit = _array select 1;
private "_class";

_unit removeMagazine _charge;
_unit playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";

switch _charge do
{
case "DemoCharge_Remote_Mag":
{
_class = "DemoCharge_Remote_Ammo";
};
};

_nearVehicle = (nearestObjects [_unit,["Plane","Ship","LandVehicle","Helicopter_Base_F"],5]) select 0;
_explosive = _class createVehicle [0,0,0];
_explosive attachTo [_unit,[0,1,0],"Lefthand"];
_random0 = random 180;
_random1 = random 180;
[_explosive,_random0,_random1] call BIS_fnc_SetPitchBank;
[_explosive,_nearVehicle,_unit,_random0,_random1] spawn
{
_explosive = _this select 0;
_nearVehicle = _this select 1;
_unit = _this select 2;
_random0 = _this select 3;
_random1 = _this select 4;

sleep 1.5;
_explosive attachTo [_nearVehicle];
[_explosive,_random0,_random1] call BIS_fnc_SetPitchBank;
_unit setVariable ["charges",(_unit getVariable ["charges",[]]) + [_explosive]];
};
};

EtV_ClosestExplosive =
{
_unit = _this select 0;
_charges = _unit getVariable ["charges",[]];
_newArray = [];
{_newArray = _newArray + [player distance _x];} forEach _charges;
_closest = _newArray call BIS_fnc_lowestNum;
_selection = _newArray find _closest;
_charge = _charges select _selection;
_charge
};

//[unit] spawn EtV_Actions;
EtV_Actions =
{
private ["_unit"];
_unit = _this select 0;
_unit addAction ["<t color=""#FFE496"">" +"Attach Explosive Charge", EtV_AttachCharge, ["DemoCharge_Remote_Mag",_unit], 1, true, true, "","['DemoCharge_Remote_Mag',_target] call EtV_ChargeCheck"];
_unit addAction ["<t color=""#FFE496"">" +"Touch off bomb(s)", EtV_TouchOff, [_unit], 1, true, true, "","[_target] call EtV_UnitCheck"];
};
//=======================
EtVInitialized = true;
4 changes: 4 additions & 0 deletions addons/Explosives-To-Vehicle/init.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
waitUntil {time > 0};
execVM "addons\Explosives-To-Vehicle\EtV.sqf";
waitUntil {!isNil "EtVInitialized"};
[player] call EtV_Actions;
Loading