Functions

Reputations

Global functions used to modify critters' reputations. More...


Detailed Description

Global functions used to modify critters' reputations.

Include reputations_h.fos for usage.

Functions

void AddReputation (Critter@ cr, uint index, int val)
 Adds reputation points for the critter.
void SubReputation (Critter@ cr, uint index, int val)
 Substracts reputation points for the critter.
void AddReputation (Critter@ cr, uint index, int val, int cap)
 Adds reputation points to the critter, but not above the specified cap.
void SubReputation (Critter@ cr, uint index, int val, int cap)
 Substracts reputation points for the critter.
uint ReputationIndex (uint locid)
 Checks the reputation index of the location owners.

Function Documentation

void AddReputation ( Critter cr,
uint  index,
int  val 
)

Adds reputation points for the critter.

Parameters:
cr Critter which reputation should increase
index Index of reputation group for which the change should occur
val Amount of points
void SubReputation ( Critter cr,
uint  index,
int  val 
)

Substracts reputation points for the critter.

Parameters:
cr Critter which reputation should decrease
index Index of reputation group for which the change should occur
val Amount of points
void AddReputation ( Critter cr,
uint  index,
int  val,
int  cap 
)

Adds reputation points to the critter, but not above the specified cap.

Parameters:
cr Critter which reputation should increase
index Index of reputation group for which the change should occur
val Amount of points
cap Maximum level beyond which the reputation won't be increased, and if it is already higher, change will not occur
void SubReputation ( Critter cr,
uint  index,
int  val,
int  cap 
)

Substracts reputation points for the critter.

Parameters:
cr Critter which reputation should decrease
index Index of reputation group for which the change should occur
val Amount of points
cap Minimum level below which the reputation won't be increased, and if it is already lower, change will not occur
uint ReputationIndex ( uint  locid  ) 

Checks the reputation index of the location owners.

Parameters:
locid Location id
Returns:
Reputation index