Skip to content

Commit 4f1bd88

Browse files
committed
refactor: ♻️ updated process results
1 parent 925acc0 commit 4f1bd88

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

test/test_mod_hook_preprocessor/test_script_A_processed.gd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ func vanilla_2078459544_im_not_in_the_child_class() -> void:
6565

6666

6767
func _ready():
68-
await _ModLoaderHooks.call_hooks_async(vanilla_2078459544__ready, [], 2195022348)
68+
return await _ModLoaderHooks.call_hooks_async(vanilla_2078459544__ready, [], 2195022348)
6969

7070

7171
func _process(delta: float):
72-
_ModLoaderHooks.call_hooks(vanilla_2078459544__process, [delta], 319893654)
72+
return _ModLoaderHooks.call_hooks(vanilla_2078459544__process, [delta], 319893654)
7373

7474

7575
func that_is_super():
76-
_ModLoaderHooks.call_hooks(vanilla_2078459544_that_is_super, [], 3896778322)
76+
return _ModLoaderHooks.call_hooks(vanilla_2078459544_that_is_super, [], 3896778322)
7777

7878

7979
func give_default() -> String:
@@ -82,16 +82,16 @@ func give_default() -> String:
8282

8383
func did_you_know_you_can_realy_write_your_function___like_this(param_1: String\
8484
, param_2=give_default()):
85-
_ModLoaderHooks.call_hooks(vanilla_2078459544_did_you_know_you_can_realy_write_your_function___like_this, [param_1, param_2], 833669474)
85+
return _ModLoaderHooks.call_hooks(vanilla_2078459544_did_you_know_you_can_realy_write_your_function___like_this, [param_1, param_2], 833669474)
8686

8787

8888
func _set_some_var_with_set(new_value):
89-
_ModLoaderHooks.call_hooks(vanilla_2078459544__set_some_var_with_set, [new_value], 1894552580)
89+
return _ModLoaderHooks.call_hooks(vanilla_2078459544__set_some_var_with_set, [new_value], 1894552580)
9090

9191

9292
func _get_some_var_with_get():
9393
return _ModLoaderHooks.call_hooks(vanilla_2078459544__get_some_var_with_get, [], 2756748012)
9494

9595

9696
func im_not_in_the_child_class():
97-
_ModLoaderHooks.call_hooks(vanilla_2078459544_im_not_in_the_child_class, [], 3426759564)
97+
return _ModLoaderHooks.call_hooks(vanilla_2078459544_im_not_in_the_child_class, [], 3426759564)

test/test_mod_hook_preprocessor/test_script_B_processed.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ func vanilla_2078495481_im_not_in_the_parent_class() -> void:
1818

1919

2020
func _ready():
21-
_ModLoaderHooks.call_hooks(vanilla_2078495481__ready, [], 2262823725)
21+
return _ModLoaderHooks.call_hooks(vanilla_2078495481__ready, [], 2262823725)
2222

2323

2424
func that_is_super():
25-
_ModLoaderHooks.call_hooks(vanilla_2078495481_that_is_super, [], 2065563731)
25+
return _ModLoaderHooks.call_hooks(vanilla_2078495481_that_is_super, [], 2065563731)
2626

2727

2828
func im_not_in_the_parent_class():
29-
_ModLoaderHooks.call_hooks(vanilla_2078495481_im_not_in_the_parent_class, [], 986863251)
29+
return _ModLoaderHooks.call_hooks(vanilla_2078495481_im_not_in_the_parent_class, [], 986863251)

test/test_mod_hook_preprocessor/test_script_C_processed.gd

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -232,44 +232,44 @@ func method(one, #Somecomment
232232
two, three: int, #Morecomments
233233
four):
234234
if ModLoaderStore.any_mod_hooked:
235-
_ModLoaderHooks.call_hooks(vanilla_2078531418_method, [one, two, three, four], 2863650651)
235+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_method, [one, two, three, four], 2863650651)
236236
else:
237-
vanilla_2078531418_method(one, two, three, four)
237+
return vanilla_2078531418_method(one, two, three, four)
238238

239239

