Skip to content

Commit

Permalink
Merge pull request #20 from Reyfin/master
Browse files Browse the repository at this point in the history
Fixed gear issue, Fixed Briefing Enabling
  • Loading branch information
ChrSacher authored Nov 19, 2018
2 parents 29a07a0 + b58ff8d commit 8529c66
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 43 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog
All notable changes to this project will be documented in this file.

Version Numbers mainly refer to the UO Modpack addition.
## [Unreleased]
### Changed

Expand All @@ -15,6 +15,9 @@ All notable changes to this project will be documented in this file.
- Made more Modules independent
### Fixed
- Ai Driver wasn't being added when ace menued
- Too much briefing being displayer
- Gear locality
- Gear works more reliable
### Removed


Binary file modified UnitedOperationsFramework.pbo
Binary file not shown.
Binary file modified UnitedOperationsFramework.pbo.bak
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ if ((missionNamespace getVariable ["UO_FW_BRIEFING_BLUFOR_APPENDIX",false])) the
UO_FW_DEBUG("No appendix found for BLUFOR!","No appendix found for BLUFOR!")
};
};

if((missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_ENABLE",false])) then
{
//Mission Notes
NEWTAB("Mission Notes:")
"<font color='#5BD527'><h1>Author:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_AUTHOR",""]) + "<br/><br/>" +
Expand All @@ -124,7 +125,7 @@ ENDTAB

private _gamemastermsg = "";

if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
if (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
_gamemastermsg = "This mission is designed for game mastering and can be manipulated as per Mission Notes";
} else {
_gamemastermsg = "This mission is not designed for game mastering and should only be manipulated for technical, administrative or diagnostic purposes.";
Expand All @@ -134,5 +135,5 @@ if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
NEWTAB("Game Mastering")
"<font color='#5BD527'><h1>Game Mastering:</h1></font color><br/>" + _gamemastermsg
ENDTAB;
};
DISPLAYBRIEFING()
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ if ((missionNamespace getVariable ["UO_FW_BRIEFING_CIVILIAN_APPENDIX",false])) t
UO_FW_DEBUG("No appendix found for CIVILIAN!","No appendix found for CIVILIAN!")
};
};

if((missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_ENABLE",false])) then
{
//Mission Notes
NEWTAB("Mission Notes:")
"<font color='#5BD527'><h1>Author:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_AUTHOR",""]) + "<br/><br/>" +
Expand All @@ -124,7 +125,7 @@ ENDTAB

private _gamemastermsg = "";

if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
if (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
_gamemastermsg = "This mission is designed for game mastering and can be manipulated as per Mission Notes";
} else {
_gamemastermsg = "This mission is not designed for game mastering and should only be manipulated for technical, administrative or diagnostic purposes.";
Expand All @@ -134,5 +135,5 @@ if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
NEWTAB("Game Mastering")
"<font color='#5BD527'><h1>Game Mastering:</h1></font color><br/>" + _gamemastermsg
ENDTAB;
};
DISPLAYBRIEFING()
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ if ((missionNamespace getVariable ["UO_FW_BRIEFING_INDFOR_APPENDIX",false])) the
UO_FW_DEBUG("No appendix found for INDFOR!","No appendix found for INDFOR!")
};
};

