Add epoch right click actions to Epoch Core

The right click menu made by Mudzereli and updated by Salival is part of epoch now. It gets only loaded if the DZE_CLICK_ACTIONS is not empty.
This commit is contained in:
A Man
2021-08-17 19:20:33 +02:00
parent ad3c38e403
commit c4919d65e5
4 changed files with 155 additions and 28 deletions

View File

@@ -160,6 +160,25 @@ if (!isDedicated) then {
dayz_knifeDulling = false; // Enable knife dulling. Knives need to be sharpened after so many uses.
dayz_matchboxCount = false; // Enable match stick count. After five uses matches run out and must be replaced.
dayz_waterBottleBreaking = false; // Water bottles have a chance to break when boiling and require duct tape to fix
/*
DZE_CLICK_ACTIONS
This is where you register your right-click actions
FORMAT -- (no comma after last array entry)
[_classname,_text,_execute,_condition],
PARAMETERS
_classname : the name of the class to click on (example = "ItemBloodbag")
_text : the text for the option that is displayed when right clicking on the item (example = "Self Transfuse")
_execute : compiled code to execute when the option is selected (example = "execVM 'my\scripts\self_transfuse.sqf';")
_condition : compiled code evaluated to determine whether or not the option is displayed (example = {true})
*/
DZE_CLICK_ACTIONS = [
/* ["ItemGPS",localize "STR_CL_CA_SCAN_NEARBY","if(isNil 'CA_GPS_RANGE') then {CA_GPS_RANGE = 1500;};CA_ZOMBIE_COUNT = count ((position player) nearEntities ['zZombie_Base',CA_GPS_RANGE]); CA_MAN_COUNT = count ((position player) nearEntities ['CAManBase',CA_GPS_RANGE]); format[localize 'STR_CL_CA_SCAN',CA_GPS_RANGE,CA_MAN_COUNT - CA_ZOMBIE_COUNT,count ((position player) nearEntities ['zZombie_Base',CA_GPS_RANGE]),count ((position player) nearEntities ['allVehicles',CA_GPS_RANGE]) - CA_MAN_COUNT] call dayz_rollingMessages;","true"],
["ItemGPS",localize "STR_CL_CA_RANGE_UP","if(isNil 'CA_GPS_RANGE') then {CA_GPS_RANGE = 1500;};CA_GPS_RANGE = (CA_GPS_RANGE + 100) min 2500; format[localize 'STR_CL_CA_RANGE_GPS',CA_GPS_RANGE] call dayz_rollingMessages;","true"],
["ItemGPS",localize "STR_CL_CA_RANGE_DOWN","if(isNil 'CA_GPS_RANGE') then {CA_GPS_RANGE = 1500;};CA_GPS_RANGE = (CA_GPS_RANGE - 100) max 1000; format[localize 'STR_CL_CA_RANGE_GPS',CA_GPS_RANGE] call dayz_rollingMessages;","true"]
*/
];
};
// Both