crafts
index
/home/thindil/Projekty/anaria/server/lib/pymodules/crafts.py

crafts.py
 
Provide data and functions for crafts.

 
Modules
       
auxiliary
gainlevel
hooks
mud
mudsys
obj
olc
random
storage
utils

 
Classes
       
Plan
PlansData

 
class Plan
    Implement one plan.
 
  Methods defined here:
__init__(self, name, set=None)
Standard class constructor.
store(self)
return a storage set representation of the plan.

 
class PlansData
    Character plans.
 
  Methods defined here:
__init__(self, set=None)
Standard class constructor.
copy(self)
copyTo(self, to)
store(self)

 
Functions
       
__unload__()
remove all hooks.
add_plan(self, name, skill, learned='N')
function add new plan to character.
cmd_make(ch, cmd, arg)
Usage: wykonaj <object>
 
Try to make selected object.
cmd_pdelete(ch, cmd, arg)
Usage: pdelete <name of plan>
 
Delete selected plan.
cmd_pedit(ch, cmd, arg)
Usage: pedit <name of plan>
 
Add or edit plan.
cmd_pinfo(ch, cmd, arg)
Usage: pinfo <name>
 
Show informations about selected plan.
cmd_plist(ch, cmd, arg)
Usage: plist
 
Show list of plans.
cmd_prename(ch, cmd, arg)
Usage: prename '<name of plan>' '<new name of plan>'
 
Rename selected plan.
get_plan(name)
function return plan statistics.
item_finished_hook(info)
Check did player made an item.
load_plans()
read all of the plans from file.
pedit_chooser(sock, data, option)
figure out what we want to edit in spell and display a prompt.
pedit_menu(sock, data)
Display main menu for add/modify plan.
pedit_parser(sock, data, choice, arg)
parse out what we want to change a specified field to in plan.
plan_learned_hook(info)
Send informations about learned plan.
plansolc_choice_exec(sock, data)
Edit plans.
plansolc_chooser(sock, data, option)
Try pick plan to set.
plansolc_extend_menu(sock, data)
Display option in main menu.
plansolc_menu(sock, data)
Display all plans and values for they.
plansolc_parser(sock, mobile, choice, arg)
Set new plan or delete it.
plansolc_to_proto(thing)
Save plans.
save_plans(plan=None)
save all of the plans to file.

 
Data
        PLAN_DELETE = 2
PLAN_NEW = 1
__PLAN_COST__ = 5
__PLAN_DIFFICULT__ = 3
__PLAN_LEARNTIME__ = 7
__PLAN_PROTO__ = 1
__PLAN_RESOURCES__ = 2
__PLAN_SKILL__ = 6
__PLAN_TIME__ = 4
__PLAN_TOOL__ = 8
__plans__ = [<crafts.Plan instance>, <crafts.Plan instance>]
__plans_file__ = '../lib/misc/plans'
plan_names = ['wywar z Irvonas', 'pasta z Acaana']
planolc_opt_map = {'1': (1, 'Podaj przedmiot jaki zostanie wykonany: '), '2': (2, 'Podaj surowce jakie s\xc4\x85 potrzebne, oddzielone \xc5\x9brednikiem: '), '3': (3, 'Podaj trudno\xc5\x9b\xc4\x87 planu: '), '4': (4, 'Podaj czas (w sekundach) jak d\xc5\x82ugo wykonuje si\xc4\x99 dany przedmiot: '), '5': (5, 'Podaj zm\xc4\x99czenie jakie powoduje wykonanie danego przedmiotu: '), '6': (6, 'Podaj umiej\xc4\x99tno\xc5\x9b\xc4\x87 powi\xc4\x85zan\xc4\x85 z tym planem: '), '7': (7, 'Podaj czas (w sekundach) jak d\xc5\x82ugo uczy si\xc4\x99 tego planu: '), '8': (8, 'Podaj narz\xc4\x99dzie jakie b\xc4\x99dzie potrzebne do wykonania tego planu: ')}