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

durability.py
 
Provide data structure and functions for durability of items

 
Modules
       
auxiliary
char
gainlevel
hooks
mud
mudsys
olc
random
storage
utils

 
Classes
       
DurabilityData

 
class DurabilityData
    Data structure for durability.
 
  Methods defined here:
__init__(self, set=None)
Standard class constructor.
copy(self)
copyTo(self, to)
store(self)

 
Functions
       
__unload__()
things that need to be detached when the module is un/reloaded
check_dur(ch, obj)
Function check durability of object after using it. If object
durability = 0, destroy it.
check_dur_hook(info)
When thing was used, check if it was damaged or not.
chk_can_repair(ch, cmd)
cmd_repair(ch, cmd, arg)
Usage: reperuj <przedmiot>
 
Repair selected item.
dur_desc_info(info)
appends information about durability of object to the description
buffer when a person looks at it.
dur_to_proto(owner)
Save durability to file.
durolc_choice_exec(sock, data)
Edit durability
durolc_chooser(sock, data, option)
Choice option to change.
durolc_extend_menu(sock, data)
Show option in main menu
durolc_menu(sock, data)
Show durability of obiect.
durolc_parser(sock, owner, choice, arg)
Set new value for durablity

 
Data
        __DUROLC_DUR__ = 1
__DUROLC_MAT__ = 3
__DUROLC_MAXDUR__ = 2
durolc_opt_map = {'1': (1, 'Wprowad\xc5\xba obecn\xc4\x85 wytrzyma\xc5\x82o\xc5\x9b\xc4\x87: '), '2': (2, 'Wprowad\xc5\xba maksymaln\xc4\x85 wytrzyma\xc5\x82o\xc5\x9b\xc4\x87: '), '3': (3, 'Wybierz materia\xc5\x82 z kt\xc3\xb3rego wykonany jest obiekt: ')}
materials = ['z drewna', 'z \xc5\xbcelaza', 'ze stali', 'ze szk\xc5\x82a', 'z kamienia', 'ze sk\xc3\xb3ry', 'z materia\xc5\x82u', 'z gliny', 'z cia\xc5\x82a', 'z miedzi']