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
runRunStateweaponWeaponItemDef
Returns
Buy(RunState, int)
RunResult Buy(RunState run, int slot)
Parameters
Returns
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
runRunStateweaponWeaponItemDef
Returns
Merge(RunState, int)
Merges the weapon at weaponIndex with the first other copy into its next tier.
RunResult Merge(RunState run, int weaponIndex)
Parameters
Returns
Price(RunState, int)
int Price(RunState run, int basePrice)
Parameters
Returns
Recycle(RunState, int)
RunResult Recycle(RunState run, int weaponIndex)
Parameters
Returns
RecycleRefund(RunState, WeaponItemDef)
int RecycleRefund(RunState run, WeaponItemDef weapon)
Parameters
runRunStateweaponWeaponItemDef
Returns
Reroll(RunState)
RunResult Reroll(RunState run)
Parameters
runRunState
Returns
RerollCost(RunState)
int RerollCost(RunState run)
Parameters
runRunState
Returns
Restock(RunState)
Fills unlocked slots (resizing the slot list to Settings.Shop.Slots). Free.
void Restock(RunState run)
Parameters
runRunState
ToggleLock(RunState, int)
RunResult ToggleLock(RunState run, int slot)