240240
func super_something():
241241
if ModLoaderStore.any_mod_hooked:
242-
_ModLoaderHooks.call_hooks(vanilla_2078531418_super_something, [], 561212438)
242+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_super_something, [], 561212438)
243243
else:
244-
vanilla_2078531418_super_something()
244+
return vanilla_2078531418_super_something()
245245

246246

247247
func super_something_else():
248248
if ModLoaderStore.any_mod_hooked:
249-
_ModLoaderHooks.call_hooks(vanilla_2078531418_super_something_else, [], 683196062)
249+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_super_something_else, [], 683196062)
250250
else:
251-
vanilla_2078531418_super_something_else()
251+
return vanilla_2078531418_super_something_else()
252252

253253

254254
func sup_func_two():
255255
if ModLoaderStore.any_mod_hooked:
256-
_ModLoaderHooks.call_hooks(vanilla_2078531418_sup_func_two, [], 1626900374)
256+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_sup_func_two, [], 1626900374)
257257
else:
258-
vanilla_2078531418_sup_func_two()
258+
return vanilla_2078531418_sup_func_two()
259259

260260

261261
func sup_func():
262262
if ModLoaderStore.any_mod_hooked:
263-
_ModLoaderHooks.call_hooks(vanilla_2078531418_sup_func, [], 1698024413)
263+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_sup_func, [], 1698024413)
264264
else:
265-
vanilla_2078531418_sup_func()
265+
return vanilla_2078531418_sup_func()
266266

267267

268268
func other_test_func():
269269
if ModLoaderStore.any_mod_hooked:
270-
_ModLoaderHooks.call_hooks(vanilla_2078531418_other_test_func, [], 124073286)
270+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_other_test_func, [], 124073286)
271271
else:
272-
vanilla_2078531418_other_test_func()
272+
return vanilla_2078531418_other_test_func()
273273

274274

275275
func hello_hello():
@@ -316,38 +316,38 @@ func more_comment_testing():
316316

317317
static func static_super():
318318
if ModLoaderStore.any_mod_hooked:
319-
_ModLoaderHooks.call_hooks(vanilla_2078531418_static_super, [], 1720709936)
319+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_static_super, [], 1720709936)
320320
else:
321-
vanilla_2078531418_static_super()
321+
return vanilla_2078531418_static_super()
322322

323323

324324
func this_is_so_cursed():
325325
if ModLoaderStore.any_mod_hooked:
326-
_ModLoaderHooks.call_hooks(vanilla_2078531418_this_is_so_cursed, [], 1705479347)
326+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_this_is_so_cursed, [], 1705479347)
327327
else:
328-
vanilla_2078531418_this_is_so_cursed()
328+
return vanilla_2078531418_this_is_so_cursed()
329329

330330

331331
func this_too():
332332
if ModLoaderStore.any_mod_hooked:
333-
_ModLoaderHooks.call_hooks(vanilla_2078531418_this_too, [], 1507098083)
333+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_this_too, [], 1507098083)
334334
else:
335-
vanilla_2078531418_this_too()
335+
return vanilla_2078531418_this_too()
336336

337337

338338
func please_stop():
339339
if ModLoaderStore.any_mod_hooked:
340-
_ModLoaderHooks.call_hooks(vanilla_2078531418_please_stop, [], 2851245561)
340+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_please_stop, [], 2851245561)
341341
else:
342-
vanilla_2078531418_please_stop()
342+
return vanilla_2078531418_please_stop()
343343

344344

345345
func why_would_you(put: int, \
346346
backslashes: ="\\", in_here: ="?!\n"):
347347
if ModLoaderStore.any_mod_hooked:
348-
_ModLoaderHooks.call_hooks(vanilla_2078531418_why_would_you, [put, backslashes, in_here], 1414126584)
348+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_why_would_you, [put, backslashes, in_here], 1414126584)
349349
else:
350-
vanilla_2078531418_why_would_you(put, backslashes, in_here)
350+
return vanilla_2078531418_why_would_you(put, backslashes, in_here)
351351

352352

353353
func param_super(one: int, two: String) -> int:
@@ -373,30 +373,30 @@ func get_something():
373373

374374
func set_something():
375375
if ModLoaderStore.any_mod_hooked:
376-
_ModLoaderHooks.call_hooks(vanilla_2078531418_set_something, [], 2687664211)
376+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_set_something, [], 2687664211)
377377
else:
378-
vanilla_2078531418_set_something()
378+
return vanilla_2078531418_set_something()
379379

