Merge pull request #420 from EpochModTeam/experimental

Release 0.3.5
This commit is contained in:
vbawol 2015-11-23 12:10:08 -06:00
commit 662c4e36d4
313 changed files with 5415 additions and 2733 deletions

29
CREDITS.txt Normal file
View File

@ -0,0 +1,29 @@
=== Epoch Mod Credits ===
The entire Epoch Mod Team wants to thank all those that have helped along the way!
== Contributors ==
Poul Andersen - Poulmba - Wiki Editor - https://www.youtube.com/user/poulmba
Tobias Solem - - Tester / Server Host - http://whatthepoch.com/
More TBA
== Top Donators to EpochMod.com ==
GTXGAMING
SurvivalServers.com
dean4310
Robio
rhinoCRUNCH
B3nzi
Madman2077
Axle
orangesherbet
== Active GSP Supporters ==
GTXGaming - Dedicated Server - http://www.gtxgaming.co.uk
Survival Servers - Dedicated Server - https://www.survivalservers.com
Vilayer - Dedicated Server - https://www.vilayer.com
Nitrado - Dedicated Server - https://server.nitrado.net
Vert Hosting - Shared Arma 2 and 3 servers - https://verthosting.com
== Past GSP Supporters ==
Gportal - Dedicated Server - https://www.g-portal.com
Arctic Servers - Shared Arma 3 server - http://arcticservers.co.uk

34
Changelogs/0.3.5.0.txt Normal file
View File

@ -0,0 +1,34 @@
**Client**
[Added] Metal Floors as upgrade in-place option for wood floors.
[Added] Gender selection screen improvements.
[Added] New interaction system.
[Added] Persistent wood and metal spike traps.
[Added] New custom 3x wide hesco type barrier.
[Added] New custom tank trap.
[Added] Updated version of the Fishing Rod. Reel was to small.
[Changed] Made wood ramp shorter by about 30% and slightly reduced height of wood towers and stairs.
[Changed] Refine ghost preview base building snap checks.
[Changed] Players now start with a Quartz radio by default.
[Changed] Overhaul of secure storage system to make it faster.
[Fixed] Selection ring now correctly shows damage/decay level of target when build mode is disabled.
[Fixed] Was unable to use cursorTarget underwater, fixed using new custom made function.
[Fixed] NPC item trades that cannot fit in the players inventory will be placed at the feet of the player.
[Fixed] Not loosing Stamina while swimming.
[Fixed] Removed extra roadway on top of columns.
[Fixed] Error Zero divisor in client side master loop.
[Fixed] .rpt error after gutting animal.
**Server**
[Added] Documentation on server core framework functions and hive calls.
[Added] muzzle_snds_338_sand to loot and pricing tables.
[Added] Client side master loop is now fully config (CfgMasterLoop) based.
[Added] Ability to fully change default player loadouts via CfgEpochServer configs:
(defaultGoggles, defaultHeadgear, defaultBackpack, defaultVestFemale, defaultVestMale, defaultUniformFemale, defaultUniformMale, itemsInContainers, weaponsInContainers, normalMagazines, weaponsAndItems)
[Changed] Increased reverse token check timeout from 90 to 180 seconds.
[Fixed] Dynamic traders did not correctly track the stored vehicle count and limits.
[Fixed] Force trader data save to save when loading starter items.
[Fixed] Added private array to all Epoch Event scripts due to feedback.
[Fixed] Removed forced weather sync on server startup from server init phase so weather changes are now solely dependent on Epoch Events weather script.
[Fixed] EPOCH_fnc_returnConfigEntry and V2 functions did not use defaults properly.
[Info] Server pack Tools folder now contains InstalEpoch.cmd that is an updated version of the command line download Epoch client files download script for steam workshop.
[Info] Removed old .bikey and added new one for 0350.

2
LICENSE.txt Normal file
View File

@ -0,0 +1,2 @@
Arma 3: Epoch Mod is licensed under:
http://creativecommons.org/licenses/by-nc-nd/4.0/

View File

