Crossfire Server, Trunk
powerbroker Namespace Reference

Functions

def base_price (sp)
 
def buy_mana ()
 
def buy_price (sp)
 
def change_stock (amount)
 
def charge (payer, quantity)
 
def check_confirm ()
 
def confirm (text, action)
 
def mana_stock ()
 
def on_apply ()
 
def on_say ()
 
def pay (payee, quantity)
 
def profit ()
 
def sell_mana ()
 
def sell_price (sp)
 
def status ()
 
def stock (message)
 

Variables

 me = Crossfire.WhoAmI()
 
int N0 = 10000
 
int P0 = 10
 

Detailed Description

powerbroker.py -- glowing crystals that buy and sell mana

Usage: add an event_apply and event_say to a non-pickable glowing crystal.

Function Documentation

◆ base_price()

def powerbroker.base_price (   sp)

Definition at line 47 of file powerbroker.py.

References mana_stock().

Referenced by buy_price(), and sell_price().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buy_mana()

def powerbroker.buy_mana ( )

Definition at line 57 of file powerbroker.py.

References buy_price(), change_stock(), charge(), confirm(), make_face_from_files.int, and mana_stock().

Referenced by on_say().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buy_price()

def powerbroker.buy_price (   sp)

Definition at line 54 of file powerbroker.py.

References base_price(), say.max, and profit().

Referenced by buy_mana(), and status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ change_stock()

def powerbroker.change_stock (   amount)

Definition at line 44 of file powerbroker.py.

References mana_stock().

Referenced by buy_mana(), sell_mana(), and stock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ charge()

def powerbroker.charge (   payer,
  quantity 
)

Definition at line 16 of file powerbroker.py.

Referenced by buy_mana().

+ Here is the caller graph for this function:

◆ check_confirm()

def powerbroker.check_confirm ( )

Definition at line 103 of file powerbroker.py.

References convert.action, and nlohmann::detail.get().

Referenced by on_say().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirm()

def powerbroker.confirm (   text,
  action 
)

Definition at line 97 of file powerbroker.py.

Referenced by buy_mana(), CREMainWindow.onClearCache(), and sell_mana().

+ Here is the caller graph for this function:

◆ mana_stock()

def powerbroker.mana_stock ( )

Definition at line 38 of file powerbroker.py.

References nlohmann::detail.get().

Referenced by base_price(), buy_mana(), change_stock(), and status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_apply()

def powerbroker.on_apply ( )

Definition at line 32 of file powerbroker.py.

Referenced by on_say().

+ Here is the caller graph for this function:

◆ on_say()

def powerbroker.on_say ( )

Definition at line 130 of file powerbroker.py.

References buy_mana(), check_confirm(), on_apply(), sell_mana(), status(), and stock().

+ Here is the call graph for this function:

◆ pay()

def powerbroker.pay (   payee,
  quantity 
)

Definition at line 19 of file powerbroker.py.

References make_face_from_files.int.

Referenced by sell_mana().

+ Here is the caller graph for this function:

◆ profit()

def powerbroker.profit ( )

Definition at line 35 of file powerbroker.py.

Referenced by buy_price(), and sell_price().

+ Here is the caller graph for this function:

◆ sell_mana()

def powerbroker.sell_mana ( )

Definition at line 83 of file powerbroker.py.

References change_stock(), confirm(), pay(), and sell_price().

Referenced by on_say().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sell_price()

def powerbroker.sell_price (   sp)

Definition at line 51 of file powerbroker.py.

References base_price(), and profit().

Referenced by sell_mana(), and status().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ status()

def powerbroker.status ( )

Definition at line 118 of file powerbroker.py.

References buy_price(), mana_stock(), and sell_price().

Referenced by on_say(), and stock().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stock()

def powerbroker.stock (   message)

Definition at line 121 of file powerbroker.py.

References change_stock(), make_face_from_files.int, and status().

Referenced by on_say().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ me

powerbroker.me = Crossfire.WhoAmI()

Definition at line 14 of file powerbroker.py.

◆ N0

int powerbroker.N0 = 10000

Definition at line 12 of file powerbroker.py.

◆ P0

int powerbroker.P0 = 10

Definition at line 13 of file powerbroker.py.