Skip to content

Commit

Permalink
Fix failstart bugs with Bag of Spilling.
Browse files Browse the repository at this point in the history
 - Fix missing inventory drawing in BG games.
 - Do not hand out empty bags if all the spilled items are undroppable.
 - Do not restore ITM undroppable items.
  • Loading branch information
GraionDilach committed Jun 19, 2022
1 parent 5a96117 commit 1a64a69
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Binary file modified zgtweaks/copy/ZGTBAG.ITM
Binary file not shown.
11 changes: 9 additions & 2 deletions zgtweaks/library/spilling.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,20 @@ BEGIN
END

PATCH_IF found = 0 BEGIN // do not stash undroppable items
PATCH_IF currentitem_flags_value < 8 BEGIN
SET item_droppable = 0
INNER_ACTION BEGIN
COPY_EXISTING ~%currentitem_name%.itm~ ~override~
READ_LONG 0x18 flags ELSE 0
item_droppable = flags BAND 4
BUT_ONLY IF_EXISTS
END
PATCH_IF currentitem_flags_value < 8 AND item_droppable = 4 BEGIN
TEXT_SPRINT append_line ~~~~~ADD_STORE_ITEM ~%currentitem_name%~ #%currentitem_charges1% #%currentitem_charges2% #%currentitem_charges3% ~%currentitem_flags%~ #1 %WNL%~~~~~
spill = 1
END ELSE BEGIN
TEXT_SPRINT append_line ~~~~~// ADD_STORE_ITEM ~%currentitem_name%~ #%currentitem_charges1% #%currentitem_charges2% #%currentitem_charges3% ~%currentitem_flags%~ #1 %WNL%~~~~~
END
SPRINT spilleddata ~%spilleddata% %append_line%~
spill = 1
END
END

Expand Down
2 changes: 1 addition & 1 deletion zgtweaks/zgtweaks.tp2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BACKUP ~weidu_external/zgtweaks/backup~ // location to store files for uninstall purposes
AUTHOR ~Graion Dilach~
VERSION ~1.3~
VERSION ~1.31~

LANGUAGE ~English~ ~english~ ~zgtweaks/english/setup.tra~

Expand Down

0 comments on commit 1a64a69

Please sign in to comment.