Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

rename 2doptics to optics #1117

Merged
merged 2 commits into from
Apr 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion addons/2doptics/$PBOPREFIX$

This file was deleted.

Binary file removed addons/2doptics/cba_optic_big_pip.p3d
Binary file not shown.
Binary file removed addons/2doptics/cba_optic_small_pip.p3d
Binary file not shown.
21 changes: 0 additions & 21 deletions addons/2doptics/stringtable.xml

This file was deleted.

2 changes: 1 addition & 1 deletion addons/main/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CfgPatches {
"cba_jam",
"cba_ui",
"cba_versioning",
"cba_2doptics"
"cba_optics"
};
versionDesc = "C.B.A.";
VERSION_CONFIG;
Expand Down
1 change: 1 addition & 0 deletions addons/optics/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x\cba\addons\optics
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added addons/optics/cba_optic_big_pip.p3d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added addons/optics/cba_optic_small_pip.p3d
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_animateScriptedOptic
Internal Function: cba_optics_fnc_animateScriptedOptic

Description:
Executed every draw frame to update the scripted weapon info display.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
_weaponInfoDisplay call cba_2doptics_fnc_animateScriptedOptic;
_weaponInfoDisplay call cba_optics_fnc_animateScriptedOptic;
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_animateScriptedOpticRecoil
Internal Function: cba_optics_fnc_animateScriptedOpticRecoil

Description:
Animates the 2D optic when firing.
Expand All @@ -14,7 +14,7 @@ Returns:

Examples:
(begin example)
[player, currentWeapon player] call cba_2doptics_fnc_animateScriptedOpticRecoil;
[player, currentWeapon player] call cba_optics_fnc_animateScriptedOpticRecoil;
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_changeCarryHandleOpticClass
Internal Function: cba_optics_fnc_changeCarryHandleOpticClass

Description:
Switch scripted optic class to class with integrated carry handle optic.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
player call cba_2doptics_fnc_changeCarryHandleOpticClass;
player call cba_optics_fnc_changeCarryHandleOpticClass;
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_changePIPOpticClass
Internal Function: cba_optics_fnc_changePIPOpticClass

Description:
Switch scripted optic class to PIP class.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
player call cba_2doptics_fnc_changePIPOpticClass;
player call cba_optics_fnc_changePIPOpticClass;
(end)

Author:
Expand Down Expand Up @@ -173,7 +173,7 @@ if (GVAR(usePipOptics) && {!GVAR(inArsenal)}) then {
INFO_2("Switched %1 to %2.",_pistol,_normalPistol);
};

// Switch to normal / 2d optic attchments.
// Switch to normal optic attchments.
{
_x params ["_weapon", "", "", "_optic"];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_currentOptic
Internal Function: cba_optics_fnc_currentOptic

Description:
Reports the currently selected optic classname of a person.
Expand All @@ -18,7 +18,7 @@ Returns:

Examples:
(begin example)
player call cba_2doptics_fnc_currentOptic
player call cba_optics_fnc_currentOptic
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_loadScriptedOptic
Internal Function: cba_optics_fnc_loadScriptedOptic

Description:
Sets up the CBA_ScriptedOptic weapon info display and adds the draw script.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
_weaponInfoDisplay call cba_2doptics_fnc_loadScriptedOptic;
_weaponInfoDisplay call cba_optics_fnc_loadScriptedOptic;
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_restartCamera
Internal Function: cba_optics_fnc_restartCamera

Description:
Restarts the PIP camera for scripted 2D optics.
Restarts the PIP camera for scripted optics.

Parameters:
_unit - The avatar <OBJECT>
Expand All @@ -14,7 +14,7 @@ Returns:

Examples:
(begin example)
player call cba_2doptics_fnc_restartCamera;
player call cba_optics_fnc_restartCamera;
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Function: cba_2doptics_fnc_setOpticMagnification
Function: cba_optics_fnc_setOpticMagnification

Description:
Set magnification of the current optic of the unit.
Expand All @@ -14,7 +14,7 @@ Returns:

Examples:
(begin example)
[player, 3] call cba_2doptics_fnc_setOpticMagnification;
[player, 3] call cba_optics_fnc_setOpticMagnification;
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Function: cba_2doptics_fnc_setOpticMagnificationHelper
Function: cba_optics_fnc_setOpticMagnificationHelper

Description:
Helper function used in config to set the magnification of a zooming optic.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
2 call (uiNamespace getVariable 'cba_2doptics_fnc_setOpticMagnificationHelper')
2 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Function: cba_2doptics_fnc_setOpticMagnificationHelperZeroing
Function: cba_optics_fnc_setOpticMagnificationHelperZeroing

Description:
Helper function used in config to remember the zeroing of a zooming optic.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
2 call (uiNamespace getVariable 'cba_2doptics_fnc_setOpticMagnificationHelperZeroing')
2 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelperZeroing')
(end)

Author:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "script_component.hpp"
/* ----------------------------------------------------------------------------
Internal Function: cba_2doptics_fnc_updateOpticInfo
Internal Function: cba_optics_fnc_updateOpticInfo

Description:
Caches the current optic's parameters in mission namespace variables.
Expand All @@ -13,7 +13,7 @@ Returns:

Examples:
(begin example)
player call cba_2doptics_fnc_updateOpticInfo;
player call cba_optics_fnc_updateOpticInfo;
(end)

Author:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#define COMPONENT 2doptics
#define COMPONENT optics
#include "\x\cba\addons\main\script_mod.hpp"

//#define DEBUG_MODE_FULL
//#define DISABLE_COMPILE_CACHE
//#define DEBUG_ENABLED_2DOPTICS
//#define DEBUG_ENABLED_OPTICS

#ifdef DEBUG_ENABLED_2DOPTICS
#ifdef DEBUG_ENABLED_OPTICS
#define DEBUG_MODE_FULL
#endif

#ifdef DEBUG_SETTINGS_2DOPTICS
#define DEBUG_SETTINGS DEBUG_SETTINGS_2DOPTICS
#ifdef DEBUG_SETTINGS_OPTICS
#define DEBUG_SETTINGS DEBUG_SETTINGS_OPTICS
#endif

#define DEBUG_MODE_NORMAL
Expand Down
21 changes: 21 additions & 0 deletions addons/optics/stringtable.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="CBA_A3">
<Package name="Optics">
<Key ID="STR_cba_optics_Component">
<English>Community Base Addons - Optics</English>
<German>Community Base Addons - Optiken</German>
<Polish>Community Base Addons - Optyka</Polish>
</Key>
<Key ID="STR_cba_optics_Category">
<English>CBA Optics</English>
<German>CBA Optiken</German>
<Polish>CBA Optyka</Polish>
</Key>
<Key ID="STR_cba_optics_UsePIP">
<English>Use picture in picture optics</English>
<German>Bild in Bild-Optiken verwenden</German>
<Japanese>Picture in Picture 照準器を使う</Japanese>
<Polish>Używaj optyki typu Obraz w obrazie (PIP)</Polish>
</Key>
</Package>
</Project>