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

Dogtags #3962

Merged
merged 27 commits into from
Jun 29, 2016
Merged

Dogtags #3962

Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ca3171a
Initial commit dogtags
SzwedzikPL Mar 19, 2016
1cdecf7
double dogtag support, fix addDogtagItem event in mp, unconscious uni…
SzwedzikPL Mar 19, 2016
174e69c
move dogtag macros to CfgWeapons
SzwedzikPL Mar 23, 2016
9d4bd0f
Added custom dogtag model and images
BaerMitUmlaut Jun 1, 2016
5dbe99b
Adjusted single and double dogtag renders
BaerMitUmlaut Jun 7, 2016
8bcf24a
Merge pull request #1 from BaerMitUmlaut/dogtags
SzwedzikPL Jun 7, 2016
aa407a4
Merge branch 'acemod/master' into dogtags
SzwedzikPL Jun 8, 2016
5313672
dogtag picture
SzwedzikPL Jun 9, 2016
acdfa52
Merge branch 'acemod/master' into dogtags
SzwedzikPL Jun 11, 2016
0e247bd
CBA events
SzwedzikPL Jun 11, 2016
1f74bfc
Merge branch 'dogtags' of https://github.com/SzwedzikPL/ACE3 into Szw…
nicolasbadano Jun 20, 2016
e58d829
Restyle the dog tag text.
nicolasbadano Jun 20, 2016
0d30bf1
- Add random service number and bloodtypes to all units.
nicolasbadano Jun 20, 2016
6df82aa
I can't believe it happened to me.
nicolasbadano Jun 20, 2016
88cf6aa
Attempt on making blood type and service number unique for players
nicolasbadano Jun 20, 2016
c883132
add function to report a blood type which is fixed to the units name
commy2 Jun 20, 2016
c47898a
Parse the first portion of the uid
nicolasbadano Jun 20, 2016
578477e
Fix issue with dogtag respawn/setVariable
PabstMirror Jun 20, 2016
09fd2c4
Merge pull request #3965 from acemod/fixDogtagRespawn
nicolasbadano Jun 20, 2016
171e6b2
Merge branch 'dogtags_blood_type' of github.com:KoffeinFlummi/ACE3 in…
nicolasbadano Jun 20, 2016
7e3e101
Nah, they don't
nicolasbadano Jun 20, 2016
7f39748
Tidy up text position to properly acommodate two line names
nicolasbadano Jun 20, 2016
3972504
Add dogtag actions to body bags
PabstMirror Jun 21, 2016
ebcf168
Generate SSN of unit from their name
kymckay Jun 21, 2016
6d8121b
Improve unit name SSN generation
kymckay Jun 21, 2016
3fa1758
Merge pull request #3971 from acemod/dogtags-player-ssn
nicolasbadano Jun 21, 2016
6801954
Merge pull request #3969 from acemod/dogtag-bodybag
nicolasbadano Jun 23, 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
11 changes: 5 additions & 6 deletions addons/dogtags/functions/fnc_getDogtagData.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ if (!isNil "_dogTagData") exitWith {_dogTagData};

// Create dog tag data once for the unit: nickname, code (eg. 135-13-900) and blood type
private ["_bloodTypeIndex", "_code"];
//hint getplayeruid _target;
if ((typename getplayeruid _target) == "SCALAR") then {
_bloodTypeIndex = (getplayeruid _target) mod 8;
_code = (str getplayeruid _target) select [0, 3] + "-" +
(str getplayeruid _target) select [3, 2] + "-" +
(str getplayeruid _target) select [5, 3];
if !(getplayeruid _target in ["", "_SP_AI_", "_SP_PLAYER_"]) then {
Copy link
Member

Choose a reason for hiding this comment

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

Minor, but it would probably make sense to store the value of getPlayerUID in a variable instead of using the command multiple times (also the lack of camel case triggers me 🐫)

Copy link
Member

Choose a reason for hiding this comment

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

Otherwise 👍

_bloodTypeIndex = (parseNumber ((getPlayerUID _target) select [0, 5])) mod 8;
_code = (getplayeruid _target) select [0, 3] + "-" +
(getplayeruid _target) select [3, 2] + "-" +
(getplayeruid _target) select [5, 3];
} else {
_bloodTypeIndex = floor random 8;
_code = str(floor random 9) + str(floor random 9) + str(floor random 9) + "-" +
Expand Down