Skip to content

Commit e084023

Browse files
authored
Merge pull request #104 from How-Bout-No/feature/enhanced-compat
refactor(YHV1): GXT labels
2 parents 6674931 + f4d3544 commit e084023

18 files changed

Lines changed: 207 additions & 137 deletions

File tree

SSV2/includes/data/globals_locals.lua

Lines changed: 40 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ return {
3131
capture_group = 1
3232
},
3333
ENHANCED = {
34-
value = 1673830,
35-
pattern =
36-
[[if \(Global_\d{7}\[PLAYER::PLAYER_ID\(\) /\*883\*/\]\.f_\d{3}\.f_\d{3}\[.*?/\*13\*/\] != HUD_COLOUR_PURE_WHITE && (Global_\d{7})\[.*?\] != 0\)]],
34+
value = 1673814,
35+
pattern = [[if \(Global_\d{7}\[.*?\] != 0 && func_\w+\(.*?\) && \w+\)]],
3736
capture_group = 1
3837
}
3938
},
@@ -104,8 +103,8 @@ return {
104103
value = 13,
105104
capture_group = 5,
106105
description = "business index read size."
107-
},
108-
},
106+
}
107+
}
109108
},
110109
ENHANCED = {
111110
value = 1845299,
@@ -129,8 +128,8 @@ return {
129128
value = 13,
130129
capture_group = 5,
131130
description = "business index read size."
132-
},
133-
},
131+
}
132+
}
134133
}
135134
},
136135
bhub_prod_time_global = {
@@ -255,7 +254,7 @@ return {
255254
value = 174,
256255
capture_group = 2,
257256
description = "expected deliveries."
258-
},
257+
}
259258
}
260259
},
261260
ENHANCED = {
@@ -283,7 +282,7 @@ return {
283282
value = 122,
284283
capture_group = 2,
285284
description = "number of deliveries made"
286-
},
285+
}
287286
}
288287
},
289288
ENHANCED = {
@@ -304,8 +303,7 @@ return {
304303
file = "gb_smuggler.c",
305304
LEGACY = {
306305
value = 1989,
307-
pattern =
308-
[[for \(i = 0; i < func_\w{2}\(func_\w{4}\(\), func_\w{2}\(\), .*?(Local_\d{4})\.(f_\d{4}), -1\); i = i \+ 1\)]],
306+
pattern = [[for \(i = 0; i < func_\w{2}\(func_\w{4}\(\), func_\w{2}\(\), .*?(Local_\d{4})\.(f_\d{4}), -1\); i = i \+ 1\)]],
309307
capture_group = 1,
310308
offsets = {
311309
{
@@ -316,8 +314,7 @@ return {
316314
},
317315
ENHANCED = {
318316
value = 1991,
319-
pattern =
320-
[[for \(i = 0; i < func_\w{2}\(func_\w{4}\(\), func_\w{2}\(\), .*?(Local_\d{4})\.(f_\d{4}), -1\); i = i \+ 1\)]],
317+
pattern = [[for \(i = 0; i < func_\w{2}\(func_\w{4}\(\), func_\w{2}\(\), .*?(Local_\d{4})\.(f_\d{4}), -1\); i = i \+ 1\)]],
321318
capture_group = 1,
322319
offsets = {
323320
{
@@ -359,12 +356,12 @@ return {
359356
LEGACY = {
360357
value = 1266,
361358
pattern = [[Local_1\d{3}\.f_\d{3} = func_\w+\(func_\w+\(\),.*?(Local_1\d{3})\.(f_\d{3}), \w+, -1\);]],
362-
capture_group = 1,
359+
capture_group = 1
363360
},
364361
ENHANCED = {
365362
value = 1268,
366363
pattern = [[Local_1\d{3}\.f_\d{3} = func_\w+\(func_\w+\(\),.*?(Local_1\d{3})\.(f_\d{3}), \w+, -1\);]],
367-
capture_group = 1,
364+
capture_group = 1
368365
}
369366
},
370367
bunker_sell_amt_delivered = {
@@ -398,8 +395,7 @@ return {
398395
file = "gb_gunrunning.c",
399396
LEGACY = {
400397
value = 1266,
401-
pattern =
402-
[[for \(i = 0; i < func_\w+\(func_\w+\(\), func_\w+\(\),.*?(Local_\d{4})(\.f_\d{3}),.*?Local_\d{4}\.f_\d{3}\); i = i \+ 1\)]],
398+
pattern = [[for \(i = 0; i < func_\w+\(func_\w+\(\), func_\w+\(\),.*?(Local_\d{4})(\.f_\d{3}),.*?Local_\d{4}\.f_\d{3}\); i = i \+ 1\)]],
403399
capture_group = 1,
404400
offsets = {
405401
{
@@ -410,8 +406,7 @@ return {
410406
},
411407
ENHANCED = {
412408
value = 1268,
413-
pattern =
414-
[[for \(i = 0; i < func_\w+\(func_\w+\(\), func_\w+\(\),.*?(Local_\d{4})(\.f_\d{3}),.*?Local_\d{4}\.f_\d{3}\); i = i \+ 1\)]],
409+
pattern = [[for \(i = 0; i < func_\w+\(func_\w+\(\), func_\w+\(\),.*?(Local_\d{4})(\.f_\d{3}),.*?Local_\d{4}\.f_\d{3}\); i = i \+ 1\)]],
415410
capture_group = 1,
416411
offsets = {
417412
{
@@ -466,8 +461,7 @@ return {
466461
file = "three_card_poker.c",
467462
LEGACY = {
468463
value = 771,
469-
pattern =
470-
[[if \((.*?Local_\d{3})\[.*? /\*(\d+)\*/\]\.f_\d+ ==.*?&&.*?Local_\d{3}\[.*?\]\.f_\d+ > 0 \|\| .*?Local_\d{3}\[.*?\]\.f_\d+ > 0\)]],
464+
pattern = [[if \((.*?Local_\d{3})\[.*? /\*(\d+)\*/\]\.f_\d+ ==.*?&&.*?Local_\d{3}\[.*?\]\.f_\d+ > 0 \|\| .*?Local_\d{3}\[.*?\]\.f_\d+ > 0\)]],
471465
capture_group = 1,
472466
offsets = {
473467
{
@@ -478,8 +472,7 @@ return {
478472
},
479473
ENHANCED = {
480474
value = 773,
481-
pattern =
482-
[[if \((.*?Local_\d{3})\[.*? /\*(\d+)\*/\]\.f_\d+ ==.*?&&.*?Local_\d{3}\[.*?\]\.f_\d+ > 0 \|\| .*?Local_\d{3}\[.*?\]\.f_\d+ > 0\)]],
475+
pattern = [[if \((.*?Local_\d{3})\[.*? /\*(\d+)\*/\]\.f_\d+ ==.*?&&.*?Local_\d{3}\[.*?\]\.f_\d+ > 0 \|\| .*?Local_\d{3}\[.*?\]\.f_\d+ > 0\)]],
483476
capture_group = 1,
484477
offsets = {
485478
{
@@ -494,8 +487,7 @@ return {
494487
file = "three_card_poker.c",
495488
LEGACY = {
496489
value = 138,
497-
pattern =
498-
[[STREAMING::REQUEST_MODEL\(func_\d+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\.f_\d+\[.*?\], .*?Local_\d{4}\.f_\d+\)\);]],
490+
pattern = [[STREAMING::REQUEST_MODEL\(func_\d+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\.f_\d+\[.*?\], .*?Local_\d{4}\.f_\d+\)\);]],
499491
capture_group = 1,
500492
offsets = {
501493
{
@@ -507,8 +499,7 @@ return {
507499
},
508500
ENHANCED = {
509501
value = 140,
510-
pattern =
511-
[[STREAMING::REQUEST_MODEL\(func_\d+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\.f_\d+\[.*?\], .*?Local_\d{4}\.f_\d+\)\);]],
502+
pattern = [[STREAMING::REQUEST_MODEL\(func_\d+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\.f_\d+\[.*?\], .*?Local_\d{4}\.f_\d+\)\);]],
512503
capture_group = 1,
513504
offsets = {
514505
{
@@ -524,14 +515,12 @@ return {
524515
file = "three_card_poker.c",
525516
LEGACY = {
526517
value = 55,
527-
pattern =
528-
[[if \(!NETWORK::NETWORK_HAS_CONTROL_OF_NETWORK_ID\(.*?Local_\d{3}(\.f_\d{2})\[\w+\(\w+, 0\)\]\)\)]],
518+
pattern = [[if \(!NETWORK::NETWORK_HAS_CONTROL_OF_NETWORK_ID\(.*?Local_\d{3}(\.f_\d{2})\[\w+\(\w+, 0\)\]\)\)]],
529519
capture_group = 1
530520
},
531521
ENHANCED = {
532522
value = 55,
533-
pattern =
534-
[[if \(!NETWORK::NETWORK_HAS_CONTROL_OF_NETWORK_ID\(.*?Local_\d{3}(\.f_\d{2})\[\w+\(\w+, 0\)\]\)\)]],
523+
pattern = [[if \(!NETWORK::NETWORK_HAS_CONTROL_OF_NETWORK_ID\(.*?Local_\d{3}(\.f_\d{2})\[\w+\(\w+, 0\)\]\)\)]],
535524
capture_group = 1
536525
}
537526
},
@@ -540,8 +529,7 @@ return {
540529
file = "three_card_poker.c",
541530
LEGACY = {
542531
value = 1060,
543-
pattern =
544-
[[if \(.*?(Local_\d{4})(\.f_\d{3})\.f_\d+\[.*?\] !=.*?Local_\d{3}\.f_\d+\[PLAYER::PLAYER_ID\(\) .*?\]\.f_1\[.*?\]\)]],
532+
pattern = [[if \(.*?(Local_\d{4})(\.f_\d{3})\.f_\d+\[.*?\] !=.*?Local_\d{3}\.f_\d+\[PLAYER::PLAYER_ID\(\) .*?\]\.f_1\[.*?\]\)]],
545533
capture_group = 1,
546534
offsets = {
547535
{
@@ -553,8 +541,7 @@ return {
553541
},
554542
ENHANCED = {
555543
value = 1062,
556-
pattern =
557-
[[if \(.*?(Local_\d{4})(\.f_\d{3})\.f_\d+\[.*?\] !=.*?Local_\d{3}\.f_\d+\[PLAYER::PLAYER_ID\(\) .*?\]\.f_1\[.*?\]\)]],
544+
pattern = [[if \(.*?(Local_\d{4})(\.f_\d{3})\.f_\d+\[.*?\] !=.*?Local_\d{3}\.f_\d+\[PLAYER::PLAYER_ID\(\) .*?\]\.f_1\[.*?\]\)]],
558545
capture_group = 1,
559546
offsets = {
560547
{
@@ -596,8 +583,7 @@ return {
596583
file = "blackjack.c",
597584
LEGACY = {
598585
value = 138,
599-
pattern =
600-
[[if \(func_\w+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\) == 10 \|\| func_\d+\(.*?Local_\d{3}\.f_\d{3}\[.*?\]\) == 11\)]],
586+
pattern = [[if \(func_\w+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\) == 10 \|\| func_\d+\(.*?Local_\d{3}\.f_\d{3}\[.*?\]\) == 11\)]],
601587
capture_group = 1,
602588
offsets = {
603589
{
@@ -608,8 +594,7 @@ return {
608594
},
609595
ENHANCED = {
610596
value = 140,
611-
pattern =
612-
[[if \(func_\w+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\) == 10 \|\| func_\d+\(.*?Local_\d{3}\.f_\d{3}\[.*?\]\) == 11\)]],
597+
pattern = [[if \(func_\w+\(.*?(Local_\d{3})(\.f_\d{3})\[.*?\]\) == 10 \|\| func_\d+\(.*?Local_\d{3}\.f_\d{3}\[.*?\]\) == 11\)]],
613598
capture_group = 1,
614599
offsets = {
615600
{
@@ -666,14 +651,12 @@ return {
666651
file = "casino_slots.c",
667652
LEGACY = {
668653
value = 1372,
669-
pattern =
670-
[[\w+ = func_\d+\(.*?(Local_\d{4})\.f_1\[.*?\]\[.*?Local_\d+\[0\]\], .*?Local_\d+?\.f_1\[.*?\]\[.*?Local_\d+\[1\]\], .*?Local_\d{4}\.f_1\[.*?\]\[.*?Local_\d+\[2\]\]\);]],
654+
pattern = [[\w+ = func_\d+\(.*?(Local_\d{4})\.f_1\[.*?\]\[.*?Local_\d+\[0\]\], .*?Local_\d+?\.f_1\[.*?\]\[.*?Local_\d+\[1\]\], .*?Local_\d{4}\.f_1\[.*?\]\[.*?Local_\d+\[2\]\]\);]],
671655
capture_group = 1
672656
},
673657
ENHANCED = {
674658
value = 1374,
675-
pattern =
676-
[[\w+ = func_\d+\(.*?(Local_\d{4})\.f_1\[.*?\]\[.*?Local_\d+\[0\]\], .*?Local_\d+?\.f_1\[.*?\]\[.*?Local_\d+\[1\]\], .*?Local_\d{4}\.f_1\[.*?\]\[.*?Local_\d+\[2\]\]\);]],
659+
pattern = [[\w+ = func_\d+\(.*?(Local_\d{4})\.f_1\[.*?\]\[.*?Local_\d+\[0\]\], .*?Local_\d+?\.f_1\[.*?\]\[.*?Local_\d+\[1\]\], .*?Local_\d{4}\.f_1\[.*?\]\[.*?Local_\d+\[2\]\]\);]],
677660
capture_group = 1
678661
}
679662
},
@@ -796,8 +779,7 @@ return {
796779
file = "fm_mission_controller.c",
797780
LEGACY = {
798781
value = 10295,
799-
pattern =
800-
[[PED::SET_SYNCHRONIZED_SCENE_RATE\(NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID\(.?Local_\d{5}\.f_\d+\), .?(Local_\d{5})(\.f_\d+\))]],
782+
pattern = [[PED::SET_SYNCHRONIZED_SCENE_RATE\(NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID\(.?Local_\d{5}\.f_\d+\), .?(Local_\d{5})(\.f_\d+\))]],
801783
capture_group = 1,
802784
offsets = {
803785
{
@@ -809,8 +791,7 @@ return {
809791
},
810792
ENHANCED = {
811793
value = 10697,
812-
pattern =
813-
[[PED::SET_SYNCHRONIZED_SCENE_RATE\(NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID\(.?Local_\d{5}\.f_\d+\), .?(Local_\d{5})(\.f_\d+\))]],
794+
pattern = [[PED::SET_SYNCHRONIZED_SCENE_RATE\(NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID\(.?Local_\d{5}\.f_\d+\), .?(Local_\d{5})(\.f_\d+\))]],
814795
capture_group = 1,
815796
offsets = {
816797
{
@@ -832,9 +813,8 @@ return {
832813
{
833814
value = 459,
834815
capture_group = 2,
835-
description =
836-
"Current objective. This hasn't changed in years, hence the reason it's hardcoded in the regex pattern."
837-
},
816+
description = "Current objective. This hasn't changed in years, hence the reason it's hardcoded in the regex pattern."
817+
}
838818
}
839819
},
840820
ENHANCED = {
@@ -844,8 +824,8 @@ return {
844824
offsets = {
845825
{
846826
value = 459,
847-
capture_group = 2,
848-
},
827+
capture_group = 2
828+
}
849829
}
850830
}
851831
},
@@ -855,28 +835,26 @@ return {
855835
LEGACY = {
856836
value = 453,
857837
pattern = [[.*?Local_\d{3}\.f_(453)\.*?]],
858-
capture_group = 1,
838+
capture_group = 1
859839
},
860840
ENHANCED = {
861841
value = 453,
862842
pattern = [[.*?Local_\d{3}\.f_(453)\.*?]],
863-
capture_group = 1,
843+
capture_group = 1
864844
}
865845
},
866846
ie_num_vehs = {
867847
description = "Import/Export steal number of vehicles.",
868848
file = "gb_vehicle_export.c",
869849
LEGACY = {
870850
value = 650,
871-
pattern =
872-
[[Local_\d{3}\.(f_\d{3})\s+=\s+func_\w+\(func_\w+\(\),.*?Local_\d{3}\.f_\d{3},\s+func_\w+\(func_\d{3}\(\)\)\);]],
873-
capture_group = 1,
851+
pattern = [[Local_\d{3}\.(f_\d{3})\s+=\s+func_\w+\(func_\w+\(\),.*?Local_\d{3}\.f_\d{3},\s+func_\w+\(func_\d{3}\(\)\)\);]],
852+
capture_group = 1
874853
},
875854
ENHANCED = {
876855
value = 650,
877-
pattern =
878-
[[Local_\d{3}\.(f_\d{3})\s+=\s+func_\w+\(func_\w+\(\),.*?Local_\d{3}\.f_\d{3},\s+func_\w+\(func_\d{3}\(\)\)\);]],
879-
capture_group = 1,
856+
pattern = [[Local_\d{3}\.(f_\d{3})\s+=\s+func_\w+\(func_\w+\(\),.*?Local_\d{3}\.f_\d{3},\s+func_\w+\(func_\d{3}\(\)\)\);]],
857+
capture_group = 1
880858
}
881859
},
882860
ie_steal_bitset = {
@@ -899,7 +877,7 @@ return {
899877
value = 2,
900878
capture_group = 2,
901879
description = "read size."
902-
},
880+
}
903881
}
904882
},
905883
ENHANCED = {
@@ -911,7 +889,7 @@ return {
911889
value = 2,
912890
capture_group = 2,
913891
description = "read size."
914-
},
892+
}
915893
}
916894
}
917895
}

SSV2/includes/data/yrv3_data.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ local RawBusinessData <const> = {
560560
HackerDen = {
561561
{ gxt = "HD_GARNAME", coords = vec3:new(719.3386, -983.1850, 24.1402) },
562562
},
563+
FieldHangar = {
564+
{ gxt = "FHAN_NME_1", coords = vec3:new(2150.65, 4796.60, 41.17) },
565+
},
563566
CashSafes = {
564567
regular = {
565568
{

SSV2/includes/features/EntityForge.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ function EntityForge:EntityGun()
466466
end
467467

468468
if (entityType == Enums.eEntityType.Vehicle) then
469-
entityName = _F("World Vehicle (%s)", vehicles.get_vehicle_display_name(modelHash))
469+
entityName = _F("World Vehicle (%s)", Game.GetVehicleDisplayName(modelHash))
470470
local t_Occupants = Vehicle(aimedAtEntity):GetOccupants()
471471
if (#t_Occupants > 0) then
472472
for _, ped in ipairs(t_Occupants) do

0 commit comments

Comments
 (0)