12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- :: moodletTest[test]
- <<set $pc.mood = 48>>
- :: moodletWidgets[widget]
- <<widget 'mood'>>
- <<set _moodletId = _args[0]>>
- <<set _moodletTimeIncrease = _args[1]>>
- <<if _moodletTimeIncrease > 0>>
- <<run $pc.moodletIncTime(_moodletId,_moodletTimeIncrease)>><!-- Make sure that this moodlet does not detoriate -->
- <<addtime _moodletTimeIncrease>>
- <<else>>
- <<set _moodletTimeIncrease = Math.abs(_moodletTimeIncrease)>>
- <</if>>
- <<run $pc.moodletApplyById(_moodletId,_moodletTimeIncrease)>>
- <<set _moodletData = setup.getMoodlet(_moodletId)>>
- <<set _moodletGroupData = setup.getMoodletGroup(_moodletData.group ?? 'none')>>
- <<set _moodletStyleClass="moodlet">>
- <<if _moodletData.effect == 0>>
- <<set _moodletStyleClass+=" neutral">>
- <<elseif _moodletData.effect < 0>>
- <<set _moodletStyleClass+=" negative">>
- <<else>>
- <<set _moodletStyleClass+=" positive">>
- <</if>>
- <div @class="_moodletStyleClass">
- <span class="effectStrength"><<if _moodletData.effect > 0>>+<</if>>_moodletData.effect</span>
- <span class="title">_moodletData.title</span>
- <span class="description">_moodletData.description</span>
- <span class="symbols">
- <<switch _moodletGroupData.accumulationMode>>
- <<case setup.moodletAccumulationMode.HIGHEST>>
- <<textWithTooltip "🔝">>
- <h3>Top only</h3>
- This mood effect is part of a group where only the strongest positive effect is applied.
- For example, if you watch TV on a bad TV and then on a good TV, only the stronger effect of the good TV is applied (the weak effect might still be in effect after the stronger ended, though).
- <</textWithTooltip>>
- <<case setup.moodletAccumulationMode.LOWEST>>
- <<textWithTooltip "🔝">>
- <h3>Top only</h3>
- This mood effect is part of a group where only the strongest negative effect is applied.
- For example, being insulted is not taken into account if you are also bullied.
- <</textWithTooltip>>
- <<case setup.moodletAccumulationMode.DIMINISHING>>
- <<textWithTooltip "🔼">>
- <h3>Diminishing return on investment</h3>
- This mood effect is part of a group where the strongest effect is taken into full account, while all other effects have reduced effects.
- For example, in the group <i>Candy</i>, eating chocolate gives you the same mood bonus as eating cake. Eating both gives you the bonus of eating chocolate and 50% of the effect of eating cake.
- <</textWithTooltip>>
- <<case setup.moodletAccumulationMode.ADD>>
- <<textWithTooltip "🔃">>
- <h3>Summed up effect</h3>
- This mood effect is part of a group where all effects are summed up.
- This is usually the case for effects which have very little in common with other effects.
- <</textWithTooltip>>
- <</switch>>
- <<switch _moodletData.timeMode>>
- <<case 0>>
- <<textWithTooltip "🔁">>
- <h3>Repeatable</h3>
- This mood effect can be gained multiple times. This will increase the time it is active, up to a maximum number of minutes.
- For example, you can make the effect of watching TV last longer by watching more TV.
- <</textWithTooltip>>
- <<case 1>>
- <<textWithTooltip "🔂">>
- <h3>Resetting</h3>
- When this mood effect is gained, it resets the time it is active.
- For example, the effect of gaining a compliment lasts for 4 hours. If you get another compliment 2 hours after you got the first one, the effect will last for 6 hours (2 of the first and 4 of the second compliment).
- <</textWithTooltip>>
- <<case 2>>
- <<textWithTooltip "🔚">>
- <h3>Lasting</h3>
- This mood effect will last until canceled. Depending on the effect, this might be an interaction with a NPC, sleeping for a specified amount of time, random chance or anything else.
- <</textWithTooltip>>
- <</switch>>
- </span>
- </div>
- <</widget>>
|