@ -0,0 +1,658 @@
**A3 Epoch Hive Calls**
Full A3 epoch server hive call documentation
**000**
Get and return Instance ID from config
_Input: None_
_Returns: [ARRAY](https://community.bistudio.com/wiki/Array) format: ["NA123"]_
```
"epochserver" callExtension "000";
```
**001**
STEAMAPI - Vac ban check
_Input: [SteamID64](https://community.bistudio.com/wiki/getPlayerUID)_
_Returns: Nothing_
```
"epochserver" callExtension format["001|%1", _uid];
```
**100**
Setter - Temporarily stack, workaround for Arma 8k character limitation. Used in combination with the SET or SETEX calls.
_Uses:  SET_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Call Index ID, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["100|%1:%2|%3|%4", 100, _prefix, _key, _hiveCallID, _value];
```
**101** 
Setter - Temporarily stack, workaround for Arma 8k character limitation. Used in combination with the SET or SETEX calls.
_Uses:  SET_
_Call Type: Asynchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Call Index ID, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["100|%1:%2|%3|%4", 101, _prefix, _key, _hiveCallID, _value];
```
**110** 
Store value in database with the specified key
_Uses:  SET_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Call Index ID, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["110|%1:%2|%3|%4", _prefix, _key, _hiveCallID, _value];
```
**111**
Store value in database with the specified key
_Uses:  SET_
_Call Type: Asynchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Call Index ID, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["111|%1:%2|%3|%4", _prefix, _key, _hiveCallID, _value];
```
**120**
_Uses:  SETEX_
_Call Type: Asynchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Expires, Call Index ID, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["120|%1:%2|%3|%4|%5", _prefix, _key, _expires, _hiveCallID, _value];
```
**121**
Store value in database with the specified key and expiration.
_Uses:  SETEX_
_Call Type: Asynchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Expires, Call Index ID, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["121|%1:%2|%3|%4|%5", _prefix, _key, _expires, _hiveCallID, _value];
```
**130**
Set a timeout on key. After the timeout has expired, the key will automatically be deleted.
_Uses:  [EXPIRE](http://redis.io/commands/expire)_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Expires_
_Returns: Nothing_
```
"epochserver" callExtension format ["130|%1:%2|%3", _prefix, _key, _expires];
```
**131**
Set a timeout on key. After the timeout has expired, the key will automatically be deleted.
_Uses:  [EXPIRE](http://redis.io/commands/expire)_
_Call Type: Asynchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Expires_
_Returns: Nothing_
```
"epochserver" callExtension format ["130|%1:%2|%3", _prefix, _key, _expires];
```
**140**
Sets or clears the bit at offset in the string value stored at key.
_Uses: [SETBIT](http://redis.io/commands/setbit)_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Bit Index, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["140|%1:%2|%3|%4", _prefix, _key, _bitIndex, _value];
```
**141**
Sets or clears the bit at offset in the string value stored at key.
_Uses: [SETBIT](http://redis.io/commands/setbit)_
_Call Type: Asynchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Bit Index, Value_
_Returns: Nothing_
```
"epochserver" callExtension format["141|%1:%2|%3|%4", _prefix, _key, _bitIndex, _value];
```
**200**
_Uses: GET_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Bit Index, Value_
_Returns: _Array
```
_hiveResponse = "epochserver" callExtension format ["200|%1:%2", _prefix, _key];
```
**210**
_Uses: GET, TLL_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Bit Index, Value_
_Returns: Array_
```
_hiveResponse = "epochserver" callExtension format ["210|%1:%2", _prefix, _key];
```
**220**
_Uses: GETRANGE_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Start Index, Stop Index_
_Returns: Array_
```
_hiveResponse = "epochserver" callExtension format["220|%1:%2|%3|%4", _prefix, _key, _currentIndex, (_currentIndexMax-1)];
```
**230**
_Uses: GETBIT_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro), Bit Index, Value (0-1)_
_Returns: BOOL_
```
_hiveResponse = "epochserver" callExtension format["240|%1:%2|%3", _prefix, _key, _value];
```
**300**
_Uses: [TTL](http://redis.io/commands/ttl)_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro)_
_Returns: TTL in seconds_
```
"epochserver" callExtension format["300|%1:%2", _prefix, _uniqueID];
```
**400**
Removes the specified key.
_Uses: [DEL](http://redis.io/commands/del)_
_Call Type: Synchronous_
_Input: [Key](http://redis.io/topics/data-types-intro)_
_Returns: Nothing_
```
"epochserver" callExtension format["400|%1:%2", _prefix, _uniqueID];
```
**500**
_Uses: [PING](http://redis.io/commands/ping)_
_Call Type: Synchronous_
_Input: Nothing_
_Returns: "PONG"_
```
'epochserver' callExtension '500'
```
**501**
Get current time.
_Call Type: Synchronous_
_Input: Nothing_
_Returns: Array [YYYY,MM,DD,HH,MM,SS]_
```
'epochserver' callExtension '510'
```
**600**
Used to push data from database server in a queue.
_Uses: [LPOP](http://redis.io/commands/lpop) with CMD- prefix_
_Call Type: Synchronous_
_Input: Server InstanceID_
_Returns: Array [1,""]_
```
_response = "epochserver" callExtension format["600|%1",_instanceID];
```
**700**
Log in Redis
_Uses: LPUSH _with -LOG postfix
_Call Type: Synchronous_
_Input: Key Prefix, Message_
_Returns: Nothing_
```
"epochserver" callExtension format["700|%1|%2", _prefix, _message];
```
**701**
Log in Redis
_Uses: LPUSH _with -LOG postfix
_Call Type: Synchronous_
_Input: Key Prefix, Message_
_Returns: Nothing_
```
"epochserver" callExtension format["701|%1|%2", _prefix, _message];
```
**800**
Append strings specified to end of first line of publicvariable.txt and then runs BE command #loadEvents.
_Call Type: Synchronous_
_Input: Strings_
_Returns: Nothing_
```
"epochserver" callExtension format["800|%1|%2|%3|%4", _var1, _var2, _var3, _var4];
```
**801**
Append strings specified to end of first line of publicvariable.txt and then runs BE command #loadEvents.
_Call Type: Asynchronous_
_Input: Strings_
_Returns: Nothing_
```
"epochserver" callExtension format["800|%1|%2|%3|%4", _var1, _var2, _var3, _var4];
```
**810**
Get random string, [a-zA-Z]{5-10}, if only one string is requested it will return a string instead of a array
_Call Type: Synchronous_
_Input: Count_
_Returns: Array or String_
```
_response = 'epochserver' callExtension format['810|%1',_count];
```
**820**
Add ban to bans.txt and execute #loadBans (Depreciated should use 900 calls)
_Call Type: Synchronous_
_Input: Steam64ID, Reason_
_Returns: Nothing_
```
'epochserver' callExtension format['820|%1|%2',getPlayerUID _playerObj,_reason];
```
**821**
Add ban to bans.txt and execute #loadBans (Depreciated should use 900 calls)
_Call Type: Synchronous_
_Input: Steam64ID, Reason_
_Returns: Nothing_
```
epochserver' callExtension format['821|%1|%2',getPlayerUID _playerObj,_reason];
```
**901**
Broadcast message to server
_Call Type: Asynchronous_
_Input: Message_
_Returns: Nothing_
```
'epochserver' callExtension format['901|%1', _message];
```
**911**
Kick with message
_Call Type: Asynchronous_
_Input: player64ID, Message_
_Returns: Nothing_
```
'epochserver' callExtension format['911|%1|%2', _playerUID, _reason];
```
**921**
Ban with message and duration
_Call Type: Asynchronous_
_Input: player64ID, Message, duration_
_Returns: Nothing_
```
'epochserver' callExtension format['921|%1|%2|%3', _playerUID, _message, _duration];
```
**930**
Unlock server using BE command #unlock
_Call Type: Asynchronous_
_Input: Nothing_
_Returns: Nothing_
```
'epochserver' callExtension '930'
```
**931**
Lock server using BE command #lock
_Call Type: Asynchronous_
_Input: Nothing_
_Returns: Nothing_
```
'epochserver' callExtension '931'
```
**991**
Shutdown Server using BE #shutdown command.  
_Call Type: Asynchronous_
_Input: Nothing_
_Returns: Nothing_
```
'epochserver' callExtension '991'
```

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,18 @@
Arma 3: Epoch Mod - EpochMod.com
Arma 3 Epoch Mod
--------------------------
Developers
Aaron Clark - [VB]AWOL - Game Design, Code
Kenneth Bente - Axle - Public Relations
Paul Tomany - Sequisha - Models, Textures
Darren Harrison - Kiory - Models, Textures
Damian Clark - [VB]GREEN - Graphics
Niklas Wagner - Skaronator - Code - http://skaronator.com/
Andrew Gregory - Axeman - AI Code
Florian Kinder - Fank - DLL Code
Denis Erygin - devd - Linux DLL Support
--------------------------
* Aaron Clark - [VB]AWOL - Game Design, Code
* Kenneth Bente - Axle - Public Relations, Models
* Paul Tomany - Sequisha - Models, Textures
* Dan - OrangeSherbet - Tester, Videos, Wiki Editor
* Darren Harrison - Kiory - Models, Textures
* Damian Clark - [VB]GREEN - Graphics
* Niklas Wagner - Skaronator - Code
* Andrew Gregory - Axeman - AI Code
* Florian Kinder - Fank - DLL Code
* Denis Erygin - devd - Linux DLL Support
* Richie - Map Support
* Paden Sturtevant - SteamPunkGears - Models
* Raimonds Virtoss - Raymix - UI and Code

View File

@ -0,0 +1,14 @@
@ECHO OFF
SET STEAMUN=admin@youremail.net
SET STEAMPW=chamgeme
SET ARMASVRPATH=C:\Arma3Server
SET ARMAAPPID=107410
SET ARMAWORKSHOPID=421839251
:: remove mod folder
rd /s/q "%ARMASVRPATH%\@Epoch"
:: update workshop mod
START "" /WAIT steamcmd.exe +login %STEAMUN% %STEAMPW% +workshop_download_item %ARMAAPPID% %ARMAWORKSHOPID% validate +quit
:: copy files back to server
xcopy /s/e/y/q/i "steamapps\workshop\content\%ARMAAPPID%\%ARMAWORKSHOPID%" "%ARMASVRPATH%\@Epoch"
:: steamcmd.exe +login %STEAMUN% %STEAMPW% +force_install_dir "%ARMASVRPATH%" "+app_update %ARMAAPPID%" validate +quit

Binary file not shown.

View File

@ -1 +1 @@
5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !"Foundation_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F"
5 "" !WeaponHolderSimulated !Shot !"(Safe|LockBox|FirePlace|PlotPole|Jack|SolarGen)_EPOCH" !"Jack_SIM_EPOCH" !"LockBox_Ghost_EPOCH" !"CinderWallHalf_Ghost_EPOCH" !"(Tipi|Workbench|StorageShelf|Wood(Floor|LargeWall|Stairs|Ramp|Ladder|Tower)_Ghost_EPOCH" !"(Hesco3|Metal|Foundation)_Ghost_EPOCH" !"Land_Cages_F" !"Epoch_Sapper_F"

View File

@ -1,3 +1,3 @@
5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F" !="#smokesource" !="SmokeLauncherAmmo"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="(Spike|Metal)_TRAP_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 SeaGull

View File

@ -1,4 +1,6 @@
//new2
7 EPOCH_C_SET !="!isNil \"EPOCH_C_SET\"" !="_array = EPOCH_C_SET;" !="EPOCH_C_SET = nil;"
7 EPOCH_GROUP_Delete_PVS !="EPOCH_GROUP_Delete_PVS = [player,Epoch_personalToken];"
7 "BIS_fnc_dynamictext" !="\"BIS_fnc_dynamictext"\" !", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;" !", 0, 0.4, 5, 2, 0, 2] spawn bis_fnc_dynamictext;" !", 0, 1, 6, 2, 0, 1] spawn bis_fnc_dynamictext;" !"snil '_fnc_scriptName') then {_fnc_scriptName}"
7 forceRespawn
7 setFriend
@ -24,6 +26,8 @@
7 addMagazineCargo !"_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]" !="_acceptHolder addMagazineCargo [_wAmmo, 1] ;"
7 addItem !="player addItem _item;" !="player addItem _craftItem;" !="player addItem _x;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow"
7 addBackPack
7 addMissionEventHandler !="addMissionEventHandler ['Draw3D',_var + \"call Epoch_gui3DCooldownEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dModelPosEH;\"];" !="addMissionEventHandler ['Draw3D',_var + \"call epoch_gui3dWorldPosEH;\"];" !="addMissionEventHandler [\n"ended",\n{\n\nBIS_fnc_missionHandlers_end = _this;"
7 removeMissionEventHandler !="removeMissionEventHandler [\"Draw3D\", _id];"
7 removeAllWeapons !="removeAllWeapons axeGeneral;"
7 removeAllItems
7 removeAllActions
@ -34,7 +38,7 @@
7 createUnit !="_unit = _grp createUnit[(_arrUnits select _i), _pos, [], 0, \"FORM\"];" !="_driver = _grp createUnit[\"I_UAV_AI\", position _unit, [], 0, \"CAN_COLLIDE\"];" !="axeGeneral = grpVIPGeneral createUnit ["I_officer_F", axeGeneralPos, [], 1, "CAN_COLLIDE"];"
7 createAgent !="_unit = createAgent[_unitClass, _targetPos, [], 256, \"FORM\"];" !="_unit = createAgent [_unitClass, _targetPos, [], 120, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 5, \"NONE\"];" !="_unit = createAgent [\"Epoch_Cloak_F\", _pos, [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent [\"Epoch_Sapper_F\", _targetPos, [], 180, \"FORM\"];" !="_sapper = createAgent ["Epoch_Sapper_F", getPos _cage2, [], 0, "FORM"];"
7 createTeam
7 createDialog !="createDialog \"rmx_craftingUI\";" !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';"
7 createDialog !="createDialog \"rmx_dynamenu\";" !="createDialog \"rmx_craftingUI\";" !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';"
7 createDisplay !="createDisplay \"rmx_dynamenu\";" !="_parent createdisplay _displayClass;"
7 deleteMarker
7 setMarker
@ -45,7 +49,7 @@
7 setDamage !="player setdamage 1;"
7 setDammage
7 displaySetEventHandler
7 ctrlSetEventHandler !"BIS_fnc_guiMessage_status" !"ctrlSetEventHandler ['LBDblClick', '_this call" !="_buttonRespawn ctrlseteventhandler [\"buttonclick\",\"with uinamespace do {['buttonRespawn',"
7 ctrlSetEventHandler !"BIS_fnc_guiMessage_status" !"ctrlSetEventHandler ['LBDblClick', '_this call" !="_buttonRespawn ctrlseteventhandler [\"buttonclick\",\"with uinamespace do {['buttonRespawn'," !="_ctrl ctrlSetEventHandler [\"mouseEnter\""
7 addMPEventHandler
7 addEventHandler !"displayAddEventHandler" !"ctrlAddEventHandler" !"FiredNear" !"EpeContactStart" !"InventoryClosed" !"GetOut" !"InventoryOpened" !"local" !"Respawn" !"Put" !"Take" !"Fired" !"Killed" !" [\"PostReset\",{BIS_EnginePPReset = true;} ];" !"_logic addeventhandler [\n\"local\""
7 displayAddEventHandler !"[_display] call _fnc_animate;" !"tVersion select 4) == \"Development\") then" !"_display displayaddeventhandler\n[\n\"mousemoving\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"true\"];" !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call EPOCH_KeyDown\"];" !="_addCase = _display46 displayAddEventHandler ['KeyDown',{_this call EPOCH_KeyDown;}];" !"_display displayaddeventhandler [\"unload\",\"uinamespace setvariable ['BIS_fnc_guiMess" !="findDisplay -1337 displayAddEventHandler ['Unload'" !="_display displayaddeventhandler [\"keydown\",\"with uinamespace do {['keyDown'"
@ -57,10 +61,9 @@
7 displayRemoveEventHandler !"BIS_fnc_guiMessage_status"
7 switchCamera !="vehicle player switchCamera"
7 remoteControl !"fn_moduleRemoteControl.sqf" !="\"BIS_fnc_moduleRemoteControl"\"
7 drawIcon3D !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !"EPOCH_drawIcon3dStability" !"EPOCH_drawIcon3d" !"if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\""
7 drawIcon3D !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !"EPOCH_drawIcon3dStability" !"EPOCH_drawIcon3d" !"if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\"" !="drawIcon3D[\"x\addons\a3_epoch_code\Data\UI\snap_ca.paa\""
7 drawLine3D !"{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari"
7 ctrlCreate !="_ctrl = _display ctrlCreate [\"RscProgress\",_idc + 1];" !="_display ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="_ctrl = _display ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];" !="_ctrlGrp = _display ctrlCreate [\"RscControlsGroupNoScrollbars\",call epoch_getIDC];"
7 ctrlDelete !="ctrlDelete _ListGroup;" !="ctrlDelete (rmx_var_crafting_ctrl_GROUP select 0);" !="ctrlDelete _mainGrp;" !="_x call epoch_getIDC;\nctrlDelete _x;"
7 ctrlCreate !="ctrlCreate [\"RscProgress\",_idc + 1];" !="ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];" !="ctrlCreate [\"RscControlsGroupNoScrollbars\",call epoch_getIDC];" !="ctrlCreate [\"rmx_rscPicture\",(66600 + _e)];" !="ctrlCreate ["RscStructuredText",call epoch_getIDC];"
7 ctrlClassName
7 ctrlModel
7 ctrlModelDirection
@ -74,5 +77,3 @@
7 setGroupIconsSelectable
7 setGroupIconParams
7 addGroupIcon
7 EPOCH_defaultVars_SEPXVar
7 EPOCH_GROUP_Delete_PVS !="EPOCH_GROUP_Delete_PVS = [player,Epoch_personalToken];"

View File

@ -1 +1 @@
5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
5 "" !="Epoch_(Male|Female)_F" !="SapperHead_SIM_EPOCH" !="(Tipi|Workbench|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|LockBox|CinderWallHalf|CinderWall|Fireplace|SolarGen|TankTrap)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp)_SIM_EPOCH" !="(Foundation|Wood(Foundation|Ladder|Tower))_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodFoundation_EPOCH" !="(Hesco3|Metal)(_Ghost|_SIM|)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
/*%FSM<COMPILE "X:\ArmA\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, animals">*/
/*%FSM<COMPILE "F:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, animals">*/
/*%FSM<HEAD>*/
/*
item0[] = {"init",0,250,375.000000,-225.000000,475.000000,-175.000000,0.000000,"init"};
@ -22,37 +22,41 @@ item17[] = {"Not_Too_Far",4,218,250.000000,325.000000,350.000000,375.000000,0.00
item18[] = {"Process_1",2,250,575.000000,250.000000,675.000000,300.000000,0.000000,"Process"};
item19[] = {"Fight",4,218,625.000000,325.000000,725.000000,375.000000,0.000000,"Fight"};
item20[] = {"Flight",4,218,500.000000,325.000000,600.000000,375.000000,0.000000,"Flight"};
item21[] = {"Fight",2,4346,625.000000,425.000000,725.000000,475.000000,0.000000,"Fight"};
item21[] = {"Fight",2,250,625.000000,425.000000,725.000000,475.000000,0.000000,"Fight"};
item22[] = {"Delete_1",1,250,675.000000,-25.000000,775.000000,25.000000,0.000000,"Delete"};
item23[] = {"Too_many",4,218,525.000000,-25.000000,625.000000,25.000000,0.000000,"Too many"};
item24[] = {"IsNull",4,4314,525.000000,-125.000000,625.000000,-75.000000,0.000000,"IsNull"};
item25[] = {"Exit_",1,250,675.000000,-125.000000,775.000000,-75.000000,0.000000,"" \n "Exit" \n ""};
link0[] = {0,1};
link1[] = {1,2};
link2[] = {2,6};
link3[] = {2,23};
link4[] = {3,15};
link5[] = {4,18};
link6[] = {5,14};
link7[] = {6,9};
link8[] = {7,8};
link9[] = {8,2};
link10[] = {9,3};
link11[] = {9,4};
link12[] = {9,11};
link13[] = {10,7};
link14[] = {11,12};
link15[] = {13,10};
link16[] = {15,5};
link17[] = {15,17};
link18[] = {16,10};
link19[] = {17,16};
link20[] = {18,19};
link21[] = {18,20};
link22[] = {19,21};
link23[] = {20,13};
link24[] = {21,10};
link25[] = {23,22};
globals[] = {25.000000,1,0,0,0,640,480,1,60,6316128,1,65.053413,836.813538,684.337891,-110.918762,853,911,1};
window[] = {2,-1,-1,-1,-1,753,25,1063,25,3,871};
link4[] = {2,24};
link5[] = {3,15};
link6[] = {4,18};
link7[] = {5,14};
link8[] = {6,9};
link9[] = {7,8};
link10[] = {8,2};
link11[] = {9,3};
link12[] = {9,4};
link13[] = {9,11};
link14[] = {10,7};
link15[] = {11,12};
link16[] = {13,10};
link17[] = {15,5};
link18[] = {15,17};
link19[] = {16,10};
link20[] = {17,16};
link21[] = {18,19};
link22[] = {18,20};
link23[] = {19,21};
link24[] = {20,13};
link25[] = {21,10};
link26[] = {23,22};
link27[] = {24,25};
globals[] = {25.000000,1,0,0,0,640,480,1,62,6316128,1,65.053413,836.813538,420.713287,-149.285370,853,630,1};
window[] = {2,-1,-1,-1,-1,884,156,1194,156,3,871};
*//*%FSM</HEAD>*/
class FSM
{
@ -115,6 +119,16 @@ class FSM
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "IsNull">*/
class IsNull
{
priority = 0.000000;
to="Exit_";
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
condition=/*%FSM<CONDITION""">*/"isNull _animalAgent"/*%FSM</CONDITION""">*/;
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
};
/*%FSM</LINK>*/
/*%FSM<LINK "Loop">*/
class Loop
{
@ -396,13 +410,25 @@ class FSM
};
};
/*%FSM</STATE>*/
/*%FSM<STATE "Exit_">*/
class Exit_
{
name = "Exit_";
init = /*%FSM<STATEINIT""">*/""/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
class Links
{
};
};
/*%FSM</STATE>*/
};
initState="init";
finalStates[] =
{
"Dead" ,
"Delete" ,
"Delete_1"
"Dead",
"Delete",
"Delete_1",
"Exit_",
};
};
/*%FSM</COMPILE>*/

View File

@ -296,7 +296,7 @@ class FSM
"" \n
"_arrGarr = [];" \n
"_garrCount = 0;" \n
"while {format [""%1"", _nrBuild buildingPos (_garrCount)] != ""[0,0,0]"" } do {" \n
"while {!((_nrBuild buildingPos _garrCount) isEqualTo [0,0,0])} do {" \n
"_arrGarr pushBack _garrCount;" \n
"_garrCount = _garrCount + 1;" \n
"};"/*%FSM</STATEINIT""">*/;
@ -372,7 +372,7 @@ class FSM
"" \n
"_arrGarr = [];" \n
"_garrCount = 0;" \n
"while {format [""%1"", _nrBuild buildingPos (_garrCount)] != ""[0,0,0]"" } do {" \n
"while {!((_nrBuild buildingPos _garrCount) isEqualTo [0,0,0])} do {" \n
"_arrGarr pushBack _garrCount;" \n
"_garrCount = _garrCount + 1;" \n
"};" \n

View File

@ -1136,7 +1136,7 @@ class FSM
"" \n
"_nestFind = _nestFind + 1;" \n
"_garrisonPos = getPos _nrBuild;" \n
"while {format [""%1"", _nrBuild buildingPos (_garrCount)] != ""[0,0,0]"" } do {" \n
"while {!((_nrBuild buildingPos _garrCount) isEqualTo [0,0,0])} do {" \n
"_arrGarr pushBack _garrCount;" \n
"_garrCount = _garrCount + 1;" \n
"};" \n

View File

@ -250,7 +250,7 @@ class FSM
"player addEventHandler [""Put"", {(_this select 1) call EPOCH_interact;_this call EPOCH_PutHandler}];" \n
"player addEventHandler [""Take"", {(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck}];" \n
"player addEventHandler [""InventoryClosed"", {if !(EPOCH_arr_interactedObjs isEqualTo[]) then {EPOCH_arr_interactedObjs remoteExec[""EPOCH_server_save_vehicles"", 2]; EPOCH_arr_interactedObjs = [];};}];" \n
"player addEventHandler [""InventoryOpened"", {_this spawn EPOCH_initUI; (locked (_this select 1) in [2, 3])}];" \n
"player addEventHandler [""InventoryOpened"", {_this spawn EPOCH_initUI; (locked (_this select 1) in [2, 3] || (_this select 1) getVariable[""EPOCH_Locked"", false])}];" \n
"player addEventHandler [""Fired"", {_this call EPOCH_fnc_playerFired}];" \n
"player addEventHandler [""Killed"", {_this call EPOCH_fnc_playerDeath}];"/*%FSM</STATEINIT""">*/;
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
@ -287,4 +287,4 @@ class FSM
"END"
};
};
/*%FSM</COMPILE>*/
/*%FSM</COMPILE>*/

File diff suppressed because it is too large Load Diff

View File

@ -94,11 +94,8 @@ switch _interactOption do {
if (_buildClass != "") then {
_isStorage = getNumber(configfile >> "CfgMagazines" >> _item >> "isStorage");
_isOk = if (_isStorage == 1) then { EPOCH_StorageSlotsCount > 0 } else { EPOCH_BuildingSlotCount > 0 };
_isOk = if (_isStorage == 1 || _buildClass isKindOf "Secure_Storage_Temp") then { EPOCH_StorageSlotsCount > 0 } else { EPOCH_BuildingSlotCount > 0 };
if (_buildClass isKindOf "Secure_Storage_Temp") then {
_isOk = (EPOCH_StorageSlotsCount > 0 && EPOCH_BuildingSlotCount > 0);
};
if (isNil "EPOCH_simulSwap_Lock") then {
if !(isNil "_isOk") then {
if (_isOk) then {

View File

@ -1,4 +1,3 @@
if (EPOCH_velTransform) then {
if (EPOCH_playerEnergy > 0) then {
_pos1 = getPosASL EPOCH_target;
@ -23,7 +22,6 @@ if (EPOCH_velTransform) then {
EPOCH_velTransform = false;
};
};
if (!isNull EPOCH_currentTarget && vehicle player == player) then {
_currentTarget = EPOCH_currentTarget;
@ -32,20 +30,27 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
_stability = 0;
_color = [1, 1, 1, 0.7];
_text = "";
_text = format ["Hold (%1)",EPOCH_keysAction call BIS_fnc_keyCode];
_icon = "\x\addons\a3_epoch_code\Data\UI\ui_question_ca.paa";
_interactOption = getNumber(configFile >> "cfgVehicles" >> typeOf _currentTarget >> "interactMode");
switch _interactOption do {
case 0: {
_text = "Press (Inventory)";
_stability = 100 - round(damage _currentTarget) * 10;
_stability = 100 - round(damage _currentTarget * 100);
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
_text = "Press (Inventory)";
if (_stability < 50) then {
_color = [1, 0.5, 0, 0.7];
if (_stability < 25) then {
_color = [1, 0, 0, 0.7];
};
};
};
case 1: {
_text = if (EPOCH_buildMode > 0) then[{"Press (Space)"}, { "Enable Build - Press (1)" }];
_stability = _currentTarget getVariable["stability", 100];
_text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode] }];
_stability = if (EPOCH_buildMode > 0) then[{_currentTarget getVariable["stability", 100]}, {100 - round(damage _currentTarget * 100)}];
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
if (_stability < 50) then {
@ -57,8 +62,8 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
};
case 2: {
if (alive _currentTarget) then{
_text = format["%1 - Press (Ctrl+T)", if (isStreamFriendlyUIEnabled) then[{"Player"}, { name _currentTarget }]];
_stability = 100 - round(damage _currentTarget) * 10;
_text = format["%1 - Press (Ctrl+%2)", if (isStreamFriendlyUIEnabled) then[{"Player"}, { name _currentTarget }],EPOCH_keysAcceptTrade call BIS_fnc_keyCode];
_stability = 100 - round(damage _currentTarget * 100);
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
if (_stability < 50) then{
@ -69,19 +74,20 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
};
} else {
_text = "Press (Inventory)";
//_text = "Press (Inventory)";
_icon = "\x\addons\a3_epoch_code\Data\UI\ui_crossbones_ca.paa";
};
};
case 3: {
if (!alive _currentTarget && _distance < 2) then{
_text = "Gut Animal - Press (Inventory)";
_text = format ["Gut Animal - %1",_text];
_icon = "\x\addons\a3_epoch_code\Data\UI\ui_crossbones_ca.paa";
};
};
case 4: {
_text = if (EPOCH_buildMode > 0) then[{"Press (Space)"}, { "Press (Inventory)" }];
_stability = _currentTarget getVariable["stability", 100];
//_text = if (EPOCH_buildMode > 0) then[{"Press (Space)"}, { "Press (Inventory)" }];
_text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1) or (Inventory)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode] }];
_stability = if (EPOCH_buildMode > 0) then[{_currentTarget getVariable["stability", 100]}, {100 - round(damage _currentTarget * 100)}];
_icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa";
if (_stability < 50) then{
@ -94,7 +100,7 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
};
if (!isNull EPOCH_stabilityTarget) then {
if (cursorTarget != EPOCH_stabilityTarget) then {
if (([10] call EPOCH_fnc_cursorTarget) != EPOCH_stabilityTarget) then {
EPOCH_stabilityTarget = objNull;
}
else {
@ -120,7 +126,7 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then {
_pos = visiblePositionASL _currentTarget;
_pos set[2, (_currentTarget modelToWorld[0, 0, 0]) select 2];
_size = 3;
_size = 2.5;
drawIcon3D[format[_icon, _stability], _color, _pos, _size, _size, 0, _text, 0, _size / 60, "PuristaMedium"];
};
}
@ -128,6 +134,7 @@ else {
EPOCH_stabilityTarget = objNull;
};
if (EPOCH_drawIcon3d) then {
{
if (!isPlayer _x) then {
@ -146,6 +153,17 @@ if (EPOCH_drawIcon3d) then {
};
}forEach EPOCH_arr_countdown;
};
{
_distance = player distance _x;
if (_distance < 9) then {
_pos = _x;
_color = [1, 1, 1, 0.7];
_size = 1;
drawIcon3D["x\addons\a3_epoch_code\Data\UI\snap_ca.paa", _color, _pos, _size, _size, 0, "", 1, _size / 60, "PuristaMedium"];
};
}forEach EPOCH_arr_snapPoints;
{
if (!isNull _x) then {
_pos = visiblePositionASL _x;

View File

@ -1,35 +0,0 @@
_target = param [0,objNull];
if (!isNull _target) then {
_targetClass = typeOf _target;
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
_recipes = getArray(_config >> _targetClass >> "upgradeBuilding");
if !(_recipes isEqualTo []) then {
createDialog "QuickUpgrade";
{
_upgradeClass = _x select 0;
_upgradeRecipe = _x select 1;
_index = lbAdd[1500, getText(configfile >> "CfgVehicles" >> _upgradeClass >> "DisplayName")];
lbSetData[1500, _index, _upgradeClass];
lbSetValue[1500, _index, _forEachIndex];
_toolTip = "";
{
_recipeClass = _x;
_recipeQty = 1;
if (typeName _recipeClass == "ARRAY") then {
_recipeClass = _x select 0;
_recipeQty = _x select 1;
};
_toolTip = _toolTip + format["%1 x %2, ",_recipeQty,getText(configfile >> "CfgMagazines" >> _recipeClass >> "DisplayName")];
} forEach _upgradeRecipe;
lbSetTooltip [1500, _index, _toolTip];
} foreach _recipes;
};
};

View File

@ -0,0 +1,23 @@
_out = [false, false, false];
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ _out };
if !(isNull EPOCH_Target) exitWith{ _out };
params ["_object"];
if (isNull _object) exitWith{ _out };
if ((player distance _object) > 9) exitWith { _out };
if !(EPOCH_buildMode > 0) exitWith {_out};
if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; _out };
_objType = typeOf _object;
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
_out =
[
!(getArray(_config >> _objType >> "upgradeBuilding") isEqualTo []),
!(getArray(_config >> _objType >> "removeParts") isEqualTo []),
(_object isKindOf "ThingX")
];
_out

View File

@ -39,16 +39,18 @@ if (!isNull _this) then {
EPOCH_arr_countdown = EPOCH_arr_countdown - [_this];
EPOCH_drawIcon3d = !(EPOCH_arr_countdown isEqualTo []);
if (typeOf _this == "Fireplace_SIM_EPOCH") then {
_objClass = typeOf _this;
// Spawn temporary static item insead of saving.
if (getNumber(configfile >> "CfgVehicles" >> _objClass >> "isTemporary") == 1) then {
_worldspace = [getposATL _this, vectordir _this, vectorup _this];
deleteVehicle _this;
_class = getText(configfile >> "CfgVehicles" >> _objClass >> "staticClass");
_newObj = createVehicle["Fireplace_EPOCH", (_worldspace select 0), [], 0, "CAN_COLLIDE"];
_newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
_newObj setposATL(_worldspace select 0);
// proceed to send save to server
} else {
if (_saveCheck) then {
EPOCH_SAVEBUILD = [_this, player, Epoch_personalToken];

View File

@ -1,32 +0,0 @@
private ["_dt","_object","_objType","_dialog","_handled","_config","_upgrade","_remove"];
if !(isNil "EPOCH_simulSwap_Lock") exitWith{ false };
if !(isNull EPOCH_Target) exitWith{ false };
if (EPOCH_playerEnergy <= 0) exitWith{ _dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Need energy</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext; false };
_object = _this;
if (isNull _object) exitWith{ false };
if ((player distance _object) > 9) exitWith { false };
_objType = typeOf _object;
_dialog = "InteractBaseBuilding";
_handled = createdialog _dialog;
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
_upgrade = getArray(_config >> _objType >> "upgradeBuilding");
if (_upgrade isEqualTo[]) then{
ctrlEnable[2400, false];
};
_remove = getArray(_config >> _objType >> "removeParts");
if (_remove isEqualTo[]) then{
ctrlEnable[2401, false];
};
// disable Move option if not SIM
if !(_object isKindOf "ThingX") then{
ctrlEnable[2402, false];
};
true

View File

@ -1,18 +1,37 @@
if !(isNil "EPOCH_maintainLockout") exitWith {_dt = ["<t size=""0.8"" shadow=""0"" color=""#99ffffff"">Already Maintaining a base.</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;};
if (EPOCH_playerCrypto > 0) then {
_config = "CfgEpochClient" call EPOCH_returnConfig;
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Constructions_lockedstatic_F"], _buildingJammerRange];
if (_maintainCount > 0) then {
if (EPOCH_playerCrypto < _maintainCount) then {
_maintainCount = EPOCH_playerCrypto;
if (EPOCH_playerCrypto < _maintainCount) then {
_maintainCount = EPOCH_playerCrypto;
};
_rnd = format ["rmx_var_temp%1%2",floor random 100, ["A","B","C","D","E","F"] select random 5];
[_this modelToWorld [0,0,0.2],20,"x\addons\a3_epoch_code\Data\UI\buttons\timer.paa", "Maintaining",60,_rnd] call epoch_gui3dWorldPos;
EPOCH_maintainLockout = true;
EPOCH_MAINTBUILD = [_this, player, _maintainCount, Epoch_personalToken];
publicVariableServer "EPOCH_MAINTBUILD";
[_rnd,_maintainCount] spawn {
params ["_rnd","_maintainCount"];
uiSleep _maintainCount;
missionNamespace setVariable [_rnd,false];
uiSleep 1;
missionNamespace setVariable [_rnd,nil];
EPOCH_maintainLockout = nil;
};
_dt = [format["<t size=""0.8"" shadow=""0"" color=""#99ffffff"">Cost %1 Krypto to maintain base.</t>", _maintainCount], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
} else {
_dt = ["<t size=""0.8"" shadow=""0"" color=""#99ffffff"">Nothing needs Maintaining</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
EPOCH_MAINTBUILD = [_this, player, _maintainCount, Epoch_personalToken];
publicVariableServer "EPOCH_MAINTBUILD";
_dt = [format["<t size=""0.8"" shadow=""0"" color=""#99ffffff"">Cost %1 Krypto to maintain base.</t>", _maintainCount], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
} else {
_dt = ["<t size=""0.8"" shadow=""0"" color=""#99ffffff"">You need Krypto to maintain a base.</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};

View File

@ -21,6 +21,8 @@ if (_energyCost == 0) then {
_class = getText(configfile >> "cfgVehicles" >> _objType >> "GhostPreview");
_maxHeight = getNumber(configfile >> "cfgVehicles" >> _objType >> "maxHeight");
_simulClass = getText(configFile >> "CfgVehicles" >> _objType >> "simulClass");
_snapChecks = getArray(configFile >> "CfgSnapChecks" >> _objType >> "nails");
diag_log format["DEBUG: _snapChecks %1",_snapChecks];
_maxSnapDistance = 1;
_lastCheckTime = diag_tickTime;
_stabilityCheck = false;
@ -71,6 +73,7 @@ if (_class != "") then {
_isSnap = false;
_EPOCH_1 = diag_tickTime;
_EPOCH_2 = diag_tickTime;
_nearestObjects = [];
while {EPOCH_target == _currentTarget} do {
@ -109,6 +112,13 @@ if (_class != "") then {
EPOCH_target attachTo[player];
};
if (EPOCH_space) then {
_dir2 = [vectorDir player, EPOCH_buildDirection] call EPOCH_returnVector;
_up2 = (vectorUp player);
EPOCH_space = false;
EPOCH_target setVectorDirAndUp [_dir2,_up2];
};
{
_nearestObject = _x;
if !(isNull EP_snap) then {
@ -129,6 +139,7 @@ if (_class != "") then {
_baselineSnapPos = _nearestObject modelToWorldVisual [0,0,0];
if (EPOCH_buildMode == 1) then {
{
if (_x in _allowedSnapPoints) then {
_pOffset = _nearestObject selectionPosition _x;
@ -231,10 +242,31 @@ if (_class != "") then {
_currentTarget setVectorDirAndUp[_dir2, (vectorUp _nearestObject)];
_currentTarget setposATL _snapPosition;
if ((diag_tickTime - _EPOCH_2) > 2) then {
_EPOCH_2 = diag_tickTime;
_arr_snapPoints = [];
EPOCH_arr_snapPoints = [];
{
_pos1_snap = _currentTarget modelToWorldVisual (_x select 0);
_pos2_snap = _currentTarget modelToWorldVisual (_x select 1);
_ins = lineIntersectsSurfaces [AGLToASL _pos1_snap, AGLToASL _pos2_snap,player,_currentTarget,true,1,"VIEW","FIRE"];
if (count _ins > 0) then {
if (surfaceIsWater _snapPosition) then {
_arr_snapPoints pushBack (_ins select 0 select 0);
} else {
_arr_snapPoints pushBack ASLToATL(_ins select 0 select 0);
};
};
if (count _arr_snapPoints >= 2) exitWith { EPOCH_arr_snapPoints = _arr_snapPoints; }
} forEach _snapChecks;
};
};
} else {
EPOCH_arr_snapPoints = [];
if !(attachedObjects player isEqualTo[]) then {
_offSet = [EPOCH_X_OFFSET, EPOCH_Y_OFFSET, EPOCH_Z_OFFSET];
_pos1 = player modelToWorldVisual _offSet;
@ -252,12 +284,16 @@ if (_class != "") then {
if ((diag_tickTime - _EPOCH_1) > 1) then {
_EPOCH_1 = diag_tickTime;
_nearestObjects = nearestObjects[EPOCH_target, _allowedSnapObjects, 12];
EPOCH_playerEnergy = (EPOCH_playerEnergy - _energyCost) max 0;
if !(isNull EPOCH_target) then {
_nearestObjects = nearestObjects[EPOCH_target, _allowedSnapObjects, 12];
EPOCH_playerEnergy = (EPOCH_playerEnergy - _energyCost) max 0;
};
};
};
EPOCH_arr_snapPoints = [];
{
detach _x;
} forEach attachedObjects player;
@ -282,37 +318,28 @@ if (_class != "") then {
_offsetZPos = [_currentPos select 0, _currentPos select 1, (_currentPos select 2) - 0.5];
if !(terrainIntersect[_currentPos, _offsetZPos]) then {
// check below for static object
if (lineintersectsobjs[ATLtoASL _currentPos, ATLtoASL _offsetZPos, _currentTarget, objNull, false, 2] isEqualTo[]) then {
_numberOfContacts = 0;
{
_pos1_snap = _currentTarget modelToWorldVisual (_x select 0);
_pos2_snap = _currentTarget modelToWorldVisual (_x select 1);
_ins = lineIntersectsSurfaces [AGLToASL _pos1_snap, AGLToASL _pos2_snap,player,_currentTarget,true,1,"VIEW","FIRE"];
if (count _ins > 0) then {
_numberOfContacts = _numberOfContacts + 1;
};
if (_numberOfContacts >= 2) exitWith {}
} forEach _snapChecks;
_currentDir = getDir _currentTarget;
_objSize = sizeOf _objType / 3.5;
_numberOfContacts = 0;
{
// check all four sides (must have two or more)
if !(lineintersectsobjs[ATLtoASL _currentPos, ATLtoASL([_currentTarget, _objSize, _currentDir + _x] call BIS_fnc_relPos), _currentTarget, objNull, false, 2] isEqualTo[]) then {
_numberOfContacts = _numberOfContacts + 1;
};
} forEach[0, 90, 180, 270];
if (_numberOfContacts < 2) then {
// TODO: foundations need to be handled
// change to sim
_worldspace = [getposATL _currentTarget, vectordir _currentTarget, vectorup _currentTarget];
deleteVehicle _currentTarget;
_currentTarget = createVehicle[_simulClass, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
_currentTarget setposATL(_worldspace select 0);
};
if (_numberOfContacts < 2) then {
// TODO: foundations need to be handled
// change to sim
_worldspace = [getposATL _currentTarget, vectordir _currentTarget, vectorup _currentTarget];
deleteVehicle _currentTarget;
_currentTarget = createVehicle[_simulClass, (_worldspace select 0), [], 0, "CAN_COLLIDE"];
_currentTarget setVectorDirAndUp[_worldspace select 1, _worldspace select 2];
_currentTarget setposATL(_worldspace select 0);
};
};
};
_currentTarget spawn EPOCH_countdown;
};
};

View File

@ -1,5 +1,8 @@
if (isNull _this) exitWith{ false };
_return = false;
_object = param [0,objNull,[objNull]];
_index = param [1,-1,[0]]; //EPOCH_UpgradeIndex
if !(_index isEqualTo -1) then {Epoch_upgradeIndex = _index};
if (isNull _object) exitWith {false};
_buildingAllowed = true;
_ownedJammerExists = false;
@ -14,19 +17,7 @@ if (_buildingCountLimit == 0) then { _buildingCountLimit = 200; };
EPOCH_buildOption = 1;
_object = _this;
// get index from UI
_index = lbCurSel 1500;
if (isNil "EPOCH_UpgradeIndex") then {
EPOCH_UpgradeIndex = 0;
};
if (_index != -1) then {
// close UI
closeDialog 0;
EPOCH_UpgradeIndex = _index;
};
// check if another player has target
_targeter = _object getVariable["last_targeter", objNull];
@ -41,10 +32,6 @@ if (_stability > 0) exitWith{
};
};
_jammer = nearestObjects[player, ["PlotPole_EPOCH"], _buildingJammerRange];
if !(_jammer isEqualTo[]) then {
@ -66,16 +53,16 @@ if !(_jammer isEqualTo[]) then {
};
if !(_buildingAllowed)exitWith{ false };
if (_this isKindOf "Constructions_static_F") then {
if (_object isKindOf "Constructions_static_F") then {
// take upgrade item from player here
_config = 'CfgBaseBuilding' call EPOCH_returnConfig;
_upgrades = getArray(_config >> (typeOf _this) >> "upgradeBuilding");
_upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding");
if !(_upgrades isEqualTo []) then {
// get selected upgrade
_upgrade = _upgrades param [EPOCH_UpgradeIndex,[]];
_upgrade = _upgrades param [Epoch_upgradeIndex,[]];
_upgradeParts = _upgrade select 1;
@ -112,8 +99,9 @@ if (_this isKindOf "Constructions_static_F") then {
if (_canUpgradePartCount == _removedPartCount) then {
// send to server for upgrade
EPOCH_UPBUILD = [_this,player,EPOCH_UpgradeIndex,Epoch_personalToken];
EPOCH_UPBUILD = [_object,player,Epoch_upgradeIndex,Epoch_personalToken];
publicVariableServer "EPOCH_UPBUILD";
Epoch_upgradeIndex = nil;
_return = true;
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Upgraded</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};

View File

@ -1,137 +0,0 @@
EPOCH_buildClasses = ["Land_Obstacle_Bridge_F",
"Land_Shoot_House_Wall_F",
"Land_Shoot_House_Wall_Stand_F",
"Land_Shoot_House_Wall_Crouch_F",
"Land_Shoot_House_Wall_Prone_F",
"Land_Shoot_House_Wall_Long_F",
"Land_Shoot_House_Wall_Long_Stand_F",
"Land_Shoot_House_Wall_Long_Crouch_F",
"Land_Shoot_House_Wall_Long_Prone_F",
"Land_Shoot_House_Corner_F",
"Land_Shoot_House_Corner_Stand_F",
"Land_Shoot_House_Corner_Crouch_F",
"Land_Shoot_House_Corner_Prone_F",
"Land_Shoot_House_Panels_F",
"Land_Shoot_House_Panels_Crouch_F",
"Land_Shoot_House_Panels_Prone_F",
"Land_Shoot_House_Panels_Vault_F",
"Land_Shoot_House_Panels_Window_F",
"Land_Shoot_House_Panels_Windows_F",
"Land_Shoot_House_Tunnel_F",
"Land_Shoot_House_Tunnel_Stand_F",
"Land_Shoot_House_Tunnel_Crouch_F",
"Land_Shoot_House_Tunnel_Prone_F",
"Land_Obstacle_RunAround_F","Land_Obstacle_Saddle_F","Land_RampConcrete_F","Land_RampConcreteHigh_F","Land_GH_Stairs_F","Land_Billboard_F","Land_HBarrier_1_F","Land_HBarrier_3_F","Land_HBarrier_5_F","Land_Razorwire_F","Land_HBarrierWall6_F","WoodFloor_EPOCH","WoodLargeWall_EPOCH","Land_BagFence_Long_F","Land_BagFence_Corner_F","Land_BagFence_End_F","Land_BagFence_Round_F","Land_BagFence_Short_F"];
EPOCH_buildClassesCount = count EPOCH_buildClasses - 1;
Epoch_selectedBuildClasIndex = 0;
EPOCH_selectedBuildClass = EPOCH_buildClasses select 0;
EPOCH_buildWorldspace = [[0,0,0],[0,0,0],[0,0,0]];
EPOCH_KeyDownFunctionhandler = {
_dikCode = _this select 1;
_shift = _this select 2;
_ctrl = _this select 3;
_alt = _this select 4;
switch (_dikCode) do {
case 0x39 : {
_worldspace = EPOCH_buildWorldspace;
_newObj = EPOCH_selectedBuildClass createVehicle (_worldspace select 0);
_newObj setVectorDirAndUp [_worldspace select 1,_worldspace select 2];
_newObj setposASL (_worldspace select 0);
_handled = true;
};
case 0xC9 : {
Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex + 1) min EPOCH_buildClassesCount) max 0;
EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex;
if !(isNull EPOCH_currentBuildObj) then {
deleteVehicle EPOCH_currentBuildObj;
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
EPOCH_currentBuildObj disableCollisionWith player;
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
};
hint EPOCH_selectedBuildClass;
_handled = true;
};
case 0xD1 : {
Epoch_selectedBuildClasIndex = ((Epoch_selectedBuildClasIndex - 1) min EPOCH_buildClassesCount) max 0;
EPOCH_selectedBuildClass = EPOCH_buildClasses select Epoch_selectedBuildClasIndex;
hint EPOCH_selectedBuildClass;
if !(isNull EPOCH_currentBuildObj) then {
deleteVehicle EPOCH_currentBuildObj;
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
EPOCH_currentBuildObj disableCollisionWith player;
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
};
_handled = true;
};
};
_handled
};
[] spawn {
(findDisplay 46) displayRemoveAllEventHandlers "KeyDown";
(findDisplay 46) displayAddEventHandler["KeyDown",{_this call EPOCH_KeyDownFunctionhandler}];
};
EPOCH_currentBuildObj = EPOCH_selectedBuildClass createVehicle [0,0,0];
EPOCH_currentBuildObj disableCollisionWith player;
EPOCH_currentBuildObj setObjectTextureGlobal [0, "#(rgb,8,8,3)color(0,0,1,1)"];
onEachFrame {
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,10],player,EPOCH_currentBuildObj];
if (count _ins == 0) exitWith {EPOCH_currentBuildObj setPosASL [0,0,0]};
_intersectObj = (_ins select 0 select 2);
if (isNull _intersectObj) then {_intersectObj = player};
EPOCH_currentBuildObj setVectorDirAndUp [vectordir _intersectObj,(_ins select 0 select 1)];
EPOCH_currentBuildObj setPosASL (_ins select 0 select 0);
EPOCH_buildWorldspace = [(_ins select 0 select 0),vectordir _intersectObj,(_ins select 0 select 1)];
_currentPos = (_ins select 0 select 0);
_numberOfContacts = 0;
_currentDir = direction EPOCH_currentBuildObj;
_bbr = boundingBoxReal EPOCH_currentBuildObj;
_p1 = _bbr select 0;
_p2 = _bbr select 1;
_maxWidth = abs ((_p2 select 0) - (_p1 select 0)) / 2;
_maxLength = abs ((_p2 select 1) - (_p1 select 1)) / 2;
_maxHeight = abs ((_p2 select 2) - (_p1 select 2)) / 2;
{
_pos1 = EPOCH_currentBuildObj modelToWorld [0,0,_maxHeight];
_pos2 = EPOCH_currentBuildObj modelToWorld _x;
_ins = lineIntersectsSurfaces [AGLToASL _pos1,AGLToASL _pos2,player,EPOCH_currentBuildObj];
_color = [0,0,1,1];
if (count _ins == 0) then {
_color = [0,0,1,1];
drawIcon3D ["a3\modules_f\data\iconunlock_ca.paa", [1,1,1,1], _pos2, 1, 1, 45, "", 1, 0.05, "TahomaB"];
} else {
_numberOfContacts = _numberOfContacts + 1;
drawIcon3D ["a3\modules_f\data\iconlock_ca.paa", [1,1,1,1], ASLToATL (_ins select 0 select 0), 1, 1, 45, "Snap", 1, 0.05, "TahomaB"];
_color = [1,0,0,1];
};
drawLine3D [
_pos1,
_pos2,
_color
];
} forEach[[_maxWidth,0,_maxHeight], [0,_maxLength,_maxHeight], [-_maxWidth,0,_maxHeight], [0,-_maxLength,_maxHeight], [0,0,-_maxHeight]];
};

View File

@ -11,10 +11,10 @@ if (isClass(_config)) then{
_finalconfig = _config >> (_this select 1);
if (configName(_finalconfig) == (_this select 1)) then{
_varData = switch (typeName _defaultData) do {
case "SCALAR": {getNumber _finalconfig};
case "BOOL": {(getNumber _finalconfig) == 1};
case "ARRAY": {getArray _finalconfig};
case "STRING": {getText _finalconfig};
case "SCALAR": {if (isNumber (_finalconfig)) then { getNumber _finalconfig } else {_defaultData} };
case "BOOL": {if (isText (_finalconfig)) then { (getText _finalconfig) isEqualTo "true" } else {_defaultData} };
case "ARRAY": {if (isArray (_finalconfig)) then { getArray _finalconfig } else {_defaultData} };
case "STRING": {if (isText (_finalconfig)) then { getText _finalconfig } else {_defaultData} };
default {_defaultData};
};
} else {

View File

@ -1,4 +1,9 @@
private ["_warming","_isNearFire","_airTemp","_waterTemp","_playerPosATL"];
if (isNil "EPOCH_CURRENT_WEATHER") then {
EPOCH_CURRENT_WEATHER = 75;
};
_airTemp = EPOCH_CURRENT_WEATHER;
_waterTemp = EPOCH_CURRENT_WEATHER/2;
_warming = true;

View File

@ -0,0 +1,4 @@
params [["_distance",10], ["_lod1", "VIEW"], ["_lod2","FIRE"], ["_sort",true]];
_ins = lineIntersectsSurfaces [AGLToASL positionCameraToWorld [0,0,0],AGLToASL positionCameraToWorld [0,0,_distance],player,objNull,_sort,1,_lod1,_lod2];
if (_ins isEqualTo []) exitWith { objNull };
(_ins select 0 param [3,objNull])

View File

@ -5,28 +5,19 @@ _EPOCH_lastSave = missionNamespace getVariable["EPOCH_lastSave", diag_tickTime];
if ((diag_tickTime - _EPOCH_lastSave) >= _time) then {
missionNamespace setVariable["EPOCH_lastSave", diag_tickTime];
// manually set hitpoints array
EPOCH_playerHitPoints = ((getAllHitPointsDamage player) param [2,[]]);
missionNamespace setVariable ["EPOCH_pushPlayer_PVS",
[ player,
[
missionNamespace getVariable "EPOCH_playerTemp",
missionNamespace getVariable "EPOCH_playerHunger",
missionNamespace getVariable "EPOCH_playerThirst",
missionNamespace getVariable "EPOCH_playerAliveTime",
missionNamespace getVariable "EPOCH_playerEnergy",
missionNamespace getVariable "EPOCH_playerWet",
missionNamespace getVariable "EPOCH_playerSoiled",
missionNamespace getVariable "EPOCH_playerImmunity",
missionNamespace getVariable "EPOCH_playerToxicity",
missionNamespace getVariable "EPOCH_playerStamina",
missionNamespace getVariable "EPOCH_playerCrypto",
((getAllHitPointsDamage player) param [2,[]]),
missionNamespace getVariable "EPOCH_playerBloodP",
missionNamespace getVariable "EPOCH_playerSpawnArray"
],
missionNamespace getVariable "Epoch_personalToken"
]
];
// Get all custom variables
_customVars = [];
_customVarsInit = ["CfgEpochClient", "customVarsDefaults", missionNamespace getVariable["EPOCH_customVarsDefaults", []]] call EPOCH_fnc_returnConfigEntryV2;
{
_customVars pushBack (missionNamespace getVariable format["EPOCH_player%1",_x select 0]);
} forEach _customVarsInit;
// TODO: use remoteExec here
missionNamespace setVariable ["EPOCH_pushPlayer_PVS",[player,_customVars,missionNamespace getVariable "Epoch_personalToken"]];
publicVariableServer "EPOCH_pushPlayer_PVS";
};
missionNamespace setVariable["EPOCH_lastSave", diag_tickTime];
};

View File

@ -1,8 +1,6 @@
private["_dikCode", "_handled"];
_dikCode = _this select 1;
_shift = _this select 2;
_ctrl = _this select 3;
_alt = _this select 4;
params ["_display","_dikCode","_shift","_ctrl","_alt"];
_handled = false;
// Developer Debug
@ -17,14 +15,14 @@ if (_dikCode in [0x02,0x03,0x04,0x58,0x57,0x44,0x43,0x42,0x41,0x40,0x3F,0x3E,0x3
_handled = true;
};
// rasie vol
if (_ctrl && _dikCode == 0x0D) then {
// increase vol
if (_ctrl && _dikCode == EPOCH_keysVolumeUp) then {
EPOCH_soundLevel = (EPOCH_soundLevel + 0.1) min 1;
5 fadeSound EPOCH_soundLevel;
_dt = [format["<t size = '0.8' shadow = '0' color = '#99ffffff'>Internal sound level: %1%2 </t>", EPOCH_soundLevel * 100, "%"], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
};
// lower vol
if (_ctrl && _dikCode == 0x0C) then {
if (_ctrl && _dikCode == EPOCH_keysVolumeDown) then {
EPOCH_soundLevel = (EPOCH_soundLevel - 0.1) max 0.1;
5 fadeSound EPOCH_soundLevel;
_dt = [format["<t size = '0.8' shadow = '0' color = '#99ffffff'>Internal sound level: %1%2 </t>", EPOCH_soundLevel * 100,"%"], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
@ -61,6 +59,22 @@ if (_dikCode == EPOCH_keysDebugMon) then {
_handled = true;
};
//Action Menu
if (_dikCode == EPOCH_keysAction) then {
_handled = true;
if !(EPOCH_keysActionPressed) then {
EPOCH_keysActionPressed = true;
if (cursorTarget isKindOf "AllVehicles") then {
call epoch_dynamicMenu;
} else {
[] spawn {
uiSleep 0.2;
if (EPOCH_keysActionPressed) then {call epoch_dynamicMenu};
};
};
};
};
// Player only code
if (vehicle player == player) then {
@ -151,7 +165,7 @@ if (vehicle player == player) then {
case EPOCH_keysBuildMovR: { EPOCH_X_OFFSET = (EPOCH_X_OFFSET - 0.1) max - 5; _handled = true };
case EPOCH_keysBuildRotL: { EPOCH_buildDirection = (EPOCH_buildDirection + 1) min 360; EPOCH_space = true; _handled = true };
case EPOCH_keysBuildRotR: { EPOCH_buildDirection = (EPOCH_buildDirection - 1) max 0; EPOCH_space = true; _handled = true };
case EPOCH_keysBuildIt: { cursorTarget call EPOCH_fnc_SelectTarget; _handled = true };
//case EPOCH_keysBuildIt: { cursorTarget call EPOCH_fnc_SelectTarget; _handled = true };
};
};
};

View File

@ -1,6 +1,14 @@
_dikCode = _this select 1;
_shift = _this select 2;
_ctrl = _this select 3;
_alt = _this select 4;
private["_dikCode", "_handled"];
params ["_display","_dikCode","_shift","_ctrl","_alt"];
_handled = false;
//Main actions
if (_dikCode == EPOCH_keysAction) then {
EPOCH_keysActionPressed = false;
true call Epoch_dynamicMenuCleanup;
};
_handled
if (_ctrl && _dikCode == 0x39) then { call EPOCH_lootTrash; };

View File

@ -2,11 +2,6 @@ private ["_bar","_uniformArmor","_totalArmor","_finalArmor","_vestArmor","_headg
disableSerialization;
EPOCH_InteractedItem = [];
if (isNil "EPOCH_MAX_ARMOR") then {
call EPOCH_maxArmorInit;
};
EPOCH_lastContainer = _this select 1;
waitUntil {!isNull findDisplay 602};
@ -14,9 +9,6 @@ _display = (findDisplay 602);
(_display displayCtrl -13) ctrlEnable false;
_totalArmor = 0;
_totalArmorMax = EPOCH_MAX_ARMOR select 3;
_color = [0.6,0.6,0.6,1];
_colorCompare = [0.4,0.6,1,0.4];

View File

@ -7,6 +7,10 @@ if (!isNull findDisplay 602) then {
_selectedClass = EPOCH_InteractedItem select 1;
};
if (isNil "EPOCH_MAX_ARMOR") then {
call EPOCH_maxArmorInit;
};
_totalArmor = 0;
_totalArmorMax = EPOCH_MAX_ARMOR select 3;

View File

@ -15,7 +15,7 @@ EPOCH_target = objNull;
EPOCH_Z_OFFSET = 0;
EPOCH_X_OFFSET = 0;
EPOCH_Y_OFFSET = 5;
EPOCH_snapVisArray = [];
EPOCH_arr_snapPoints = [];
EPOCH_prevTarget = objNull;
EPOCH_interactOption = 0;

View File

@ -4,6 +4,13 @@ params [["_args",0],["_input",0]];
_keyMap =
[
//["Name", "Variable name", Default value],
["Action","EPOCH_keysAction",0x39],
["Holster Weapon", "EPOCH_keysHolster", 35],
["Debug Monitor", "EPOCH_keysDebugMon", 41],
["Trade", "EPOCH_keysAcceptTrade", 0x14],
["Volume + (ctrl)","EPOCH_keysVolumeUp",0x0D],
["Volume - (ctrl)","EPOCH_keysVolumeDown",0x0C],
["Build: Mode 1", "EPOCH_keysBuildMode1", 2],
["Build: Mode 2", "EPOCH_keysBuildMode2", 3],
["Build: Direction", "EPOCH_keysBuildDir", 4],
@ -15,11 +22,7 @@ _keyMap =
["Build: Move LEFT", "EPOCH_keysBuildMovL", 0xD2],
["Build: Move RIGHT", "EPOCH_keysBuildMovR", 0xD3],
["Build: Rotate LEFT", "EPOCH_keysBuildRotL", 0x12],
["Build: Rotate RIGHT", "EPOCH_keysBuildRotR", 0x10],
["Build: BUILD", "EPOCH_keysBuildIt", 0x39],
["Trade", "EPOCH_keysAcceptTrade", 0x14],
["Holster Weapon", "EPOCH_keysHolster", 35],
["Debug Monitor", "EPOCH_keysDebugMon", 41]
["Build: Rotate RIGHT", "EPOCH_keysBuildRotR", 0x10]
];
switch (_args) do {

View File

@ -1,5 +1,5 @@
call EPOCH_clientInit;
[] spawn EPOCH_masterLoop;
[] spawn EPOCH_masterLoop_v2;
[5,100] call EPOCH_niteLight;
Epoch_canBeRevived = true;
@ -7,4 +7,4 @@ Epoch_canBeRevived = true;
[] execFSM "\x\addons\a3_epoch_code\system\gender_selection.fsm";
true
true

View File

@ -1,4 +1,4 @@
//
//
_playerObject = _this select 0;
if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
_ply = player;
@ -12,7 +12,7 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
Epoch_personalToken = _this select 1;
// call EPOCH_clientInit;
[] spawn EPOCH_masterLoop;
[] spawn EPOCH_masterLoop_v2;
[5, 100] call EPOCH_niteLight;
closeDialog 0;
@ -20,13 +20,13 @@ if !(alive player && alive _playerObject && !isPlayer _playerObject) then {
player addEventHandler ["Respawn", {(_this select 0) call EPOCH_clientRespawn}];
player addEventHandler ["Put", {(_this select 1) call EPOCH_interact;_this call EPOCH_PutHandler}];
player addEventHandler ["Take", {(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck}];
player addEventHandler["InventoryClosed", { if !(EPOCH_arr_interactedObjs isEqualTo[]) then{EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2]; EPOCH_arr_interactedObjs = []; }; }];
player addEventHandler ["InventoryOpened", {_this spawn EPOCH_initUI;locked (_this select 1) in [2, 3]}];
player addEventHandler ["Fired", {_this call EPOCH_fnc_playerFired}];
player addEventHandler ["Killed", {_this call EPOCH_fnc_playerDeath}];
player addEventHandler ["Take", {(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck}];
player addEventHandler ["InventoryClosed", { if !(EPOCH_arr_interactedObjs isEqualTo[]) then{EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2]; EPOCH_arr_interactedObjs = []; }; }];
player addEventHandler ["InventoryOpened", {_this spawn EPOCH_initUI; (locked (_this select 1) in [2, 3] || (_this select 1) getVariable["EPOCH_Locked", false]) }];
player addEventHandler ["Fired", {_this call EPOCH_fnc_playerFired}];
player addEventHandler ["Killed", {_this call EPOCH_fnc_playerDeath}];
} else {
deleteVehicle _playerObject;
};
true call EPOCH_pushCustomVar;
true call EPOCH_pushCustomVar;

View File

@ -185,6 +185,8 @@ _fadeUI = {
};
};
_cursorTarget = objNull;
// Master Loop Start
while {alive player} do {
@ -198,17 +200,15 @@ while {alive player} do {
// current target
_currentTarget = objNull;
if (!isNull cursorTarget && !(EPOCH_target isEqualTo cursorTarget)) then {
_distance = player distance cursorTarget;
if (_distance < 9) then {
if (cursorTarget isKindOf "ThingX" || cursorTarget isKindOf "Constructions_static_F" || cursorTarget isKindOf "Constructions_foundation_F" || cursorTarget isKindOf "WeaponHolder" || cursorTarget isKindOf "AllVehicles" || cursorTarget isKindOf "PlotPole_EPOCH") then{
if (cursorTarget isKindOf "Animal_Base_F") then {
if !(alive cursorTarget) then {
_currentTarget = cursorTarget;
};
} else {
_currentTarget = cursorTarget;
_cursorTarget = ([10] call EPOCH_fnc_cursorTarget);
if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then {
if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{
if (_cursorTarget isKindOf "Animal_Base_F") then {
if !(alive _cursorTarget) then {
_currentTarget = _cursorTarget;
};
} else {
_currentTarget = _cursorTarget;
};
};
};
@ -218,7 +218,9 @@ while {alive player} do {
_vehicle = vehicle player;
if (_vehicle == player) then {
_val = log(abs(speed player));
if (_val>0.7) then {
_staminaThreshold = 0.7;
if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3};
if (_val>_staminaThreshold) then {
EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0;
} else {
_increaseStamina = true;
@ -478,6 +480,7 @@ while {alive player} do {
_position = getPosATL player;
EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300];
EPOCH_playerIsSwimming = false;
if !(surfaceIsWater _position) then {
if (EPOCH_nearestLocations isEqualTo []) then{
@ -489,12 +492,19 @@ while {alive player} do {
} else {
// spawn shark if player is deep water and not in vehicle
if (vehicle player == player) then{
if (((_position vectorDiff getPosASL player) select 2) > 50) then {
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
if (_offsetZ > 1.7) then {
EPOCH_playerIsSwimming = true;
};
if (_offsetZ > 50) then {
"GreatWhite_F" call EPOCH_unitSpawn;
};
};
};
// default power state
EPOCH_nearPower = false;
EPOCH_chargeRate = 0;
// energy Charge from nearby power plants
_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange];
@ -514,12 +524,15 @@ while {alive player} do {
};
_totalCapacity = _totalCapacity + _powerCap;
} forEach _powerSources;
_players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange];
EPOCH_chargeRate = ceil(_totalCapacity / (count _players));
EPOCH_nearPower = true;
} else {
EPOCH_nearPower = false;
EPOCH_chargeRate = 0;
if (_totalCapacity > 0) then {
_players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange];
if (_players isEqualTo []) then {
EPOCH_chargeRate = ceil _totalCapacity;
} else {
EPOCH_chargeRate = ceil (_totalCapacity / (count _players));
};
EPOCH_nearPower = true;
};
};
EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer));
@ -553,7 +566,6 @@ while {alive player} do {
} forEach EPOCH_playerSpawnArray;
// test spawning one antagonist every 10 minutes select one unit at random to spawn
if !(_spawnUnits isEqualTo[]) then{
(_spawnUnits select(floor random(count _spawnUnits))) call EPOCH_unitSpawn;
};

View File

@ -0,0 +1,40 @@
// EPOCHMOD.com
disableSerialization;
_config = 'CfgMasterLoop' call EPOCH_returnConfig;
_build_sqf = preprocessFile getText (_config >> "Init" >> "file");
_configs = "true" configClasses (_config >> "Events");
_condition = getText (_config >> "Events" >> "condition");
_file = getText (_config >> "Events" >> "file");
{
_configName = configName _x;
_varName = format["_EPOCH_%1",_configName];
_build_sqf = _build_sqf + '
'+_varName+' = diag_tickTime;
';
}forEach _configs;
_build_sqf = _build_sqf + '
while {'+_condition+'} do {
_tickTime = diag_tickTime;
';
{
_delay = getNumber(_x >> "delay");
_configName = configName _x;
_varName = format["_EPOCH_%1",_configName];
_code = preprocessFile format ["%1\%2.sqf",_file,_configName];
_build_sqf = _build_sqf + '
if ((_tickTime - '+_varName+') > '+str(_delay)+') then {
'+_varName+' = _tickTime;
'+_code+'
};
';
}forEach _configs;
_build_sqf = _build_sqf + '
if (vehicle player != player) then {
if (isNull EPOCH_currentVehicle) then {
EPOCH_currentVehicle = vehicle player;
EPOCH_currentVehicle addEventHandler["GetOut", "_this call EPOCH_antiWall"];
};
};
uiSleep 0.1;
};';
call compile _build_sqf;

View File

@ -0,0 +1,142 @@
// current target
_currentTarget = objNull;
_cursorTarget = ([10] call EPOCH_fnc_cursorTarget);
if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then {
if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{
if (_cursorTarget isKindOf "Animal_Base_F") then {
if !(alive _cursorTarget) then {
_currentTarget = _cursorTarget;
};
} else {
_currentTarget = _cursorTarget;
};
};
};
EPOCH_currentTarget = _currentTarget;
_increaseStamina = false;
_vehicle = vehicle player;
if (_vehicle == player) then {
_val = log(abs(speed player));
_staminaThreshold = 0.7;
if (EPOCH_playerIsSwimming) then {_staminaThreshold = 0.3};
if (_val>_staminaThreshold) then {
EPOCH_playerStamina = (EPOCH_playerStamina - (_val/4)) max 0;
} else {
_increaseStamina = true;
};
} else {
if (EPOCH_buildMode > 0) then {
EPOCH_buildMode = 0;
EPOCH_snapDirection = 0;
hintsilent "BUILD MODE: DISABLED";
EPOCH_Target = objNull;
// EPOCH_SURVEY = [];
};
_increaseStamina = true;
switch (typeOf _vehicle) do {
case "jetski_epoch": {
_clock_hour10 = floor ((date select 3)/10);
_clock_minute10 = floor ((date select 4)/10);
{
_vehicle setObjectTexture [_forEachIndex,_x];
}forEach[
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_hour10],
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 3)-(_clock_hour10*10)],
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",_clock_minute10],
format["\x\addons\a3_epoch_vehicles\data\num%1_ca.paa",(date select 4)-(_clock_minute10*10)],
format["\x\addons\a3_epoch_vehicles\data\fuel%1_ca.paa",floor(fuel _vehicle*10)]
];
};
case "ebike_epoch": {
{
_vehicle setObjectTexture [_forEachIndex,_x];
}forEach[
format["\x\addons\a3_epoch_vehicles\data\speed%1_ca.paa",floor(speed _vehicle/9) max 0],
format["\x\addons\a3_epoch_vehicles\data\energ%1_ca.paa",floor(fuel _vehicle*14)]
];
};
};
};
_envCold = EPOCH_playerTemp <= 95.0;
_envHot = EPOCH_playerTemp >= 106.7;
_hungry = EPOCH_playerHunger <= 0;
_thirsty = EPOCH_playerThirst <= 0;
_warnbloodPressure = EPOCH_playerBloodP > 120;
_thirst ctrlShow (EPOCH_playerThirst <= 625);
if (ctrlShown _thirst) then {
[_thirst,_thirsty] call _fadeUI;
_thirstScale = linearConversion [0,EPOCH_playerThirst,2500,0.01,1];
_thirst ctrlSetTextColor [_thirstScale, _thirstScale, 0.9, 1];
};
_hunger ctrlShow (EPOCH_playerHunger <= 1250);
if (ctrlShown _hunger) then {
[_hunger,_hungry] call _fadeUI;
_hungerScale = linearConversion [0,EPOCH_playerHunger,5000,0.01,1];
_hunger ctrlSetTextColor [1, _hungerScale, _hungerScale, 1];
};
_playerOxygen = getOxygenRemaining player;
_oxygen ctrlShow (_playerOxygen < 1);
if (ctrlShown _oxygen) then {
[_oxygen,(_playerOxygen <= 0.55)] call _fadeUI;
_oxygen ctrlSetTextColor [1, _playerOxygen, _playerOxygen, 1];
};
_hazzard ctrlShow (EPOCH_playerToxicity > 1);
if (ctrlShown _hazzard) then {
[_hazzard,(EPOCH_playerToxicity >= 55)] call _fadeUI;
_toxicScale = 1-linearConversion [0,EPOCH_playerToxicity,100,0.01,1];
_hazzard ctrlSetTextColor [_toxicScale, 1, _toxicScale, 1];
};
_broken ctrlShow ((player getHitPointDamage "HitLegs") >= 0.5);
if (ctrlShown _broken) then {
[_broken,true] call _fadeUI;
};
if (_envCold || _envHot || _hungry || _thirsty) then {
if (_envHot || _envCold) then {
player setFatigue 1;
};
EPOCH_playerBloodP = (EPOCH_playerBloodP + 0.05) min 190;
_increaseStamina = false;
} else {
if (EPOCH_playerStamina > 0) then {
if !(_panic) then {
if (!_warnbloodPressure) then {
player setFatigue 0;
};
EPOCH_playerBloodP = EPOCH_playerBloodP - 1 max 100;
};
};
};
_critical = (damage player >= 0.7 || _warnbloodPressure);
_emergency ctrlShow _critical;
if (ctrlShown _emergency) then {
[_emergency,(EPOCH_playerBloodP > 140)] call _fadeUI;
_emergencyScale = 1-linearConversion [0,EPOCH_playerBloodP,180,0.01,1];
_emergency ctrlSetTextColor [1, _emergencyScale, _emergencyScale, 1];
};
if (EPOCH_playerBloodP >= 180) then {
true call EPOCH_pushCustomVar;
};
if (_increaseStamina && (getFatigue player) == 0) then {
EPOCH_playerStamina = (EPOCH_playerStamina + 0.5) min EPOCH_playerStaminaMax;
};
if (EPOCH_debugMode) then {
call EPOCH_debugMonitor;
};
call EPOCH_TradeLoop;
onEachFrame EPOCH_onEachFrame;

View File

@ -0,0 +1,94 @@
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
EPOCH_arr_interactedObjs remoteExec["EPOCH_server_save_vehicles", 2];
EPOCH_arr_interactedObjs = [];
};
if (damage player != _damagePlayer) then {
if (alive player) then {
true call EPOCH_pushCustomVar;
_damagePlayer = damage player;
};
};
if ((rating player) < 0) then {
player addRating abs(rating player);
};
// calculate total available power
// 1. number of power production devices within range 75m
// find share of power based on factors
// 1. number of players
// 2. Other sources of drain (Lights)
_energyValue = EPOCH_chargeRate min _energyRegenMax;
_vehicle = vehicle player;
if (_vehicle != player && isEngineOn _vehicle) then {
_energyValue = _energyValue + 5;
};
if (currentVisionMode player == 1) then { //NV enabled
_energyValue = _energyValue - _energyCostNV;
if (EPOCH_playerEnergy == 0) then {
player action["nvGogglesOff", player];
};
};
EPOCH_playerEnergy = ((EPOCH_playerEnergy + _energyValue) min EPOCH_playerEnergyMax) max 0;
if !(EPOCH_playerEnergy isEqualTo _prevEnergy) then {
9993 cutRsc["EpochGameUI3", "PLAIN", 0, false];
_display3 = uiNamespace getVariable "EPOCH_EpochGameUI3";
_energyDiff = round(EPOCH_playerEnergy - _prevEnergy);
_diffText = if (_energyDiff > 0) then {format["+%1",_energyDiff]} else {format["%1",_energyDiff]};
// hint str [_energyValue,_prevEnergy,EPOCH_playerEnergy];
(_display3 displayCtrl 21210) ctrlSetText format["%1/%2 %3", round(EPOCH_playerEnergy), EPOCH_playerEnergyMax, _diffText];
_prevEnergy = EPOCH_playerEnergy;
};
if (EPOCH_playerEnergy == 0) then {
if (EPOCH_buildMode > 0) then {
EPOCH_buildMode = 0;
EPOCH_snapDirection = 0;
_dt = ["<t size = '0.8' shadow = '0' color = '#99ffffff'>Build Mode Disabled: Need Energy< / t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
EPOCH_Target = objNull;
EPOCH_Z_OFFSET = 0;
EPOCH_X_OFFSET = 0;
EPOCH_Y_OFFSET = 5;
};
};
_attackers = player nearEntities[["Snake_random_EPOCH", "GreatWhite_F", "Epoch_Cloak_F"], 30];
if !(_attackers isEqualTo[]) then {
(_attackers select 0) call EPOCH_client_bitePlayer;
_panic = true;
} else {
// custom poision
_toxicObjs = player nearobjects["SmokeShellCustom", 6];
if!(_toxicObjs IsEqualTo[]) then {
(_toxicObjs select 0) call EPOCH_client_bitePlayer;
_panic = true;
} else {
_panic = false;
};
};
call EPOCH_fnc_Weather;
// Hunger / Thirst
_HTlossRate = _baseHTLoss;
if (EPOCH_playerStamina < 100) then {
if ((getFatigue player) > 0) then {
_HTlossRate = _HTlossRate + (_HTlossRate*(getFatigue player));
};
} else {
_HTlossRate = (_HTlossRate / 2);
};
EPOCH_playerHunger = (EPOCH_playerHunger - _HTlossRate) max 0;
EPOCH_playerThirst = (EPOCH_playerThirst - _HTlossRate) max 0;
call _lootBubble;
EPOCH_playerStaminaMax = (100 * (round(EPOCH_playerAliveTime/360)/10)) min 2500;

View File

@ -0,0 +1,6 @@
if !(_prevEquippedItem isEqualTo EPOCH_equippedItem_PVS) then {
_EPOCH_15 = _tickTime;
_prevEquippedItem = EPOCH_equippedItem_PVS;
publicVariableServer "EPOCH_equippedItem_PVS";
};

View File

@ -0,0 +1,17 @@
_nearByBobbersLocal = [];
_nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12];
{
if (local _x) then {
_nearByBobbersLocal pushBack _x
}
} forEach _nearByBobbers;
if !(_nearByBobbersLocal isEqualTo []) then {
if ((random 100) < 50) then {
_bobber = _nearByBobbersLocal select floor(random(count _nearByBobbers));
_bobber setVelocity [0,-1,-1];
_bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime];
};
};

View File

@ -0,0 +1,60 @@
_position = getPosATL player;
EPOCH_nearestLocations = nearestLocations[player, ["NameCityCapital", "NameCity", "Airport"], 300];
EPOCH_playerIsSwimming = false;
if !(surfaceIsWater _position) then {
if (EPOCH_nearestLocations isEqualTo []) then{
if (count(_position nearEntities["Animal_Base_F", 800]) < 2) then {
// diag_log "DEBUG: Attempt to spawn animal";
call EPOCH_client_loadAnimalBrain;
};
};
} else {
// spawn shark if player is deep water and not in vehicle
if (vehicle player == player) then{
_offsetZ = ((_position vectorDiff getPosASL player) select 2);
if (_offsetZ > 1.7) then {
EPOCH_playerIsSwimming = true;
};
if (_offsetZ > 50) then {
"GreatWhite_F" call EPOCH_unitSpawn;
};
};
};
// default power state
EPOCH_nearPower = false;
EPOCH_chargeRate = 0;
// energy Charge from nearby power plants
_powerSources = nearestObjects[player, ["Land_spp_Tower_F","Land_wpp_Turbine_V2_F","Land_wpp_Turbine_V1_F","SolarGen_EPOCH"], _energyRange];
if !(_powerSources isEqualTo[]) then {
_totalCapacity = 0;
{
_powerClass = typeOf _x;
_powerCap = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerCapacity");
_powerType = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerType");
if (_powerCap == 0) then {
_powerCap = 100;
};
if (_powerType == 1) then {
if (sunOrMoon < 1) then {
_powerCap = _powerCap/2;
};
};
_totalCapacity = _totalCapacity + _powerCap;
} forEach _powerSources;
if (_totalCapacity > 0) then {
_players = player nearEntities[["Epoch_Male_F", "Epoch_Female_F"], _energyRange];
if (_players isEqualTo []) then {
EPOCH_chargeRate = ceil _totalCapacity;
} else {
EPOCH_chargeRate = ceil (_totalCapacity / (count _players));
};
EPOCH_nearPower = true;
};
};
EPOCH_playerAliveTime = round(EPOCH_playerAliveTime + (_tickTime - EPOCH_clientAliveTimer));
EPOCH_clientAliveTimer = _tickTime;

View File

@ -0,0 +1 @@
false call EPOCH_pushCustomVar;

View File

@ -0,0 +1,23 @@
if ((EPOCH_playerSpawnArray select(EPOCH_spawnIndex find "Epoch_Sapper_F")) <= 0) then{
_sapperChance = 1 + (EPOCH_playerSoiled / 2);
if !(EPOCH_nearestLocations isEqualTo[]) then{
_sapperChance = _sapperChance + 2;
};
// 1% - 55% if soiled (+ 2% if in city) chance to spawn sapper every 10 minutes
if (random _sapperRndChance < _sapperChance) then{
"Epoch_Sapper_F" call EPOCH_unitSpawnIncrease;
};
};
_spawnUnits = [];
{
if (_x > 0) then{
_spawnUnits pushBack(EPOCH_spawnIndex select _forEachIndex);
};
} forEach EPOCH_playerSpawnArray;
// test spawning one antagonist every 10 minutes select one unit at random to spawn
if !(_spawnUnits isEqualTo[]) then{
(_spawnUnits select(floor random(count _spawnUnits))) call EPOCH_unitSpawn;
};

View File

@ -0,0 +1,179 @@
_prevEquippedItem = [];
_damagePlayer = damage player;
_panic = false;
_prevEnergy = EPOCH_playerEnergy;
// init config data
_sapperRndChance = ["CfgEpochClient", "sapperRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
EPOCH_droneRndChance = ["CfgEpochClient", "droneRngChance", 100] call EPOCH_fnc_returnConfigEntryV2;
_baseHTLoss = ["CfgEpochClient", "baseHTLoss", 8] call EPOCH_fnc_returnConfigEntryV2;
_energyCostNV = ["CfgEpochClient", "energyCostNV", 3] call EPOCH_fnc_returnConfigEntryV2;
_energyRegenMax = ["CfgEpochClient", "energyRegenMax", 5] call EPOCH_fnc_returnConfigEntryV2;
_energyRange = ["CfgEpochClient", "energyRange", 75] call EPOCH_fnc_returnConfigEntryV2;
EPOCH_chargeRate = 0;
// default data if mismatch
if (count EPOCH_playerSpawnArray != count EPOCH_spawnIndex) then{
{ EPOCH_playerSpawnArray pushBack 0 } forEach EPOCH_spawnIndex;
};
9990 cutRsc ["EpochGameUI","PLAIN",2,false];
_display = uiNamespace getVariable "EPOCH_EpochGameUI";
_thirst = _display displayCtrl 21201;
_hunger = _display displayCtrl 21202;
_broken = _display displayCtrl 21203;
_oxygen = _display displayCtrl 21204;
_hazzard = _display displayCtrl 21205;
_emergency = _display displayCtrl 21206;
{
_x ctrlShow false;
}forEach[_thirst,_hunger,_broken,_oxygen,_hazzard,_emergency];
// find radio
{
if (configName(inheritsFrom(configFile >> "CfgWeapons" >> _x)) == "ItemRadio") exitWith{
EPOCH_equippedItem_PVS = [_x, true, player];
};
} forEach assignedItems player;
// lootBubble Init
_loots = ["CfgEpochClient", "lootClasses", EPOCH_lootClasses] call EPOCH_fnc_returnConfigEntryV2;
_lootClasses = ('CfgBuildingLootPos' call EPOCH_returnConfig) call Bis_fnc_getCfgSubClasses;
_lootClasses = _lootClasses - ["Default"];
_lootBubble = {
private["_pos", "_others", "_objects", "_nearObjects", "_building", "_travelDir", "_lootDist", "_xPos", "_yPos", "_lootLoc", "_playerPos", "_distanceTraveled", "_class", "_dir", "_color", "_colors", "_item", "_randomColor", "_positions", "_lootBiasPos", "_lootType", "_config"];
_playerPos = getPosATL vehicle player;
_distanceTraveled = EPOCH_lastPlayerPos distance _playerPos;
if (_distanceTraveled > 10 && _distanceTraveled < 200) then {
_travelDir = [EPOCH_lastPlayerPos, _playerPos] call BIS_fnc_dirTo;
_lootDist = 30 + _distanceTraveled;
_xPos = (_playerPos select 0) + (_lootDist * sin(_travelDir));
_yPos = (_playerPos select 1) + (_lootDist * cos(_travelDir));
_lootLoc = [_xPos, _yPos, 0];
_objects = nearestObjects[_lootLoc, _lootClasses, 30];
_config = 'CfgEpochClient' call EPOCH_returnConfig;
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
_jammer = nearestObjects [_lootLoc, ["PlotPole_EPOCH"], _buildingJammerRange];
if (!(_objects isEqualTo[]) && (_jammer isEqualTo[])) then {
_building = _objects select(floor(random(count _objects)));
if !(_building in EPOCH_LootedBlds) then {
_pos = getPosATL _building;
_others = _building nearEntities[["Epoch_Male_F", "Epoch_Female_F"], 15];
if (_others isEqualTo[]) then {
_nearObjects = nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 35];
if (_nearObjects isEqualTo[]) then {
_config = ('CfgBuildingLootPos' call EPOCH_returnConfig) >> (typeOf _building);
if (isClass(_config)) then {
_lootBiasPos = getNumber(_config >> "lootBiasPos");
_lootType = getText(_config >> "lootType");
EPOCH_LootedBlds pushBack _building;
if (count EPOCH_LootedBlds >= 20) then {
EPOCH_LootedBlds deleteAt 0;
};
{
_positions = [] + getArray(_config >> (_x select 0));
if !(_positions isEqualTo[]) then {
_class = _x select 1;
_randomColor = _x select 2;
{
if ((random 100) < _lootBiasPos) then {
_pos = _building modelToWorld(_x select 0);
if (nearestObjects[_pos, ["WH_Loot", "Animated_Loot"], 2] isEqualTo[]) then {
if ((typeName _class) == "ARRAY") then {
_class = _class select(floor(random(count _class)));
};
_dir = (_x select 1) + (getDir _building);
if (_dir > 360) then {
_dir = _dir - 360;
};
// Temp for now till we get more
if (_lootType == "mil" && _class == "Bed_EPOCH") then {
_class = "Bunk_EPOCH";
};
_item = createVehicle[_class, _pos, [], 0.0, "CAN_COLLIDE"];
_item setDir _dir;
// force item to ground level is resulting z pos is below ground.
if (_pos select 2 < 0) then {
_pos set[2, 0];
};
if (surfaceIsWater _pos) then {
_item setPosASL _pos;
} else {
_item setPosATL _pos;
};
if (typeName _randomColor isEqualTo "STRING") then {
_randomColor = _randomColor isEqualTo "true";
};
if (_randomColor) then {
_colors = [] + getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures");
if !(_colors isEqualTo[]) then {
_color = _colors select floor(random(count _colors));
_item setObjectTextureGlobal[0, _color];
};
};
};
};
}forEach _positions;
};
}forEach _loots;
};
};
};
};
};
};
EPOCH_lastPlayerPos = _playerPos;
};
// [control,bool] call _fadeUI;
_fadeUI = {
private ["_ctrl"];
_ctrl = _this select 0;
if (_this select 1) then {
if (ctrlFade _ctrl == 0) then {
_ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0.5;
};
if (ctrlFade _ctrl == 1) then {
_ctrl ctrlSetFade 0;
_ctrl ctrlCommit 0.5;
};
} else {
if (ctrlFade _ctrl != 1) then {
_ctrl ctrlSetFade 0;
_ctrl ctrlCommit 0;
};
};
};
_cursorTarget = objNull;

View File

@ -23,16 +23,18 @@ if (isNull _target) then {
if (!isNull _target) then {
if (alive _target) then {
/*
if ((_target isKindOf "LandVehicle") || (_target isKindOf "Air") || (_target isKindOf "Ship") || (_target isKindOf "Tank")) then {
_dialog = "InteractVehicle";
};
/*
if (_ctrl) then {
if (_target isKindOf "Constructions_static_F" || _target isKindOf "Constructions_foundation_F") then {
_dialog = "InteractBaseBuilding";
};
};
*/
/*
if (_target isKindOf "Man") then {
if (_target != player) then {
if (!isPlayer _target) then {
@ -42,6 +44,7 @@ if (!isNull _target) then {
};
};
};
*/
};
if (_forceGear) then {

View File

@ -19,8 +19,8 @@ if (!isNull _this) then {
_item = lbData[41501, _i];
if (isClass (_config >> _item)) then{
// test remove items to be sold and add to array
// test remove items to be sold and add to array
if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then {
if (_item in items player) then {
player removeItem _item;
@ -48,10 +48,10 @@ if (!isNull _this) then {
};
};
};
// test
// test
};
};
};
@ -107,18 +107,14 @@ if (!isNull _this) then {
if !((EPOCH_TRADE_COMPLETE select 1) isEqualTo[]) then {
if ((EPOCH_TRADE_COMPLETE select 1) isEqualTo(_this select 1)) then {
_errorMsg = 'Items Purchased';
_errorMsg = 'Items Purchased: ';
// add purchased items
{
if ([_x, "CfgWeapons"] call EPOCH_fnc_isAny) then {
if (player canAdd _x) then {
player addItem _x;
}
else {
_type = getNumber(configfile >> "CfgWeapons" >> (_x) >> "type");
_addWeaponToHands = false;
switch (_type) do {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgWeapons" >> (_x) >> "displayName")];
_type = getNumber(configfile >> "CfgWeapons" >> (_x) >> "type");
_addWeaponToHands = false;
switch (_type) do {
case 1: {
if (primaryWeapon player == "") then {
_addWeaponToHands = true;
@ -134,24 +130,18 @@ if (!isNull _this) then {
_addWeaponToHands = true;
};
};
};
if (_addWeaponToHands) then {
player addWeapon _x;
}
else {
_errorMsg = "Not enough space";
};
};
}
else {
if (_addWeaponToHands) then {
player addWeapon _x;
} else {
_x call EPOCH_fnc_addItemOverflow;
};
} else {
if ([_x, "CfgMagazines"] call EPOCH_fnc_isAny) then {
if (player canAdd _x) then {
player addMagazine _x;
}
else {
_errorMsg = "Not enough space";
};
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgMagazines" >> (_x) >> "displayName")];
_x call EPOCH_fnc_addItemOverflow;
} else {
_errorMsg = _errorMsg + format["%1, ", getText(configfile >> "CfgVehicles" >> (_x) >> "displayName")];
};
};
} forEach(_this select 1);
@ -169,4 +159,4 @@ if (!isNull _this) then {
EPOCH_TRADE_STARTED = nil;
};
};
};
};

View File

@ -16,7 +16,7 @@ class CfgMods
hidePicture = 0;
hideName = 0;
action = "http://www.epochmod.com";
version = "0.3.4.0";
version = "0.3.5.0";
majorVersion = 0.3; //MUST BE A NUMBER!; Change this if we release a new major version, don't change if we push just push a hotfix
ArmAVersion = 150;
overview = "Open world survival mod set in the year 2035, Just two years after the mass extinction of billions of people. Those that remain are left with remnants of a once technological society. Try to survive, build, or explore your way through the harsh dynamic environment.";
@ -27,20 +27,20 @@ class Epoch
class Version
{
//Version System, Check if PBO Version is compatible with Code
A3_epoch_assets = "0.3.4.0";
A3_epoch_assets_1 = "0.3.4.0";
epoch_objects = "0.3.4.0";
A3_epoch_assets_3 = "0.3.4.0";
A3_epoch_config = "0.3.4.0";
A3_epoch_language = "0.3.4.0";
Underground_Epoch = "0.3.4.0";
A3_epoch_vehicles = "0.3.4.0";
a3_epoch_weapons = "0.3.4.0";
a2_epoch_weapons = "0.3.4.0";
a3_epoch_structures = "0.3.4.0";
A3_epoch_functions = "0.3.4.0";
A3_epoch_vehicles_1 = "0.3.4.0";
Enhanced_Epoch_AiASupport = "0.3.4.0";
A3_epoch_assets = "0.3.5.0";
A3_epoch_assets_1 = "0.3.5.0";
epoch_objects = "0.3.5.0";
A3_epoch_assets_3 = "0.3.5.0";
A3_epoch_config = "0.3.5.0";
A3_epoch_language = "0.3.5.0";
Underground_Epoch = "0.3.5.0";
A3_epoch_vehicles = "0.3.5.0";
a3_epoch_weapons = "0.3.5.0";
a2_epoch_weapons = "0.3.5.0";
a3_epoch_structures = "0.3.5.0";
A3_epoch_functions = "0.3.5.0";
A3_epoch_vehicles_1 = "0.3.5.0";
Enhanced_Epoch_AiASupport = "0.3.5.0";
};
};
@ -146,7 +146,6 @@ class CfgClientFunctions
class maintainIT {};
class lockCheck {};
class countdown {};
class fnc_SelectTarget {};
class fnc_SelectTargetBuild {};
class isBuildAllowed {};
class simulSwap {};
@ -156,7 +155,7 @@ class CfgClientFunctions
class upgradeBUILDv2 {};
class removeBUILD {};
class changeWallState {};
class QuickUpgrade {};
class checkBuild {};
};
class traders
@ -178,6 +177,7 @@ class CfgClientFunctions
class interface_event_handlers
{
class KeyDown {};
class KeyUp {};
class onChar {};
};
@ -185,6 +185,7 @@ class CfgClientFunctions
{
class client_publicEH {};
class masterLoop {};
class masterLoop_v2 {};
class clientInit {};
class clientRespawn {};
class clientRevive {};
@ -220,6 +221,8 @@ class CfgClientFunctions
class fnc_stringLeft {};
class fnc_findSapperStalkLocation {};
class fnc_dirToFuzzy {};
class fnc_cursorTarget {};
};
class environment
@ -259,25 +262,31 @@ class CfgClientFunctions
class gui {
file = "\x\addons\a3_epoch_code\gui\scripts";
class onPause {};
class interactVehicle {};
class showStats {};
//class dynamicMenu {};
//class dynamicMenuCleanup {};
class 3DctrlPitchYaw {};
class 3DctrlSpin {};
class 3DctrlYaw {};
class InterruptConfig {};
class InterruptConfigActions {};
class gui3DCooldown {};
class gui3DWorldPos {};
class gui3DModelPos {};
class getIDC {};
class guiObjHP {};
class secureStorageHandler {};
class dynamicText {};
class genderSelection {};
};
class config {
file = "\x\addons\a3_epoch_code\gui\scripts\config";
class config_keymap {};
};
class dynamenu {
file = "\x\addons\a3_epoch_code\gui\scripts\dynamenu";
class dynamicMenu {};
class dynamicMenuPopulate {};
class dynamicMenuCleanup {};
};
class gui_craft {
file = "\x\addons\a3_epoch_code\gui\scripts\craftingv2";
class crafting_animate {};
@ -295,7 +304,7 @@ class CfgClientFunctions
class crafting_LB_defaults {};
class crafting_LB_doubleClick {};
class crafting_colorScheme {};
};
};
class group {
file = "\x\addons\a3_epoch_code\gui\scripts\group";
class Group_invitePlayer {};
@ -331,6 +340,16 @@ class CfgClientFunctions
class postprocessCreate {};
class postprocessAdjust {};
class postprocessDestroy {};
class setDrunk {}; //needs a better name
};
class worldToScreen {
file = "\x\addons\a3_epoch_code\gui\scripts\worldToScreen";
class gui3DCooldown {};
class gui3DCooldownEH {};
class gui3DWorldPos {};
class gui3DWorldPosEH {};
class gui3DModelPos {};
class gui3DModelPosEH {};
};
};
};

View File

@ -42,7 +42,7 @@ class ScrollBar;
#include "Epoch_GUI_ClientConfigs.hpp"
#include "Epoch_GUI_rmx.hpp"
class RscTitles
class RscTitles
{
#include "Epoch_RscTitles.hpp"
};
@ -116,7 +116,7 @@ class TradeRequest
};
};
*/
/*
class QuickUpgrade
{
idd = -15;
@ -169,7 +169,7 @@ class QuickUpgrade
};
};
*/
class QuickTake
{
idd = -5;
@ -275,7 +275,7 @@ class TapOut
};
/*
class SelectGender
{
idd = -7;
@ -318,6 +318,78 @@ class SelectGender
};
};
};
*/
class SelectGender
{
idd = -7;
movingEnable = 0;
enableSimulation = 1;
onLoad = "['Select your gender',10] call Epoch_dynamicText; setMousePosition [0.5, 0.5];";
class ControlsBackground
{
class Background: RscPicture //Replace with custom background
{
idc = 88800;
text = "x\addons\a3_epoch_code\Data\gender_selection.paa";
x = safezoneX - safezoneW * 0.1;
y = safezoneY - safezoneH * 0.1;
w = safezoneW + safezoneW * 0.3;
h = safezoneH + safezoneH * 0.3;
};
};
class Objects
{
class female
{
idc = 88801;
type = 82;
model = "\x\addons\a3_epoch_assets\models\clone_female.p3d";
scale = 0.5;
direction[] = {0, 1, 0};
up[] = {0, 0, 1};
x = -1;
z = 1;
y = 1.8;
xBack = -1;
zBack = 1;
yBack = 1.8;
inBack = 0;
enableZoom = 0;
zoomDuration = 0.001;
onMouseButtonDown = "closeDialog 0; EPOCH_PlayerIsMale = false;";
onLoad = "(_this select 0) ctrlSetModelDirAndUp [[0,1,0],[0,0,1]];";
};
class male: female
{
idc = 88802;
model = "\x\addons\a3_epoch_assets\models\clone_male.p3d";
x = 2;
xBack = 2;
onMouseButtonDown = "closeDialog 0; EPOCH_PlayerIsMale = true;";
};
};
class controls
{
class overlay: RscPicture
{
idc = 88803;
text = "#(argb,8,8,3)color(0,0,0,0)";
x = safezoneX + 0.4 * safezoneW;
y = safezoneY;
w = safezoneW * 0.2;
h = safezoneH;
onMouseMoving = "(_this select 1) call epoch_genderSelection;";
onLoad = "(_this select 0) ctrlEnable true;";
};
};
};
class TradeNPCMenu
{
@ -390,6 +462,7 @@ class TradeNPCMenu
h = 0.282151 * safezoneH;
onLBDblClick = "[41501,_this] call EPOCH_npcTraderAdd";
onLBDrop = "[41501,_this] call EPOCH_npcTraderAdd";
onLoad = "ctrlSetFocus (_this select 0)";
};
class RscListbox_playerOffer: RscListbox
{
@ -1191,7 +1264,7 @@ class CraftItem
};
};
/*
class InteractVehicle
{
idd = -11;
@ -1241,7 +1314,7 @@ class InteractVehicle
};
};
};
*/
/*
class InteractPlayer
{
@ -1273,7 +1346,7 @@ class InteractPlayer
};
};
*/
/*
class InteractNPC
{
idd = -12;
@ -1302,7 +1375,7 @@ class InteractNPC
h = 0.08;
action = "call EPOCH_startNPCTraderMenu;";
};
/*
class RscButtonMenu_2403: RscButtonMenu
{
idc = 2403;
@ -1313,7 +1386,7 @@ class InteractNPC
h = 0.08;
action = "closeDialog 0; player action [""Gear"", cursorTarget];";
};
*/
class RscButtonMenu_2404: RscButtonMenu
{
idc = 2405;
@ -1326,6 +1399,7 @@ class InteractNPC
};
};
};
*/
/*
class InteractBuilding
@ -1492,6 +1566,7 @@ class InteractBank
};
};
};
/*
class InteractBaseBuilding
{
idd = -14;
@ -1542,9 +1617,10 @@ class InteractBaseBuilding
h = 0.08;
action = "closeDialog 0; cursorTarget call EPOCH_fnc_SelectTargetBuild;";
};
};
};
*/
/*
class InteractItem
{
@ -2398,7 +2474,7 @@ class RscDisplayInventory_DLCTemplate
};
};
};
class RscDisplayInventory
{
@ -3235,13 +3311,13 @@ class RscDisplayInventory
class EpochBtnBG : IGUIBack
{
idc = -10;
//x = 0.433468 * safezoneW + safezoneX;
//y = 0.75872 * safezoneH + safezoneY;
//w = 0.30231 * safezoneW;
//h = 0.0337482 * safezoneH;
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "23.9 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "24.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3254,12 +3330,12 @@ class RscDisplayInventory
idc = -11;
text = "Group Menu";
onMouseButtonDown = "_this call EPOCH_Inventory_Group";
//x = 0.437079 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "33.2 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3270,12 +3346,12 @@ class RscDisplayInventory
idc = -12;
text = "Requests";
onMouseButtonDown = "_this call EPOCH_Inventory_iGroup";
//x = 0.511347 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "27.0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3286,12 +3362,12 @@ class RscDisplayInventory
idc = -13;
text = "EXAMINE";
onMouseButtonDown = "call EPOCH_consumeItem";
//x = 0.585617 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "14.62 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@ -3302,12 +3378,12 @@ class RscDisplayInventory
idc = -14;
text = "CRAFT";
onMouseButtonDown = "EPOCH_CraftingItem call EPOCH_crafting_load;";
//x = 0.659883 * safezoneW + safezoneX;
//y = 0.764 * safezoneH + safezoneY;
//w = 0.0711741 * safezoneW;
//h = 0.022 * safezoneH;
x = "20.8 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";

View File

@ -3,6 +3,7 @@ class rmx_dynamenu {
enableSimulation = 1;
movingEnable = 1;
onLoad = "setMousePosition [0.5, 0.5];";
onKeyUp = "_this call epoch_keyUp";
class controls {};
};
@ -47,6 +48,136 @@ class rmx_rscObject
};
};
class rmx_rscContainer
{
idd = 99440;
movingEnable = 0;
enableSimulation = 1;
enableDisplay = 0;
class Objects
{
class _CT_OBJECT_CONTAINER
{
access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
idc = 99441; // Control identification (without it, the control won't be displayed)
type = 82; // Type
style = ST_LEFT; // Style
blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect.
//model = "\A3\Misc_F\Helpers\UserTexture1m.p3d"; // Displayed model
//model = "\x\addons\a3_epoch_code\gui\terminal2.p3d"; // Displayed model
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\center_plane.p3d";
scale = 0.2; // Model scale
x = 26 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates
y = 21 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates
z = 1; // Depth coordinates
//position[] = {0,0,1}; // Alternative XYZ coordinates, where XY is center of the screen
xBack = 25 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal background coordinates
yBack = 12 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical background coordinates
zBack = 2; // Depth background coordinates
//positionBack[] = {0,0,2}; // Alternative XYZ coordinates, where XY is center of the screen
enableZoom = 1; // Allow foreground/background transformation
zoomDuration = 0.5; // Speed of foreground/background transformation
inBack = 0; // Start in back (Back coordinates are used)
direction[] = {1,0,0.5}; // Model vector dir
up[] = {0.5,1,0}; // Model vector up
tooltip = "CT_OBJECT"; // Tooltip text
tooltipColorShade[] = {0,0,0,1}; // Tooltip background color
tooltipColorText[] = {1,1,1,1}; // Tooltip text color
tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color
class Areas // Configurable UI areas. Normally interactive controls (buttons, listboxes, ...) are not interactive here.
{
class UserTextureL
{
selection = "usertextureL"; // Model selection on which the UI will be rendered
class Controls
{
class _CT_STATIC
{
idc = 1100; // Control identification (without it, the control won't be displayed)
type = CT_STATIC; // Type
style = ST_LEFT + ST_CENTER + ST_MULTI; // Style
x = 0; // Horizontal coordinates (relative to the selection area)
y = 0; // Vertical coordinates (relative to the selection area)
w = 1; // Width (relative to the selection area)
h = 1; // Height (relative to the selection area)
colorBackground[] = {0,0,0,1}; // Fill color
text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text
sizeEx = 6 * GUI_GRID_CENTER_H; // Text size
font = "VT323"; // Font from CfgFontFamilies
colorText[] = {1,0,0,1}; // Text color
lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height)
};
};
};
class UserTexture
{
selection = "usertexture"; // Model selection on which the UI will be rendered
class Controls
{
class _CT_STATIC
{
idc = 11002; // Control identification (without it, the control won't be displayed)
type = CT_STATIC; // Type
style = ST_LEFT + ST_CENTER + ST_MULTI; // Style
x = 0; // Horizontal coordinates (relative to the selection area)
y = 0; // Vertical coordinates (relative to the selection area)
w = 1; // Width (relative to the selection area)
h = 1; // Height (relative to the selection area)
colorBackground[] = {0,0,0,1}; // Fill color
text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text
sizeEx = 6 * GUI_GRID_CENTER_H; // Text size
font = "VT323"; // Font from CfgFontFamilies
colorText[] = {1,0,0,1}; // Text color
lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height)
};
};
};
class UserTextureR
{
selection = "usertextureR"; // Model selection on which the UI will be rendered
class Controls
{
class _CT_STATIC
{
idc = 11001; // Control identification (without it, the control won't be displayed)
type = CT_STATIC; // Type
style = ST_LEFT + ST_CENTER + ST_MULTI; // Style
x = 0; // Horizontal coordinates (relative to the selection area)
y = 0; // Vertical coordinates (relative to the selection area)
w = 1; // Width (relative to the selection area)
h = 1; // Height (relative to the selection area)
colorBackground[] = {0,0,0,1}; // Fill color
text = "\nCT_OBJECT\n_CONTAINER"; // Displayed text
sizeEx = 6 * GUI_GRID_CENTER_H; // Text size
font = "VT323"; // Font from CfgFontFamilies
colorText[] = {1,0,0,1}; // Text color
lineSpacing = 1; // When ST_MULTI style is used, this defines distance between lines (1 is text height)
};
};
};
};
};
};
};
class rmx_rscControlsGroup: RscControlsGroup
{
idc = -1;
@ -620,4 +751,22 @@ class Epoch_main_config_combo: RscCombo
};
onLBSelChanged = "_this call EPOCH_InterruptConfigActions;";
};
class rmx_ST1: RscStructuredText
{
text = "";
size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1,1,1,1.0};
shadow = 2;
class Attributes
{
font = "PuristaMedium";
color = "#ffffff";
colorLink = "#D09B43";
align = "center";
valign = "middle";
size = "2";
shadow = 2;
};
};

View File

@ -1,137 +0,0 @@
#include <\x\Addons\rmx_init\defines.inc>
//TODO: read key press from global var (profileNamespace config)
//TODO: admin choice to use missionConfigFile
//TODO: (Ask team) suffix code to close dialog when button pressed
//TODO: unlimited categories
//TODO: functionize var Defines, do check before button action
//TODO: nil before closing display
//TODO: add commented out dialog version to display
//TODO: add cooldown
//TODO: prevent from opening and instantly close if known display is on
if !(isNil "rmx_var_dynamicMenuInProgress") exitWith {};
if !(isNil "rmx_var_dynamicMenuHOLD") exitWith {};
private ["_display","_cfg","_cat","_buttonSettings","_configs","_subclasses","_action","_entries","_img","_img2","_center","_defaultScaleX","_defaultScaleY","_distance","_scaleLargeX","_scaleLargeY","_scaleSmallX","_scaleSmallY","_scaleSelectedX","_scaleSelectedY","_points","_positions","_positions2","_positions3","_x","_y"];
disableSerialization;
rmx_var_dynamicMenuInProgress = true; //needed to suspend button spam, removed later
_display = (findDisplay 46) createDisplay "rmx_dynamenu";
_display displaySetEventHandler ["keyUp", "[false,_this select 1] call Epoch_dynamicMenuCleanup;"];
//TODO: config choice based on global variable or dynamic config update (slower)
_cfg = param [0,"cfgDynamicMenu" call EPOCH_returnConfig,[configFile]];
/** Variable Defines **/
{
call compile (format ["%1 = %2;",configName _x,getText _x]);
} count (configProperties [(_cfg >> "variableDefines"),"true",false]);
_cat = if (isClass _cfg >> "dynaButtons") then {
(_cfg >> "dynaButtons")
} else {
_cfg
};
/** Button configs **/
_buttonSettings = [];
_configs = "true" configClasses (_cat);
{
if (call compile (getText(_x >> "condition"))) then {
_subclasses = configProperties [_x, "isClass _x",true];
_action = if (_subclasses isEqualTo []) then {
compile (format ["%1",getText(_x >> "action")])
} else {
compile (format ["[true,57] call Epoch_dynamicMenuCleanup; %2",getText(_x >> "action")])
};
//diag_log _action;
_buttonSettings pushBack [
getText(_x >> "icon"),
getText(_x >> "tooltip"),
_action
];
};
} forEach _configs;
_entries = count _buttonSettings;
if (_entries <= 0) exitWith {rmx_var_tabmenu = true; rmx_var_dynamicMenuInProgress = nil;};
//Post processing
if (isNil "rmx_var_dynamenuPPHandle") then {
rmx_var_dynamenuPPHandle = ["dynamicBlur",10] call epoch_postProcessCreate;
[rmx_var_dynamenuPPHandle, 1, [1]] call epoch_postprocessAdjust;
};
_img = "#(rgb,8,8,3)color(0,0,0,0)";
_img2 = "x\addons\a3_epoch_code\Data\UI\buttons\dm_selection.paa";
//defaults don't edit
_center = 0.5;
_defaultScaleX = 0.4;
_defaultScaleY = 0.5;
_distance = 0.7 + _entries / 100;
//edit scaling here (divisor only, larger values produce smaller image)
_scaleLargeX = _defaultScaleX / (1.5 + _entries / 10); //anim invisible
_scaleLargeY = _defaultScaleY / (1.5 + _entries / 10);
_scaleSmallX = _defaultScaleX / (2.5 + _entries / 10); //icons
_scaleSmallY = _defaultScaleY / (2.5 + _entries / 10);
_scaleSelectedX = _defaultScaleX / (1.75 + _entries / 10); //anim selected
_scaleSelectedY = _defaultScaleY / (1.75 + _entries / 10);
_points = 360 / _entries;
_positions = [];
_positions2 = [];
_positions3 = [];
for "_p" from 0 to 360 step _points do {
_x = cos _p * (0.3 * _distance);
_y = sin _p * (0.4 * _distance);
_positions pushBack [_x + (_center - (_scaleLargeX / 2)),_y + (_center - (_scaleLargeY / 2)),_scaleLargeX,_scaleLargeY];
_positions2 pushBack [_x + (_center - (_scaleSmallX / 2)),_y + (_center - (_scaleSmallY / 2)),_scaleSmallX,_scaleSmallY];
_positions3 pushBack [_x + (_center - (_scaleSelectedX / 2)),_y + (_center - (_scaleSelectedY / 2)),_scaleSelectedX,_scaleSelectedY];
};
rmx_var_controls = [];
//_buttonSettings [icon,tooltip,action]
for "_e" from 0 to (_entries - 1) do {
private ["_ctrl","_ctrl2"];
_ctrl = _display ctrlCreate ["rmx_rscPicture",(66600 + _e)];
_ctrl ctrlSetText _img;
_ctrl ctrlSetPosition (_positions select _e);
_ctrl ctrlCommit 0.1;
_ctrl ctrlSetTooltip (_buttonSettings select _e select 1);
_ctrl ctrlSetTooltipColorBox [0, 0, 0, 0];
_ctrl ctrlSetTooltipColorShade [0, 0, 0, 0];
_ctrl ctrlSetEventHandler ["mouseEnter", (format ["_c = _this select 0; _c ctrlSetText '%1'; _c ctrlSetPosition %2; _c ctrlCommit 0.3;",_img2,(_positions3 select _e)])];
_ctrl ctrlSetEventHandler ["mouseExit", (format ["_c = _this select 0; _c ctrlSetText '%1'; _c ctrlSetPosition %2; _c ctrlCommit 0.3;",_img,(_positions select _e)])];
_ctrl ctrlSetEventHandler ["mouseButtonDown", (format ["call %1;",(_buttonSettings select _e select 2)])];
_ctrl ctrlEnable true;
_ctrl2 = _display ctrlCreate ["rmx_rscPicture",-(66600 + _e)];
_ctrl2 ctrlSetTooltip (_buttonSettings select _e select 1);
_ctrl2 ctrlSetTooltipColorBox [0, 0, 0, 0];
_ctrl2 ctrlSetTooltipColorShade [0, 0, 0, 0];
_ctrl2 ctrlSetText (_buttonSettings select _e select 0);
_ctrl2 ctrlSetPosition (_positions2 select _e);
_ctrl2 ctrlCommit 0.1;
rmx_var_controls pushBack _ctrl;
rmx_var_controls pushBack _ctrl2;
};
/** Variable Cleanup **/
{
call compile (format ["%1 = nil;",configName _x]);
} count (configProperties [(_cfg >> "variableDefines"),"true",false]);
rmx_var_dynamicMenuInProgress = nil;
true

View File

@ -1,31 +0,0 @@
_test = param [1,0];
if (_test != 57) exitWith {true}; //dirty fix, TODO: read values from epoch startup vars for key
_this spawn {
if !(isNil "rmx_var_dynamicMenuInProgress") exitWith {};
_args = param [0,false,[false]]; //true if redirected with category, false for full cleanup
if (_args) then {rmx_var_dynamicMenuHOLD = true;} else {rmx_var_dynamicMenuHOLD = nil; rmx_var_dynamicMenuCat = nil;};
disableSerialization;
private "_animSpeed";
_animSpeed = 0.1;
{
_x ctrlSetPosition [0.4625,0.45,0.075,0.1];
_x ctrlSetFade 1;
_x ctrlCommit _animSpeed;
} forEach rmx_var_controls;
[rmx_var_dynamenuPPHandle, _animSpeed, [0]] call epoch_postprocessAdjust;
uiSleep _animSpeed;
findDisplay 66600 closeDisplay 1;
rmx_var_controls = nil;
rmx_var_dynamenuPPHandle call epoch_postprocessDestroy;
rmx_var_dynamenuPPHandle = nil;
};
true

View File

@ -0,0 +1,97 @@
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
_text = param [0,"Missing text",["",(text "")]];
_time = param [1,5,[1]];
_color = param [2,"#ffffff",[""]];
if (typeName _text isEqualTo "STRING") then {_text = parseText _text};
_alreadyEnabled = uiNamespace getVariable ["rmx_var_dynamicText",false];
_input = count str _text * 2;
_scale = 1;
_width = _scale * GUI_GRID_W;
_height = _scale * GUI_GRID_H;
_centerX = 0.5;
_centerY = -18 * GUI_GRID_H + GUI_GRID_Y;
disableSerialization;
_display = findDisplay 46;
_ctrlGroup = _display ctrlCreate ["RscControlsGroupNoScrollbars", call Epoch_getIDC];
_ctrlGroup ctrlSetPosition [_centerX - _width/2 * _input / 2, _centerY - _height, _width * _input, _height * 2];
_ctrlGroup ctrlCommit 0;
_y = 0;
_cnt = -1;
_controls = [];
for "_i" from 0 to (_input - 1) do {
_ctrl = _display ctrlCreate ["RscPicture", call Epoch_getIDC,_ctrlGroup];
_cnt = _cnt + 1;
if (_cnt == (_input / 2)) then {_y = _height; _cnt = 0;};
_ctrl ctrlSetPosition [_cnt * _width,_y,_width,_height];
_ctrl ctrlSetText "#(rgb,8,8,3)color(1,1,1,1)";
_ctrl ctrlCommit 0;
_ctrl ctrlSetFade 1-(random 0.2);
[_ctrl, 1-(random 0.2),0] call BIS_fnc_ctrlSetScale;
_controls set [_i, _ctrl];
};
_ctrlText = _display ctrlCreate ["rmx_ST1", call Epoch_getIDC,_ctrlGroup];
_ctrlText ctrlSetStructuredText _text;
_ctrlText ctrlSetPosition [0, 0, _width * _input /2, _height * 2];
_ctrlText ctrlCommit 0;
_add = uiNamespace getVariable ["rmx_var_dynamicTextCTRL",[]];
_add pushBack _ctrlGroup;
uiNamespace setVariable ["rmx_var_dynamicTextCTRL",_add];
[_time,_ctrlGroup,_ctrlText,_controls] spawn {
disableSerialization;
params ["_time","_ctrlGroup","_ctrlText","_controls"];
_tick = diag_tickTime;
while {(diag_tickTime - _tick) < _time} do {
{
_x ctrlSetFade 1-(random 0.2);
[_x, 1-(random 0.2), (random 1)] call BIS_fnc_ctrlSetScale;
} forEach _controls;
uiSleep 0.5;
};
_arr = uiNamespace getVariable ["rmx_var_dynamicTextCTRL",[]];
_del =
{
if (str _x isEqualTo str _ctrlGroup) exitWith {_forEachIndex};
0
} forEach _arr;
_arr deleteAt _del;
uiNamespace setVariable ["rmx_var_dynamicTextCTRL",_arr];
uiSleep 0.01;
{
_x call Epoch_getIDC;
ctrlDelete _x;
} forEach (_controls + [_ctrlText] + [_ctrlGroup]);
};
if !(_alreadyEnabled) then {
uiNamespace setVariable ["rmx_var_dynamicText",true];
[ctrlPosition _ctrlGroup] spawn {
disableSerialization;
params ["_defaultPos"];
_yPos = _defaultPos param [1];
_height = _defaultPos param [3];
while {uiNamespace getVariable ["rmx_var_dynamicText",false]} do {
_arr = uiNamespace getVariable ["rmx_var_dynamicTextCTRL",[]];
if (_arr isEqualTo []) exitWith {uiNamespace setVariable ["rmx_var_dynamicText",nil];};
{
_xPos = (ctrlPosition _x) select 0;
_x ctrlSetPosition [_xPos,_yPos + _height * _forEachIndex];
_x ctrlCommit 0;
} forEach _arr;
};
};
};
true

View File

@ -0,0 +1,10 @@
_min = safezoneX + 0.4 * safezoneW;
_max = safezoneX + 0.6 * safezoneW;
_r = linearConversion [_min, _max, _this, 0.2, -1, true];
_r2 = linearConversion [_min, _max, _this, 2, 0.8, true];
_r3 = linearConversion [_min, _max, _this, safezoneX, safezoneX - safezoneW * 0.3, true];
(findDisplay -7 displayCtrl 88801) ctrlSetPosition [_r,1,1.8];
(findDisplay -7 displayCtrl 88802) ctrlSetPosition [_r2,1,1.8];
(findDisplay -7 displayCtrl 88800) ctrlSetPosition [_r3,safezoneY - safezoneH * 0.1];
(findDisplay -7 displayCtrl 88800) ctrlCommit 0;

View File

@ -4,7 +4,7 @@
*/
private ["_in","_list","_out","_find"];
_in = param [0,controlNull,[controlNull]];
_list = uiNamespace getVariable ["rmx_var_uniqueIDC",[]];
_list = missionNamespace getVariable ["rmx_var_uniqueIDC",[]];
if (ctrlIDC _in isEqualTo -1) then {
_out = -90000 - (count _list);
@ -14,6 +14,6 @@ if (ctrlIDC _in isEqualTo -1) then {
_list deleteAt _find;
_out = true;
};
uiNamespace setVariable ["rmx_var_uniqueIDC",_list];
missionNamespace setVariable ["rmx_var_uniqueIDC",_list];
_out

View File

@ -0,0 +1,25 @@
private ["_obj","_mode","_hitPoints","_dmg"];
_obj = param [0, objNull, [objNull]];
_mode = param [1, 0, [0]];
if (_obj isEqualTo objNull) exitWith {};
_hitPoints = getAllHitPointsDamage _obj;
{
_dmg = _hitPoints select 2 select _forEachIndex;
if ((_mode isEqualTo 1) || ((_mode isEqualTo 0) && !(_dmg isEqualTo 0))) then {
[
_obj,
10,
format ["x\addons\a3_epoch_code\Data\UI\health_parts\%1.paa", floor (_dmg * 10)],
format ["%1%2",100 - (round (_dmg * 100)),"%"],
(_obj selectionPosition _x),
10
] call epoch_gui3dModelPos;
};
} forEach (_hitPoints select 1);
true

View File

@ -1,43 +0,0 @@
private["_mode","_display","_vehicle","_isLock"];
_mode = [_this,0,"",[""]] call bis_fnc_param;
_display = [_this,1,displayNull,[displayNull]] call bis_fnc_param;
_vehicle = cursorTarget;
if (vehicle player != player) then {
_vehicle = vehicle player;
};
if (isNull _vehicle) exitWith { closeDialog 0 };
disableSerialization;
_isLock = locked _vehicle in [2,3];
switch _mode do {
case "onLoad": {
if !((crew _vehicle) isEqualTo []) then {
(_display displayCtrl 2400) ctrlEnable false;
};
if (_isLock) then {
(_display displayCtrl 2400) ctrlEnable false; //Lock Button
(_display displayCtrl 2402) ctrlEnable false; //Inspect Button
} else {
(_display displayCtrl 2401) ctrlEnable false; //Unlock Button
};
};
case "Lock": {
if (!_isLock) then {
EPOCH_lockVehicle_PVS = [_vehicle, true, player, Epoch_personalToken];
publicVariableServer "EPOCH_lockVehicle_PVS";
};
closeDialog 0;
};
case "Unlock": {
if (_isLock) then {
EPOCH_lockVehicle_PVS = [_vehicle, false, player, Epoch_personalToken];
publicVariableServer "EPOCH_lockVehicle_PVS";
};
closeDialog 0;
};
default { closeDialog 0 };
};

View File

@ -0,0 +1,19 @@
_in = param [0,false];
_out = switch (typeName _in) do {
case "STRING":
{
if !(isNull dyna_cursorTarget) then {
dyna_cursorTarget getVariable ["EPOCH_Locked",false]
};
};
case "OBJECT":
{
EPOCH_lockStorage_PVS = [_in,(_in getVariable ["EPOCH_Locked",false]),player,Epoch_personalToken];
publicVariableServer "EPOCH_lockStorage_PVS";
true
};
default {false};
};
_out

View File

@ -129,7 +129,7 @@ rmx_var_crafting_PP_DB = ["dynamicBlur",11] call epoch_postProcessCreate;
private "_pos";
_pos = position player;
while {rmx_var_craftingLOOPS} do {
if ((_pos distance (position player)) > 0) exitWith {closeDialog 0;};
if ((_pos distance (position player)) > 1) exitWith {closeDialog 0;};
};
};
true

Some files were not shown because too many files have changed in this diff Show More