Supply

A system for player based supply & demand.

Functions

impulse.Supply.Add(id, count)

View source »

Add supply to a stock.

Parameters

  • id int

    Supply Id.

  • count int

    Amount of stock to add.

impulse.Supply.Define(data)

View source »

Creates a new stock system.

Parameters

  • data

    supply table.

Returns

  • int

    Supply ID.

impulse.Supply.Get(id)

View source »

Gets the amount of supply a given id has.

Parameters

  • id int

    The id of the supply.

Returns

  • int

    The stock.

impulse.Supply.Take(id, count)

View source »

Takes supply away.

Parameters

  • id int

    The supply id.

  • count int

    How much to take away.