Interface IMyContractSystem
Describes contract system (mods interface)
Assembly: VRage.Game.dll
Syntax
public interface IMyContractSystem
Properties
CustomCanActivateContract
Gets or sets function that is triggered when player trying to take contract
First argument - ContractId, Second - IdentityId
Declaration
Func<long, long, MyActivationCustomResults> CustomCanActivateContract { get; set; }
Property Value
CustomFinishCondition
The operation of finishing Condition itself
Returns whether it succeeded or not
Declaration
Func<long, long, bool> CustomFinishCondition { get; set; }
Property Value
Type |
Description |
System.Func<System.Int64, System.Int64, System.Boolean> |
|
CustomNeedsUpdate
Gets or sets function that is triggered each 100 frames per each contract.
Declaration
Func<long, bool> CustomNeedsUpdate { get; set; }
Property Value
Type |
Description |
System.Func<System.Int64, System.Boolean> |
|
Methods
add_CustomActivateContract(MyContractActivateDelegate)
Declaration
void add_CustomActivateContract(MyContractActivateDelegate value)
Parameters
add_CustomCleanUp(MyContractChangeDelegate)
Declaration
void add_CustomCleanUp(MyContractChangeDelegate value)
Parameters
add_CustomConditionFinished(MyContractConditionDelegate)
Declaration
void add_CustomConditionFinished(MyContractConditionDelegate value)
Parameters
add_CustomFail(MyContractChangeDelegate)
Declaration
void add_CustomFail(MyContractChangeDelegate value)
Parameters
add_CustomFailFor(MyContractFailedDelegate)
Declaration
void add_CustomFailFor(MyContractFailedDelegate value)
Parameters
add_CustomFinish(MyContractChangeDelegate)
Declaration
void add_CustomFinish(MyContractChangeDelegate value)
Parameters
add_CustomFinishFor(MyContractFinishedDelegate)
Declaration
void add_CustomFinishFor(MyContractFinishedDelegate value)
Parameters
add_CustomTimeRanOut(MyContractChangeDelegate)
Declaration
void add_CustomTimeRanOut(MyContractChangeDelegate value)
Parameters
add_CustomUpdate(MyContractUpdateDelegate)
Declaration
void add_CustomUpdate(MyContractUpdateDelegate value)
Parameters
AddContract(IMyContract)
Declaration
MyAddContractResultWrapper AddContract(IMyContract contract)
Parameters
Returns
GetContractDefinitionId(Int64)
Gets Contracts Definition Id
Declaration
Nullable<MyDefinitionId> GetContractDefinitionId(long contractId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
Returns
Type |
Description |
System.Nullable<MyDefinitionId> |
Definition Id of the contract
|
GetContractState(Int64)
Declaration
MyCustomContractStateEnum GetContractState(long contractId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
Returns
IsContractActive(Int64)
Checks if specified contract is in active state
Declaration
bool IsContractActive(long contractId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
Returns
Type |
Description |
System.Boolean |
True if contract is active
|
remove_CustomActivateContract(MyContractActivateDelegate)
Declaration
void remove_CustomActivateContract(MyContractActivateDelegate value)
Parameters
remove_CustomCleanUp(MyContractChangeDelegate)
Declaration
void remove_CustomCleanUp(MyContractChangeDelegate value)
Parameters
remove_CustomConditionFinished(MyContractConditionDelegate)
Declaration
void remove_CustomConditionFinished(MyContractConditionDelegate value)
Parameters
remove_CustomFail(MyContractChangeDelegate)
Declaration
void remove_CustomFail(MyContractChangeDelegate value)
Parameters
remove_CustomFailFor(MyContractFailedDelegate)
Declaration
void remove_CustomFailFor(MyContractFailedDelegate value)
Parameters
remove_CustomFinish(MyContractChangeDelegate)
Declaration
void remove_CustomFinish(MyContractChangeDelegate value)
Parameters
remove_CustomFinishFor(MyContractFinishedDelegate)
Declaration
void remove_CustomFinishFor(MyContractFinishedDelegate value)
Parameters
remove_CustomTimeRanOut(MyContractChangeDelegate)
Declaration
void remove_CustomTimeRanOut(MyContractChangeDelegate value)
Parameters
remove_CustomUpdate(MyContractUpdateDelegate)
Declaration
void remove_CustomUpdate(MyContractUpdateDelegate value)
Parameters
RemoveContract(Int64)
Declaration
bool RemoveContract(long contractId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
Returns
Type |
Description |
System.Boolean |
True if contract was removed
|
TryAbandonCustomContract(Int64, Int64)
Tries to abandon the contract
Declaration
bool TryAbandonCustomContract(long contractId, long playerId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
System.Int64 |
playerId |
player id who has the contract
|
Returns
Type |
Description |
System.Boolean |
True if contract was abandoned
|
TryFailCustomContract(Int64)
Tries to set the contract to fail state
Declaration
bool TryFailCustomContract(long contractId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
Returns
Type |
Description |
System.Boolean |
True if contract was failed
|
TryFinishCustomContract(Int64)
Tries to set the contract to finish state
Declaration
bool TryFinishCustomContract(long contractId)
Parameters
Type |
Name |
Description |
System.Int64 |
contractId |
contract id
|
Returns
Type |
Description |
System.Boolean |
True if contract was finished
|
Events
CustomActivateContract
Called when contract is activated.
Declaration
event MyContractActivateDelegate CustomActivateContract
Event Type
CustomCleanUp
Called when contract ended due to any reason. Use to clean up/remove anything.
Declaration
event MyContractChangeDelegate CustomCleanUp
Event Type
CustomConditionFinished
Called after Condition has been successfully finished.
Declaration
event MyContractConditionDelegate CustomConditionFinished
Event Type
CustomFail
Called when contract failed.
Declaration
event MyContractChangeDelegate CustomFail
Event Type
CustomFailFor
Called when contract has failed. Has additional information associated with the contract.
Declaration
event MyContractFailedDelegate CustomFailFor
Event Type
CustomFinish
Called when contract was finished.
Declaration
event MyContractChangeDelegate CustomFinish
Event Type
CustomFinishFor
Called when contract was finished. Has additional information associated with the contract.
Declaration
event MyContractFinishedDelegate CustomFinishFor
Event Type
CustomTimeRanOut
Called immediately just before contract failed.
Declaration
event MyContractChangeDelegate CustomTimeRanOut
Event Type
CustomUpdate
Called every frame if marked for it by CustomNeedsUpdate.
Declaration
event MyContractUpdateDelegate CustomUpdate
Event Type