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

Add Zeus utility modules #4661

Merged
merged 24 commits into from
Nov 15, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
51de0bd
Merge remote-tracking branch 'refs/remotes/acemod/master'
RSpeekenbrink Nov 11, 2016
d2638cf
Added Zeus Module: Simulation
RSpeekenbrink Nov 11, 2016
9332101
Added AddObjects and Remove Objects & ACE Util Category
RSpeekenbrink Nov 12, 2016
d27c68c
Removed Tabs
RSpeekenbrink Nov 12, 2016
1683b5d
Merge remote-tracking branch 'refs/remotes/acemod/master' into ZeusUtil
RSpeekenbrink Nov 12, 2016
f329405
Code Cleanup
RSpeekenbrink Nov 12, 2016
7037676
Fix array in fnc_moduleSimulation.sqf
RSpeekenbrink Nov 12, 2016
2398ac9
Tab and Newline Cleanup
RSpeekenbrink Nov 12, 2016
5a87acf
Filename Upercase on remote fix (fnc_removeObjects)
RSpeekenbrink Nov 12, 2016
aa3289d
Filename Upercase on remote fix (fnc_addObjects)
RSpeekenbrink Nov 12, 2016
221d0ae
Reduce network traffic of toggle simulation module
kymckay Nov 12, 2016
40ba9ef
Edited functions to meet Review
RSpeekenbrink Nov 12, 2016
7868eaf
Merge remote-tracking branch 'origin/ZeusUtil' into ZeusUtil
RSpeekenbrink Nov 12, 2016
be7c4d6
Remove fnc_errorAndClose from fnc_ui_addObjects.sqf
RSpeekenbrink Nov 12, 2016
4b690e8
Remove White Space from fnc_moduleSImulation
RSpeekenbrink Nov 12, 2016
a1ebaed
_fnc_errorAndClose & removed from fnc_ui_removeObjects
RSpeekenbrink Nov 12, 2016
dd85fcb
Space @ EOF removed :)
RSpeekenbrink Nov 12, 2016
59ef96c
simplified code (Tested in MP & SP)
RSpeekenbrink Nov 12, 2016
1c73355
Merge add/remove editable objects zeus modules
kymckay Nov 12, 2016
30c694d
Clean up ace_zeus
kymckay Nov 12, 2016
aab2cb7
Clean up some camel case
kymckay Nov 12, 2016
438255a
Remove disableSerialization from fnc_ui_editableObjects
RSpeekenbrink Nov 12, 2016
008bb40
Fix zeus feedback of toggle simulation module
kymckay Nov 13, 2016
6c6bb58
Remove unnecessary `disableSerialization` usage
kymckay Nov 13, 2016
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/zeus/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ class CfgVehicles {
category = QGVAR(Utility);
displayName = CSTRING(ModuleSimulation_DisplayName);
function = QFUNC(moduleSimulation);
isGlobal = 0;
};
class GVAR(moduleSurrender): GVAR(moduleBase) {
curatorCanAttach = 1;
Expand Down
4 changes: 2 additions & 2 deletions addons/zeus/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill);
// Editable object commands must be ran on server, this events are used in the respective module
if (isServer) then {
[QGVAR(addObjects), {
params ["_objects", "_curator"];
params ["_objects", ["_curator",objNull]];

if !(isNull _curator) exitWith { _curator addCuratorEditableObjects [_objects, true]; };

Expand All @@ -28,7 +28,7 @@ if (isServer) then {
}] call CBA_fnc_addEventHandler;

[QGVAR(removeObjects), {
params ["_objects", "_curator"];
params ["_objects", ["_curator",objNull]];

if !(isNull _curator) exitWith { _curator removeCuratorEditableObjects [_objects, true]; };

Expand Down
10 changes: 6 additions & 4 deletions addons/zeus/functions/fnc_moduleSimulation.sqf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Author: Fisher
* Toggle Simulation on object (runs on server only via module framework).
* Author: Fisher, SilentSpike
* Toggle Simulation on object.
*
* Arguments:
* 0: The module logic <OBJECT>
Expand All @@ -15,11 +15,13 @@

params ["_logic"];

if !(local _logic) exitWith {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the module is local to the zeus? good to know

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this line is standard in all zeus modules (BI included) with a few exceptions.


private _object = attachedTo _logic;
if (isNull _object) then {
[LSTRING(NoObjectSelected)] call EFUNC(common,displayTextStructured);
[LSTRING(NothingSelected)] call EFUNC(common,displayTextStructured);
} else {
_object enableSimulationGlobal !(simulationEnabled _object);
[QEGVAR(common,enableSimulationGlobal), [_object, !(simulationEnabled _object)]] call CBA_fnc_serverEvent;
Copy link
Contributor Author

@RSpeekenbrink RSpeekenbrink Nov 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for learning purposes, what does QEGVAR exactly in this state?
Thanks

Copy link
Member

@bux bux Nov 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QuotedExternalGlobalVARiable
=> "ace_common_enableSimulationGlobal"

http://ace3mod.com/wiki/development/coding-guidelines.html#macro-usage

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line makes use of this event defined in the common component:
https://github.com/acemod/ACE3/blob/master/addons/common/XEH_postInit.sqf#L135

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aah I get it, makes a lot of sense now, thanks 👍

};

deleteVehicle _logic;
3 changes: 0 additions & 3 deletions addons/zeus/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -624,9 +624,6 @@
<Hungarian>Semmi sincs az egér alatt</Hungarian>
<Italian>Piazza su una unità</Italian>
<Japanese>ユニットの上に設置</Japanese>
</Key>
<Key ID="STR_ACE_Zeus_NoObjectSelected">
<English>Place on an object</English>
</Key>
<Key ID="STR_ACE_Zeus_RequiresAddon">
<English>Requires an addon that is not present</English>
Expand Down