Show / Hide Table of Contents

Interface IMyContractSystem

Describes contract system (mods interface)

Namespace: VRage.Game.ModAPI
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
Type Description
System.Func<System.Int64, System.Int64, MyActivationCustomResults>

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
Type Name Description
MyContractActivateDelegate value

add_CustomCleanUp(MyContractChangeDelegate)

Declaration
void add_CustomCleanUp(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

add_CustomConditionFinished(MyContractConditionDelegate)

Declaration
void add_CustomConditionFinished(MyContractConditionDelegate value)
Parameters
Type Name Description
MyContractConditionDelegate value

add_CustomFail(MyContractChangeDelegate)

Declaration
void add_CustomFail(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

add_CustomFailFor(MyContractFailedDelegate)

Declaration
void add_CustomFailFor(MyContractFailedDelegate value)
Parameters
Type Name Description
MyContractFailedDelegate value

add_CustomFinish(MyContractChangeDelegate)

Declaration
void add_CustomFinish(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

add_CustomFinishFor(MyContractFinishedDelegate)

Declaration
void add_CustomFinishFor(MyContractFinishedDelegate value)
Parameters
Type Name Description
MyContractFinishedDelegate value

add_CustomTimeRanOut(MyContractChangeDelegate)

Declaration
void add_CustomTimeRanOut(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

add_CustomUpdate(MyContractUpdateDelegate)

Declaration
void add_CustomUpdate(MyContractUpdateDelegate value)
Parameters
Type Name Description
MyContractUpdateDelegate value

AddContract(IMyContract)

Adds the contract

Declaration
MyAddContractResultWrapper AddContract(IMyContract contract)
Parameters
Type Name Description
IMyContract contract

contract id

Returns
Type Description
MyAddContractResultWrapper

information about new contract

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)

Gets Contract State

Declaration
MyCustomContractStateEnum GetContractState(long contractId)
Parameters
Type Name Description
System.Int64 contractId

contract id

Returns
Type Description
MyCustomContractStateEnum

state of the contract

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
Type Name Description
MyContractActivateDelegate value

remove_CustomCleanUp(MyContractChangeDelegate)

Declaration
void remove_CustomCleanUp(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

remove_CustomConditionFinished(MyContractConditionDelegate)

Declaration
void remove_CustomConditionFinished(MyContractConditionDelegate value)
Parameters
Type Name Description
MyContractConditionDelegate value

remove_CustomFail(MyContractChangeDelegate)

Declaration
void remove_CustomFail(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

remove_CustomFailFor(MyContractFailedDelegate)

Declaration
void remove_CustomFailFor(MyContractFailedDelegate value)
Parameters
Type Name Description
MyContractFailedDelegate value

remove_CustomFinish(MyContractChangeDelegate)

Declaration
void remove_CustomFinish(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

remove_CustomFinishFor(MyContractFinishedDelegate)

Declaration
void remove_CustomFinishFor(MyContractFinishedDelegate value)
Parameters
Type Name Description
MyContractFinishedDelegate value

remove_CustomTimeRanOut(MyContractChangeDelegate)

Declaration
void remove_CustomTimeRanOut(MyContractChangeDelegate value)
Parameters
Type Name Description
MyContractChangeDelegate value

remove_CustomUpdate(MyContractUpdateDelegate)

Declaration
void remove_CustomUpdate(MyContractUpdateDelegate value)
Parameters
Type Name Description
MyContractUpdateDelegate value

RemoveContract(Int64)

Removes the contract

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
Type Description
MyContractActivateDelegate

CustomCleanUp

Called when contract ended due to any reason. Use to clean up/remove anything.

Declaration
event MyContractChangeDelegate CustomCleanUp
Event Type
Type Description
MyContractChangeDelegate

CustomConditionFinished

Called after Condition has been successfully finished.

Declaration
event MyContractConditionDelegate CustomConditionFinished
Event Type
Type Description
MyContractConditionDelegate

CustomFail

Called when contract failed.

Declaration
event MyContractChangeDelegate CustomFail
Event Type
Type Description
MyContractChangeDelegate

CustomFailFor

Called when contract has failed. Has additional information associated with the contract.

Declaration
event MyContractFailedDelegate CustomFailFor
Event Type
Type Description
MyContractFailedDelegate

CustomFinish

Called when contract was finished.

Declaration
event MyContractChangeDelegate CustomFinish
Event Type
Type Description
MyContractChangeDelegate

CustomFinishFor

Called when contract was finished. Has additional information associated with the contract.

Declaration
event MyContractFinishedDelegate CustomFinishFor
Event Type
Type Description
MyContractFinishedDelegate

CustomTimeRanOut

Called immediately just before contract failed.

Declaration
event MyContractChangeDelegate CustomTimeRanOut
Event Type
Type Description
MyContractChangeDelegate

CustomUpdate

Called every frame if marked for it by CustomNeedsUpdate.

Declaration
event MyContractUpdateDelegate CustomUpdate
Event Type
Type Description
MyContractUpdateDelegate
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