mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
black periphery
This commit is contained in:
parent
36d0b78811
commit
6a5c9cfca7
@ -1,5 +1,5 @@
|
||||
|
||||
class CBA_Extended_EventHandlers;
|
||||
class CBA_Extended_EventHandlers_base;
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
@ -18,6 +18,111 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class LandVehicle;
|
||||
class StaticWeapon: LandVehicle {
|
||||
class Turrets;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions;
|
||||
};
|
||||
};
|
||||
|
||||
class StaticATWeapon: StaticWeapon {
|
||||
class Turrets: Turrets {
|
||||
class MainTurret;
|
||||
};
|
||||
|
||||
class ACE_Actions: ACE_Actions {
|
||||
class ACE_MainActions: ACE_MainActions {};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_SpottingScopeObject: StaticATWeapon {
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition)[] = {0,1,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
|
||||
class ACE_Actions: ACE_Actions{
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
selection = "main_turret";
|
||||
class ACE_Pickup {
|
||||
selection = "";
|
||||
displayName = CSTRING(PickUp);
|
||||
distance = 5;
|
||||
condition = QUOTE((alive _target) && (count (crew _target) == 0));
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
icon = QPATHTOF(UI\w_spottingscope_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class EventHandlers {
|
||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
|
||||
};
|
||||
|
||||
scope = 1;
|
||||
side = 1;
|
||||
typicalCargo[] = {"Soldier"};
|
||||
displayName = CSTRING(DisplayName);
|
||||
model = QPATHTOF(data\ace_spottingscope.p3d);
|
||||
mapSize = 0.5;
|
||||
transportSoldier = 0;
|
||||
getInAction = "GetInLow";
|
||||
getOutAction = "GetOutLow";
|
||||
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
minTurn = -45;
|
||||
maxTurn = 45;
|
||||
initTurn = 0;
|
||||
minElev = -10;
|
||||
maxElev = 40;
|
||||
initElev = 0;
|
||||
|
||||
class ViewGunner {
|
||||
initAngleX = 5;
|
||||
minAngleX = -30;
|
||||
maxAngleX = 30;
|
||||
initAngleY = 0;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
initFov = 0.75;
|
||||
minFov = 0.25;
|
||||
maxFov = 1.25;
|
||||
};
|
||||
|
||||
class ViewOptics {
|
||||
initAngleX = 0;
|
||||
minAngleX = -30;
|
||||
maxAngleX = 30;
|
||||
initAngleY = 0;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
minFov = 0.0025;
|
||||
maxFov = 0.05;
|
||||
initFov= 0.05;
|
||||
};
|
||||
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerOpticsColor[] = {1,1,1,1};
|
||||
gunnerOpticsModel = "\A3\Weapons_F\empty"; //QPATHTOF(data\m144_optic.p3d);
|
||||
gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"};
|
||||
gunnerOutOpticsShowCursor = 0;
|
||||
gunnerOpticsShowCursor = 0;
|
||||
gunnerAction = "ACE_SpottingScope";
|
||||
gunnerGetInAction = "GetInLow";
|
||||
gunnerGetOutAction = "GetOutLow";
|
||||
gunnerForceOptics = 0;
|
||||
ejectDeadGunner = 0;
|
||||
turretInfoType = QGVAR(RscUnitInfo);
|
||||
opticsDisablePeripherialVision = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Item_Base_F;
|
||||
class ACE_Item_SpottingScope: Item_Base_F {
|
||||
author[] = {"Rocko", "Scubaman3D"};
|
||||
@ -36,102 +141,4 @@ class CfgVehicles {
|
||||
MACRO_ADDITEM(ACE_SpottingScope,2);
|
||||
};
|
||||
};
|
||||
|
||||
class LandVehicle;
|
||||
class StaticWeapon: LandVehicle {
|
||||
class Turrets;
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {};
|
||||
};
|
||||
};
|
||||
class StaticATWeapon: StaticWeapon {
|
||||
class Turrets: Turrets {
|
||||
class MainTurret;
|
||||
};
|
||||
class ACE_Actions: ACE_Actions{
|
||||
class ACE_MainActions: ACE_MainActions {};
|
||||
};
|
||||
};
|
||||
class ACE_SpottingScopeObject: StaticATWeapon {
|
||||
class EventHandlers {
|
||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};
|
||||
};
|
||||
|
||||
scope = 1;
|
||||
side = 1;
|
||||
typicalCargo[] = {"Soldier"};
|
||||
displayName = CSTRING(DisplayName);
|
||||
model = QPATHTOF(data\ace_spottingscope.p3d);
|
||||
mapSize = 0.5;
|
||||
transportSoldier = 0;
|
||||
getInAction = "GetInLow";
|
||||
getOutAction = "GetOutLow";
|
||||
opticsDisablePeripherialVision = 1;
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {
|
||||
turretInfoType = QGVAR(RscUnitInfo);
|
||||
|
||||
minTurn = -45;
|
||||
maxTurn = 45;
|
||||
initTurn = 0;
|
||||
minElev = -10;
|
||||
maxElev = 40;
|
||||
initElev = 0;
|
||||
|
||||
weapons[] = {};
|
||||
magazines[] = {};
|
||||
gunnerOpticsColor[] = {1,1,1,1};
|
||||
gunnerOpticsmodel = "\A3\Weapons_F\empty"; //QPATHTOF(data\m144_optic.p3d);
|
||||
gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"};
|
||||
gunnerOutOpticsShowCursor = 0;
|
||||
gunnerOpticsShowCursor = 0;
|
||||
gunnerAction = "ACE_SpottingScope";
|
||||
gunnerGetInAction = "GetInLow";
|
||||
gunnerGetOutAction = "GetOutLow";
|
||||
gunnerForceOptics = 0;
|
||||
ejectDeadGunner = 0;
|
||||
class ViewGunner {
|
||||
initAngleX = 5;
|
||||
minAngleX = -30;
|
||||
maxAngleX = 30;
|
||||
initAngleY = 0;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
initFov = 0.75;
|
||||
minFov = 0.25;
|
||||
maxFov = 1.25;
|
||||
};
|
||||
class ViewOptics {
|
||||
initAngleX = 0;
|
||||
minAngleX = -30;
|
||||
maxAngleX = 30;
|
||||
initAngleY = 0;
|
||||
minAngleY = -100;
|
||||
maxAngleY = 100;
|
||||
minFov = 0.0025;
|
||||
maxFov = 0.05;
|
||||
initFov= 0.05;
|
||||
};
|
||||
};
|
||||
};
|
||||
EGVAR(dragging,canDrag) = 1;
|
||||
EGVAR(dragging,dragPosition)[] = {0,1,0};
|
||||
EGVAR(dragging,dragDirection) = 0;
|
||||
class ACE_Actions: ACE_Actions{
|
||||
class ACE_MainActions: ACE_MainActions {
|
||||
selection = "main_turret";
|
||||
class ACE_Pickup {
|
||||
selection = "";
|
||||
displayName = CSTRING(PickUp);
|
||||
distance = 5;
|
||||
condition = QUOTE((alive _target) && (count (crew _target) == 0));
|
||||
statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup));
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
icon = QPATHTOF(UI\w_spottingscope_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -6,7 +6,8 @@ class RscText;
|
||||
class RscInGameUI {
|
||||
class RscUnitInfo;
|
||||
class GVAR(RscUnitInfo): RscUnitInfo {
|
||||
controls[] = {"CA_FOVMode","ScriptedReticleHelper","Reticle","Body","trippleHeadLeft","trippleHeadRight"}; // don't change this order
|
||||
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); {((_this select 0) displayCtrl _x) ctrlShow false} forEach [ARR_4(IDC_RETICLE,IDC_BODY,IDC_BLACK_LEFT,IDC_BLACK_RIGHT)]);
|
||||
controls[] = {"CA_FOVMode","ScriptedReticleHelper","trippleHeadLeft","trippleHeadRight","Reticle","Body"}; // don't change this order
|
||||
|
||||
class CA_FOVMode: RscOpticsValue { // idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used
|
||||
idc = 154;
|
||||
@ -54,14 +55,14 @@ class RscInGameUI {
|
||||
idc = IDC_BLACK_LEFT;
|
||||
x = "safeZoneXAbs";
|
||||
Y = "safezoneY";
|
||||
W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))";
|
||||
W = "(-safeZoneX - safeZoneXAbs) * ((getResolution select 4)/(16/3))";
|
||||
H = "safeZoneH";
|
||||
colorBackground[] = {0,0,0,1};
|
||||
};
|
||||
|
||||
class trippleHeadRight: trippleHeadLeft {
|
||||
idc = IDC_BLACK_RIGHT;
|
||||
x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))";
|
||||
x = "safeZoneXAbs + safeZoneWAbs - (-safeZoneX - safeZoneXABS) * ((getResolution select 4)/(16/3))";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,23 +15,23 @@
|
||||
disableSerialization;
|
||||
|
||||
params ["_display"];
|
||||
|
||||
//uinamespace setVariable [QGVAR(dlgSpottingScope), _display];
|
||||
|
||||
private _ctrlReticle = _display displayCtrl IDC_RETICLE;
|
||||
private _ctrlBody = _display displayCtrl IDC_BODY;
|
||||
private _ctrlBlackLeft = _display displayCtrl IDC_BLACK_LEFT;
|
||||
private _ctrlBlackRight = _display displayCtrl IDC_BLACK_RIGHT;
|
||||
|
||||
// check if optics are used
|
||||
// hide all controls otherwise
|
||||
private _isUsingOptic = ctrlShown (_display displayCtrl 154);
|
||||
|
||||
(_display displayCtrl IDC_BLACK_LEFT) ctrlShow _isUsingOptic;
|
||||
(_display displayCtrl IDC_BLACK_RIGHT) ctrlShow _isUsingOptic;
|
||||
|
||||
// animate reticle
|
||||
private _ctrlReticle = _display displayCtrl IDC_RETICLE;
|
||||
private _ctrlBody = _display displayCtrl IDC_BODY;
|
||||
|
||||
_ctrlReticle ctrlShow _isUsingOptic;
|
||||
_ctrlBody ctrlShow _isUsingOptic;
|
||||
_ctrlBlackLeft ctrlShow _isUsingOptic;
|
||||
_ctrlBlackRight ctrlShow _isUsingOptic;
|
||||
|
||||
// animate reticle
|
||||
private _zoom = ([] call EFUNC(common,getZoom)) * MAGIC_SCOPE_NUMBER;
|
||||
|
||||
_ctrlReticle ctrlSetPosition [
|
||||
|
Loading…
Reference in New Issue
Block a user