New engine feature: Tweak op122/255#5
Open
4Luke4 wants to merge 3 commits into
Open
Conversation
Add .gitignore entries to exclude Google Drive File Stream temporary files (.tmp.driveupload, .tmp.drivedownload) so transient local upload/download artifacts are not committed to the repository.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces hooks for the Create Item opcodes (op122 and op255), enabling custom logic to be executed before and after an item is placed by an effect. These hooks provide better control and tracking of item creation and placement, including the ability to override item flags and track the equipment slot in which an item is placed.
New Create Item opcode hooks:
Opcode_Hook_CGameEffectCreateItem_BeforePlaceItemandOpcode_Hook_CGameEffectCreateItem_AfterPlaceItemfunction declarations toEEex.h, allowing logic to run before and after an item is placed by an effect.Opcode_Hook_CGameEffectCreateItem_BeforePlaceItemto override item flags with effect flags if present, andOpcode_Hook_CGameEffectCreateItem_AfterPlaceItemto track and store the equipment slot of the placed item in Lua state, or clear it if not equipped.exportPatterninmain.cpp, making them available for use in the engine.See also Bubb13/EEex#117.