PassageFooter.tw 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. :: PassageFooter
  2. /*<<if Story.has($here+'_after')>>
  3. <<include `$here+'_after'`>>
  4. <</if>>*/
  5. <<for _afterPassage range Story.lookup("tags", $here+'_after')>>
  6. <<run console.log('Included after-passage:',_afterPassage.title)>>
  7. <<include _afterPassage.title>>
  8. <</for>>
  9. <<if $pc and $pc.gameover>>
  10. <<done>>
  11. <<cla>>
  12. <<include 'gameover'>>
  13. <</cla>>
  14. <</done>>
  15. <<elseif $subpassage>>
  16. <<gt 'subpassage'>>
  17. <<elseif $isEventPassage>>
  18. <<set _menuDeactivated = true>>
  19. <<else>>
  20. <<if _tags.includes('indoors') or _tags.includes('outdoors')>>
  21. <<run $location.update(_thisMainPassage,$location_var[_thisMainPassage])>>
  22. <<set $menuReturnPassage = _thisMainPassage>>
  23. <<set _menuDeactivated = false>>
  24. <<if !_tags.includes('dynamicHousing') && $dynamicHousingRoom>>
  25. <<unset $dynamicHousingRoom>>
  26. <</if>>
  27. <<set _dynamicConnections = $housing.connectionsByFromPassage(_thisMainPassage)>>
  28. <<for _dynamicConnection range _dynamicConnections>>
  29. <<set _dynamicConnectionFlags = setup.mergeDeep({capture:['_dynamicConnection']},_dynamicConnection.flags??{})>>
  30. <<ConnectedLocation _dynamicConnection.label _dynamicConnection.toPassage _dynamicConnection.passageArg _dynamicConnection.image _dynamicConnection.time _dynamicConnectionFlags>>
  31. <</for>>
  32. <<set _workActions = $jobs.workActionsByLocation(_thisMainPassage)>>
  33. <<for _workAction range _workActions>>
  34. <<set _jobData = $jobs.jobData(_workAction)>>
  35. <<act `"Work ("+_jobData.title+")"` undefined `{capture:['_jobData']}`>>
  36. <<gt _jobData.workPassage>>
  37. <</act>>
  38. <</for>>
  39. <<if _tags.includes('outdoors') and _tags.includes('public')>>
  40. <<actCLA 'Wait'>>
  41. <<gs 'wait'>>
  42. <</actCLA>>
  43. <</if>>
  44. <<elseif _tags.includes('quest')>>
  45. <!-- This should be able to be returned to -->
  46. <<set _menuDeactivated = false>>
  47. <<set $menuReturnPassage = _thisMainPassage>>
  48. <<elseif _tags.includes('events') or _tags.includes('event') or _tags.includes('activity')>>
  49. <!-- This can't be returned to -->
  50. <<set _menuDeactivated = true>>
  51. <<elseif _tags.includes('menu')>>
  52. <<set _menuDeactivated = true>>
  53. <<else>>
  54. <<warn `"No valid tag settings in passage "+_thisMainPassage`>>
  55. <</if>>
  56. <<if _tags.includes('bathroom')>>
  57. <<include 'bathroom'>>
  58. <</if>>
  59. <<if _tags.includes('bedroom')>>
  60. <<include 'bedroom'>>
  61. <</if>>
  62. <<if _tags.includes('kitchen')>>
  63. <<include 'kitchen_generic'>>
  64. <</if>>
  65. <<if _tags.includes('car')>>
  66. <<gs 'VehiclePassages'>>
  67. <</if>>
  68. <<if _tags.includes('beach')>>
  69. <<gs 'beach'>>
  70. <</if>>
  71. <<if _tags.includes('tv_medium')>>
  72. <<act 'Watch TV'>><<gt 'TV' 'medium'>><</act>>
  73. <</if>>
  74. <<if _tags.includes('configurable')>>
  75. <<include 'configurable'>>
  76. <</if>>
  77. <<include 'generic_all'>>
  78. <<if $npc>>
  79. <<phoneReceivePendingCall>>
  80. <</if>>
  81. <</if>>
  82. <<debug>>
  83. Here: $location.passage ($location.region)
  84. <div id="callStack"></div>
  85. <<done>>
  86. <<tryReplace '#callStack'>>
  87. <h2>Callstack</h2>
  88. <table>
  89. <<for _i, _call range $callStack>>
  90. <tr>
  91. <td>_i:</td><td><<='&nbsp;'.repeat(_call[1]*10)>><<=_call[0].replace('_','&#95;')>></td>
  92. </tr>
  93. <</for>>
  94. </table>
  95. <</tryReplace>>
  96. <</done>>
  97. <</debug>>