feature(misc-changes): Miscellaneous Changes#61
Merged
themrdemonized merged 11 commits intothemrdemonized:all-in-one-vs2022-wpofrom Aug 18, 2024
Merged
Conversation
…/xray-monolith into all-in-one-vs2022-wpo
add patrol_paths.ltx file
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.
Hello,
This PR brings a couple of unrelated changes, mainly due to the fact that VS git integration sucks, and I'm scared to lose my changes. Sorry in advance.
Summary
CWeaponMagazinedCScriptGameObject::GetObjectByNameActorMenu_on_item_after_movecallback sending nil values in obj argumentactor_on_item_take_from_boxcallback not firing when item is moved from a slotLTX based patrol paths definitions
As the name suggests, this allows for defining patrol paths in a config file, instead of having to define them in SDK.
New patrol paths must be defined in a file
gamedata/configs/patrol_paths.ltx. The file can be empty. Patrol paths in this file can be defined the same way they are inlevel.spawnorall.spawn. Here is an example :Here is a set of patrol paths that will cause the engine to Crash To Desktop. These can be used to test proper functioning of engine-side handled exceptions. When the engine crashes, it prints a custom message, the name of the faulty patrol path, and sometimes an extra argument, depending on context.
Support for custom first shot sound effect in
CWeaponMagazinedThis change allows people to define a custom sound effect that will be used for the first shot in a burst. If the key is not defined, it uses the same behavior as before the change.
Here is an example :
Support for inventory boxes in
CScriptGameObject::GetObjectByNameWhen executing
game_object:object(string section), this function would only work onInventoryOwner, and not onInventoryBox. This change allows this function to be called onInventoryBoxand return the desired result.There are three functions of this kind in engine, and with this change, only two support
InventoryBoxobjects. I don't know enough to extend this behavior to the third one, so I am leaving it as is.Fix for
ActorMenu_on_item_after_movecallback sending nil values in obj argumentThis one is rather simple. The
ActorMenu_on_item_after_movecallback can send nil values (I think it happens when moving multiple items at once with CTRL+Double Click). This change makes sure that the callback is only fired when the object is not nil.Fix for
actor_on_item_take_from_boxcallback not firing when item is moved from a slotThis one is also simple. The
actor_on_item_take_from_boxcallback does not fire when an item is moved from a slot. It does fire normally when the item is moved from the inventory. By piggybacking theActorMenu_on_item_after_movecallback, and narrowing down the conditions for the missing call, we can "artificially" fire the callback when it should have.