380380

381381
func set_exclude_me():
382382
if ModLoaderStore.any_mod_hooked:
383-
_ModLoaderHooks.call_hooks(vanilla_2078531418_set_exclude_me, [], 1755202272)
383+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_set_exclude_me, [], 1755202272)
384384
else:
385-
vanilla_2078531418_set_exclude_me()
385+
return vanilla_2078531418_set_exclude_me()
386386

387387

388388
func get_exclude_me():
389389
if ModLoaderStore.any_mod_hooked:
390-
_ModLoaderHooks.call_hooks(vanilla_2078531418_get_exclude_me, [], 2711326548)
390+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_get_exclude_me, [], 2711326548)
391391
else:
392-
vanilla_2078531418_get_exclude_me()
392+
return vanilla_2078531418_get_exclude_me()
393393

394394

395395
func definitely_a_coroutine(args: =[]):
396396
if ModLoaderStore.any_mod_hooked:
397-
await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine, [args], 1072984126)
397+
return await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine, [args], 1072984126)
398398
else:
399-
await vanilla_2078531418_definitely_a_coroutine(args)
399+
return await vanilla_2078531418_definitely_a_coroutine(args)
400400

401401

402402
func definitely_a_coroutine2(args: =[]):
@@ -415,41 +415,41 @@ func definitely_a_coroutine3(args: =[]):
415415

416416
func definitely_a_coroutine4(args: =[]):
417417
if ModLoaderStore.any_mod_hooked:
418-
await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine4, [args], 1048737842)
418+
return await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine4, [args], 1048737842)
419419
else:
420-
await vanilla_2078531418_definitely_a_coroutine4(args)
420+
return await vanilla_2078531418_definitely_a_coroutine4(args)
421421

422422

423423
func absolutely_not_a_coroutine(args: =[]):
424424
if ModLoaderStore.any_mod_hooked:
425-
_ModLoaderHooks.call_hooks(vanilla_2078531418_absolutely_not_a_coroutine, [args], 2502244037)
425+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_absolutely_not_a_coroutine, [args], 2502244037)
426426
else:
427-
vanilla_2078531418_absolutely_not_a_coroutine(args)
427+
return vanilla_2078531418_absolutely_not_a_coroutine(args)
428428

429429

430430
func definitely_a_coroutine5(args: =[]):
431431
if ModLoaderStore.any_mod_hooked:
432-
await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine5, [args], 1048737843)
432+
return await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine5, [args], 1048737843)
433433
else:
434-
await vanilla_2078531418_definitely_a_coroutine5(args)
434+
return await vanilla_2078531418_definitely_a_coroutine5(args)
435435

436436

437437
func definitely_a_coroutine6(args: =[]):
438438
if ModLoaderStore.any_mod_hooked:
439-
await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine6, [args], 1048737844)
439+
return await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine6, [args], 1048737844)
440440
else:
441-
await vanilla_2078531418_definitely_a_coroutine6(args)
441+
return await vanilla_2078531418_definitely_a_coroutine6(args)
442442

443443

444444
func absolutely_not_a_coroutine2(args: =[]):
445445
if ModLoaderStore.any_mod_hooked:
446-
_ModLoaderHooks.call_hooks(vanilla_2078531418_absolutely_not_a_coroutine2, [args], 969674647)
446+
return _ModLoaderHooks.call_hooks(vanilla_2078531418_absolutely_not_a_coroutine2, [args], 969674647)
447447
else:
448-
vanilla_2078531418_absolutely_not_a_coroutine2(args)
448+
return vanilla_2078531418_absolutely_not_a_coroutine2(args)
449449

450450

451451
func definitely_a_coroutine7(args: =[]):
452452
if ModLoaderStore.any_mod_hooked:
453-
await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine7, [args], 1048737845)
453+
return await _ModLoaderHooks.call_hooks_async(vanilla_2078531418_definitely_a_coroutine7, [args], 1048737845)
454454
else:
455-
await vanilla_2078531418_definitely_a_coroutine7(args)
455+
return await vanilla_2078531418_definitely_a_coroutine7(args)

0 commit comments

Comments
 (0)