Added cse_sys_advanced_interaction source

This commit is contained in:
Thomas Kooi 2015-01-12 23:24:21 +01:00
parent db6f30fcc9
commit ff88c74537
90 changed files with 4612 additions and 0 deletions

View File

@ -0,0 +1,7 @@
class CfgAddons {
class PreloadAddons {
class cse_sys_advanced_interaction {
list[] = {"cse_sys_advanced_interaction", "cse_moduleAmbientCivilians"};
};
};
};

View File

@ -0,0 +1,45 @@
class CfgFunctions {
class CSE {
class AdvancedInteraction {
file = "cse\cse_sys_advanced_Interaction\functions";
class arrest_AIM { recompile = 1; };
class displayArrestOptions_AIM { recompile = 1; };
class load_AIM { recompile = 1; };
class loadLocal_AIM { recompile = 1; };
class move_AIM { recompile = 1; };
class placedown_AIM { recompile = 1; };
class release_AIM { recompile = 1; };
class searchPerson_AIM { recompile = 1; };
class searchPersonCondition_AIM { recompile = 1; };
class unload_AIM { recompile = 1; };
class onCivilianKilled_AIM { recompile = 1; };
class getDialogLines_AIM { recompile = 1; };
class getReactionTypeOfUnit_AIM { recompile = 1; };
class playerStartConverationWith_AIM { recompile = 1; };
class dialogMovementOrder_AIM { recompile = 1; };
class fillDialogWithConversationLines_AIM { recompile = 1; };
class personSpeaksLine_AIM { recompile = 1; };
class getAvailableProfileSetsFor_AIM { recompile = 1; };
class generateProfileInformation_AIM { recompile = 1; };
class getPlayerSpokenLineType_AIM { recompile = 1; };
class playerSpeaksLine_AIM { recompile = 1; };
class personReactionToLine_AIM { recompile = 1; };
class getProfileInformation_AIM { recompile = 1; };
class getReactionLinesOfPerson_AIM { recompile = 1; };
class addToConversationLog_AIM { recompile = 1; };
class getALiVECivData_AIM { recompile = 1; };
class isALIVECivlianSystemActive_AIM { recompile = 1; };
class disarmPerson_AIM { recompile = 1; };
class canDetain { recompile = 1; };
class canPerformArrestActions_AIM { recompile = 1; };
class canPerformAction_AIM { recompile = 1; };
class callForSurrender_AIM { recompile = 1; };
};
class AmbientCivilians {
file = "cse\cse_sys_advanced_Interaction\ambient\functions";
class moduleAmbientcivilians { recompile = 1; };
class getAvailableUnits_faction { recompile = 1; };
};
};
};

View File

@ -0,0 +1,104 @@
// keep present for sometime, to allow backwards compatibility. Note: We will not support this in the code!
class CfgMagazines {
class Default;
class CA_magazine: Default{};
class cse_Keycuffs: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Keycuffs";
picture = "cse\cse_sys_advanced_interaction\img\keycuffs.paa";
descriptionShort = "Keycuffs, used for detaining a suspect";
};
class cse_HIIDE: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 3;
descriptionUse = "Biometric Scanner";
descriptionShort = "";
displayName = "Biometric Scanner (HIIDE)";
picture = "cse\cse_sys_advanced_interaction\img\HIIDE.paa";
model = "cse\cse_sys_advanced_interaction\hiide.p3d";
};
class cse_oldphone: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Old Phone";
picture = "cse\cse_sys_advanced_interaction\img\oldphone.paa";
model = "cse\cse_sys_advanced_interaction\mobile.p3d";
};
class cse_oldphone_folded: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Old Phone (Folded)";
picture = "cse\cse_sys_advanced_interaction\img\oldphone.paa";
model = "cse\cse_sys_advanced_interaction\mobile_folded.p3d";
};
class cse_watch_expensive: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Watch";
picture ="cse\cse_sys_advanced_interaction\img\watch_expensive.paa";
};
class cse_wallet: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Wallet";
picture = "cse\cse_sys_advanced_interaction\img\wallet.paa";
};
class cse_9v_battery: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "9 volt battery";
picture = "cse\cse_sys_advanced_interaction\img\9v_battery.paa";
model = "\A3\Structures_F_EPA\Items\Electronics\Battery_F.p3d";
};
class cse_notebook: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Notebook";
picture = "cse\cse_sys_advanced_interaction\img\notebook.paa";
};
class cse_scissors: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Scissors";
picture = "cse\cse_sys_advanced_interaction\img\scissor.paa";
} ;
class cse_wires: CA_magazine {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Wires";
picture = "cse\cse_sys_advanced_interaction\img\wires.paa";
};
};

View File

@ -0,0 +1,7 @@
class CfgSounds {
class cse_cable_tie_zipping {
name = "cse_cable_tie_zipping";
sound[] = {"cse\cse_sys_advanced_interaction\sounds\cse_cable_tie_zipping.ogg","db-1",1.0};
titles[] = {};
};
};

View File

@ -0,0 +1,355 @@
class CfgVehicles
{
class Logic;
class Module_F: Logic
{
class ArgumentsBaseUnits
{
};
};
class cse_sys_advanced_interaction: Module_F {
scope = 2;
displayName = "Advanced Interaction [CSE]";
icon = "\cse\cse_main\data\cse_aim_module.paa";
category = "cseModules";
function = "cse_fnc_initalizeModule_F";
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
class Arguments
{
class enableDetain {
displayName = "Allow detaining";
description = "Allow players to detain other units";
typeName = "NUMBER";
defaultValue = 2;
class values {
class all {name="Everyone"; value=3; };
class onlyOtherSide {name="Opposite side"; value=2; default=1;};
class onlyAI {name="AI Only"; value=1; };
class onlyOtherSideAI {name="Opposite side AI only"; value=0; };
class disable {name="Disable"; value=-1; };
};
};
class enableSearch {
displayName = "Allow search";
description = "Allow players to search other units and vehicles";
typeName = "NUMBER";
defaultValue = 2;
class values {
class all {name="Everyone"; value=3; };
class onlyOtherSide {name="Opposite side"; value=2; default=1;};
class onlyAI {name="AI Only"; value=1; };
class onlyOtherSideAI {name="Opposite side (AI Only)"; value=0; };
class disable {name="Disable"; value=-1; };
};
};
class enableBiometric {
displayName = "Biometric Scanner";
description = "Allow players to use the biometric scanner on other units";
typeName = "NUMBER";
defaultValue = 2;
class values {
class all {name="Everyone"; value=3; };
class onlyOtherSide {name="Opposite side"; value=2; default=1;};
class onlyAI {name="AI Only"; value=1; };
class onlyOtherSideAI {name="Opposite side (AI Only)"; value=0; };
class disable {name="Disable"; value=-1; };
};
};
class enableConversation {
displayName = "Enable Conversation";
description = "Allow Conversation with civilians";
typeName = "BOOL";
defaultValue = false;
};
class useEquipment {
displayName = "Equipment Required";
description = "Is AIM equipment required for performing actions?";
typeName = "BOOL";
defaultValue = true;
};
};
};
class cse_moduleAmbientCivilians: Module_F {
scope = 2;
displayName = "Ambient civilians [CSE]";
icon = "\cse\cse_main\data\cse_aim_module.paa";
category = "cseMisc";
function = "cse_fnc_moduleAmbientcivilians";
functionPriority = 1;
isGlobal = 0;
isTriggerActivated = 0;
class Arguments {
class maxCivilians {
displayName = "Max Civilians";
description = "The maximum amount of civilians at any given time";
typeName = "NUMBER";
defaultValue = 50;
};
class maxRadius {
displayName = "Max Radius";
description = "The maximum radus around object";
typeName = "NUMBER";
defaultValue = 1000;
};
class minPlayerDistance {
displayName = "Minimal Player distance";
description = "The minimal distance players can be near spawn locations";
typeName = "NUMBER";
defaultValue = 250;
};
class percentageOf {
displayName = "Percentage";
description = "Chance of building occupied ( 1 = 100%, 0 = 0%)";
typeName = "NUMBER";
defaultValue = 0.3;
};
class factionOf {
displayName = "Faction";
description = "Of what faction should the civilians be";
typeName = "STRING";
defaultValue = "CIV_F";
};
class weaponChance {
displayName = "Chance of Weapons";
description = "What is the chance that spawned civilans have weapons";
typeName = "NUMBER";
defaultValue = 0;
};
class hostilityToBlufor {
displayName = "Hostility to BLUFOR";
description = "What is the initial stance towards BLUFOR";
typeName = "NUMBER";
defaultValue = 0;
};
class hostilityToOPfor {
displayName = "Hostility to OPFOR";
description = "What is the initial stance towards OPFOR";
typeName = "NUMBER";
defaultValue = 0;
};
};
};
class NATO_Box_Base;
class cse_advancedInteractionItems: NATO_Box_Base
{
scope = 2;
displayName = "Advanced Interaction Items [CSE]";
author = "Combat Space Enhancement";
model = "\A3\weapons_F\AmmoBoxes\AmmoBox_F";
class TransportWeapons
{
class _xx_cse_Keycuffs
{
weapon="cse_Keycuffs";
count=5;
};
class _xx_cse_HIIDE
{
weapon="cse_HIIDE";
count=5;
};
class _xx_cse_oldphone
{
weapon="cse_oldphone";
count=5;
};
class _xx_cse_oldphone_folded
{
weapon="cse_oldphone_folded";
count=5;
};
class _xx_cse_watch_expensive
{
weapon="cse_watch_expensive";
count=5;
};
class _xx_cse_wallet
{
weapon="cse_wallet";
count=5;
};
class _xx_cse_9v_battery
{
weapon="cse_9v_battery";
count=5;
};
class _xx_cse_notebook
{
weapon="cse_notebook";
count=5;
};
class _xx_cse_scissors
{
weapon="cse_scissors";
count=5;
};
class _xx_cse_wires
{
weapon="cse_wires";
count=5;
};
};
};
class Item_Base_F;
class cse_KeycuffsItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Keycuffs";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_Keycuffs
{
name = "cse_Keycuffs";
count = 1;
};
};
};
class cse_HIIDEItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
descriptionUse = "Biometric Scanner";
descriptionShort = "";
displayName = "Biometric Scanner (HIIDE)";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_HIIDE
{
name = "cse_HIIDE";
count = 1;
};
};
};
class cse_oldphoneItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Old Phone";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_oldphone
{
name = "cse_oldphone";
count = 1;
};
};
};
class cse_oldphone_foldedItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Old Phone (Folded)";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_oldphone_folded
{
name = "cse_oldphone_folded";
count = 1;
};
};
};
class cse_watch_expensiveItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Watch";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_watch_expensive
{
name = "cse_watch_expensive";
count = 1;
};
};
};
class cse_walletItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Wallet";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_wallet
{
name = "cse_wallet";
count = 1;
};
};
};
class cse_9v_batteryItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "9 volt battery";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_9v_battery
{
name = "cse_9v_battery";
count = 1;
};
};
};
class cse_notebookItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Notebook";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_notebook
{
name = "cse_notebook";
count = 1;
};
};
};
class cse_scissorsItem: Item_Base_F {
author = "Combat Space Enhancement";
scope = 2;
displayName = "Scissors";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_scissors
{
name = "cse_scissors";
count = 1;
};
};
};
class cse_wiresItem: Item_Base_F {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = "Wires";
vehicleClass = "Items";
scopeCurator = 2;
class TransportItems
{
class cse_wires
{
name = "cse_wires";
count = 1;
};
};
};
};

View File

