Merged
Conversation
Contributor
|
👍 This PR makes the backbone of CBA events system very similar to that of ACE events, originally written by @NouberNou. That framework has been extensively used over the last year, and aside from a few key improvements, which @commy2 ported, it really probed to be very adecuate from the get go. In particular, having only one type of event handler, which can be invoqued by local or remote events alike, gives greater flexibility and makes it easier to use. |
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.
Oh boy, here we go.
CBA event system
CBA_fnc_createNamespaceinstead of hashesCBA_fnc_createNamespaceinstead of two local game logics (2x lesscreateVehicleLocal "logic") per machineadd
CBA_fnc_targetEventCBA_fnc_globalEventin use, but can specify machines that recieve events by passing objects, groups and arrays of objects and groups as third paramter.add
CBA_fnc_serverEventCBA_fnc_globalEvent, but will only execute event on server machineadd return value to
CBA_fnc_localEvent.deprecate:
CBA_fnc_addClientToServerEventhandler,CBA_fnc_clientToServerEvent,CBA_fnc_removeClientToServerEventCBA_fnc_serverEventCBA_fnc_addReceiverOnlyEventhandler,CBA_fnc_receiverOnlyEvent,CBA_fnc_removeReceiverOnlyEventCBA_fnc_targetEventCBA_fnc_addLocalEventHandler,CBA_fnc_whereLocalEvent,CBA_fnc_removeLocalEventHandlerCBA_fnc_targetEventCBA display handler
CBA_fnc_addDisplayHandlerDisplayLoadXEH)createTrigger(present even in MP!) solution that would reassign all key handlers when no keys were pressed for 5 secondsCBA keyhandler
CBA_fnc_createNamespaceor arrays^ these should drastically reduce the amount of overhead for the CBA keybinding module
CBA_fnc_addKeyHandlerwith the same hashkey twice would result in the last added event to be executed twice.CBA_fnc_addKeyHandlerFromConfigwould prevent a mission from loading when the added event used the simple config syntax without modifiersMisc.
didJIPcorrectly reports https://community.bistudio.com/wiki/didJIPmissionVersioncommand on postInit (detects 3den vs 2d mission)CBA_isHeadlessClient, loged on postInitRscDisplayCurator. usesDisplayLoadXEH insteadCBA_MISSION_STARTeventCBA_playerSpawnevent. Would report if the player respawned, but unreliable due toteamSwitchandselectPlayer. It was also a never ending waitUntil loop on headless clients since 1.56.waitUntil {!isNull findDisplay 46}. very annoying.