Show / Hide Table of Contents

Class CraftingFees

This class allows to calculate, pay and store escrowed payments withing craft/repair. Tables which has CreditComponent could set fee for using that table. This class will operate with payments allowing to retrieve back paid money for canceled work orders. Stores fee data on the moment work order was created. So further changes to fee/currency would not affect stored payment. When payment is requested, money are transfered to Escrow account saving all needed transfer info within serialized fields. When using escrow account is not needed (repair or craft single item) transfer is performed instantly.

Inheritance
System.Object
CraftingFees
Namespace: Eco.Gameplay.Components
Assembly: Eco.Gameplay.dll
Syntax
public class CraftingFees : Object

Constructors

CraftingFees()

Declaration
public CraftingFees()

Methods

Initialize(WorldObject, WorkOrder)

Declaration
public void Initialize(WorldObject worldObject, WorkOrder workOrder)
Parameters
Type Name Description
WorldObject worldObject
WorkOrder workOrder

PayCraftingFee()

Pay stored crafting fee per 1 unit. If table becomes public or free - refund all stored money.

Declaration
public void PayCraftingFee()

PayCraftingFees(GameActionPack, User, WorldObject, Single, Int32, BankAccount, WorkOrder)

Try to pay crafting fees for work order. If multiple orders queued payment transfered to escrow account and owner will receive payment per finished order. On work order cancel tries to refund. Otherwise returns null.

Declaration
public static CraftingFees PayCraftingFees(GameActionPack pack, User user, WorldObject worldObject, float timePerItem, int quantity, BankAccount account, WorkOrder workOrder)
Parameters
Type Name Description
GameActionPack pack
User user
WorldObject worldObject
System.Single timePerItem
System.Int32 quantity
BankAccount account
WorkOrder workOrder
Returns
Type Description
CraftingFees

PayRepairFees(GameActionPack, User, WorldObject, BankAccount, Item)

Pay repair fees instantly.

Declaration
public static void PayRepairFees(GameActionPack pack, User user, WorldObject obj, BankAccount account, Item item)
Parameters
Type Name Description
GameActionPack pack
User user
WorldObject obj
BankAccount account
Item item

RefundCraftingFee()

Refund remaining fees if any left in escrow bank account.

Declaration
public void RefundCraftingFee()

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