Add this script to a trade post to integrate it with Love/Hate. More...
Public Member Functions | |
void | RecordOriginalPrices () |
Records the trader's current prices as the original prices. | |
void | RestoreOriginalPrices () |
Restores the original prices. | |
void | AdjustPricesForFaction (Faction faction) |
Adjusts the post's prices to sell to a faction. | |
void | AdjustPricesForFaction (Faction faction, bool buyingFromFaction) |
Adjusts the post's prices for a faction. | |
Public Attributes | |
AnimationCurve | priceCurve |
The price adjustment curve. | |
bool | debug = false |
Tick to log debug information for this post. | |
Properties | |
Dictionary< string, float > | originalPrice [get] |
The original prices of the items, indexed by item name. | |
Add this script to a trade post to integrate it with Love/Hate.
It introduces one method: AdjustPricesForFaction(). Assign a Love/Hate faction member to the post. Then call this method before a trader interacts with the post to adjust the post's prices based on the trader's Love/Hate faction. This script doesn't use TradeSys factions.
|
inline |
Adjusts the post's prices to sell to a faction.
faction | Faction to sell to. |
|
inline |
Adjusts the post's prices for a faction.
If trading with a friendly faction, adjust prices toward the right end of the curve (lower prices). If trading with an enemy faction, sell to the faction at high prices and buy at low prices.
faction | Faction to sell to or buy from. |
buyingFromFaction | If true , set prices for buying from the faction; if false , selling to faction. |
|
inline |
Records the trader's current prices as the original prices.
|
inline |
Restores the original prices.
bool PixelCrushers.LoveHate.TradeSysSupport.LoveHateTradePost.debug = false |
Tick to log debug information for this post.
AnimationCurve PixelCrushers.LoveHate.TradeSysSupport.LoveHateTradePost.priceCurve |
The price adjustment curve.
Scales the base price by this affinity value. For example, if the post's affinity to the trader is 50, and the curve's value at 50 is 0.25, then prices will be discounted by 25%.
|
get |
The original prices of the items, indexed by item name.