-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added fix for Han Solo (odf change in pistol) (#45)
- Loading branch information
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
-- user_script_han_fix.lua | ||
-- HanFix by bad_al_, Rayman1103 | ||
-- Description: Fixes issue where Han Solo crashes the game. | ||
-- | ||
|
||
-- need to set | ||
-- MedalsTypeToLock = -1 in "all_weap_hero_hanpistol.odf" | ||
|
||
local oldReadDataFile = ReadDataFile | ||
|
||
local function LoadHanPistol() | ||
print("info: LoadHanPistol()") | ||
-- use the zero_fs to find the right file | ||
local result = zero_patch_fs.getFiles("all_weap_hero_hanpistol", {".lvl"}) | ||
if( table.getn(result) > 0) then | ||
ReadDataFile(result[1], "all_weap_hero_hanpistol") | ||
print("info: run fix for 'all_weap_hero_hanpistol' ") | ||
else | ||
print("info: Oopsie! 'all_weap_hero_hanpistol.lvl' not found ") | ||
end | ||
end | ||
|
||
ReadDataFile = function(...) | ||
if(string.upper(arg[1]) == "SIDE\\ALL1.LVL") then | ||
local index = 2 | ||
local length = table.getn(arg) | ||
while index < length do | ||
if( string.lower(arg[index]) == "all_hero_hansolo_tat") then | ||
LoadHanPistol() | ||
break | ||
end | ||
index = index + 1 | ||
end | ||
end | ||
return oldReadDataFile(unpack(arg)) | ||
end |