@ -0,0 +1,141 @@
class CfgWeapons {
class ItemCore;
class InventoryItem_Base_F;
class cse_Keycuffs: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_KEYCUFFS_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\keycuffs.paa";
descriptionShort = $STR_CSE_ITEM_KEYCUFFS_DESC;
model = "\A3\weapons_F\ammo\mag_univ.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_HIIDE: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
descriptionUse = $STR_CSE_ITEM_HIIDE_DESC;
descriptionShort = $STR_CSE_ITEM_HIIDE_DESC;
displayName = $STR_CSE_ITEM_HIIDE_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\HIIDE.paa";
model = "\cse\cse_sys_advanced_interaction\hiide.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_oldphone: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_PHONE_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\oldphone.paa";
model = "\cse\cse_sys_advanced_interaction\mobile.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_oldphone_folded: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_PHONE_FOLDED_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\oldphone.paa";
model = "\cse\cse_sys_advanced_interaction\mobile_folded.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_watch_expensive: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_WATCH_EXPENSIVE_DISPLAY;
picture ="cse\cse_sys_advanced_interaction\img\watch_expensive.paa";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_wallet: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_WALLET_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\wallet.paa";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_9v_battery: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_9v_BATTERY_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\9v_battery.paa";
model = "\A3\Structures_F_EPA\Items\Electronics\Battery_F.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_notebook: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_NOTEBOOK_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\notebook.paa";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_scissors: ItemCore {
author = "Combat Space Enhancement";
scope = 2;
displayName = $STR_CSE_ITEM_SCISSORS_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\scissor.paa";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
class cse_wires: ItemCore {
scope = 2;
value = 1;
count = 1;
type = 16;
mass = 1;
displayName = $STR_CSE_ITEM_WIRES_DISPLAY;
picture = "\cse\cse_sys_advanced_interaction\img\wires.paa";
model = "\A3\weapons_F\ammo\mag_univ.p3d";
class ItemInfo: InventoryItem_Base_F
{
mass=10;
type=201;
};
};
};

View File

@ -0,0 +1,60 @@
#define MENU_KEYBINDING 1
#define ACTION_KEYBINDING 2
#define CLIENT_SETTING 3
class Combat_Space_Enhancement {
class cfgModules {
class cse_sys_advanced_interaction {
init = "call compile preprocessFile 'cse\cse_sys_advanced_interaction\fn_aim_init.sqf';";
name = "Advanced Interaction Module";
class EventHandlers {
class CAManBase {
//init = "waituntil{player==player}; hint 'AIM TEST';";
killed = "_this call cse_fnc_onCivilianKilled_AIM;";
};
};
class dialog_module {
class lines {
class agressive_OutOfMyFace {
text = "I already told you to go away! Now get out of my face!";
};
class agressive_YouWontListen: agressive_OutOfMyFace {
text = "You just won't listen, won't you?";
};
class agressive_SlapInFace: agressive_OutOfMyFace {
text = "Someone should slap you in the face.";
};
class agressive_LeaveAlone: agressive_OutOfMyFace {
text = "Leave me alone!";
};
class friendly_hello_friend {
text = "Hello my friend!";
stance = "Friendly";
};
class friendly_haveNiceDay: friendly_hello_friend {
text = "Good Sir, I hope you have a nice day";
};
class friendly_welcome: friendly_hello_friend {
text = "Welcome";
};
class friendly_whatbringsyouhere: friendly_hello_friend {
text = "Hello, what brings you here?";
};
};
};
class Configurations {
class open_biometric_scanner_aim {
type = MENU_KEYBINDING;
title = "Open Biometric Scanner";
description = "Opens the biometric scanner if the action is available. The action will be available if you are looking at another Person.";
value[] = {0,0,0,0};
onPressed = "if (CSE_ENABLED_BIOMETRIC_SCANNER_AIM) then {_target = cursorTarget;if (!iSNull _target) then {if ((_target isKindOf 'CAManBase') && ((player distance _target) < 10)) then {[player,_target] call cse_fnc_biometricScanner;};};};";
idd = 432231;
};
};
};
};
};

View File

@ -0,0 +1,7 @@
#include "biometric_scanner\define.hpp"
#include "biometric_scanner\biometricScannerDialog.hpp"
#include "gui\define.h"
#include "gui\dialog_menu.h"
#include "gui\search_menu.h"

View File

@ -0,0 +1,41 @@
/**
* fn_getAvailableGroups_faction.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_factionOfEntry", "_faction", "_factionConfig", "_return", "_sideN", "_sideT", "_sideConfig", "_entry", "_scopeOfEntry"];
_faction = _this select 0;
_baseclass = _this select 1;
_factionConfig = (configFile >> "CfgFactionClasses" >> _faction);
_return = [];
_filtered_non_base = [];
if (isclass _factionConfig) then {
_configCivs = (configFile >> "CfgVehicles");
_numberOfConfig = count _configCivs;
for [{_i=0}, {(_i< _numberOfConfig)}, {_i=_i+1}] do {
_entry = _configCivs select _i;
if (isClass _entry) then {
_factionOfEntry = getText(_entry >> "faction");
_scopeOfEntry = getNumber (_entry >> "scope");
if (_factionOfEntry == _faction && _scopeOfEntry >= 2) then {
if ([_entry, _baseclass] call cse_fnc_inheritsFrom) then {
_return pushback (configName _entry);
} else {
_filtered_non_base pushback (configName _entry);
};
};
};
};
//};
} else {
[]
};
[format["Filtered non base config entries: %1", _filtered_non_base]] call cse_fnc_debug;
_return

View File

@ -0,0 +1,201 @@
/**
* fn_moduleAmbientCivilians.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#define BUILDING_SEARCH_RADIUS 1000
#define PERCENTAGE_OF_BUILDINGS 0.3
#define MINIMAL_DISTANCE_PLAYERS 10
#define MAX_AMOUNT_CIVS_TOTAL 100
#define MAX_UNITS_IN_GROUP 3
// only run this on the server
if !(isServer) exitwith {};
_this spawn {
waitUntil {time > 1};
_logic = [_this,0,objNull,[objNull]] call BIS_fnc_param;
if (!isNull _logic) then {
_MAX_CIVS_TOTAL = _logic getvariable ["maxCivilians", MAX_AMOUNT_CIVS_TOTAL];
_MAX_RADIUS = _logic getvariable ["maxRadius", BUILDING_SEARCH_RADIUS];
_MIN_DISTANCE_PLAYERS = _logic getvariable ["minPlayerDistance", MINIMAL_DISTANCE_PLAYERS];
_PERCENTAGE = _logic getvariable ["percentageOf", PERCENTAGE_OF_BUILDINGS];
_FACTION_OF = _logic getVariable ["factionOf", "CIV_F"];
_availableUnitClasses = [_FACTION_OF, "CaManBase"] call cse_fnc_getAvailableUnits_faction;
[format["Found available classes: %1", _availableUnitClasses]] call cse_fnc_debug;
if (_availableUnitClasses isEqualTo []) exitwith { [format["AvailableClasses for %1 is empty", _FACTION_OF]] call cse_fnc_debug; };
_allSpawnedUnits = [];
_allSpawnedGroups = [];
_playerUnits = [];
_allCheckedBuildings = [];
while {alive _logic} do {
sleep 1;
if (isMultiplayer) then {
waituntil {count playableUnits > 0};
_playerUnits = playableUnits;
} else {
_playerUnits = [player];
};
_spawnLocatationObjects = [_logic];
{
_playableUnit = _x;
if (count _allSpawnedUnits < _MAX_CIVS_TOTAL && {_playableUnit distance _logic < _MAX_RADIUS}) then {
_availableBuildings = [];
_buildingsWithInArea = nearestObjects [_playableUnit, ["house"], _MAX_RADIUS];
{
_building = _x;
if !(_building in _allCheckedBuildings) then {
_buildingPos = [_x] call BIS_fnc_buildingPositions;
_invalid = false;
{
if (_building distance _x <= _MIN_DISTANCE_PLAYERS) exitwith {
_invalid = true;
};
}foreach _playerUnits;
if !(_invalid) then {
_availableBuildings pushback [_building, _buildingPos];
_allCheckedBuildings pushback _building;
};
};
}foreach _buildingsWithInArea;
{
_building = _x select 0;
_buildingPos = _x select 1;
if (({_x getvariable ["cse_ambientcivilianModule_Building", objNull] == _building}count _allSpawnedGroups) == 0 && (count _allSpawnedUnits < _MAX_CIVS_TOTAL)) then {
if (random(1) >= (1 - _PERCENTAGE)) then {
_group = createGroup civilian;
_group setvariable ["cse_ambientcivilianModule_Building", _building];
if (isNull _group) exitwith {
["Group was null - most likely hit the 144 limit!"] call cse_fnc_debug;
};
{
if ((random(1) >= 0.7 && (count _allSpawnedUnits < _MAX_CIVS_TOTAL) && {(count units _group < MAX_UNITS_IN_GROUP)})|| (count units _group == 0)) then {
_className = _availableUnitClasses select (round(random((count _availableUnitClasses)-1)));
_unit = _group createUnit [_className, _x, [], 0, "NONE"];
_unit setOwner (owner _logic);
_allSpawnedUnits pushback _unit;
};
}foreach _buildingPos;
if (count units _group == 0) then {
deleteGroup _group;
} else {
_allSpawnedGroups pushback _group;
_group addWaypoint [(getPos _building), 100, 1, "initial_waypoint_ambientCiv"];
[_group, 1] setWaypointSpeed "LIMITED";
};
};
};
// lets exit, since we ran into the limit.
if ((count _allSpawnedUnits >= _MAX_CIVS_TOTAL)) exitwith {};
}foreach _availableBuildings;
};
}foreach _playerUnits;
sleep 0.5;
_unitsRemoved = 0;
{
_unit = _x;
_cannotRemove = false;
{
if (_unit distance _x <= _MIN_DISTANCE_PLAYERS) exitwith {
_cannotRemove = true;
};
}foreach _playerUnits;
if !(_cannotRemove) then {
if ({(_unit distance _x > _MAX_RADIUS)}count _playerUnits == count _playerUnits) then {
deleteVehicle _unit;
_allSpawnedUnits set [_foreachIndex, ObjNull];
_unitsRemoved = _unitsRemoved + 1;
};
};
}foreach _allSpawnedUnits;
_allSpawnedUnits = _allSpawnedUnits - [objNull];
{
if (count units _x == 0) then {
deleteGroup _x;
_allSpawnedGroups set [_foreachIndex, ObjNull];
} else {
_group = _x;
// HANDLE WAYPOINTS FOR GROUPS
if (currentWaypoint _group == (count waypoints _group)) then {
_building = _group getvariable "cse_ambientcivilianModule_Building";
_group addWaypoint [(getPos _building), 200, currentWaypoint _group];
};
};
}foreach _allSpawnedGroups;
_allSpawnedGroups = _allSpawnedGroups - [objNull];
sleep 0.5;
{
_building = _x;
_cannotRemove = false;
{
if (_building distance _x <= _MIN_DISTANCE_PLAYERS) exitwith {
_cannotRemove = true;
};
}foreach _playerUnits;
if !(_cannotRemove) then {
if ({(_building distance _x > _MAX_RADIUS)}count _playerUnits == count _playerUnits) then {
_allCheckedBuildings set [_foreachIndex, ObjNull];
};
};
}foreach _allCheckedBuildings;
_allCheckedBuildings = _allCheckedBuildings - [objNull];
if (_unitsRemoved > 0) then {
[format["%1- %2 - Removed %3", count _allSpawnedUnits, _allSpawnedUnits, _unitsRemoved]] call cse_fnc_debug;
};
};
[["Finished ambient Civilians module. Cleaning up all units"]] call cse_fnc_Debug;
// Finished this module. Cleaning up everything.
_cleanUpStartTime = time;
// CLEAN UP ALL UNITS, ENSURE PLAYERS ARE NOT NEARBY
while {(count _allSpawnedUnits > 0 && count _allSpawnedGroups > 0)} do {
{
_unit = _x;
_cannotRemove = false;
{
if (_unit distance _x <= _MIN_DISTANCE_PLAYERS) exitwith {
_cannotRemove = true;
};
}foreach _playerUnits;
// force clean up if this loop has been running for 60 seconds already
if (!(_cannotRemove) || (time - _cleanUpStartTime > 60)) then {
if ({(_unit distance _x > _MAX_RADIUS)}count _playerUnits == count _playerUnits) then {
deleteVehicle _unit;
_allSpawnedUnits set [_foreachIndex, ObjNull];
_unitsRemoved = _unitsRemoved + 1;
};
};
}foreach _allSpawnedUnits;
_allSpawnedUnits = _allSpawnedUnits - [objNull];
{
if (count units _x == 0) then {
deleteGroup _x;
_allSpawnedGroups set [_foreachIndex, ObjNull];
} else {
// HANDLE WAYPOINTS FOR GROUPS
};
}foreach _allSpawnedGroups;
_allSpawnedGroups = _allSpawnedGroups - [objNull];
};
};
};

Binary file not shown.

View File

@ -0,0 +1,196 @@
// GBL_BiometricDialog
// Displays a HIIDE inderface for a biometric scan.
// by gobbo
class cse_biometricScanner {
idd = 432231;
movingEnable = true;
onLoad = "uiNamespace setVariable ['cse_biometricScanner', _this select 0];";
class controlsBackground {
class cse_backgroundImageScanner : cse_backgroundBase {
text = "cse\cse_sys_advanced_interaction\biometric_scanner\data\biometricScanner_background.paa";
idc = 21314;
x = -0.3;
y = 0.2;
w = 1.6;
h = 1;
};
};
class controls {
class cse_title: cse_staticBase {
idc = 100;
x = 0.29;
y = 0.45;
w = 0.33825;
h = 0.104575;
sizeEx = 0.04;
text = "HIIDE - ";
};
class cse_subtitle: cse_staticBase {
idc = 101;
x = 0.29;
y = 0.49;
w = 0.33825;
h = 0.104575;
sizeEx = 0.025;
text = "";
};
class cse_infoText1: cse_title {
idc = 111;
x = 100.3025;
y = 110.64;
w = 0.2;
h = 0.104575;
sizeEx = 0.03021;
text = "";
style = ST_STATIC + ST_CENTER;
};
class cse_infoText2: cse_infoText1 {
idc = 112;
x = 100.3025;
y = 110.69;
w = 0.2;
h = 0.104575;
sizeEx = 0.03021;
text = "";
};
class cse_text1: cse_title {
idc = 121;
x = 100.3025;
y = 110.64;
w = 0.183825;
h = 0.104575;
sizeEx = 0.03021;
text = "NAME: ";
};
class cse_text2: cse_text1 {
idc = 122;
x = 100.3025;
y = 110.69;
w = 0.183825;
h = 0.104575;
sizeEx = 0.03021;
text = "AGE: ";
};
class cse_text3: cse_text1 {
idc = 123;
x = 100.3025;
y = 110.74;
w = 0.183825;
h = 0.104575;
sizeEx = 0.03021;
text = "Known Info: ";
};
class cse_text4: cse_text1 {
idc = 124;
x = 100.3025;
y = 110.79;
w = 0.183825;
h = 0.104575;
sizeEx = 0.03021;
text = "Additional 1: ";
};
class cse_text5: cse_text1 {
idc = 125;
x = 100.3025;
y = 110.84;
w = 0.183825;
h = 0.104575;
sizeEx = 0.03021;
text = "Additional 2: ";
};
class cse_editableBox1: cse_editBase
{
idc = 701;
x = 100.42;
y = 110.68;
h = 0.03;
w = 0.3;
sizeEx = 0.03021;
text = "";
autocomplete = "";
};
class cse_editableBox2: cse_editBase
{
idc = 702;
x = 100.42;
y = 110.73;
h = 0.03;
w = 0.3;
sizeEx = 0.03021;
text = "";
autocomplete = "";
};
class cse_editableBox3: cse_editBase
{
idc = 703;
x = 100.42;
y = 110.78;
h = 0.03;
w = 0.3;
sizeEx = 0.03021;
text = "";
autocomplete = "";
};
class cse_editableBox4: cse_editBase
{
idc = 704;
x = 100.42;
y = 110.83;
h = 0.03;
w = 0.3;
sizeEx = 0.03021;
text = "";
autocomplete = "";
};
class cse_editableBox5: cse_editBase
{
idc = 705;
x = 100.42;
y = 110.88;
h = 0.03;
w = 0.3;
sizeEx = 0.03021;
text = "";
autocomplete = "";
};
class cse_option1 : cse_buttonBase {
idc = 151;
text = "";
onButtonClick = "";
x = 0.27;
y = 0.87;
w = 0.14;
h = 0.04;
color[] = {0.0, 0.0, 0.0, 1};
color2[] = {0.0, 0.0, 0.0, 1};
colorBackground[] = {1, 1, 1, 1};
colorbackground2[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.5};
animTextureNormal = "cse\cse_sys_advanced_interaction\biometric_scanner\data\scanner_button.paa";
animTextureDisabled = "cse\cse_sys_advanced_interaction\biometric_scanner\data\scanner_button.paa";
animTextureOver = "cse\cse_sys_advanced_interaction\biometric_scanner\data\scanner_button.paa";
animTextureFocused = "cse\cse_sys_advanced_interaction\biometric_scanner\data\scanner_button.paa";
animTexturePressed = "cse\cse_sys_advanced_interaction\biometric_scanner\data\scanner_button.paa";
animTextureDefault = "cse\cse_sys_advanced_interaction\biometric_scanner\data\scanner_button.paa";
};
class cse_option2 : cse_option1 {
idc = 152;
text = "";
x = 0.425;
};
class cse_option3 : cse_option1 {
idc = 153;
text = "";
x = 0.58;
};
};
objects[] = {};
};

View File

@ -0,0 +1,271 @@
// define.hpp
#define true 1
#define false 0
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUTBUTTON 16
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_ANIMATED_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_LISTNBOX 102
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
#define FontCSE "PuristaMedium"
class cse_backgroundBase {
type = CT_STATIC;
idc = -1;
style = ST_PICTURE;
colorBackground[] = {0,0,0,0};
colorText[] = {1, 1, 1, 1};
font = FontCSE;
text = "";
sizeEx = 0.032;
};
class cse_editBase
{
access = 0;
type = CT_EDIT;
style = ST_STATIC;
x = 0;
y = 0;
h = 1;
w = 1;
colorBackground[] = {0,0,0,0};
colorText[] = {1,1,1,1};
colorSelection[] = {1,1,1,0};
colorDisabled[] = {1, 1, 1, 0.25};
font = FontCSE;
sizeEx = 0.03921;
autocomplete = "";
text = "";
size = 0.03921;
shadow = 0;
};
class cse_buttonBase {
idc = -1;
type = 16;
style = 0;
text = "";
action = "";
x = 0.0;
y = 0.0;
w = 0.2;
h = 0.04;
size = 0.03921;
sizeEx = 0.03921;
color[] = {1.0, 1.0, 1.0, 1};
color2[] = {1.0, 1.0, 1.0, 1};
colorBackground[] = {1, 1, 1, 0.6};
colorbackground2[] = {1, 1, 1, 0.4};
colorDisabled[] = {1, 1, 1, 0.25};
colorFocused[] = {1,1,1,1};
colorBackgroundFocused[] = {1,1,1,0.6};
periodFocus = 1.2;
periodOver = 0.8;
default = false;
class HitZone {
left = 0.00;
top = 0.00;
right = 0.00;
bottom = 0.00;
};
class ShortcutPos {
left = 0.00;
top = 0.00;
w = 0.00;
h = 0.00;
};
class TextPos {
left = 0.002;
top = 0.0004;
right = 0.0;
bottom = 0.00;
};
textureNoShortcut = "";
animTextureNormal = "cse\cse_gui\data\cse_cms_button.paa";
animTextureDisabled = "cse\cse_gui\data\cse_cms_button.paa";
animTextureOver = "cse\cse_gui\data\cse_cms_button.paa";
animTextureFocused = "cse\cse_gui\data\cse_cms_button.paa";
animTexturePressed = "cse\cse_gui\data\cse_cms_button.paa";
animTextureDefault = "cse\cse_gui\data\cse_cms_button.paa";
period = 0.5;
font = FontCSE;
soundEnter[] = {"\A3\ui_f\data\sound\onover",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\new1",0.0,0};
soundClick[] = {"\A3\ui_f\data\sound\onclick",0.07,1};
soundEscape[] = {"\A3\ui_f\data\sound\onescape",0.09,1};
class Attributes {
font = FontCSE;
color = "#E5E5E5";
align = "center";
shadow = "true";
};
class AttributesImage {
font = FontCSE;
color = "#E5E5E5";
align = "left";
shadow = "true";
};
};
class cse_staticBase {
idc = -1;
type = CT_STATIC;
x = 0.0;
y = 0.0;
w = 0.183825;
h = 0.104575;
style = ST_LEFT;
font = FontCSE;
sizeEx = 0.03921;
colorText[] = {0.95, 0.95, 0.95, 1.0};
colorBackground[] = {0, 0, 0, 0};
text = "";
};
class cse_listBoxBase {
type = CT_LISTBOX;
style = ST_MULTI;
font = FontCSE;
sizeEx = 0.03921;
color[] = {1, 1, 1, 1};
colorText[] = {0.543, 0.5742, 0.4102, 1.0};
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
colorSelect[] = {0.95, 0.95, 0.95, 1};
colorSelect2[] = {0.95, 0.95, 0.95, 1};
colorSelectBackground[] = {0, 0, 0, 1};
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
period = 1.2;
rowHeight = 0.03;
colorBackground[] = {0, 0, 0, 1};
maxHistoryDelay = 1.0;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
soundSelect[] = {"",0.1,1};
soundExpand[] = {"",0.1,1};
soundCollapse[] = {"",0.1,1};
class ScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "";
arrowFull = "";
arrowEmpty = "";
border = "";
};
};
class cse_comboBoxBase {
idc = -1;
type = 4;
style = 1;
x = 0;
y = 0;
w = 0.3;
h = 0.035;
colorSelect[] = {0.023529,0,0.0313725,1};
colorText[] = {0.023529,0,0.0313725,1};
colorBackground[] = {0.95,0.95,0.95,1};
colorSelectBackground[] = {0.543,0.5742,0.4102,1.0};
colorScrollbar[] = {0.023529,0,0.0313725,1};
arrowEmpty = "";
arrowFull = "";
wholeHeight = 0.45;
color[] = {0,0,0,0.6};
colorActive[] = {0,0,0,1};
colorDisabled[] = {0,0,0,0.3};
font = FontCSE;
sizeEx = 0.031;
soundSelect[] = {"",0.09,1};
soundExpand[] = {"",0.09,1};
soundCollapse[] = {"",0.09,1};
maxHistoryDelay = 1.0;
class ScrollBar
{
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
thumb = "";
arrowFull = "";
arrowEmpty = "";
border = "";
};
};

View File

@ -0,0 +1,54 @@
/*
NAME: fnc_biometricScanner
USAGE: opens the biometric Scanner dialog and starts up all functionality needed
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller", "_cursor", "_interactionDialog", "_button1", "_button2", "_button3", "_textDisplays", "_infoDisplays", "_editableColums", "_positionCenter"];
_caller = _this select 0;
_cursor = _this select 1;
CSE_biometricScannerTarget = _cursor;
ctrlSetText [100,"HIIDE - Scanning"];
call cse_fnc_clearScreenBiometricScanner;
disableSerialization;
_interactionDialog = uiNamespace getvariable "cse_biometricScanner";
_button1 = (_interactionDialog displayCtrl 151);
_button2 = (_interactionDialog displayCtrl 152);
_button3 = (_interactionDialog displayCtrl 153);
// adjusting positions:
_textDisplays = [(_interactionDialog displayCtrl 111),(_interactionDialog displayCtrl 112)];
_infoDisplays = [(_interactionDialog displayCtrl 121),(_interactionDialog displayCtrl 122),(_interactionDialog displayCtrl 123),
(_interactionDialog displayCtrl 124),(_interactionDialog displayCtrl 125)];
_editableColums = [(_interactionDialog displayCtrl 701),(_interactionDialog displayCtrl 702),(_interactionDialog displayCtrl 703),
(_interactionDialog displayCtrl 704),(_interactionDialog displayCtrl 705)];
_button1 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_hiideMainMenu"]];
// LOGIN FUNCTIONALITY
_button1 ctrlSetText "Cancel";
_button2 ctrlSetText "";
_button3 ctrlSetText "";
_positionCenter = [0.35,0.54];
{
_x ctrlSetPosition _positionCenter;
_positionCenter = [_positionCenter select 0, (_positionCenter select 1) + 0.05];
}foreach _textDisplays;
(_interactionDialog displayCtrl 111) ctrlSetText "Scanning Database";
(_interactionDialog displayCtrl 112) ctrlSetText "Please Wait";
(_interactionDialog displayCtrl 111) ctrlCommit 0.0001;
(_interactionDialog displayCtrl 112) ctrlCommit 0.0001;
sleep 2 + random(10);
if (!dialog) exitwith{};
[player,CSE_biometricScannerTarget] call cse_fnc_biometricScannerInfo;

View File

@ -0,0 +1,25 @@
/*
NAME: fnc_biometricScanner
USAGE: opens the biometric Scanner dialog and starts up all functionality needed
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
CSE_biometricScannerTarget = _cursor;
[] call cse_fnc_closeAllDialogs_f;
createDialog "cse_biometricScanner";
if (isnil ("cse_biometricScannerLogin")) then {
cse_biometricScannerLogin = false;
};
if (cse_biometricScannerLogin) then {
[player,CSE_biometricScannerTarget] call cse_fnc_hiideMainMenu;
} else {
call cse_fnc_biometricScannerLoginScreen;
};

View File

@ -0,0 +1,77 @@
/*
NAME: fnc_biometricScanner
USAGE: opens the biometric Scanner dialog and starts up all functionality needed
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
call cse_fnc_clearScreenBiometricScanner;
ctrlSetText [100,"HIIDE - Details"];
disableSerialization;
_interactionDialog = uiNamespace getvariable "cse_biometricScanner";
_button1 = (_interactionDialog displayCtrl 151);
_button2 = (_interactionDialog displayCtrl 152);
_button3 = (_interactionDialog displayCtrl 153);
// adjusting positions:
_textDisplays = [(_interactionDialog displayCtrl 111),(_interactionDialog displayCtrl 112)];
_infoDisplays = [(_interactionDialog displayCtrl 121),(_interactionDialog displayCtrl 122),(_interactionDialog displayCtrl 123),
(_interactionDialog displayCtrl 124),(_interactionDialog displayCtrl 125)];
_editableColums = [(_interactionDialog displayCtrl 701),(_interactionDialog displayCtrl 702),(_interactionDialog displayCtrl 703),
(_interactionDialog displayCtrl 704),(_interactionDialog displayCtrl 705)];
_button1 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_hiideMainMenu"]]; // logout
_button3 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_saveSettingsBiometric"]]; // scan something
// LOGIN FUNCTIONALITY
_button1 ctrlSetText "Cancel";
_button2 ctrlSetText "";
_button3 ctrlSetText "Save";
_counter = 0;
_leftText = ["Name","DOB","Known Info","Additional"];
_positionCenter = [0.3,0.54];
{
if (_counter < count _leftText) then {
_x ctrlSetPosition _positionCenter;
_positionCenter = [_positionCenter select 0, (_positionCenter select 1) + 0.05];
_x ctrlCommit 0.0001;
_x ctrlSetText (_leftText select _counter);
};
_counter = _counter + 1;
}foreach _infoDisplays;
_text = _cursor getvariable "cse_biometricScannerInfo";
if (!isnil ("_text")) then {
ctrlSetText [701, _text select 0];
ctrlSetText [702,_text select 1];
ctrlSetText [703,_text select 2];
ctrlSetText [704,_text select 3];
ctrlSetText [705,_text select 4];
ctrlSetText [101,"Entry in database found"];
} else {
ctrlSetText [101,"No Entry in database found - Please fill in details"];
};
_counter = 0;
_positionCenter = [0.42,0.58];
{
if (_counter < count _leftText) then {
_x ctrlSetPosition _positionCenter;
_positionCenter = [_positionCenter select 0, (_positionCenter select 1) + 0.05];
_x ctrlCommit 0.0001;
};
_counter = _counter + 1;
}foreach _editableColums;

View File

@ -0,0 +1,53 @@
/*
NAME: fnc_biometricScannerLogin
USAGE: checks if the username and password have been typed correctly
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor","_return","_foundName"];
_caller = _this select 0;
_cursor = _this select 1;
_return = false;
cse_biometricScannerLogin = false;
_inputName = ctrlText 701;
_inputPass = ctrlText 702;
_foundName = "";
_foundUnit = "";
if (Ismultiplayer) then {
{
if (isPlayer _x) then {
if ([_x] call cse_fnc_getName == _inputName) then {
_foundName = [_x] call cse_fnc_getName;
_foundUnit = _x;
};
};
}foreach playableUnits;
} else {
_foundName = [player] call cse_fnc_getName;
_foundUnit = player;
};
if (_foundName != _inputName) exitwith {
hint "Username incorrect!";
};
if (_inputPass == "Password") then {
hint "Password and Username correct!";
_return = true;
} else {
hint "Wrong Password!";
};
if (_return) then {
[player,CSE_biometricScannerTarget] call cse_fnc_hiideMainMenu;
cse_biometricScannerLogin = true;
};
[] spawn {
sleep 5;
hintSilent "";
};

View File

@ -0,0 +1,39 @@
/*
NAME: fnc_biometricScannerLoginScreen
USAGE: checks if the username and password have been typed correctly
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
call cse_fnc_clearScreenBiometricScanner;
ctrlSetText [100,"HIIDE - Login"];
disableSerialization;
_interactionDialog = uiNamespace getvariable "cse_biometricScanner";
_button1 = (_interactionDialog displayCtrl 151);
_button2 = (_interactionDialog displayCtrl 152);
_button3 = (_interactionDialog displayCtrl 153);
_button1 ctrlSetEventHandler ["ButtonClick", "closedialog 21314"];
_button2 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_hiideMainMenu"]];
_button3 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_biometricScannerLogin"]];
// LOGIN FUNCTIONALITY
_button1 ctrlSetText "Cancel";
_button2 ctrlSetText "Iris Login";
_button3 ctrlSetText "Login";
(_interactionDialog displayCtrl 121) ctrlSetPosition [0.3,0.54];
(_interactionDialog displayCtrl 121) ctrlCommit 0.0001;
(_interactionDialog displayCtrl 121) ctrlSetText "Username";
(_interactionDialog displayCtrl 122) ctrlSetposition [0.3,0.59];
(_interactionDialog displayCtrl 122) ctrlCommit 0.0001;
(_interactionDialog displayCtrl 122) ctrlSetText "Password";
(_interactionDialog displayCtrl 701) ctrlSetposition [0.42,0.58];
(_interactionDialog displayCtrl 701) ctrlCommit 0.0001;
(_interactionDialog displayCtrl 702) ctrlSetposition [0.42,0.63];
(_interactionDialog displayCtrl 702) ctrlCommit 0.0001;

View File

@ -0,0 +1,14 @@
/*
NAME: fnc_biometricScanner
USAGE: opens the biometric Scanner dialog and starts up all functionality needed
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
hint "cancel biometric ";

View File

@ -0,0 +1,52 @@
/**
* fnc_clearScreenBiometricScanner.sqf
* @Descr: Clears the screen on the biometric scanner of all ctrl objects
* @Author: Glowbal
*
* @Arguments: []
* @Return: nil
* @PublicAPI: false
*/
private ["_interactionDialog","_button1","_button2","_button3","_textDisplays","_infoDisplays","_editableColums"];
disableSerialization;
_interactionDialog = uiNamespace getvariable "cse_biometricScanner";
_button1 = (_interactionDialog displayCtrl 151);
_button2 = (_interactionDialog displayCtrl 152);
_button3 = (_interactionDialog displayCtrl 153);
// adjusting positions:
_textDisplays = [(_interactionDialog displayCtrl 111),(_interactionDialog displayCtrl 112)];
_infoDisplays = [(_interactionDialog displayCtrl 121),(_interactionDialog displayCtrl 122),(_interactionDialog displayCtrl 123),
(_interactionDialog displayCtrl 124),(_interactionDialog displayCtrl 125)];
_editableColums = [(_interactionDialog displayCtrl 701),(_interactionDialog displayCtrl 702),(_interactionDialog displayCtrl 703),
(_interactionDialog displayCtrl 704),(_interactionDialog displayCtrl 705)];
_position = [100.0,100.0];
{
_x ctrlsetText "";
_x ctrlSetPosition _position;
_x ctrlCommit 0;
}foreach _textDisplays;
{
_x ctrlSetPosition _position;
_x ctrlsetText "";
_x ctrlCommit 0;
}foreach _infoDisplays;
{
_x ctrlsetText "";
_x ctrlSetPosition _position;
_x ctrlCommit 0;
}foreach _editableColums;
_button1 ctrlRemoveAllEventHandlers "ButtonClick";
_button2 ctrlRemoveAllEventHandlers "ButtonClick";
_button3 ctrlRemoveAllEventHandlers "ButtonClick";
_button1 ctrlSetText "";
_button2 ctrlSetText "";
_button3 ctrlSetText "";
ctrlSetText [101,""];

View File

@ -0,0 +1,18 @@
/*
NAME: fnc_conditionBiometricScanner
USAGE: checks if unit can be checked with a biometric scanner
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: boolean
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
_return = false;
if (_cursor iskindof "man" && group _cursor != group _caller) then {
_return = true;
};
_return

View File

@ -0,0 +1,50 @@
/*
NAME: fnc_biometricScanner
USAGE: opens the biometric Scanner dialog and starts up all functionality needed
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
CSE_biometricScannerTarget = _cursor;
disableSerialization;
_interactionDialog = uiNamespace getvariable "cse_biometricScanner";
call cse_fnc_clearScreenBiometricScanner;
ctrlSetText [100,"HIIDE - Menu"];
_button1 = (_interactionDialog displayCtrl 151);
_button2 = (_interactionDialog displayCtrl 152);
_button3 = (_interactionDialog displayCtrl 153);
// adjusting positions:
_textDisplays = [(_interactionDialog displayCtrl 111),(_interactionDialog displayCtrl 112)];
_infoDisplays = [(_interactionDialog displayCtrl 121),(_interactionDialog displayCtrl 122),(_interactionDialog displayCtrl 123),
(_interactionDialog displayCtrl 124),(_interactionDialog displayCtrl 125)];
_editableColums = [(_interactionDialog displayCtrl 701),(_interactionDialog displayCtrl 702),(_interactionDialog displayCtrl 703),
(_interactionDialog displayCtrl 704),(_interactionDialog displayCtrl 705)];
_button1 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_biometricScannerLoginScreen; cse_biometricScannerLogin = false;"]];
_button2 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_biometricScanStart"]]; // scan something
_button3 ctrlSetEventHandler ["ButtonClick", format["[player,CSE_biometricScannerTarget] spawn cse_fnc_biometricScanStart"]]; // scan something
_button1 ctrlSetText "Logout";
_button2 ctrlSetText "Scan Hands";
_button3 ctrlSetText "Scan Iris";
_positionCenter = [0.35,0.54];
{
_x ctrlSetPosition _positionCenter;
_positionCenter = [_positionCenter select 0, (_positionCenter select 1) + 0.05];
}foreach _textDisplays;
(_interactionDialog displayCtrl 111) ctrlSetText "You are now logged in";
(_interactionDialog displayCtrl 112) ctrlSetText "Select any option below to begin";
(_interactionDialog displayCtrl 111) ctrlCommit 0.0001;
(_interactionDialog displayCtrl 112) ctrlCommit 0.0001;

View File

@ -0,0 +1,24 @@
/*
NAME: fnc_biometricScanner
USAGE: Saves the information of the biometric scanner for _cursor UNIT
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
_text1 = ctrlText 701;
_text2 = ctrlText 702;
_text3 = ctrlText 703;
_text4 = ctrlText 704;
_text5 = ctrlText 705;
_cursor setvariable ["cse_biometricScannerInfo",[_text1,_text2,_text3,_text4,_text5],true];
hint "Saved biometric";
[format["AIM - Biometric Scanner Saving. Target: %1 Information: %2",_cursor,[_text1,_text2,_text3,_text4,_text5]],2] call cse_fnc_debug;

View File

@ -0,0 +1,12 @@
cse_fnc_biometricScanner = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_biometricScanner.sqf";
cse_fnc_conditionBiometricScanner = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_conditionBiometricScanner.sqf";
cse_fnc_saveSettingsBiometric = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_saveSettingsBiometric.sqf";
cse_fnc_cancelBiometric = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_cancelBiometric.sqf";
cse_fnc_hiideMainMenu = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_hiideMainMenu.sqf";
cse_fnc_clearScreenBiometricScanner = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_clearScreenBiometricScanner.sqf";
cse_fnc_biometricScanStart = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_biometricScanStart.sqf";
cse_fnc_biometricScannerInfo = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_biometricScannerInfo.sqf";
cse_fnc_biometricScannerLogin = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_biometricScannerLogin.sqf";
cse_fnc_biometricScannerLoginScreen = compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\fnc_biometricScannerLoginScreen.sqf";

View File

@ -0,0 +1,6 @@
call compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\functions.sqf";
[format["AIM - Biometric Scanner Component initialisation completed"],3] call cse_fnc_debug;

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

View File

@ -0,0 +1,38 @@
#define _ARMA_
class CfgPatches
{
class cse_sys_advanced_interaction
{
units[] = {"cse_advancedInteractionItems", "cse_KeycuffsItem", "cse_HIIDEItem", "cse_oldphoneItem", "cse_oldphone_foldedItem", "cse_watch_expensiveItem", "cse_walletItem", "cse_9v_batteryItem", "cse_notebookItem", "cse_scissorsItem", "cse_wiresItem"};
weapons[] = {"cse_Keycuffs", "cse_HIIDE", "cse_oldphone", "cse_oldphone_folded", "cse_watch_expensive", "cse_wallet", "cse_9v_battery", "cse_notebook", "cse_scissors", "cse_wires"};
requiredVersion = 0.1;
requiredAddons[] = {"cse_gui","cse_main"};
version = "0.10.0";
author[] = {"Combat Space Enhancement"};
authorUrl = "http://csemod.com";
};
class cse_moduleAmbientCivilians
{
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"cse_gui","cse_main"};
version = "0.10.0";
author[] = {"Combat Space Enhancement"};
authorUrl = "http://csemod.com";
};
};
#include "CfgAddOns.h"
#include "CfgVehicles.h"
#include "Combat_Space_Enhancement.h"
#include "GUI.h"
// Here for backwards compatability. To be removed at a later moment.
// #include "CfgMagazines.h"
#include "CfgWeapons.h"
#include "CfgFunctions.h"
#include "CfgSounds.h"
// EOF

Binary file not shown.

View File

@ -0,0 +1,20 @@
if (Isnil ("cse_stance_systemBlufor")) then {cse_stance_systemBlufor = 10;};
if (Isnil ("cse_stance_systemOpfor")) then {cse_stance_systemOpfor = 10;};
if (Isnil ("cse_stance_systemRes")) then {cse_stance_systemRes = 10; };
[format["AIM - Conversation Component initialisation completed"],3] call cse_fnc_debug;
if (!isnil "CSE_SYS_AIM_DIALOG_MODULE_TALKTO_AIM") then {
player removeAction CSE_SYS_AIM_DIALOG_MODULE_TALKTO_AIM;
CSE_SYS_AIM_DIALOG_MODULE_TALKTO_AIM = nil;
};
CSE_SYS_AIM_DIALOG_MODULE_TALKTO_AIM = player addAction ["Talk to", {[cursorTarget, _this select 1] call cse_fnc_playerStartConverationWith_AIM;}, [], 1, false, false, "", "((cursortarget isKindOf 'CAManBase') && [cursortarget] call cse_fnc_isAwake && !(IsPlayer cursorTarget))"];
["cse_profile_information_aim", [], true, "aim"] call cse_fnc_defineVariable;
["cse_dialog_recorded_conversation_aim", [], false, "aim"] call cse_fnc_defineVariable;
CSE_PERFORMING_TALKING_ACTION_AIM = false;

View File

@ -0,0 +1,5 @@
/**
* This file is here temporarly. It will be replaced by config entries in the near future.
*
*/

View File

@ -0,0 +1,142 @@
private ["_args"];
_args = _this;
CSE_ENABLED_DIALOG_INTERACTION_AIM = true;
CSE_USE_EQUIPMENT_AIM = false;
CSE_BIOMETRIC_SCANNER_SETTING_AIM = 0;
CSE_DETAIN_SETTING_AIM = 0;
CSE_SEARCH_SETTING_AIM = 0;
{
_value = _x select 1;
if (!isnil "_value") then {
if (_x select 0 == "enableDetain") exitwith {
CSE_DETAIN_SETTING_AIM = _value;
if ((_x select 1) > 0) then {
CSE_ENABLED_DETAIN_AIM = true;
} else {
CSE_ENABLED_DETAIN_AIM = false;
};
};
if (_x select 0 == "enableSearch") exitwith {
CSE_SEARCH_SETTING_AIM = _value;
if ((_x select 1) > 0) then {
CSE_ENABLED_SEARCH_AIM = true;
} else {
CSE_ENABLED_SEARCH_AIM = false;
};
};
if (_x select 0 == "enableBiometric") exitwith {
CSE_BIOMETRIC_SCANNER_SETTING_AIM = _x select 1;
if ((_x select 1) > 0) then {
CSE_ENABLED_BIOMETRIC_SCANNER_AIM = true;
} else {
CSE_ENABLED_BIOMETRIC_SCANNER_AIM = false;
};
};
if (_x select 0 == "enableConversation") exitwith {
CSE_ENABLED_DIALOG_INTERACTION_AIM = (_x select 1);
};
if (_x select 0 == "useEquipment") exitwith {
CSE_USE_EQUIPMENT_AIM = (_x select 1);
};
} ;
}foreach _args;
[format["AIM - Advanced Interaction initialisation started"],3] call cse_fnc_debug;
waituntil{!isnil "cse_gui"};
[format["AIM - Advanced Interaction initialisation completed"],3] call cse_fnc_debug;
cse_fnc_action_openBiometricScanner_AIM = {
private ["_target"];
if (CSE_ENABLED_BIOMETRIC_SCANNER_AIM && (!CSE_USE_EQUIPMENT_AIM || [player, "cse_HIDDE"] call cse_fnc_hasItem)) then {
_target = cursorTarget;
if (!iSNull _target) then {
if ((_target isKindOf "CAManBase") && ((player distance _target) < 10)) then {
[player,_target] call cse_fnc_biometricScanner;
};
};
};
};
if (CSE_ENABLED_BIOMETRIC_SCANNER_AIM) then {
call compile preprocessFile "cse\cse_sys_advanced_interaction\biometric_scanner\init.sqf";
_entries = [
["Biometric",
{
([_this select 0, _this select 1, CSE_BIOMETRIC_SCANNER_SETTING_AIM, "cse_HIDDE"] call cse_fnc_canPerformAction_AIM)
}, "cse\cse_sys_advanced_interaction\biometric_scanner\data\icon_biometricscanner.paa",
{ closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_biometricScanner; }, "Use Biometric Scanner"]
];
["ActionMenu","interaction", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
};
if (CSE_ENABLED_SEARCH_AIM) then {
_entries = [
["Search",
{ ([_this select 0, _this select 1, CSE_SEARCH_SETTING_AIM, ""] call cse_fnc_canPerformAction_AIM) }, CSE_ICON_PATH + "icon_search.paa",
{
closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_searchPerson_AIM;
},"Search Person"]
];
["ActionMenu","interaction", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
};
if (CSE_ENABLED_DIALOG_INTERACTION_AIM) then {
call compile preprocessFile "cse\cse_sys_advanced_interaction\dialog_module\init.sqf";
_entries = [
["Speak",{(((_this select 1) iskindof "CaManBase") && {((player distance (_this select 1)) < 10)} && {((_this select 1) != (_this select 0))} && {!Isplayer (_this select 1)})}, CSE_ICON_PATH + "icon_speak.paa",
{
if ([_this select 1] call cse_fnc_isAwake) then {
closeDialog 0; [_this select 1, player] call cse_fnc_playerStartConverationWith_AIM;
};
},"Speak with Person"]
];
["ActionMenu","interaction", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
};
if (CSE_ENABLED_DETAIN_AIM) then {
_entries = [
["Arrest",{[player, _this select 1] call cse_fnc_canDetain}, CSE_ICON_PATH + "icon_handcuffs.paa",
{
closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_arrest_AIM;
},"Arrest Person"],
["Release",{[player, _this select 1] call cse_fnc_canPerformArrestActions_AIM}, CSE_ICON_PATH + "icon_handcuffs.paa",
{
closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_release_AIM;
},"Release Person"],
["Move",{[player, _this select 1] call cse_fnc_canPerformArrestActions_AIM}, CSE_ICON_PATH + "icon_movement.paa",
{
closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_move_AIM;
},"Move Person"],
["Place",{[player, _this select 1] call cse_fnc_canPerformArrestActions_AIM}, CSE_ICON_PATH + "icon_placedown.paa",
{
closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_placedown_AIM;
},"Place down"],
["Load",{[player, _this select 1] call cse_fnc_canPerformArrestActions_AIM}, CSE_ICON_PATH + "icon_place_in.paa",
{
closeDialog 0; [(_this select 0),(_this select 1)] call cse_fnc_load_AIM;
},"Load in nearby vehicle"]
];
["ActionMenu","interaction", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
_entries = [
["Unload (Pris)", {((_this call cse_fnc_interactWithVehicle_Crew_Condition) && (count ((_this select 1) getvariable ["cse_loaded_detainees_AIM",[]]) > 0))}, CSE_ICON_PATH + "icon_open_dialog.paa",
{
closeDialog 0;
_loaded = ((_this select 1) getvariable ["cse_loaded_detainees_AIM",[]]);
{
[player,_x,false] call cse_fnc_unload_AIM;
}foreach _loaded
}, "Unload Prisoners"]
];
["ActionMenu","interaction", _entries ] call cse_fnc_addMultipleEntriesToRadialCategory_F;
};

View File

@ -0,0 +1,31 @@
/**
* fn_addToConversationLog_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_unit","_caller","_type","_activity","_log"];
_unit = _this select 0;
_nameOf = _this select 1;
_message = _this select 2;
_log = [_unit,"cse_dialog_recorded_conversation_aim"] call cse_fnc_getVariable;
if (count _log >= 12) then {
_newLog = [];
_counter = 0;
{
if (_counter > 0) then {
_newLog pushback _x;
} else {
_counter = _counter + 1;
};
}foreach _log;
_log = _newLog;
};
_log set [count _log, [_nameOf,_message]];
[_unit,"cse_dialog_recorded_conversation_aim",_log] call cse_fnc_setVariable;

View File

@ -0,0 +1,21 @@
/*
NAME: fnc_setArrested
USAGE: switches state of unit to arrested
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_target = _this select 1;
playSound "cse_cable_tie_zipping";
[_target, true] call cse_fnc_setArrestState;
hint format["You arrrest this person"];
if (CSE_USE_EQUIPMENT_AIM) then {
[_caller, "cse_Keycuffs", false] call cse_fnc_useItem;
};

View File

@ -0,0 +1,61 @@
/**
* fn_callForSurrender_AIM.sqf
* @Descr:
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#define DISTANCE_AWAY 50
// TODO add missing variables to private array
private ["_nearest"];
_nearest = (player nearEntities [["CAManBase"], DISTANCE_AWAY]);
_amountOpfor = {side _x == EAST} count _nearest;
_amountBlufor = {side _x == west} count _nearest;
_amountInd = {side _x == independent} count _nearest;
_amountOfSideCaller = switch (playerSide) do {
case west: {_amountOpfor};
case east: {_amountBlufor};
case independent: {_amountInd};
default {0};
};
if (_amountOfSideCaller == 0) exitwith {};
{
if (side _x != playerSide && !(isPlayer _x)) then {
if (!(lineIntersects [eyePos player, eyePos _x, _x, player]) || (random(1)>=0.75)) then {
_amountOfSideTarget = switch (side _x) do {
case west: {_amountOpfor};
case east: {_amountBlufor};
case independent: {_amountInd};
default {0};
};
_magCount = count magazines _x;
_allWeapons = weapons _x;
_availableMags = 0;
{
if (isArray (configFile >> "CfgWeapons" >> _x >> "magazines")) then {
_magazineArray = getArray (configFile >> "CfgWeapons" >> _x >> "magazines");
_canFitInWeapon = {_x in _magazineArray} count _magCount;
_availableMags = _availableMags + _canFitInWeapon;
};
}foreach _allWeapons;
if (_amountOfSideTarget / _amountOfSideCaller <= (0.1) + random(0.1)) then {
if (_availableMags <= 1) then {
// unit is out as well, so surrender here.
[format["UNIT %1 is surrendering", _x]] call cse_fnc_debug;
// TODO implement surrender functionality
};
};
};
};
}count _nearest;

View File

@ -0,0 +1,16 @@
/**
* fn_canDetain.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target", "_caller"];
_caller = _this select 0;
_target = _this select 1;
([_caller, _target, CSE_DETAIN_SETTING_AIM, "cse_Keycuffs"] call cse_fnc_canPerformAction_AIM) && !([_target] call cse_fnc_isArrested);

View File

@ -0,0 +1,28 @@
/**
* fn_canPerformAction_AIM.sqf
* @Descr:
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: true
*/
private [ "_caller", "_target", "_return", "_settingNumber", "_item"];
_caller = _this select 0;
_target = _this select 1;
_settingNumber = _this select 2;
_item = _this select 3;
if ((_target iskindof "CaManBase") && {((_caller distance _target) < 10)} && (_caller != _target) && (!CSE_USE_EQUIPMENT_AIM || [_caller, _item] call cse_fnc_hasItem || _item == "")) exitwith {
_return = switch (_settingNumber ) do {
case 3: {true};
case 2: {side _caller != side _target};
case 1: {!(isPlayer _target)};
case 0: {side _caller != side _target && !(isPlayer _target)};
default { false };
};
_return
};
false;

View File

@ -0,0 +1,17 @@
/**
* fn_canPerformArrestActions_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target", "_caller"];
_caller = _this select 0;
_target = _this select 1;
([_caller, _target, CSE_DETAIN_SETTING_AIM, ""] call cse_fnc_canPerformAction_AIM) && ([_target] call cse_fnc_isArrested);

View File

@ -0,0 +1,25 @@
/**
* fn_dialogMovementOrder_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target","_order"];
_target = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_order = [_this, 1, "",[""]] call BIS_fnc_Param;
switch (_order) do {
case "Stop": {
_target stop true;
};
case "Move": {
_target stop false;
};
default {
};
};

View File

@ -0,0 +1,19 @@
/**
* fn_disarmPerson_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_caller","_cursor", "_weaponHolder"];
_caller = _this select 0;
_target = _this select 1;
_weaponHolder = createVehicle ["GroundWeaponHolder" , getPos _target, [], 0, "NONE"];
{
_target action ["DropWeapon", _weaponHolder, _X];
}foreach weapons _target;

View File

@ -0,0 +1,31 @@
/**
* fn_displayArrestOptions_aim.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
_subMenus = [
["Arrest",{!(CSE_interactionTarget getvariable ["cse_unitArrested",false])},
{
[(_this select 0),(_this select 1)] call cse_fnc_arrest_AIM;
}],
["Release",{(CSE_interactionTarget getvariable ["cse_unitArrested",false])},{
[(_this select 0),(_this select 1)] call cse_fnc_release_AIM;
}],
["Move",{(CSE_interactionTarget getvariable ["cse_unitArrested",false])},{
[(_this select 0),(_this select 1)] call cse_fnc_move_AIM;
}],
["Place down",{(CSE_interactionTarget getvariable ["cse_unitArrested",false])},{
[(_this select 0),(_this select 1)] call cse_fnc_placedown_AIM;
}]
];
["Arresting",_this select 2,_subMenus] call cse_fnc_gui_displaySubMenuButtons;

View File

@ -0,0 +1,28 @@
/**
* fn_fillDialogWithConversationLines_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_display","_target","_list","_conversation"];
_target = [_this, 0, objNull, [objNull]] call BIS_fnc_Param;
disableSerialization;
_display = uiNamespace getvariable "cse_dialog_menu_aim";
_list = _display displayCtrl 200;
while {dialog} do {
lbClear 200;
_conversation = _target getvariable ["cse_dialog_recorded_conversation_aim",[]];
{
_list lbAdd format["%1:",(_x select 0)];
_list lbAdd (_x select 1); // should localize here!
}foreach _conversation;
uisleep 0.1; // got to put this in a oneachframe EH instead!
};

View File

@ -0,0 +1,41 @@
/**
* fn_generateProfileInformation_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#define SELECT_RANDOM_ITEM(ARRAY) ARRAY select (round(random(count ARRAY -1)));
private ["_unit","_occupation","_dateOfBirth","_politicalViews","_culture","_homeTown", "_availableCultures","_availableOccupations", "_availablePoliticalStances", "_availableSidesToSupport", "_availableHomeTown", "_supportedSides", "_profile"];
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_occupation = "Soldier";
_dateOfBirth = "0/0/0";
_politicalViews = ["Unknown"];
_culture = "Unknown";
_homeTown = "Unknown";
_sideOfUnit = side _unit;
_factionOfUnit = faction _unit;
_availableCultures = [_unit, _sideOfUnit, _factionOfUnit,"Cultures"] call cse_fnc_getAvailableProfileSetsFor_AIM;
_availableOccupations = [_unit, _sideOfUnit, _factionOfUnit,"Occupations"] call cse_fnc_getAvailableProfileSetsFor_AIM;
_availablePoliticalStances = [_unit, _sideOfUnit, _factionOfUnit,"PoliticalViews"] call cse_fnc_getAvailableProfileSetsFor_AIM;
_availableSidesToSupport = [_unit, _sideOfUnit, _factionOfUnit,"SupportedSides"] call cse_fnc_getAvailableProfileSetsFor_AIM;
_availableHomeTown = [_unit, _sideOfUnit, _factionOfUnit,"homeTown"] call cse_fnc_getAvailableProfileSetsFor_AIM;
_occupation = SELECT_RANDOM_ITEM(_availableOccupations);
_dateOfBirth = SELECT_RANDOM_ITEM(["Unknown"]);
_politicalViews = SELECT_RANDOM_ITEM(_availablePoliticalStances);
_culture = SELECT_RANDOM_ITEM(_availableCultures);
_supportedSides = SELECT_RANDOM_ITEM(_availableSidesToSupport);
_homeTown = SELECT_RANDOM_ITEM(_availableHomeTown);
_profile = [_occupation, _dateOfBirth, _politicalViews, _culture, _supportedSides, _homeTown];
[_unit, "cse_profile_information_aim", _profile] call cse_fnc_setVariable;

View File

@ -0,0 +1,20 @@
/**
* fn_getALiVECivData_AIM.sqf
* Descr: Get the ALiVE Civ data from a Civilian unit
* Author: Glowbal
*
* Arguments: [unit OBJECT (Civilian unit to pull the data from.)]
* Return: ARRAY Civlian Data if system is enabled. Otherwise returns empty array.
* PublicAPI: true
*/
private ["_unit","_civData"];
_unit = [_this, 0, ObjNull, [ObjNull]] call BIS_fnc_Param;
if ([] call cse_fnc_isLoaded_ALiVE_Mod) then {
//_civData = ["server","CSE_GET_AGENT_DATA_ALIVE_AIM",[[_unit],{call ALIVE_fnc_getAgentData}]] call ALiVE_fnc_BUS_RetVal;
_civData = [_unit] call ALIVE_fnc_getAgentData; // format: [ int POSTURE, array POSITION (HOME Postion), array TOWN Position, int Home town Posture]
} else {
_civData = [];
};
_civData

View File

@ -0,0 +1,112 @@
/**
* fn_getAvailableProfileSetsFor_AIM.sqf
* Descr: Get available options for a profile set. Profile sets can be any of the following: Cultures, Occupations, PoliticalViews, SupportedSides, homeTown.
*
* Author: Glowbal
*
* Arguments: [unit OBJECT, side SIDE, faction STRING (Faction classname), set STRING (What set should be returned) ]
* Return: ARRAY Returns an array with the available profile set options. Is an array of strings in all cases but homeTown, which returns a 2D array.
* PublicAPI: true
*/
#define ALL_LOCATIONS ["Strategic","StrongpointArea","FlatArea","FlatAreaCity","FlatAreaCitySmall","CityCenter","Airport","NameMarine","NameCityCapital","NameCity","NameVillage","NameLocal","Hill","ViewPoint","RockArea","BorderCrossing","VegetationBroadleaf","VegetationFir","VegetationPalm","VegetationVineyard"]
#define NEAREST_LOCATION_RADIUS 700
private ["_side","_faction","_set","_return", "_result", "_locationClose", "_locationFar", "_locationsClose", "_locationsFar", "_htReturn"];
_unit = _this select 0;
_side = _this select 1;
_faction = _this select 2;
_set = _this select 3;
_return = switch (_set) do {
case "Cultures": {
switch (_side) do {
case civilian: {
["Greek", "Other"]
};
default {["Unknown"]};
};
};
case "Occupations": {
switch (_side) do {
case civilian: {
["Baker", "Butcher", "Mechanic", "Writer", "Law_Enforcement", "Retired", "None", "Unknown", "Farmer", "Software_Developer", "Hunter", "Artist", "Banker", "Fireman", "Cook", "Construction_Worker", "Fisher","Repair_man", "Cleaner", "Woods_man", "Painter"]
};
default {["Soldier"]};
};
};
case "PoliticalViews": {
switch (_side) do {
case civilian: {
["Normal", "Radical", "Mild", "None"]
};
default {["Unknown"]};
};
};
case "SupportedSides": {
switch (_side) do {
case civilian: {
_stances = [];
if (cse_stance_systemBlufor > 10) then {
_stances pushback West;
};
if (cse_stance_systemOpfor > 10) then {
_stances pushback east;
};
if (cse_stance_systemRes > 10) then {
_stances pushback independent;
};
if (count _stances == 0) then {
_stances set [ 0, Civilian ];
};
_stances
};
default {[_side]};
};
};
case "homeTown": {
_htReturn = [["Unknown","Unknown"]];
switch (_side) do {
case civilian: {
if ([] call cse_fnc_isLoaded_ALiVE_Mod) then {
["ALiVE is loaded. Returning result with AlIVE settings", 1] call cse_fnc_debug;
_result = [_unit] call cse_fnc_getALiVECivData_AIM;
if (isnil "_result") then {
_result = [];
};
_locationClose = "";
_locationFar = "";
if (count _result > 0) then {
_locationsClose = (nearestLocations [_result select 1, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
_locationsFar = (nearestLocations [_result select 2, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if (count _locationsClose > 0) then {
_locationClose = text (_locationsClose select 0);
};
if (count _locationsFar > 0) then {
if (count _locationsFar > 1) then {
_locationFar = text (_locationsClose select 1);
} else {
_locationFar = text (_locationsClose select 0);
};
};
_htReturn = [[_locationClose,_locationFar]];
} else {
_htReturn = [["Unknown","Unknown"]];
};
} else {
_htReturn = [["Unknown","Unknown"]];
};
};
default {_htReturn = [["Unknown","Unknown"]]};
};
_htReturn;
};
default {
["Unknown"]
};
};
_return

View File

@ -0,0 +1,46 @@
// Made by Glowbal
// Input: unit, object (Civ AI)
// Returns String array, contains strings with possible sentences
private ["_arrayWithStrings", "_behaviour"];
_behaviour = _this select 0;
_arrayWithStrings = [];
switch (_behaviour) do {
case "agressive":
{
_arrayWithStrings = CSE_AgressiveLines_AIM;
};
case "friendly":
{
_arrayWithStrings = CSE_FriendlyLines_AIM;
};
case "neutral":
{
_arrayWithStrings = CSE_NeutralLines_AIM;
};
case "careless":
{
_arrayWithStrings = CSE_CarelessLines_AIM;
};
case "hostile":
{
_arrayWithStrings = CSE_HostileLines_AIM;
};
case "lostchicken":
{
_arrayWithStrings = CSE_OtherLines_AIM;
};
case default
{
_arrayWithStrings = CSE_DefaultLines_AIM;
};
};
_arrayWithStrings

View File

@ -0,0 +1,74 @@
/**
* fn_getPlayerSpokenLineType_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#define MEET_AND_GREET 0
#define ASK_ABOUT_OCCUPATION 1
#define ASK_ABOUT_STANCE 2
#define ASK_ABOUT_HOME 3
#define ASK_ABOUT_CULTURE 4
#define ASK_ABOUT_DOB 5
#define ASK_ABOUT_INTEL 6
#define ASK_ABOUT_ENEMY 7
#define GIVE_MONEY 8
#define GIVE_AID_PACKAGE 9
#define OFFER_MEDICAL_AID 10
private ["_target","_caller","_spokenLineType", "_spot", "_enemySide", "_allSides"];
_target = _this select 0;
_caller = _this select 1;
_spokenLineType = _this select 2;
_allSides = [west, independent, east, civilian];
_spot = 0;
{
if ((_x getFriend side _caller) < ((_allSides select _spot) getFriend side _caller)) then {
_spot = _foreachIndex;
};
}foreach _allSides;
_enemySide = _allSides select _spot;
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Hello, how are you?",format["Hello, I am %1",[_caller] call cse_fnc_getName], "Hi", "Hello.."]
};
case ASK_ABOUT_OCCUPATION: {
["What do you do for a living?", "What is it that you do?", "What is your occupation?"]
};
case ASK_ABOUT_STANCE: {
["Who do you support?", "What do you think of our cause?"]
};
case ASK_ABOUT_HOME: {
["Where do you live?","Do you live nearby?","Where are you from?","What is your place?"]
};
case ASK_ABOUT_CULTURE: {
["From what area are you from?"]
};
case ASK_ABOUT_DOB: {
["How old are you?","From when are you?"]
};
case ASK_ABOUT_INTEL: {
["Do you know any information that could be of use for us?","Have you got any information for us?","Have you seen something suspicious?"]
};
case ASK_ABOUT_ENEMY: {
[format["Have you seen %1 side?", _enemySide], format["Can you tell me anything about %1 side movements?", _enemySide]]
};
case GIVE_MONEY: {
["Sir, please accept this"]
};
case GIVE_AID_PACKAGE: {
["Sir, please accept this"]
};
case OFFER_MEDICAL_AID: {
["Do you need medical assistance?"]
};
default {
["Hello"]
};
};

View File

@ -0,0 +1,42 @@
/**
* fn_getProfileInformation_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_unit","_set"];
_unit = _this select 0;
_set = _this select 1;
if (count (_unit getvariable ["cse_profile_information_aim",[]]) == 0) then {
[_unit] call cse_fnc_generateProfileInformation_AIM;
};
_profile = _unit getvariable ["cse_profile_information_aim",[]];
// [_occupation, _dateOfBirth, _politicalViews, _culture, _supportedSides, _homeTown]
switch (_set) do {
case "Culture": {
_profile select 3
};
case "Occupation": {
_profile select 0
};
case "PoliticalViews": {
_profile select 2
};
case "SupportedSides": {
_profile select 4
};
case "homeTown": {
_profile select 5
};
case "dateOfBirth": {
_profile select 6
};
default {
"Unknown"
};
};

View File

@ -0,0 +1,362 @@
/**
* fn_getReactionLinesOfPerson_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#define MEET_AND_GREET 0
#define ASK_ABOUT_OCCUPATION 1
#define ASK_ABOUT_STANCE 2
#define ASK_ABOUT_HOME 3
#define ASK_ABOUT_CULTURE 4
#define ASK_ABOUT_DOB 5
#define ASK_ABOUT_INTEL 6
#define ASK_ABOUT_ENEMY 7
#define GIVE_MONEY 8
#define GIVE_AID_PACKAGE 9
#define OFFER_MEDICAL_AID 10
#define ALL_LOCATIONS ["Strategic","StrongpointArea","FlatArea","FlatAreaCity","FlatAreaCitySmall","CityCenter","Airport","NameMarine","NameCityCapital","NameCity","NameVillage","NameLocal","Hill","ViewPoint","RockArea","BorderCrossing","VegetationBroadleaf","VegetationFir","VegetationPalm","VegetationVineyard"]
#define NEAREST_LOCATION_RADIUS 700
// TODO clean up this file. To massive, so split it up into multiple functions
private ["_target", "_caller","_spokenLineType","_reactionType"];
_target = _this select 0; // civilian
_caller = _this select 1; // usually the player
_spokenLineType = _this select 2;
_reactionType = _this select 3;
switch (_reactionType) do {
case "agressive": {
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Go away...","We don't need you here!", "I won't talk to you", "GO AWAY!"]
};
case ASK_ABOUT_OCCUPATION: {
["Non of your business!"]
};
case ASK_ABOUT_STANCE: {
["Non of your business!", "I am warning you!"]
};
case ASK_ABOUT_HOME: {
["So you can destroy that?","Pfft.. someone should do something about you.."]
};
case ASK_ABOUT_CULTURE: {
["HA! You should die", "What..."]
};
case ASK_ABOUT_DOB: {
["Non of your business!"]
};
case ASK_ABOUT_INTEL: {
["As if I will help you!"]
};
case ASK_ABOUT_ENEMY: {
if !([_target] call cse_fnc_isArrested) then {
["I will not tell you anything!"]
} else {
_nearEntities = _target nearEntities ["CaManBase", 1000];
_enemyResults = [];
{
if (side _x != side _caller && {random(1)>0.8} && {side _x != side _target}) then {
_foundLocations = (nearestLocations [getPos _x, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if !(_foundLocations isEqualTo []) then {
_enemyResults pushback format["Alright! Perhaps something can be found near %2", side _x, text(_foundLocations select 0)];
};
};
}foreach _nearEntities;
if (_enemyResults isEqualTo []) then {
_enemyResults = ["I will never tell you anything!", "You won't get anything from me..", "I do not know anything!", "hmmph!"];
};
_enemyResults;
};
};
case GIVE_MONEY: {
["I DONT NEED YOUR MONEY","So you are going to buy my favour?"]
};
case GIVE_AID_PACKAGE: {
["Go away!","I dont want this!"]
};
case OFFER_MEDICAL_AID: {
["I dont need your help"]
};
default {
["Go","Leave me!","Someone should do something about you.."]
};
};
};
case "friendly": {
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Hello...",format["Hello, I am %1",[_target] call cse_fnc_getName], "Hi", "How are you, sir?"]
};
case ASK_ABOUT_OCCUPATION: {
[format["My occupation is %1",[_target, "Occupation"] call cse_fnc_getProfileInformation_AIM]]
};
case ASK_ABOUT_STANCE: {
[format["I support %1", str ([_target, "SupportedSides"] call cse_fnc_getProfileInformation_AIM)]]
};
case ASK_ABOUT_HOME: {
["Sorry, I won't answer that", format["I live near %1, that is nearby %2",str (([_target, "homeTown"] call cse_fnc_getProfileInformation_AIM) select 0), str (([_target, "homeTown"] call cse_fnc_getProfileInformation_AIM) select 1)]]
};
case ASK_ABOUT_CULTURE: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_DOB: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_INTEL: {
["Sorry, I don't know"]
};
case ASK_ABOUT_ENEMY: {
_nearEntities = _target nearEntities ["CaManBase", 1000];
_enemyResults = [];
{
if (side _x != side _caller && {random(1)>0.2} && {side _x != side _target}) then {
_foundLocations = (nearestLocations [getPos _x, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if !(_foundLocations isEqualTo []) then {
_enemyResults pushback format["There might be some from side %1 near %2", side _x, text(_foundLocations select 0)];
};
};
}foreach _nearEntities;
if (_enemyResults isEqualTo []) then {
_enemyResults pushback "I'm afraid I cannot tell you anything";
};
_enemyResults;
};
case GIVE_MONEY: {
["Thank you"]
};
case GIVE_AID_PACKAGE: {
["Thank you"]
};
case OFFER_MEDICAL_AID: {
["Thank you"]
};
default {
["Hello"]
};
};
};
case "neutral": {
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Hello...",format["Hello, I am %1",[_target] call cse_fnc_getName], "Hi", "How are you, sir?"]
};
case ASK_ABOUT_OCCUPATION: {
[format["My occupation is %1",[_target, "Occupation"] call cse_fnc_getProfileInformation_AIM]]
};
case ASK_ABOUT_STANCE: {
[format["I support %1",str ([_target, "SupportedSides"] call cse_fnc_getProfileInformation_AIM)]]
};
case ASK_ABOUT_HOME: {
["Sorry, I won't answer that", format["I live near %1, that is nearby %2",str (([_target, "homeTown"] call cse_fnc_getProfileInformation_AIM) select 0), str (([_target, "homeTown"] call cse_fnc_getProfileInformation_AIM) select 1)]]
};
case ASK_ABOUT_CULTURE: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_DOB: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_INTEL: {
["Sorry, I don't know"]
};
case ASK_ABOUT_ENEMY: {
_nearEntities = _target nearEntities ["CaManBase", 1000];
_enemyResults = [];
{
if (side _x != side _caller && {random(1)>0.2} && {side _x != side _target}) then {
_foundLocations = (nearestLocations [getPos _x, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if !(_foundLocations isEqualTo []) then {
_enemyResults pushback format["There might be some from side %1 near %2", side _x, text(_foundLocations select 0)];
};
};
}foreach _nearEntities;
if (_enemyResults isEqualTo []) then {
_enemyResults pushback "I'm afraid I cannot tell you anything";
};
_enemyResults;
};
case GIVE_MONEY: {
["Thank you"]
};
case GIVE_AID_PACKAGE: {
["Thank you"]
};
case OFFER_MEDICAL_AID: {
["Thank you"]
};
default {
["Hello"]
};
};
};
case "careless": {
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Hello...",format["Hello, I am %1",[_target] call cse_fnc_getName], "Hi", "How are you, sir?"]
};
case ASK_ABOUT_OCCUPATION: {
[format["My occupation is %1",[_target, "Occupation"] call cse_fnc_getProfileInformation_AIM]]
};
case ASK_ABOUT_STANCE: {
[format["I support %1",str ([_target, "SupportedSides"] call cse_fnc_getProfileInformation_AIM)]]
};
case ASK_ABOUT_HOME: {
["Sorry, I won't answer that", format["I live near %1, that is nearby %2",str (([_target, "homeTown"] call cse_fnc_getProfileInformation_AIM) select 0), str (([_target, "homeTown"] call cse_fnc_getProfileInformation_AIM) select 1)]]
};
case ASK_ABOUT_CULTURE: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_DOB: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_INTEL: {
["Sorry, I don't know"]
};
case ASK_ABOUT_ENEMY: {
_nearEntities = _target nearEntities ["CaManBase", 1000];
_enemyResults = [];
{
if (side _x != side _caller && {random(1)>0.2} && {side _x != side _target}) then {
_foundLocations = (nearestLocations [getPos _x, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if !(_foundLocations isEqualTo []) then {
_enemyResults pushback format["There might be some from side %1 near %2", side _x, text(_foundLocations select 0)];
};
};
}foreach _nearEntities;
if (_enemyResults isEqualTo []) then {
_enemyResults pushback "I'm afraid I cannot tell you anything";
};
_enemyResults;
};
case GIVE_MONEY: {
["Thank you"]
};
case GIVE_AID_PACKAGE: {
["Thank you"]
};
case OFFER_MEDICAL_AID: {
["Thank you"]
};
default {
["Hello"]
};
};
};
case "hostile": {
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Go away...","We don't need you here!", "I won't talk to you", "GO AWAY!"]
};
case ASK_ABOUT_OCCUPATION: {
["Non of your business!", "What are you still doing here"]
};
case ASK_ABOUT_STANCE: {
["Non of your business!", "I am warning you!", "Should I push you in the face?"]
};
case ASK_ABOUT_HOME: {
["So you can destroy that?","Pfft.. someone should do something about you..", "Where do you live? Perhaps I should visit there.."]
};
case ASK_ABOUT_CULTURE: {
["HA! You should die", "What..."]
};
case ASK_ABOUT_DOB: {
["Non of your business!"]
};
case ASK_ABOUT_INTEL: {
["As if I will help you!"]
};
case ASK_ABOUT_ENEMY: {
if !([_target] call cse_fnc_isArrested) then {
["I will not tell you anything!"]
} else {
_nearEntities = _target nearEntities ["CaManBase", 1000];
_enemyResults = [];
{
if (side _x != side _caller && {random(1)>0.8} && {side _x != side _target}) then {
_foundLocations = (nearestLocations [getPos _x, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if !(_foundLocations isEqualTo []) then {
_enemyResults pushback format["Alright! Perhaps something can be found near %2", side _x, text(_foundLocations select 0)];
};
};
}foreach _nearEntities;
if (_enemyResults isEqualTo []) then {
_enemyResults = ["I will never tell you anything!", "You won't get anything from me..", "I do not know anything!", "hmmph!"];
};
_enemyResults;
};
};
case GIVE_MONEY: {
["I DONT NEED YOUR MONEY","So you are going to buy my favour?"]
};
case GIVE_AID_PACKAGE: {
["Go away!","I dont want this!"]
};
case OFFER_MEDICAL_AID: {
["I dont need your help"]
};
default {
["Go","Leave me!","Someone should do something about you.."]
};
};
};
case default {
switch (_spokenLineType) do {
case MEET_AND_GREET: { // meet & greet
["Hello...",format["Hello, I am %1",[_target] call cse_fnc_getName], "Hi", "How are you, sir?"]
};
case ASK_ABOUT_OCCUPATION: {
[format["My occupation is %1",[_target, "Occupation"] call cse_fnc_getProfileInformation_AIM]]
};
case ASK_ABOUT_STANCE: {
[format["I support %1",str ([_target, "SupportedSides"] call cse_fnc_getProfileInformation_AIM)]]
};
case ASK_ABOUT_HOME: {
["Sorry, I won't answer that"]
};
case ASK_ABOUT_CULTURE: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_DOB: {
["Sorry, I will not answer that"]
};
case ASK_ABOUT_INTEL: {
_nearEntities = _target nearEntities ["CaManBase", 1000];
_enemyResults = [];
{
if (side _x != side _caller && {random(1)>0.2} && {side _x != side _target}) then {
_foundLocations = (nearestLocations [getPos _x, ALL_LOCATIONS, NEAREST_LOCATION_RADIUS]);
if !(_foundLocations isEqualTo []) then {
_enemyResults pushback format["There might be some from side %1 near %2", side _x, text(_foundLocations select 0)];
};
};
}foreach _nearEntities;
if (_enemyResults isEqualTo []) then {
_enemyResults pushback "I'm afraid I cannot tell you anything";
};
_enemyResults;
};
case ASK_ABOUT_ENEMY: {
["I am afraid I can't tell you anything"]
};
case GIVE_MONEY: {
["Thank you"]
};
case GIVE_AID_PACKAGE: {
["Thank you"]
};
case OFFER_MEDICAL_AID: {
["Thank you"]
};
default {
["Hello"]
};
};
};
};

View File

@ -0,0 +1,58 @@
/**
* fn_getReactionTypeOfUnit_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target","_caller","_stanceTowardsPlayerSide","_possibleReactionTypes","_selectedReactionType", "_selectNewReactionType", "_oldStance"];
_target = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_caller = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_stanceTowardsPlayerSide = switch (side _caller) do {
case WEST: {cse_stance_systemBlufor};
case EAST: {cse_stance_systemOpfor};
case independent: {cse_stance_systemRes};
default {0};
};
if (side _caller == side _target) then {
_stanceTowardsPlayerSide = 500;
};
_selectNewReactionType = false;
_reactionType = _target getvariable "CSE_SYS_AIM_REACTION_TYPE";
if (isnil "_reactionType") then {
_selectNewReactionType = true;
} else {
_oldStance = _reactionType select 1;
if (abs(_oldStance - _stanceTowardsPlayerSide) > 50) then {
_selectNewReactionType = true;
["Need to refresh stance"] call cse_fnc_debug;
} else {
_selectedReactionType = _reactionType select 0;
};
};
if (_selectNewReactionType) then {
_possibleReactionTypes = switch (true) do {
case (_stanceTowardsPlayerSide > 200): {
["friendly", "neutral", "careless"];
};
case (_stanceTowardsPlayerSide > 0 ): {
["agressive", "friendly", "neutral", "careless"];
};
case (_stanceTowardsPlayerSide < -500): {
["agressive", "hostile"];
};
default {
["agressive", "careless", "hostile", "neutral"];
};
};
_selectedReactionType = (_possibleReactionTypes select round (random (count _possibleReactionTypes - 1)));
_target setvariable ["CSE_SYS_AIM_REACTION_TYPE",[_selectedReactionType, _stanceTowardsPlayerSide]];
};
_selectedReactionType

View File

@ -0,0 +1,15 @@
/**
* fn_isALiVECivilianSystemActive.sqf
* Descr: Check if the ALiVE Civilian system is active
* Author: Glowbal
*
* Arguments: []
* Return: BOOL true if ALiVE civilian system is active
* PublicAPI: true
*/
if ([] call cse_fnc_isLoaded_ALiVE_Mod) then {
(["server","Subject",[[1],{[] call ALIVE_fnc_isCivilianSystemActive}]] call ALiVE_fnc_BUS)
} else {
false;
};

View File

@ -0,0 +1,30 @@
/*
fnc_loadLocal.sqf
Usage:
Author: Glowbal
Arguments: array [unit (object), vehicle (object), unit (object)]
Returns:
Affects:
Executes:
*/
private ["_unit","_vehicle","_caller","_handle","_loaded"];
_unit = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_vehicle = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_caller = [_this, 2, ObjNull,[ObjNull]] call BIS_fnc_Param;
_unit moveInCargo _vehicle;
_loaded = _vehicle getvariable ["cse_loaded_detainees_AIM",[]];
_loaded pushback _unit;
_vehicle setvariable ["cse_loaded_detainees_AIM",_loaded,true];
if (!([_unit] call cse_fnc_isAwake)) then {
_handle = [_unit,_vehicle] spawn {
private ["_unit","_vehicle"];
_unit = _this select 0;
_vehicle = _this select 1;
waituntil {vehicle _unit == _vehicle};
[_unit,([_unit] call cse_fnc_getDeathAnim)] call cse_fnc_broadcastAnim;
};
};

View File

@ -0,0 +1,31 @@
/*
fnc_load.sqf
Usage: loads specified unit into a vehicle
Author: Glowbal
Arguments: array [unit (object), unit (object)]
Returns: none
Affects:
Executes:
*/
private ["_caller", "_unit","_vehicle", "_loaded"];
_caller = _this select 0;
_unit = _this select 1;
if (!([_unit] call cse_fnc_isArrested)) exitwith {
hintSilent "This player is awake and cannot be loaded";
};
_vehicle = [_caller, _unit] call cse_fnc_loadPerson_F;
if (!isNull _vehicle) then {
_loaded = _vehicle getvariable ["cse_loaded_detainees_AIM",[]];
_loaded pushback _unit;
_vehicle setvariable ["cse_loaded_detainees_AIM",_loaded,true];
if (!isnil "CSE_DROP_ADDACTION_AIM") then {
_caller removeAction CSE_DROP_ADDACTION_AIM;
CSE_DROP_ADDACTION_AIM = nil;
};
};

View File

@ -0,0 +1,21 @@
/*
NAME: fnc_release
USAGE: switches state of unit to arrested
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
if ([_caller,_cursor,[-0.25,0.5,0]] call cse_fnc_carryObj) then {
//_cursor switchmove "UnaErcPoslechVelitele2";
[_cursor,"UnaErcPoslechVelitele2",true] call cse_fnc_broadcastAnim;
hint format["You move this person"];
} else {
//hint format["FAILED"];
};

View File

@ -0,0 +1,23 @@
/**
* fn_onCivilianKilled_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_killer","_victem"];
_killer = _this select 0;
_victem = _this select 1;
if (side _victem == civilian) then {
if (CSE_ENABLED_DIALOG_INTERACTION_AIM && {isPlayer _killer} && {local _victem}) then {
switch (side _killer) do {
case WEST: {cse_stance_systemBlufor = cse_stance_systemBlufor - (random 300); publicVariable "cse_stance_systemBlufor";};
case EAST: { cse_stance_systemOpfor = cse_stance_systemOpfor - (random 300); publicVariable "cse_stance_systemOpfor";};
case independent: {cse_stance_systemRes = cse_stance_systemRes - (random 300); publicVariable "cse_stance_systemRes";};
default {};
};
};
};

View File

@ -0,0 +1,30 @@
/**
* fn_personReactionToLine_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target", "_caller", "_civilian", "_array","_position","_textFromCiv", "_conversation"];
_target = _this select 0;
_caller = _this select 1;
_lineType = _this select 2;
if ((_target getvariable ["cse_profile_information_aim",[]]) isEqualTo []) then {
[[_target], "cse_fnc_generateProfileInformation_AIM", false, false] call BIS_fnc_MP;
waituntil {!((_target getvariable ["cse_profile_information_aim",[]]) isEqualTo [])};
};
sleep 3;
_array = [_target, _caller, _lineType, ([_target, _caller] call cse_fnc_getReactionTypeOfUnit_AIM)] call cse_fnc_getReactionLinesOfPerson_AIM;
_position = round (random (count _array -1));
_textFromCiv = _array select _position;
titleText [_textFromCiv,"PLAIN DOWN"];
[_target,[_target] call cse_fnc_getName, _textFromCiv ] call cse_fnc_addToConversationLog_AIM;
CSE_PERFORMING_TALKING_ACTION_AIM = false;

View File

@ -0,0 +1,20 @@
/**
* fn_personSpeaksLine_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target", "_caller", "_civilian", "_array","_position","_textFromCiv", "_conversation"];
_target = _this select 0;
_caller = _this select 1;
_array = [ ([_target, _caller] call cse_fnc_getReactionTypeOfUnit_AIM) , 0] call cse_fnc_getDialogLines_AIM;
_position = round (random (count _array -1));
_textFromCiv = _array select _position;
titleText [_textFromCiv,"PLAIN DOWN"];
[_target,[_target] call cse_fnc_getName, _textFromCiv ] call cse_fnc_addToConversationLog_AIM;

View File

@ -0,0 +1,18 @@
/*
NAME: fnc_release
USAGE: switches state of unit to arrested
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
[_caller,ObjNull] call cse_fnc_carryObj;
//_cursor switchmove "aidlpsitmstpsnonwnondnon_ground00";
if ([_cursor] call cse_fnc_isAwake) then {
[_cursor,"aidlpsitmstpsnonwnondnon_ground00",true] call cse_fnc_broadcastAnim;
};
hint format["You place this person on the ground"];

View File

@ -0,0 +1,31 @@
/**
* fn_playerSpeaksLine_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target", "_caller", "_civilian", "_array","_position","_textFromCiv", "_conversation", "_typeSelected"];
_target = _this select 0;
_caller = _this select 1;
if (CSE_PERFORMING_TALKING_ACTION_AIM) exitwith {};
waituntil {!CSE_PERFORMING_TALKING_ACTION_AIM};
CSE_PERFORMING_TALKING_ACTION_AIM = true;
_typeSelected = lbCurSel 400;
_array = [_target, _caller, _typeSelected] call cse_fnc_getPlayerSpokenLineType_AIM;
_position = round (random (count _array -1));
_textFromCiv = _array select _position;
titleText [_textFromCiv,"PLAIN DOWN"];
[_target,[_caller] call cse_fnc_getName, _textFromCiv ] call cse_fnc_addToConversationLog_AIM;
_handle = [_target, _caller, _typeSelected] spawn cse_fnc_personReactionToLine_AIM;

View File

@ -0,0 +1,46 @@
/**
* fn_playerStartConverationWith_AIM.sqf
* @Descr: N/A
* @Author: Glowbal
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
private ["_target", "_caller", "_civilian", "_array","_position","_textFromCiv"];
_target = _this select 0;
_caller = _this select 1;
[_this] call cse_fnc_debug;
disableSerialization;
CSE_AIM_DIALOG_INTERACTION_TARGET_AIM = _target;
createDialog "cse_dialog_menu_aim";
[_target] spawn cse_fnc_fillDialogWithConversationLines_AIM;
if (count (_target getvariable ["cse_profile_information_aim",[]]) == 0) then {
//[_target] call cse_fnc_generateProfileInformation_AIM;
[[_target], "cse_fnc_generateProfileInformation_AIM", false, false] call BIS_fnc_MP;
};
lbadd [400, localize "STR_CSE_DIALOG_MEET_AND_GREET" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_OCCUPATION" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_STANCE" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_HOME" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_CULTURE" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_DOB" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_INTEL" ];
lbadd [400, localize "STR_CSE_DIALOG_ASK_ABOUT_ENEMY" ];
// lbadd [400, localize "STR_CSE_DIALOG_GIVE_MONEY" ];
// lbadd [400, localize "STR_CSE_DIALOG_GIVE_AID_PACKAGE" ];
// lbadd [400, localize "STR_CSE_DIALOG_OFFER_MEDICAL_AID" ];
lbSetCurSel [400, 0];
ctrlSetText[12, "Name: "+ ([_target] call cse_fnc_getName)];
[_target] spawn {
_target = _this select 0;
[[_target,"Stop"],"cse_fnc_dialogMovementOrder_AIM",_target, false] spawn BIS_fnc_MP;
waituntil {!dialog};
[[_target,"Move"],"cse_fnc_dialogMovementOrder_AIM",_target, false] spawn BIS_fnc_MP;
};

View File

@ -0,0 +1,20 @@
/*
NAME: fnc_release
USAGE: switches state of unit to arrested
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target , of type man
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_target = _this select 1;
[_caller,ObjNull] call cse_fnc_carryObj;
[_target, false] call cse_fnc_setArrestState;
hint format["You release this person"];
if (CSE_USE_EQUIPMENT_AIM) then {
// Disabled, as these are zipties. We would not be getting them back.
// _caller addItem "cse_Keycuffs";
};

View File

@ -0,0 +1,20 @@
/*
NAME: fnc_searchPersonCondition
USAGE: Checks if caller can search target
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target
RETURN: boolean
*/
private ["_caller","_cursor", "_return"];
_caller = _this select 0;
_cursor = _this select 1;
_return = false;
if (group _caller != group _cursor && {_cursor iskindof "CaManBase"} && {_cursor distance _caller < 5}) then {
_return = true;
};
_return

View File

@ -0,0 +1,16 @@
/*
NAME: fnc_searchPerson
USAGE: Opens gear menu of target object for caller
AUTHOR: Glowbal
ARGUMENTS: OBJECT unit, OBJECT target
RETURN: void
*/
private ["_caller","_cursor"];
_caller = _this select 0;
_cursor = _this select 1;
if ([_caller, _cursor] call cse_fnc_searchPersonCondition_AIM) then {
_caller action ["GEAR", _cursor];
};

View File

@ -0,0 +1,33 @@
/*
fnc_unload.sqf
Usage:
Author: Glowbal
Arguments: array [unit (object), unit (object), vehicle (object)]
Returns:
Affects:
Executes:
*/
private ["_caller", "_unit","_vehicle", "_drag", "_handle"];
_caller = [_this, 0, ObjNull,[ObjNull]] call BIS_fnc_Param;
_unit = [_this, 1, ObjNull,[ObjNull]] call BIS_fnc_Param;
_drag = [_this, 2, false, [false]] call BIS_fnc_Param;
_vehicle = vehicle _unit;
if ([_caller, _unit] call cse_fnc_unloadPerson_F) then {
_loaded = _vehicle getvariable ["cse_loaded_detainees_AIM",[]];
_loaded = _loaded - [_unit];
_vehicle setvariable ["cse_loaded_detainees_AIM",_loaded,true];
if (_drag) then {
if ((vehicle _caller) == _caller) then {
_handle = [_caller, _unit] spawn {
_caller = _this select 0;
_unit = _this select 1;
waituntil {(vehicle _unit == _unit)};
[[_caller,_unit], "cse_fnc_move_AIM", _caller, false] spawn BIS_fnc_MP;
};
};
};
};

View File

@ -0,0 +1,797 @@
#ifndef CSE_DEFINE_H
#define CSE_DEFINE_H
// define.hpp
#define true 1
#define false 0
#define CT_STATIC 0
#define CT_BUTTON 1
#define CT_EDIT 2
#define CT_SLIDER 3
#define CT_COMBO 4
#define CT_LISTBOX 5
#define CT_TOOLBOX 6
#define CT_CHECKBOXES 7
#define CT_PROGRESS 8
#define CT_HTML 9
#define CT_STATIC_SKEW 10
#define CT_ACTIVETEXT 11
#define CT_TREE 12
#define CT_STRUCTURED_TEXT 13
#define CT_CONTEXT_MENU 14
#define CT_CONTROLS_GROUP 15
#define CT_SHORTCUTBUTTON 16
#define CT_XKEYDESC 40
#define CT_XBUTTON 41
#define CT_XLISTBOX 42
#define CT_XSLIDER 43
#define CT_XCOMBO 44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT 80
#define CT_OBJECT_ZOOM 81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK 98
#define CT_ANIMATED_USER 99
#define CT_MAP 100
#define CT_MAP_MAIN 101
#define CT_LISTNBOX 102
// Static styles
#define ST_POS 0x0F
#define ST_HPOS 0x03
#define ST_VPOS 0x0C
#define ST_LEFT 0x00
#define ST_RIGHT 0x01
#define ST_CENTER 0x02
#define ST_DOWN 0x04
#define ST_UP 0x08
#define ST_VCENTER 0x0c
#define ST_TYPE 0xF0
#define ST_SINGLE 0
#define ST_MULTI 16
#define ST_TITLE_BAR 32
#define ST_PICTURE 48
#define ST_FRAME 64
#define ST_BACKGROUND 80
#define ST_GROUP_BOX 96
#define ST_GROUP_BOX2 112
#define ST_HUD_BACKGROUND 128
#define ST_TILE_PICTURE 144
#define ST_WITH_RECT 160
#define ST_LINE 176
#define ST_SHADOW 0x100
#define ST_NO_RECT 0x200 // this style works for CT_STATIC in conjunction with ST_MULTI
#define ST_KEEP_ASPECT_RATIO 0x800
#define ST_TITLE ST_TITLE_BAR + ST_CENTER
// Slider styles
#define SL_DIR 0x400
#define SL_VERT 0
#define SL_HORZ 0x400
#define SL_TEXTURES 0x10
// Listbox styles
#define LB_TEXTURES 0x10
#define LB_MULTI 0x20
#define FontCSE "PuristaMedium"
class cse_gui_backgroundBase {
type = CT_STATIC;
idc = -1;
style = ST_PICTURE;
colorBackground[] = {0,0,0,0};
colorText[] = {1, 1, 1, 1};
font = FontCSE;
text = "";
sizeEx = 0.032;
};
class cse_gui_editBase
{
access = 0;
type = 2;
x = 0;
y = 0;
h = 0.04;
w = 0.2;
colorBackground[] =
{
0,
0,
0,
1
};
colorText[] =
{
0.95,
0.95,
0.95,
1
};
colorSelection[] =
{
"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])",
"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])",
"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])",
1
};
autocomplete = "";
text = "";
size = 0.2;
style = "0x00 + 0x40";
font = "PuristaMedium";
shadow = 2;
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorDisabled[] =
{
1,
1,
1,
0.25
};
};
class cse_gui_buttonBase {
idc = -1;
type = 16;
style = ST_LEFT;
text = "";
action = "";
x = 0.0;
y = 0.0;
w = 0.25;
h = 0.04;
size = 0.03921;
sizeEx = 0.03921;
color[] = {1.0, 1.0, 1.0, 1};
color2[] = {1.0, 1.0, 1.0, 1};
/*colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.5])"};
colorbackground2[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.4};
colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
colorFocused[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])", 0.8};
colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.8};
*/
colorBackground[] = {1,1,1,0.95};
colorbackground2[] = {1,1,1,0.95};
colorDisabled[] = {1,1,1,0.6};
colorFocused[] = {1,1,1,1};
colorBackgroundFocused[] = {1,1,1,1};
periodFocus = 1.2;
periodOver = 0.8;
default = false;
class HitZone {
left = 0.00;
top = 0.00;
right = 0.00;
bottom = 0.00;
};
class ShortcutPos {
left = 0.00;
top = 0.00;
w = 0.00;
h = 0.00;
};
class TextPos {
left = 0.002;
top = 0.0004;
right = 0.0;
bottom = 0.00;
};
textureNoShortcut = "";
animTextureNormal = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
animTextureDisabled = "cse\cse_gui\data\buttonDisabled_gradient.paa";
animTextureOver = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
animTextureFocused = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
animTexturePressed = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
animTextureDefault = "cse\cse_gui\data\buttonNormal_gradient_top.paa";
period = 0.5;
font = FontCSE;
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.0,0};
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.07,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
class Attributes {
font = FontCSE;
color = "#E5E5E5";
align = "center";
shadow = "true";
};
class AttributesImage {
font = FontCSE;
color = "#E5E5E5";
align = "left";
shadow = "true";
};
};
class cse_gui_RscProgress {
type = 8;
style = 0;
colorFrame[] = {1,1,1,0.7};
colorBar[] = {1,1,1,0.7};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
};
class cse_gui_staticBase {
idc = -1;
type = CT_STATIC;
x = 0.0;
y = 0.0;
w = 0.183825;
h = 0.104575;
style = ST_LEFT;
font = FontCSE;
sizeEx = 0.03921;
colorText[] = {0.95, 0.95, 0.95, 1.0};
colorBackground[] = {0, 0, 0, 0};
text = "";
};
class RscListBox;
class cse_gui_listBoxBase : RscListBox{
type = CT_LISTBOX;
style = ST_MULTI;
font = FontCSE;
sizeEx = 0.03921;
color[] = {1, 1, 1, 1};
colorText[] = {0.543, 0.5742, 0.4102, 1.0};
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
colorSelect[] = {0.95, 0.95, 0.95, 1};
colorSelect2[] = {0.95, 0.95, 0.95, 1};
colorSelectBackground[] = {0, 0, 0, 1};
colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1.0};
colorDisabled[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", 0.25};
period = 1.2;
rowHeight = 0.03;
colorBackground[] = {0, 0, 0, 1};
maxHistoryDelay = 1.0;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
soundSelect[] = {"",0.1,1};
soundExpand[] = {"",0.1,1};
soundCollapse[] = {"",0.1,1};
class ListScrollBar {
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
autoScrollDelay = 5;
autoScrollEnabled = 0;
autoScrollRewind = 0;
autoScrollSpeed = -1;
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
height = 0;
scrollSpeed = 0.06;
shadow = 0;
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
width = 0;
};
class ScrollBar {
color[] = {1, 1, 1, 0.6};
colorActive[] = {1, 1, 1, 1};
colorDisabled[] = {1, 1, 1, 0.3};
thumb = "";
arrowFull = "";
arrowEmpty = "";
border = "";
};
};
class cse_gui_listNBox {
access = 0;
type = CT_LISTNBOX;// 102;
style =ST_MULTI;
w = 0.4;
h = 0.4;
font = FontCSE;
sizeEx = 0.031;
autoScrollSpeed = -1;
autoScrollDelay = 5;
autoScrollRewind = 0;
arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
columns[] = {0.0};
color[] = {1, 1, 1, 1};
rowHeight = 0.03;
colorBackground[] = {0, 0, 0, 0.2};
colorText[] = {1,1, 1, 1.0};
colorScrollbar[] = {0.95, 0.95, 0.95, 1};
colorSelect[] = {0.95, 0.95, 0.95, 1};
colorSelect2[] = {0.95, 0.95, 0.95, 1};
colorSelectBackground[] = {0, 0, 0, 0.0};
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.5};
colorActive[] = {0,0,0,1};
colorDisabled[] = {0,0,0,0.3};
rows = 1;
drawSideArrows = 0;
idcLeft = -1;
idcRight = -1;
maxHistoryDelay = 1;
soundSelect[] = {"", 0.1, 1};
period = 1;
shadow = 2;
class ScrollBar {
arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
border = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
thumb = "#(argb,8,8,3)color(1,1,1,1)";
};
class ListScrollBar {
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
autoScrollDelay = 5;
autoScrollEnabled = 0;
autoScrollRewind = 0;
autoScrollSpeed = -1;
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
color[] = {1,1,1,0.6};
colorActive[] = {1,1,1,1};
colorDisabled[] = {1,1,1,0.3};
height = 0;
scrollSpeed = 0.06;
shadow = 0;
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
width = 0;
};
};
class RscCombo;
class cse_gui_comboBoxBase: RscCombo {
idc = -1;
type = 4;
style = "0x10 + 0x200";
x = 0;
y = 0;
w = 0.3;
h = 0.035;
color[] = {0,0,0,0.6};
colorActive[] = {1,0,0,1};
colorBackground[] = {0,0,0,1};
colorDisabled[] = {1,1,1,0.25};
colorScrollbar[] = {1,0,0,1};
colorSelect[] = {0,0,0,1};
colorSelectBackground[] = {1,1,1,0.7};
colorText[] = {1,1,1,1};
arrowEmpty = "";
arrowFull = "";
wholeHeight = 0.45;
font = FontCSE;
sizeEx = 0.031;
soundSelect[] = {"\A3\ui_f\data\sound\RscCombo\soundSelect",0.1,1};
soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1};
soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1};
maxHistoryDelay = 1.0;
class ScrollBar
{
color[] = {0.3,0.3,0.3,0.6};
colorActive[] = {0.3,0.3,0.3,1};
colorDisabled[] = {0.3,0.3,0.3,0.3};
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
border = "";
};
class ComboScrollBar {
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa";
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa";
autoScrollDelay = 5;
autoScrollEnabled = 0;
autoScrollRewind = 0;
autoScrollSpeed = -1;
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa";
color[] = {0.3,0.3,0.3,0.6};
colorActive[] = {0.3,0.3,0.3,1};
colorDisabled[] = {0.3,0.3,0.3,0.3};
height = 0;
scrollSpeed = 0.06;
shadow = 0;
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa";
width = 0;
};
};
class cse_gui_mapBase {
moveOnEdges = 1;
x = "SafeZoneXAbs";
y = "SafeZoneY + 1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "SafeZoneWAbs";
h = "SafeZoneH - 1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
type = 100; // Use 100 to hide markers
style = 48;
shadow = 0;
ptsPerSquareSea = 5;
ptsPerSquareTxt = 3;
ptsPerSquareCLn = 10;
ptsPerSquareExp = 10;
ptsPerSquareCost = 10;
ptsPerSquareFor = 9;
ptsPerSquareForEdge = 9;
ptsPerSquareRoad = 6;
ptsPerSquareObj = 9;
showCountourInterval = 0;
scaleMin = 0.001;
scaleMax = 1.0;
scaleDefault = 0.16;
maxSatelliteAlpha = 0.85;
alphaFadeStartScale = 0.35;
alphaFadeEndScale = 0.4;
colorBackground[] = {0.969,0.957,0.949,1.0};
colorSea[] = {0.467,0.631,0.851,0.5};
colorForest[] = {0.624,0.78,0.388,0.5};
colorForestBorder[] = {0.0,0.0,0.0,0.0};
colorRocks[] = {0.0,0.0,0.0,0.3};
colorRocksBorder[] = {0.0,0.0,0.0,0.0};
colorLevels[] = {0.286,0.177,0.094,0.5};
colorMainCountlines[] = {0.572,0.354,0.188,0.5};
colorCountlines[] = {0.572,0.354,0.188,0.25};
colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6};
colorCountlinesWater[] = {0.491,0.577,0.702,0.3};
colorPowerLines[] = {0.1,0.1,0.1,1.0};
colorRailWay[] = {0.8,0.2,0.0,1.0};
colorNames[] = {0.1,0.1,0.1,0.9};
colorInactive[] = {1.0,1.0,1.0,0.5};
colorOutside[] = {0.0,0.0,0.0,1.0};
colorTracks[] = {0.84,0.76,0.65,0.15};
colorTracksFill[] = {0.84,0.76,0.65,1.0};
colorRoads[] = {0.7,0.7,0.7,1.0};
colorRoadsFill[] = {1.0,1.0,1.0,1.0};
colorMainRoads[] = {0.9,0.5,0.3,1.0};
colorMainRoadsFill[] = {1.0,0.6,0.4,1.0};
colorGrid[] = {0.1,0.1,0.1,0.6};
colorGridMap[] = {0.1,0.1,0.1,0.6};
colorText[] = {1, 1, 1, 0.85};
font = "PuristaMedium";
sizeEx = 0.0270000;
stickX[] = {0.20, {"Gamma", 1.00, 1.50} };
stickY[] = {0.20, {"Gamma", 1.00, 1.50} };
onMouseButtonClick = "";
onMouseButtonDblClick = "";
fontLabel = "PuristaMedium";
sizeExLabel = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
fontGrid = "TahomaB";
sizeExGrid = 0.02;
fontUnits = "TahomaB";
sizeExUnits = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
fontNames = "PuristaMedium";
sizeExNames = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2";
fontInfo = "PuristaMedium";
sizeExInfo = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
fontLevel = "TahomaB";
sizeExLevel = 0.02;
text = "#(argb,8,8,3)color(1,1,1,1)";
class ActiveMarker {
color[] = {0.30, 0.10, 0.90, 1.00};
size = 50;
};
class Legend
{
x = "SafeZoneX + ( ((safezoneW / safezoneH) min 1.2) / 40)";
y = "SafeZoneY + safezoneH - 4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
h = "3.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
font = "PuristaMedium";
sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)";
colorBackground[] = {1,1,1,0.5};
color[] = {0,0,0,1};
};
class Task
{
icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa";
iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa";
iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa";
iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa";
iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa";
color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"};
colorCreated[] = {1,1,1,1};
colorCanceled[] = {0.7,0.7,0.7,1};
colorDone[] = {0.7,1,0.3,1};
colorFailed[] = {1,0.3,0.2,1};
size = 27;
importance = 1;
coefMin = 1;
coefMax = 1;
};
class Waypoint
{
icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
color[] = {0,0,0,1};
size = 20;
importance = "1.2 * 16 * 0.05";
coefMin = 0.900000;
coefMax = 4;
};
class WaypointCompleted
{
icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa";
color[] = {0,0,0,1};
size = 20;
importance = "1.2 * 16 * 0.05";
coefMin = 0.900000;
coefMax = 4;
};
class CustomMark
{
icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa";
size = 24;
importance = 1;
coefMin = 1;
coefMax = 1;
color[] = {0,0,0,1};
};
class Command
{
icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa";
size = 18;
importance = 1;
coefMin = 1;
coefMax = 1;
color[] = {1,1,1,1};
};
class Bush
{
icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
color[] = {0.45,0.64,0.33,0.4};
size = "14/2";
importance = "0.2 * 14 * 0.05 * 0.05";
coefMin = 0.25;
coefMax = 4;
};
class Rock
{
icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa";
color[] = {0.1,0.1,0.1,0.8};
size = 12;
importance = "0.5 * 12 * 0.05";
coefMin = 0.25;
coefMax = 4;
};
class SmallTree
{
icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
color[] = {0.45,0.64,0.33,0.4};
size = 12;
importance = "0.6 * 12 * 0.05";
coefMin = 0.25;
coefMax = 4;
};
class Tree
{
icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa";
color[] = {0.45,0.64,0.33,0.4};
size = 12;
importance = "0.9 * 16 * 0.05";
coefMin = 0.25;
coefMax = 4;
};
class busstop
{
icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class fuelstation
{
icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class hospital
{
icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class church
{
icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class lighthouse
{
icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class power
{
icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class powersolar
{
icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class powerwave
{
icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class powerwind
{
icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class quay
{
icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class shipwreck
{
icon = "\A3\ui_f\data\map\mapcontrol\shipwreck_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class transmitter
{
icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class watertower
{
icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {1,1,1,1};
};
class Cross
{
icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {0,0,0,1};
};
class Chapel
{
icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa";
size = 24;
importance = 1;
coefMin = 0.85;
coefMax = 1.0;
color[] = {0,0,0,1};
};
class Bunker
{
icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
size = 14;
importance = "1.5 * 14 * 0.05";
coefMin = 0.25;
coefMax = 4;
color[] = {0,0,0,1};
};
class Fortress
{
icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa";
size = 16;
importance = "2 * 16 * 0.05";
coefMin = 0.25;
coefMax = 4;
color[] = {0,0,0,1};
};
class Fountain
{
icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa";
size = 11;
importance = "1 * 12 * 0.05";
coefMin = 0.25;
coefMax = 4;
color[] = {0,0,0,1};
};
class Ruin
{
icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa";
size = 16;
importance = "1.2 * 16 * 0.05";
coefMin = 1;
coefMax = 4;
color[] = {0,0,0,1};
};
class Stack
{
icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa";
size = 20;
importance = "2 * 16 * 0.05";
coefMin = 0.9;
coefMax = 4;
color[] = {0,0,0,1};
};
class Tourism
{
icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa";
size = 16;
importance = "1 * 16 * 0.05";
coefMin = 0.7;
coefMax = 4;
color[] = {0,0,0,1};
};
class ViewTower
{
icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa";
size = 16;
importance = "2.5 * 16 * 0.05";
coefMin = 0.5;
coefMax = 4;
color[] = {0,0,0,1};
};
};
#endif

View File

@ -0,0 +1,172 @@
class cse_dialog_menu_aim {
idd = 54327;
movingEnable = false;
onLoad = "uiNamespace setVariable ['cse_dialog_menu_aim', _this select 0];";
onUnload = "uiNamespace setVariable ['cse_dialog_menu_aim', nil];";
class controlsBackground {
class HeaderBackground: cse_gui_backgroundBase{
idc = -1;
type = CT_STATIC;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
style = ST_LEFT + ST_SHADOW;
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
text = "";
};
class CenterBackground: HeaderBackground {
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
h = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "";
colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
};
class LeftBackground: CenterBackground {
y = "4.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
h = "12.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "25 * (((safezoneW / safezoneH) min 1.2) / 40)";
};
class RightBackground: LeftBackground {
x = "26.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
w = "12.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
};
};
class controls {
class HeaderName {
idc = 1;
type = CT_STATIC;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
style = ST_LEFT + ST_SHADOW;
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0};
text = "Dialog with Person";
};
class labelShow : cse_gui_staticBase {
idc = 12;
x = "2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "2.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "30 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "Name:";
};
class labelShow2: cse_gui_staticBase {
idc = 13;
x = "2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "3.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "30 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "State:";
};
class actionClose : cse_gui_buttonBase {
idc = 10;
text = "Close";
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "17.3 * ((((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)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {1, 1, 1, 1};
color2[] = {0,0,0, 1};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground[] = {1,1,1,1};
colorbackground2[] = {1,1,1,1};
colorDisabled[] = {0.5,0.5,0.5,0.8};
colorFocused[] = {0,0,0,1};
periodFocus = 1;
periodOver = 1;
action = "closedialog 0;";
};
class listboxConversationOverView: cse_gui_listNBox {
idc = 200;
x = "2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "5.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "23 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
colorBackground[] = {0, 0, 0, 0.9};
colorSelectBackground[] = {0, 0, 0, 0.9};
columns[] = {0.0, 0.25};
};
class labelTitle: cse_gui_staticBase {
idc = 250;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "5.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "Conversation Selection";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
};
class actionListBox1: cse_gui_listBoxBase {
idc = 400;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "7.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "11 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorBackground[] = {0,0,0, 0.9};
colorSelectBackground[] = {0,0,0, 0.9};
colorSelectBackground2[] = { 0.9, 0.9, 0.9, 0.9};
color[] = {1, 1, 1, 1};
colorText[] = {1, 1, 1, 1};
colorSelect[] = {1, 1, 1, 1};
colorSelect2[] = {0,0,0, 1};
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.75)";
rowHeight = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.75)";
};
class labelKey: cse_gui_staticBase {
idc = 300;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "6.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
text = "";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
};
class actionPerformAction: actionClose {
idc = 30;
text = "Say selected line type";
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "17.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "11 * (((safezoneW / safezoneH) min 1.2) / 40)";
action = "[CSE_AIM_DIALOG_INTERACTION_TARGET_AIM, player] call cse_fnc_playerSpeaksLine_AIM; ";
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {0,0,0, 1};
color2[] = {0,0,0, 1};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground[] = {1,1,1,1};
colorbackground2[] = {1,1,1,1};
colorDisabled[] = {0.5,0.5,0.5,0.8};
colorFocused[] = {0,0,0,1};
};
};
};

View File

@ -0,0 +1,26 @@
class cse_searchMenu_aim {
idd = 54327;
movingEnable = false;
onLoad = "uiNamespace setVariable ['cse_searchMenu_aim', _this select 0];";
onUnload = "uiNamespace setVariable ['cse_searchMenu_aim', nil];";
class controlsBackground {
class HeaderBackground: cse_gui_backgroundBase{
idc = -1;
type = CT_STATIC;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
style = ST_LEFT + ST_SHADOW;
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
text = "";
};
};
class controls {
};
};

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

@ -0,0 +1,167 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project name="Combat Space Enhancement">
<Package name="Advanced Interaction">
<Container name="ConversationModule">
<Key ID="STR_CSE_DIALOG_MEET_AND_GREET">
<Original>Meet and Greet</Original>
<English>Meet and Greet</English>
<Polish>Przedstaw się i przywitaj</Polish>
<Spanish>Saludar</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_OCCUPATION">
<Original>Ask about Occupation</Original>
<English>Ask about Occupation</English>
<Polish>Zapytaj o zawód</Polish>
<Spanish>Preguntar sobre su ocupación</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_STANCE">
<Original>Ask about Their supported side</Original>
<English>Ask about Their supported side</English>
<Polish>Zapytaj którą stronę wspierają</Polish>
<Spanish>Preguntar sobre su bando</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_HOME">
<Original>Ask about there home</Original>
<English>Ask about there home</English>
<Polish>Zapytaj o dom</Polish>
<Spanish>Preguntar acerca de su hogar</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_CULTURE">
<Original>Find out their culture</Original>
<English>Find out their culture</English>
<Polish>Zapytaj o kulturę</Polish>
<Spanish>Averigüe su cultura</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_DOB">
<Original>Ask about Date of Birth</Original>
<English>Ask about Date of Birth</English>
<Polish>Zapytaj o datę urodzenia</Polish>
<Spanish>Preguntar fecha de nacimiento</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_INTEL">
<Original>Ask information</Original>
<English>Ask information</English>
<Polish>Zapytaj o informację</Polish>
<Spanish>Pedir información</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_ASK_ABOUT_ENEMY">
<Original>Ask about enemy</Original>
<English>Ask about enemy</English>
<Polish>Zapytaj o przeciwnika</Polish>
<Spanish>Preguntar sobre el enemigo</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_GIVE_MONEY">
<Original>Give Money</Original>
<English>Give Money</English>
<Polish>Podaruj pieniądze</Polish>
<Spanish>Dar Dinero</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_GIVE_AID_PACKAGE">
<Original>Give Aid Package</Original>
<English>Give Aid Package</English>
<Polish>Podaruj apteczkę</Polish>
<Spanish>Dar paquete de ayuda médica</Spanish>
</Key>
<Key ID="STR_CSE_DIALOG_OFFER_MEDICAL_AID">
<Original>Offer medical Aid</Original>
<English>Offer medical Aid</English>
<Polish>Zaoferuj pomoc medyczną</Polish>
<Spanish>Ofrecer ayuda médica</Spanish>
</Key>
</Container>
<Container name="ConversationModule">
<Key ID="STR_CSE_ITEM_KEYCUFFS_DISPLAY">
<Original>Keycuffs</Original>
<Spanish>Bridas</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_KEYCUFFS_DESC">
<Original>Keycuffs, used for detaining a suspect</Original>
<Spanish>Bridas, usadas para detener a un sospechoso</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_HIIDE_DISPLAY">
<Original>Biometric Scanner (HIIDE)</Original>
<Spanish>Escáner Biométrico (HIIDE)</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_HIIDE_DESC">
<Original>Biometric Scanner (HIIDE)</Original>
<Spanish>Escáner Biométrico (HIIDE)</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_PHONE_DISPLAY">
<Original>Old Phone</Original>
<Spanish>Teléfono Antiguo</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_PHONE_DESC">
<Original>Old Phone</Original>
<Spanish>Teléfono Antiguo</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_PHONE_FOLDED_DISPLAY">
<Original>Old Phone (Folded)</Original>
<Spanish>Teléfono Antiguo (Cerrado)</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_PHONE_FOLDED_DESC">
<Original>Old Phone (Folded)</Original>
<Spanish>Teléfono Antiguo (Cerrado)</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_WATCH_EXPENSIVE_DISPLAY">
<Original>Watch (Expensive)</Original>
<Spanish>Reloj (Caro)</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_WATCH_EXPENSIVE_DESC">
<Original>Watch (Expensive)</Original>
<Spanish>Reloj (Caro)</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_WALLET_DISPLAY">
<Original>Wallet</Original>
<Spanish>Billetera</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_WALLET_DESC">
<Original>Wallet</Original>
<Spanish>Billetera</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_9v_BATTERY_DISPLAY">
<Original>9 volt battery</Original>
<Spanish>Pila de 9 voltios</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_9v_BATTERY_DESC">
<Original>9 volt battery</Original>
<Spanish>Pila de 9 voltios</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_NOTEBOOK_DISPLAY">
<Original>Notebook</Original>
<Spanish>Cuaderno</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_NOTEBOOK_DESC">
<Original>Notebook</Original>
<Spanish>Cuaderno</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_SCISSORS_DISPLAY">
<Original>Scissors</Original>
<Spanish>Tijeras</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_SCISSORS_DESC">
<Original>Scissors</Original>
<Spanish>Tijeras</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_WIRES_DISPLAY">
<Original>Wires</Original>
<Spanish>Alambre</Spanish>
</Key>
<Key ID="STR_CSE_ITEM_WIRES_DESC">
<Original>Wires</Original>
<Spanish>Alambre</Spanish>
</Key>
</Container>
</Package>
</Project>