Table of Contents

Class ContractInfo

Namespace
S1API.Economy
Assembly
S1API.dll

Builder/DTO for offering a contract to a customer.

public sealed class ContractInfo
Inheritance
ContractInfo
Inherited Members
Extension Methods

Constructors

ContractInfo()

public ContractInfo()

Properties

DeliveryLocationGuid

Delivery location GUID (optional). If null or invalid, a reasonable location will be chosen.

public string DeliveryLocationGuid { get; set; }

Property Value

string

DeliveryWindow

Optional delivery window. If not set, game defaults are used.

public (int startTime, int endTime)? DeliveryWindow { get; set; }

Property Value

(int startTime, int endTime)?

Expires

Whether the offer expires automatically.

public bool Expires { get; set; }

Property Value

bool

ExpiresAfterMinutes

Minutes until expiry if Expires is true.

public int ExpiresAfterMinutes { get; set; }

Property Value

int

IsCounterOffer

Whether this is a counter offer.

public bool IsCounterOffer { get; set; }

Property Value

bool

Orders

Ordered products.

public List<ContractInfo.OrderLine> Orders { get; }

Property Value

List<ContractInfo.OrderLine>

Payment

Contract payment (base, excluding bonuses).

public float Payment { get; set; }

Property Value

float

PickupScheduleIndex

Optional pickup schedule index; 0 is typical for immediate offers.

public int PickupScheduleIndex { get; set; }

Property Value

int

Methods

AddProduct(ProductDefinition, int, Quality)

Adds a product by API definition.

public ContractInfo AddProduct(ProductDefinition definition, int quantity, Quality minQuality)

Parameters

definition ProductDefinition
quantity int
minQuality Quality

Returns

ContractInfo

AddProductById(string, int, Quality)

Adds a product by registry ID.

public ContractInfo AddProductById(string productId, int quantity, Quality minQuality)

Parameters

productId string
quantity int
minQuality Quality

Returns

ContractInfo

WithWindow(int, int)

Sets the delivery window in 24h hhmm format.

public ContractInfo WithWindow(int startTime, int endTime)

Parameters

startTime int
endTime int

Returns

ContractInfo