![]() This process is transparent to the user who only has to treat the above as normal python dictionaries.īelow I will do a quick rundown of the data expected in these dictionaries: >py print mapper.areaNamesMapĪbove stores. When the data in the dictionaries are created,updated or deleted, the changes are automatically updated to the C++ data structures. When a mud session is started, the C++ map data is used to populate the above python dictionaries. They are almost identical to the underlying C++ data structures used to store the map data. The above five dictionaries contain the data of a map. What happened to the other 45 methods you might wonder? They are replaced by the five dictionaries listed below: The python version only has 8 methods as opposed to the 52 in the Lua version. What the methods do should hopefully be apparent. searchRoom(room_name,dirs=None,color=None,desc=None).Where '>' is the prompt and 'py' is just an input alias I use to run python code, with the following script: exec matchesĬlasses start with a capital letter and methods and dictionaries with lowercase. 'mudlet_to_mapper_color_map', 'refresh', 'rooms', 'saveMap', 'searchRoom', 'customEnvColors', 'custom_color_map', 'envColors', 'getPath', 'mapLabels', '_module_', '_construct_name_hash', '_name_hash', 'areaNamesMap', 'centerview', ['AreaNamesMap', 'CommandList', 'CustomEnvColors', 'EnvColors', 'Labels', 'MapLabel', The map functions and data structures are contained in the Mapper class which is instantiated to the variable 'mapper': > py print mapper To reduce the number of functions to make using the mapper easier to use. ![]() The main aim of the current design is twofolds: The map implementation for Python is designed differently than to the Lua counterpart.
0 Comments
Leave a Reply. |