~hokiegeek/tw5-thousand-year-old-vampire-rpg

534ec5dcf9da356c5fccea93233233be75645ee2 — HokieGeek 4 months ago 9fd8942 main 0.6.0
Initial implementation of skills
M plugin.info => plugin.info +1 -1
@@ 2,7 2,7 @@
    "title": "$:/plugins/hokiegeek/thousand-year-old-vampire-rpg",
    "description": "Some templates and stuff for recording plays of the Thousand Year Old Vampire RPG",
    "author": "hokiegeek",
    "version": "0.5.0",
    "version": "0.6.0",
    "core-version": ">=5.2.1",
    "source": "https://git.sr.ht/~hokiegeek/tw5-thousand-year-old-vampire-rpg",
    "plugin-type": "plugin",

M resources/view-resources-available.tid => resources/view-resources-available.tid +1 -1
@@ 6,6 6,6 @@ tags: ThousandYearOldVampire
type: text/vnd.tiddlywiki
caption: Available

<$list filter="[tag[ThousandYearOldVampire]tag<currentTiddler>tag[resource]!tag[lost]sort[resource-num]]" emptyMessage="game over!">
<$list filter="[tag[ThousandYearOldVampire]tag<currentTiddler>tag[resource]!tag[lost]sort[resource-num]]" emptyMessage="you have nothing left">
<$transclude tiddler="$:/plugins/hokiegeek/thousand-year-old-vampire/template/resources/resource" mode="block" />
</$list>

A skills/template-skill.tid => skills/template-skill.tid +57 -0
@@ 0,0 1,57 @@
modified: 20220209200910000
created: 20220209200910000
creator: hokiegeek
title: $:/plugins/hokiegeek/thousand-year-old-vampire/template/skills/skill
tags: ThousandYearOldVampire
type: text/vnd.tiddlywiki

<!--
- Skills
  * Can be 'checked' (used)
  * Can be lost
-->
<style>
.used {
    /* text-decoration: line-through; */
    opacity: .6;
    font-size: .95em;
}
</style>
<$let isused={{{ [is[current]tag[used]then[yes]else[no]] }}}
      islost={{{ [is[current]tag[lost]then[yes]else[no]] }}}>
<$reveal type="match" default=<<islost>> text="no">
<$fieldmangler>
<$reveal type="match" default=<<isused>> text="no">
<$button tooltip="use" aria-label="use" message="tm-add-tag" param="used" class=<<tv-config-toolbar-class>>>
    {{$:/core/images/done-button}}
</$button>
</$reveal>
<$reveal type="match" default=<<isimmortal>> text="yes" style="font-size: 1.2rem;">
&#8734;
</$reveal>
<$button tooltip="lose" aria-label="lose" message="tm-add-tag" param="lost" class=<<tv-config-toolbar-class>>>
    {{$:/core/images/erase}}
</$button>
</$fieldmangler>
<$reveal type="match" default=<<isused>> text="no">
<$button tooltip="edit" aria-label="edit" message="tm-edit-tiddler" param=<<currentTiddler>> class=<<tv-config-toolbar-class>> style="margin-right: 5px;">
    {{$:/core/images/edit-button}}
</$button>
</$reveal>
</$reveal>
<$reveal type="match" default=<<islost>> text="yes">
<$fieldmangler>
<$button tooltip="recovered" aria-label="recovered" message="tm-remove-tag" param="lost" class=<<tv-config-toolbar-class>>>
    {{$:/core/images/refresh-button}}
</$button>
</$fieldmangler>
</$reveal>
</$let>
<span class={{{ [is[current]tag[used]then[used]] }}}>
<$reveal type="match" default={{!!text}} text="">
hidden skill #<$view field="skill-num" />
</$reveal>
<$transclude />
</span>
<$let skill-class={{{ [is[current]tag[used]then[used]] }}}>
</$let>

A skills/view-skills-available.tid => skills/view-skills-available.tid +12 -0
@@ 0,0 1,12 @@
modified: 20220209201434000
created: 20220209201434000
creator: hokiegeek
title: $:/plugins/hokiegeek/thousand-year-old-vampire/templates/skills/available
tags: ThousandYearOldVampire
type: text/vnd.tiddlywiki
caption: Can and might do

<$list filter="[tag[ThousandYearOldVampire]tag<currentTiddler>tag[skill]!tag[lost]sort[skill-num]]" emptyMessage="there is nothing you can do">
<$transclude tiddler="$:/plugins/hokiegeek/thousand-year-old-vampire/template/skills/skill" mode="block" />
</$list>


A skills/view-skills-lost.tid => skills/view-skills-lost.tid +12 -0
@@ 0,0 1,12 @@
modified: 20220209200812000
created: 20220209200812000
creator: hokiegeek
title: $:/plugins/hokiegeek/thousand-year-old-vampire/templates/skills/lost
tags: ThousandYearOldVampire
type: text/vnd.tiddlywiki
caption: Lost

<$list filter="[tag[ThousandYearOldVampire]tag<currentTiddler>tag[skill]tag[lost]sort[skill-num]]" emptyMessage="nothing has been lost">
<$transclude tiddler="$:/plugins/hokiegeek/thousand-year-old-vampire/template/skills/skill" mode="block" />
</$list>


M view-vampire.tid => view-vampire.tid +3 -1
@@ 101,7 101,9 @@ used:
</$fieldmangler>

-->
<<list-links filter:"[tag[ThousandYearOldVampire]tag[skill]tag{!!title}]" emptyMessage:"none yet">>
<$let tabstate={{{ [{!!title}addprefix[$:/state/thousand-year-old-vampire/tabs/skills/]] }}}>
<$macrocall $name="tabs" tabsList="$:/plugins/hokiegeek/thousand-year-old-vampire/templates/skills/available $:/plugins/hokiegeek/thousand-year-old-vampire/templates/skills/lost" default="$:/plugins/hokiegeek/thousand-year-old-vampire/templates/skills/available" state=<<tabstate>> />
</$let>

<<traitHeader "Resources" "resource">>
<$let tabstate={{{ [{!!title}addprefix[$:/state/thousand-year-old-vampire/tabs/resources/]] }}}>