Skip to content

ZContracts 0.9.0

Compare
Choose a tag to compare
@zonical zonical released this 24 Apr 04:03
· 13 commits to master since this release

ZContracts 0.9.0 Changelog:

  • Bumped Contracker version to 2. Old Contract progress will continue to load.
  • Massive changes to several natives and forwards:
    • SetClientContract now only takes two parameters: client index and UUID. dont_save and dont_notify have been moved to a new function: SetClientContractEx.
    • GetClientContract now returns a UUID instead of a string. A struct can still be obtained using the new function GetClientContractStruct, but usage is discouraged.
    • Changed high-level saving functions to remove usage of enum structs and to only save the client's active contract: SaveActiveContractToDatabase and SaveActiveObjectiveToDatabase.
    • Changed OnContractObjectiveCompleted, OnContractCompleted and OnProcessContractLogic to not use enum structs.
  • Added new natives and forwards:
    • GetContractSchema: returns KeyValues of a specified Contract
    • GetObjectiveSchema: returns KeyValues of an objective in a specified Contract
    • GetContractObjectiveCount: returns the amount of objectives in a specified Contract
    • GetActiveContractProgress: gets the progress of the clients current contract
    • GetActiveObjectiveProgress: gets the progress of an objective in the clients current contract
    • SetActiveContractProgress: changes the progress of the clients active contract
    • SetActiveObjectiveProgress: changes the progress of an objective in the clients active contract
    • GetClientCompletedContracts: returns a copy of the clients active contracts. There are enum structs still embedded in the StringMap
    • CanClientActivateContract: checks to see if a client can select a specified contract
    • CanClientCompleteContract: checks to see if a client can progress a contract at that time
    • IsActiveContractComplete: returns the completion status of the clients current contract
    • HasClientCompletedContract: checks to see if a client has completed a contract
    • OnClientActivatedContract: fired when a client has selected a contract but data has not been retrieved from the database:
    • OnClientActivatedContractPost: fired when a client has selected a contract and data has been retrieved from the database
    • OnContractProgressReceived: fired when contract progress is retrieved from the database
    • OnObjectiveProgressReceived: fired when objective progress from a contract is retrieved from the database
  • Minor menu edits
  • Updated zcontracts_tf2 to reflect the native/forward changes above