Skip to content

Commit c507344

Browse files
authored
Merge pull request #102 from acidlabsdev/main
refactor: several refactors
2 parents 7a2ff39 + 82ff6e7 commit c507344

109 files changed

Lines changed: 4378 additions & 2439 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

SSV2/includes/backend.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ function Backend:PANIQUE()
513513
sleep(100)
514514
end
515515

516-
local pos = Self:GetPos()
516+
local pos = LocalPlayer:GetPos()
517517
AUDIO.PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(
518518
"ELECTROCUTION",
519519
"MISTERK",

SSV2/includes/data/globals_locals.lua

Lines changed: 136 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ return {
8484
file = "freemode.c",
8585
LEGACY = {
8686
value = 1845250,
87-
pattern = [[(Global_\d{7})\[.*?(.*?)\]\.(f_\d{3}).(f_\d{3})\[.*?/(.*?)\].f_9 = .*?;]],
87+
pattern = [[Global_(\d{7})\[.*? /\*(\d+)\*/\]\.(f_\d{3}).(f_\d{3})\[.*? /\*(\d+)\*/\].f_9 = .*?;]],
8888
capture_group = 1,
8989
offsets = {
9090
{
@@ -109,7 +109,7 @@ return {
109109
},
110110
ENHANCED = {
111111
value = 1845299,
112-
pattern = [[(Global_\d{7})\[.*?(.*?)\]\.(f_\d{3}).(f_\d{3})\[.*?/(.*?)\].f_9 = .*?;]],
112+
pattern = [[Global_(\d{7})\[.*? /\*(\d+)\*/\]\.(f_\d{3}).(f_\d{3})\[.*? /\*(\d+)\*/\].f_9 = .*?;]],
113113
capture_group = 1,
114114
offsets = {
115115
{
@@ -156,7 +156,7 @@ return {
156156
capture_group = 2,
157157
offsets = {
158158
{
159-
1,
159+
value = 1,
160160
capture_group = 3,
161161
description = "some int value indexed by hub slot. can't be bothered -_-"
162162
}
@@ -168,7 +168,7 @@ return {
168168
capture_group = 2,
169169
offsets = {
170170
{
171-
1,
171+
value = 1,
172172
capture_group = 3,
173173
description = "some int value indexed by hub slot. can't be bothered -_-"
174174
}
@@ -243,7 +243,35 @@ return {
243243
capture_group = 1
244244
}
245245
},
246-
gb_biker_contraband_sell_local = {
246+
biker_required_deliveries_local = {
247+
description = "Biker Contraband Sell Local",
248+
file = "gb_biker_contraband_sell.c",
249+
LEGACY = {
250+
value = 729,
251+
pattern = [[.*?Local_(\d{3})\.f_(\d{3}) = func_\w+\(-1\);]],
252+
capture_group = 1,
253+
offsets = {
254+
{
255+
value = 174,
256+
capture_group = 2,
257+
description = "expected deliveries."
258+
},
259+
}
260+
},
261+
ENHANCED = {
262+
value = 731,
263+
pattern = [[.*?Local_(\d{3})\.f_(\d{3}) = func_\w+\(-1\);]],
264+
capture_group = 1,
265+
offsets = {
266+
{
267+
value = 174,
268+
capture_group = 2,
269+
description = "expected deliveries."
270+
}
271+
}
272+
}
273+
},
274+
biker_deliveries_local = {
247275
description = "Biker Contraband Sell Local",
248276
file = "gb_biker_contraband_sell.c",
249277
LEGACY = {
@@ -253,8 +281,9 @@ return {
253281
offsets = {
254282
{
255283
value = 122,
256-
capture_group = 2
257-
}
284+
capture_group = 2,
285+
description = "number of deliveries made"
286+
},
258287
}
259288
},
260289
ENHANCED = {
@@ -264,7 +293,8 @@ return {
264293
offsets = {
265294
{
266295
value = 122,
267-
capture_group = 2
296+
capture_group = 2,
297+
description = "number of deliveries made"
268298
}
269299
}
270300
}
@@ -323,33 +353,21 @@ return {
323353
}
324354
}
325355
},
326-
gb_gunrunning_sell_local_1 = {
356+
gb_gunrunning_sell_local = {
327357
description = "Bunker Sell Local 1",
328358
file = "gb_gunrunning.c",
329359
LEGACY = {
330360
value = 1266,
331361
pattern = [[Local_1\d{3}\.f_\d{3} = func_\w+\(func_\w+\(\),.*?(Local_1\d{3})\.(f_\d{3}), \w+, -1\);]],
332362
capture_group = 1,
333-
offsets = {
334-
{
335-
value = 762,
336-
capture_group = 2
337-
}
338-
}
339363
},
340364
ENHANCED = {
341365
value = 1268,
342366
pattern = [[Local_1\d{3}\.f_\d{3} = func_\w+\(func_\w+\(\),.*?(Local_1\d{3})\.(f_\d{3}), \w+, -1\);]],
343367
capture_group = 1,
344-
offsets = {
345-
{
346-
value = 762,
347-
capture_group = 2
348-
}
349-
}
350368
}
351369
},
352-
gb_gunrunning_sell_local_2 = {
370+
bunker_sell_amt_delivered = {
353371
description = "Amount delivered.",
354372
file = "gb_gunrunning.c",
355373
LEGACY = {
@@ -375,8 +393,8 @@ return {
375393
}
376394
}
377395
},
378-
gb_gunrunning_sell_local_3 = {
379-
description = "Remaining delivery vehicles.",
396+
bunker_sell_num_vehs = {
397+
description = "Number of delivery vehicles.",
380398
file = "gb_gunrunning.c",
381399
LEGACY = {
382400
value = 1266,
@@ -802,5 +820,99 @@ return {
802820
}
803821
}
804822
}
823+
},
824+
ie_objective_local = {
825+
description = "Import/Export steal auto complete mission.",
826+
file = "gb_vehicle_export.c",
827+
LEGACY = {
828+
value = 880,
829+
pattern = [[.*?Local_(\d{3})\.f_(459)\s+=\s+\w+;]],
830+
capture_group = 1,
831+
offsets = {
832+
{
833+
value = 459,
834+
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+
},
838+
}
839+
},
840+
ENHANCED = {
841+
value = 882,
842+
pattern = [[.*?Local_(\d{3})\.f_(459)\s+=\s+\w+;]],
843+
capture_group = 1,
844+
offsets = {
845+
{
846+
value = 459,
847+
capture_group = 2,
848+
},
849+
}
850+
}
851+
},
852+
ie_bitset_1 = {
853+
description = "Import/Export some other array of bits. Hardcoded as well because it hasn't changed either.",
854+
file = "gb_vehicle_export.c",
855+
LEGACY = {
856+
value = 453,
857+
pattern = [[.*?Local_\d{3}\.f_(453)\.*?]],
858+
capture_group = 1,
859+
},
860+
ENHANCED = {
861+
value = 453,
862+
pattern = [[.*?Local_\d{3}\.f_(453)\.*?]],
863+
capture_group = 1,
864+
}
865+
},
866+
ie_num_vehs = {
867+
description = "Import/Export steal number of vehicles.",
868+
file = "gb_vehicle_export.c",
869+
LEGACY = {
870+
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,
874+
},
875+
ENHANCED = {
876+
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,
880+
}
881+
},
882+
ie_steal_bitset = {
883+
description = [[This stores indices of bitsets??
884+
It's indexed by the number of targets (size 2, idx from 1 to 4) which is stored in Local_880.f_650.
885+
Still haven't figured out which bits we need to set.
886+
Attempts made:
887+
- Use Arthur's scrDbg to log calls to func_9 and func_140
888+
- Result: 1.7GB log file that broke my text editor (skill issue on my part).
889+
- Log the final value after finishing the mission normally and try to directly set it. Feels wrong, bad, and weird but does (kida) work.
890+
- Result: Mission passes but vehicle won't be stored in our garage.
891+
]],
892+
file = "gb_vehicle_export.c",
893+
LEGACY = {
894+
value = 48,
895+
pattern = [[.*?Local_\d{3}\.f_(\d{2})\[.*?/\*(\d+)\*/\]\[\w+\], \w+\);]],
896+
capture_group = 1,
897+
offsets = {
898+
{
899+
value = 2,
900+
capture_group = 2,
901+
description = "read size."
902+
},
903+
}
904+
},
905+
ENHANCED = {
906+
value = 48,
907+
pattern = [[.*?Local_\d{3}\.f_(\d{2})\[.*?/\*(\d+)\*/\]\[\w+\], \w+\);]],
908+
capture_group = 1,
909+
offsets = {
910+
{
911+
value = 2,
912+
capture_group = 2,
913+
description = "read size."
914+
},
915+
}
916+
}
805917
}
806918
}

0 commit comments

Comments
 (0)