Interface IShopRules

Namespace
SurvivorsMaker.Run
Assembly
SurvivorsMaker.Run.dll

Shop offers, purchases, and weapon management.

public interface IShopRules

Methods

AddWeapon(RunState, WeaponItemDef)

Adds a weapon following the slot/merge rules. Used by buying and field-mode choices.

RunResult AddWeapon(RunState run, WeaponItemDef weapon)

Parameters

run RunState
weapon WeaponItemDef

Returns

RunResult

Buy(RunState, int)

RunResult Buy(RunState run, int slot)

Parameters

run RunState
slot int

Returns

RunResult

CanAccept(RunState, WeaponItemDef)

True if the weapon could be added now (free slot, or full slots with a merge partner).

bool CanAccept(RunState run, WeaponItemDef weapon)

Parameters

run RunState
weapon WeaponItemDef

Returns

bool

Merge(RunState, int)

Merges the weapon at weaponIndex with the first other copy into its next tier.

RunResult Merge(RunState run, int weaponIndex)

Parameters

run RunState
weaponIndex int

Returns

RunResult

Price(RunState, int)

int Price(RunState run, int basePrice)

Parameters

run RunState
basePrice int

Returns

int

Recycle(RunState, int)

RunResult Recycle(RunState run, int weaponIndex)

Parameters

run RunState
weaponIndex int

Returns

RunResult

RecycleRefund(RunState, WeaponItemDef)

int RecycleRefund(RunState run, WeaponItemDef weapon)

Parameters

run RunState
weapon WeaponItemDef

Returns

int

Reroll(RunState)

RunResult Reroll(RunState run)

Parameters

run RunState

Returns

RunResult

RerollCost(RunState)

int RerollCost(RunState run)

Parameters

run RunState

Returns

int

Restock(RunState)

Fills unlocked slots (resizing the slot list to Settings.Shop.Slots). Free.

void Restock(RunState run)

Parameters

run RunState

ToggleLock(RunState, int)

RunResult ToggleLock(RunState run, int slot)

Parameters

run RunState
slot int

Returns

RunResult