if((missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_ENABLE",false])) then
{
//Mission Notes
NEWTAB("Mission Notes:")
"<font color='#5BD527'><h1>Author:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_AUTHOR",""]) + "<br/><br/>" +
Expand All @@ -124,7 +125,7 @@ ENDTAB

private _gamemastermsg = "";

if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
if (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
_gamemastermsg = "This mission is designed for game mastering and can be manipulated as per Mission Notes";
} else {
_gamemastermsg = "This mission is not designed for game mastering and should only be manipulated for technical, administrative or diagnostic purposes.";
Expand All @@ -134,5 +135,5 @@ if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
NEWTAB("Game Mastering")
"<font color='#5BD527'><h1>Game Mastering:</h1></font color><br/>" + _gamemastermsg
ENDTAB;
};
DISPLAYBRIEFING()
37 changes: 20 additions & 17 deletions UnitedOperationsFramework/BriefingModule/defines/opfor_briefing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,27 +112,30 @@ if ((missionNamespace getVariable ["UO_FW_BRIEFING_OPFOR_APPENDIX",false])) then
UO_FW_DEBUG("No appendix found for OPFOR!","No appendix found for OPFOR!")
};
};
if((missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_ENABLE",false])) then
{
//Mission Notes
NEWTAB("Mission Notes:")
"<font color='#5BD527'><h1>Author:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_AUTHOR",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>Testers:</h1></font color><br/>" +(missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_TESTERS",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>End Conditions:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_CONDITIONS",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>Mission Specific Notes:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_CUSTOM",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>Mission Changelog:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_CHANGELOG",""])
ENDTAB

//Mission Notes
NEWTAB("Mission Notes:")
"<font color='#5BD527'><h1>Author:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_AUTHOR",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>Testers:</h1></font color><br/>" +(missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_TESTERS",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>End Conditions:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_CONDITIONS",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>Mission Specific Notes:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_CUSTOM",""]) + "<br/><br/>" +
"<font color='#5BD527'><h1>Mission Changelog:</h1></font color><br/>" + (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_CHANGELOG",""])
ENDTAB
private _gamemastermsg = "";

private _gamemastermsg = "";
if (missionNamespace getVariable ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
_gamemastermsg = "This mission is designed for game mastering and can be manipulated as per Mission Notes";
} else {
_gamemastermsg = "This mission is not designed for game mastering and should only be manipulated for technical, administrative or diagnostic purposes.";
};

if (getMissionConfigValue ["UO_FW_BRIEFING_MISSIONNOTES_GM",false]) then {
_gamemastermsg = "This mission is designed for game mastering and can be manipulated as per Mission Notes";
} else {
_gamemastermsg = "This mission is not designed for game mastering and should only be manipulated for technical, administrative or diagnostic purposes.";
//Game Mastering
NEWTAB("Game Mastering")
"<font color='#5BD527'><h1>Game Mastering:</h1></font color><br/>" + _gamemastermsg
ENDTAB;
};

//Game Mastering
NEWTAB("Game Mastering")
"<font color='#5BD527'><h1>Game Mastering:</h1></font color><br/>" + _gamemastermsg
ENDTAB;

DISPLAYBRIEFING()
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

#include "\x\UO_FW\addons\main\script_macros.hpp"
UO_FW_EXEC_CHECK(ALL)

if(!UO_FW_SERVER_FRAMEWORK_ALLOWED || !UO_FW_SERVER_DEBUG_ALLOWED) exitWith
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ params ["_basicmsg","_detailedmsg"];

if (isNil "UO_FW_Debug_Enabled") then
{
UO_FW_Debug_Enabled = (getMissionConfigValue ["UO_FW_Debug_Enabled",false]);
UO_FW_Debug_Enabled = (missionNamespace getVariable ["UO_FW_Debug_Enabled",false]);
};
if (isNil "UO_FW_Debug_Detailed_Enabled") then
{
UO_FW_Debug_Detailed_Enabled = (getMissionConfigValue ["UO_FW_Debug_Detailed_Enabled",false]);
UO_FW_Debug_Detailed_Enabled = (missionNamespace getVariable ["UO_FW_Debug_Detailed_Enabled",false]);
};
if ((UO_FW_Debug_Enabled) && !(UO_FW_Debug_Detailed_Enabled)) then
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

#include "\x\UO_FW\addons\main\script_macros.hpp"
UO_FW_EXEC_CHECK(ALL)


//Universal init
#include "\x\UO_FW\addons\main\Core\defines\mainSettings.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"" spawn
{

if(!(getMissionConfigValue ["UO_FW_Gear_Enabled",false])) exitWith {};
if(!(missionNamespace getVariable ["UO_FW_Gear_Enabled",false])) exitWith {};
//when set to false, facewear types that are whitelisted will not be removed
UO_FW_force_remove_facewear = getMissionConfigValue ["UO_FW_GearFaceRemovalEnabled",false];;
UO_FW_force_remove_facewear = missionNamespace getVariable ["UO_FW_GearFaceRemovalEnabled",false];;

//forces adding an item to inventory. Works only if container is specified!
UO_FW_enableOverfill = getMissionConfigValue ["UO_FW_GearOverfillEnabled",false];
UO_FW_enableOverfill = missionNamespace getVariable ["UO_FW_GearOverfillEnabled",false];

/*UO_FW_GearLoadouts = [];
_gear = ["UO_FW_GearPath_1","UO_FW_GearPath_2","UO_FW_GearPath_3","UO_FW_GearPath_4","UO_FW_GearPath_5",
Expand All @@ -26,12 +26,13 @@

if(!isDedicated) then
{
if((player getVariable ["UO_FW_Gear_Groupname",""]) != "" ) then { (group player) setGroupId [(player getVariable ["UO_FW_Gear_Groupname",""])];};
_type = player getVariable ["UO_FW_Gear_UnitGearType",""];
if(_type != "") then
{
_array = [player,_type];

if(player getVariable ["UO_FW_Gear_Groupname",""] != "" ) then { (group player) setGroupId [player getVariable ["UO_FW_Gear_Groupname",""]];};

_array call UO_FW_FNC_GearScript;
};
};
Expand All @@ -41,22 +42,23 @@
{
if(!(isPlayer _x)) then
{
if((_x getVariable ["UO_FW_Gear_Groupname",""]) != "" ) then { (group _x) setGroupId [(_x getVariable ["UO_FW_Gear_Groupname",""])];};
_type = _x getVariable ["UO_FW_Gear_UnitGearType",""];
if(_type != "") then
{
_array = [_x,_type];
if(_x getVariable ["UO_FW_Gear_Groupname",""] != "" ) then { (group _x) setGroupId [_x getVariable ["UO_FW_Gear_Groupname",""]];};

_array call UO_FW_FNC_GearScript;
};
};
}forEach allUnits;
{

if((_x getVariable ["UO_FW_Gear_Groupname",""]) != "" ) then { (group _x) setGroupId [(_x getVariable ["UO_FW_Gear_Groupname",""])];};
_type = _x getVariable ["UO_FW_Gear_UnitGearType",""];
if(_type != "") then
{
_array = [_x,_type];
if(_x getVariable ["UO_FW_Gear_Groupname",""] != "" ) then { (group _x) setGroupId [_x getVariable ["UO_FW_Gear_Groupname",""]];};

_array call UO_FW_FNC_GearScript;
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "\x\UO_FW\addons\main\script_macros.hpp"
if(!hasinterface) exitWith {};
private ["_unit", "_type", "_groupId"];
if(!(getMissionConfigValue ["UO_FW_Gear_Enabled",false])) exitWith {};
if(!(missionNamespace getVariable ["UO_FW_Gear_Enabled",false])) exitWith {};
//waitUntil{!(isNil "UO_FW_GearLoadouts")};

_unit = _this select 0;
Expand All @@ -25,10 +25,10 @@ _unit call UO_FW_FNC_RemoveAllGear;
}forEach UO_FW_GearLoadouts;*/

//Other Version
_path = getMissionConfigValue ["UO_FW_Gear_PathToGear",""];
_path = missionNamespace getVariable ["UO_FW_Gear_PathToGear","GearScript.sqf"];
if(_path != "") then
{
_string = _this call (compile (preprocessFileLineNumbers UO_FW_Gear_PathToGear));
_string = _this call (compile (preprocessFileLineNumbers _path));
};


Expand Down
4 changes: 2 additions & 2 deletions UnitedOperationsFramework/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define UO_FW_EXEC_CHECK(ARG)\
_argUpper = toUpper(#ARG);\
if (isNil "UO_FW_Enabled") then {\
UO_FW_Enabled = (getMissionConfigValue ["UO_FW_Enabled",false]);\
UO_FW_Enabled = (missionNamespace getVariable ["UO_FW_Enabled",false]);\
};\
if(_argUpper == "SERVER" && (((!isServer) && isMultiplayer) || (!UO_FW_Enabled))) exitWith {}; \
if(_argUpper == "CLIENT" && ((!hasinterface) || (!UO_FW_Enabled))) exitWith {};\
Expand All @@ -35,4 +35,4 @@ call compile format ['%1 = {
#define ADD_GROUP(groupName) call call compile format ["%1", #groupName + package]

#define UO_FW_VAR(name,default)\
getMissionConfigValue [#name,default];
missionNamespace getVariable [#name,default];

0 comments on commit 8529c66

Please sign in to comment.