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 GUI - Peek Medical Info on Hit #9467
Conversation
Like with my other PR, the goal with this is to provide the player with immediate feedback about their medical condition without interrupting gameplay. Is TODO:
|
Event should be a matter of preference (as long as execution order is right). Tying to medical's injured event would be most appropriate and consistent with the rest of the components. |
This now uses the Here's a quick demo, tweaked to still show my own info when remote controling a unit. |
params ["_unit", "_allDamages", ""]; | ||
if !(GVAR(peekMedicalOnHit) && ACE_PLAYER == _unit) exitWith {}; | ||
|
||
private _bodypart = toLower (_allDamages select 0 select 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're only ANSI chars, right ?
private _bodypart = toLower (_allDamages select 0 select 1); | |
private _bodypart = toLowerANSI (_allDamages select 0 select 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, but I was just copying the existing usage from here:
_bodyPart = toLower _bodyPart; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya, seen exactly that one before and it annoys me a lot (assuming I ain't wrong).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this? We don't do it anywhere else.
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
addons/medical_gui/initSettings.sqf
Outdated
[ | ||
QGVAR(peekMedicalOnHit), | ||
"CHECKBOX", | ||
[LSTRING(PeekMedicalOnHit_DisplayName), LSTRING(PeekMedicalOnHit_Description)], | ||
[ELSTRING(medical,Category), LSTRING(SubCategory)], | ||
true, | ||
false // isGlobal | ||
] call CBA_fnc_addSetting; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be local IMO.
Some might prefer defaulting to off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set it local to allow servers to leave it to player preference. Particularly thinking about if somone wants to disable it while a server allows it. But I don't feel too strongly about it.
I do agree with defaulting to off, on second thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local can always be overwritten.
Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
Looks good, solve merge conflicts. |
Those setting limits were intentional. 0 seconds is too short to actually parse any information, and 1 second is still very short. The upper limit being 10 seconds was just an extreme in case anyone felt like looking for that long. |
There's no harm in reducing the lower end of the time range. 10 seconds is too much time IMO. 5 is an eternity during a firefight already. I guess default time could've been kept as it was but since this feature is off by default, anyone using it will be looking at settings anyway. |
When merged this pull request will:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.