movement.html 5.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: movement</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>movement</strong></big></big></font></td
  8. ><td align=right valign=bottom
  9. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/hollis/Desktop/nakedmud/lib/pymodules/movement.py">/Users/hollis/Desktop/nakedmud/lib/pymodules/movement.py</a></font></td></tr></table>
  10. <p><tt>movement.py<br>
  11. &nbsp;<br>
  12. all&nbsp;of&nbsp;the&nbsp;functions&nbsp;concerned&nbsp;with&nbsp;movement&nbsp;and&nbsp;position&nbsp;change</tt></p>
  13. <p>
  14. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  15. <tr bgcolor="#aa55cc">
  16. <td colspan=3 valign=bottom>&nbsp;<br>
  17. <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
  18. <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  19. <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hooks.html">hooks</a><br>
  20. </td><td width="25%" valign=top><a href="inform.html">inform</a><br>
  21. </td><td width="25%" valign=top><a href="mud.html">mud</a><br>
  22. </td><td width="25%" valign=top><a href="mudsys.html">mudsys</a><br>
  23. </td></tr></table></td></tr></table><p>
  24. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  25. <tr bgcolor="#eeaa77">
  26. <td colspan=3 valign=bottom>&nbsp;<br>
  27. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  28. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  29. <td width="100%"><dl><dt><a name="-chk_can_move"><strong>chk_can_move</strong></a>(ch, cmd)</dt></dl>
  30. <dl><dt><a name="-chk_land"><strong>chk_land</strong></a>(ch, cmd)</dt></dl>
  31. <dl><dt><a name="-chk_sit"><strong>chk_sit</strong></a>(ch, cmd)</dt></dl>
  32. <dl><dt><a name="-chk_sleep"><strong>chk_sleep</strong></a>(ch, cmd)</dt></dl>
  33. <dl><dt><a name="-chk_stand"><strong>chk_stand</strong></a>(ch, cmd)</dt></dl>
  34. <dl><dt><a name="-chk_wake"><strong>chk_wake</strong></a>(ch, cmd)</dt></dl>
  35. <dl><dt><a name="-cmd_move"><strong>cmd_move</strong></a>(ch, cmd, arg)</dt><dd><tt>A&nbsp;basic&nbsp;movement&nbsp;command,&nbsp;relocating&nbsp;you&nbsp;to&nbsp;another&nbsp;room&nbsp;in&nbsp;the<br>
  36. specified&nbsp;direction.</tt></dd></dl>
  37. <dl><dt><a name="-cmd_sit"><strong>cmd_sit</strong></a>(ch, cmd, arg)</dt><dd><tt>If&nbsp;standing,&nbsp;attempts&nbsp;to&nbsp;sit&nbsp;on&nbsp;the&nbsp;ground.</tt></dd></dl>
  38. <dl><dt><a name="-cmd_sleep"><strong>cmd_sleep</strong></a>(ch, cmd, arg)</dt><dd><tt>If&nbsp;awake,&nbsp;attempts&nbsp;to&nbsp;lay&nbsp;down&nbsp;and&nbsp;sleep.</tt></dd></dl>
  39. <dl><dt><a name="-cmd_stand"><strong>cmd_stand</strong></a>(ch, cmd, arg)</dt><dd><tt>If&nbsp;sitting,&nbsp;attempts&nbsp;to&nbsp;stand.&nbsp;If&nbsp;flying,&nbsp;attempts&nbsp;to&nbsp;land.</tt></dd></dl>
  40. <dl><dt><a name="-cmd_wake"><strong>cmd_wake</strong></a>(ch, cmd, arg)</dt><dd><tt>If&nbsp;sleep,&nbsp;attempts&nbsp;to&nbsp;wake&nbsp;up&nbsp;and&nbsp;sit.</tt></dd></dl>
  41. <dl><dt><a name="-dir_index"><strong>dir_index</strong></a>(dir)</dt><dd><tt>returns&nbsp;the&nbsp;index&nbsp;of&nbsp;the&nbsp;direction&nbsp;name</tt></dd></dl>
  42. <dl><dt><a name="-dir_opposite"><strong>dir_opposite</strong></a>(dir)</dt><dd><tt>returns&nbsp;the&nbsp;opposite&nbsp;direction&nbsp;of&nbsp;the&nbsp;specified&nbsp;one,&nbsp;or&nbsp;None&nbsp;if&nbsp;none.</tt></dd></dl>
  43. <dl><dt><a name="-try_change_pos"><strong>try_change_pos</strong></a>(ch, pos)</dt><dd><tt>this&nbsp;function&nbsp;attempts&nbsp;to&nbsp;change&nbsp;the&nbsp;position&nbsp;of&nbsp;the&nbsp;person</tt></dd></dl>
  44. <dl><dt><a name="-try_move"><strong>try_move</strong></a>(ch, dir, mssg<font color="#909090">=False</font>)</dt><dd><tt>Handles&nbsp;all&nbsp;moving&nbsp;of&nbsp;characters&nbsp;from&nbsp;one&nbsp;room&nbsp;to&nbsp;another,&nbsp;through<br>
  45. commands.&nbsp;Attempts&nbsp;a&nbsp;move.&nbsp;If&nbsp;successful,&nbsp;returns&nbsp;the&nbsp;exit&nbsp;left<br>
  46. through.</tt></dd></dl>
  47. <dl><dt><a name="-try_move_mssg"><strong>try_move_mssg</strong></a>(ch, dir)</dt><dd><tt>Handles&nbsp;all&nbsp;moving&nbsp;of&nbsp;characters&nbsp;from&nbsp;one&nbsp;room&nbsp;to&nbsp;another,&nbsp;through<br>
  48. commands.&nbsp;Attempts&nbsp;a&nbsp;move.&nbsp;If&nbsp;successful,&nbsp;returns&nbsp;the&nbsp;exit&nbsp;left&nbsp;through.<br>
  49. Informs&nbsp;people&nbsp;of&nbsp;our&nbsp;moving</tt></dd></dl>
  50. <dl><dt><a name="-try_use_furniture"><strong>try_use_furniture</strong></a>(ch, obj, pos)</dt><dd><tt>attempts&nbsp;to&nbsp;resituate&nbsp;a&nbsp;person&nbsp;on&nbsp;the&nbsp;piece&nbsp;of&nbsp;furniture</tt></dd></dl>
  51. </td></tr></table><p>
  52. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  53. <tr bgcolor="#55aa55">
  54. <td colspan=3 valign=bottom>&nbsp;<br>
  55. <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
  56. <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  57. <td width="100%"><strong>cmd</strong> = 'se'<br>
  58. <strong>dir_abbr</strong> = ['n', 'e', 's', 'w', 'ne', 'nw', 'sw', 'se', 'u', 'd']<br>
  59. <strong>dir_name</strong> = ['north', 'east', 'south', 'west', 'northeast', 'northwest', 'southwest', 'southeast', 'up', 'down']<br>
  60. <strong>dir_opp</strong> = [2, 3, 0, 1, 6, 7, 4, 5, 9, 8]<br>
  61. <strong>pos_act</strong> = ['collapse', 'sleep', 'sit', 'stand', 'fly']<br>
  62. <strong>positions</strong> = ['unconscious', 'sleeping', 'sitting', 'standing', 'flying']</td></tr></table>
  63. </body></html>