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

Medical Update (SAM Splint) #6412

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8f9e836
SAM Splint / Cast update
mgkid3310 Jun 28, 2018
a705c63
show SAM Splint on medical menu
mgkid3310 Jun 28, 2018
2d3a5b0
Actions display update
mgkid3310 Jun 28, 2018
410a341
add eventhandler
mgkid3310 Jun 28, 2018
b51c853
fix variable names
mgkid3310 Jun 28, 2018
67dfd56
use space instead of tab
mgkid3310 Jun 28, 2018
78459aa
remove tabs
mgkid3310 Jun 28, 2018
4db3b4a
fix issues
mgkid3310 Jun 28, 2018
e27fb89
use private keyword
mgkid3310 Jun 28, 2018
61327bd
fixed issues
mgkid3310 Jun 29, 2018
925ca6f
remove Cast & improve splint
mgkid3310 Jun 29, 2018
d1fdf22
fixed wrong porting
mgkid3310 Jun 29, 2018
672fa6a
remove unused script
mgkid3310 Jun 29, 2018
cdc19ff
use params command
mgkid3310 Jun 29, 2018
27a1da1
use DFUNC() instead of FUNC()
mgkid3310 Jun 30, 2018
0d7fc24
use private command to declare variable
mgkid3310 Jul 1, 2018
747902b
removed unnecessary characters
mgkid3310 Jul 1, 2018
acd216f
broadcast only when list is changed
mgkid3310 Jul 7, 2018
f9e8582
fix wrong variable name
mgkid3310 Jul 7, 2018
e26af32
make logic simpler
mgkid3310 Jul 7, 2018
5f6752e
fix logic
mgkid3310 Jul 7, 2018
5ff17d2
fix target array
mgkid3310 Jul 7, 2018
9a344fe
use macros for indexes
mgkid3310 Jul 9, 2018
834b808
remove UI work
mgkid3310 Jul 24, 2018
f583a5b
treat splint on init/fullheal
mgkid3310 Jul 24, 2018
ca8c48f
change condition expression
mgkid3310 Jul 25, 2018
5e21b42
remove remains of ui work
mgkid3310 Jul 25, 2018
7ba2cde
optimize functions
mgkid3310 Jul 26, 2018
05d6fcb
update header
mgkid3310 Jul 27, 2018
c49209d
update icon & model
mgkid3310 Jul 28, 2018
90a0e42
add hiddenSelectionsTextures
mgkid3310 Jul 28, 2018
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
4 changes: 2 additions & 2 deletions addons/medical/ACE_Medical_Treatments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,8 @@ class ACE_Medical_Actions {
requiredMedic = 0;
items[] = {"ACE_samSplint"};
treatmentTime = 10;
callbackSuccess = QUOTE(DFUNC(treatmentSAMSplint));
condition = QUOTE([ARR_2(_this select 1, _this select 2)] call FUNC(canTreatSAMSplint));
callbackSuccess = QFUNC(treatmentSAMSplint);
condition = QFUNC(canTreatSAMSplint);
litter[] = {};
};
};
Expand Down
7 changes: 4 additions & 3 deletions addons/medical/functions/fnc_canTreatSAMSplint.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
* Check if can treat Splint
*
* Arguments:
* 0: The patient <OBJECT>
* 1: SelectionName <STRING>
* 1: The caller (not used, can pass nil) <OBJECT>
Copy link
Contributor

@dedmen dedmen Jul 27, 2018

Choose a reason for hiding this comment

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

I'd say remove the (not used, can pass nil) part.
Also this should be argument 0 not 1
IMO it's good to have caller here. Makes it easily extendable later. In case someone comes up with a requirement on the caller. Telling people to pass nil would make that a more complicated task.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Roger, will fix that. Would it be better to skip the caller with "" or just accept to _caller for later extension?

Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't really make a difference I think.

* 1: The patient <OBJECT>
* 2: SelectionName <STRING>
*
* Return Value:
* None
Expand All @@ -17,7 +18,7 @@

#include "script_component.hpp"

params ["_target", "_part"];
params ["_caller", "_target", "_part"];

if !(_part isEqualType 0) then {
_part = [_part] call FUNC(selectionNameToNumber);
Expand Down