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

ranged.py
 
Ranged weapons and ammunitons items types.

 
Modules
       
auxiliary
hooks
mud
mudsock
mudsys
olc
storage
utils

 
Classes
       
AmmoData
RangedData

 
class AmmoData
    Data for ammunition for ranged weapons.
 
  Methods defined here:
__init__(self, set=None)
Standard class constructor.
copy(self)
copyTo(self, to)
store(self)

Data and other attributes defined here:
__item_type__ = 'ammo'

 
class RangedData
    Data for ranged weapons.
 
  Methods defined here:
__init__(self, set=None)
Standard class constructor.
copy(self)
copyTo(self, to)
store(self)

Data and other attributes defined here:
__item_type__ = 'ranged'

 
Functions
       
__unload__()
remove all hooks.
ammo_desc_info(info)
appends ammo informations about an object to the description buffer when
person looks at it.
ammo_manip(ch, uid, type='')
If uid is 0, return ammunition or gunpowder, otherwise reset hidden value
for item.
ammoolc_chooser(sock, data, option)
figure out what we want to edit and display a prompt.
ammoolc_menu(sock, data)
display our menu interface.
ammoolc_parser(sock, data, choice, arg)
parse out what we want to change at specified field to
ammoolc_to_proto(data)
return a script that will generate relevant info to create this item
cmd_load(ch, cmd, arg)
Usage: zaladuj [pocisk] [z] [pojemnik]
 
Load ranged weapon in hand with selected ammo. If no ammo specified, get first
from inventory.
ranged_desc_info(info)
appends ranged weapon informations about an object to the description
buffer when person looks at it.
ranged_load_hook(info)
Send informations about loaded weapon.
ranged_unequip_hook(info)
Check if we try unequip loaded ranged weapon. If yes, unload it or stop
loading.
rangedolc_chooser(sock, data, option)
figure out what field we want to edit and display a prompt.
rangedolc_menu(sock, data)
display our menu interface.
rangedolc_parser(sock, data, choice, arg)
parse out what we want to change at specified field to.
rangedolc_to_proto(data)
return a script that will generate relevant info to create this item.

 
Data
        __AMMOOLC_DAMAGE__ = 3
__AMMOOLC_SUBTYPE__ = 2
__AMMOOLC_TYPE__ = 1
__RANGEDOLC_AMMO__ = 2
__RANGEDOLC_GUNPOWDER__ = 3
__RANGEDOLC_PREPARE__ = 1
__RANGEDOLC_SKILL__ = 4
ammo_subtypes = ['impaling', 'cut', 'crush']
ammo_types = ['strza\xc5\x82a', 'be\xc5\x82t', 'kula', 'strza\xc5\x82ka', 'pocisk']
ammoolc_opt_map = {'1': (1, 'Wybierz typ: '), '2': (2, 'Wybierz podtyp: '), '3': (3, 'Wprowad\xc5\xba zadawane obra\xc5\xbcenia: ')}
rangedolc_opt_map = {'1': (1, 'Wprowad\xc5\xba czas \xc5\x82adowania w sek: '), '2': (2, 'Wybierz rodzaj amunicji: '), '3': (3, ''), '4': (4, 'Wprowad\xc5\xba umiej\xc4\x99tno\xc5\x9b\xc4\x87: ')}