Skip to content

Commit

Permalink
A little bit of code cleaning, and release v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kakaroto committed Nov 27, 2020
1 parent 9215a66 commit 805c692
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
10 changes: 5 additions & 5 deletions app/js/theatre_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Hooks.on("preCreateChatMessage", function(chatData) {
chatData.speaker.actor = null;
chatData.speaker.scene = null;
}
chatData.type = 1;
chatData.type = CONST.CHAT_MESSAGE_TYPES.OOC;
return;
}

Expand All @@ -336,7 +336,7 @@ Hooks.on("preCreateChatMessage", function(chatData) {
chatData.speaker.actor = null;
chatData.speaker.scene = null;
//chatData.flags.theatreColor = theatreColor;
chatData.type = 2;
chatData.type = CONST.CHAT_MESSAGE_TYPES.IC;
// if delay emote is active
if (
Theatre.instance.isDelayEmote &&
Expand Down Expand Up @@ -366,7 +366,7 @@ Hooks.on("preCreateChatMessage", function(chatData) {
chatData.speaker.actor = null;
chatData.speaker.scene = null;
//chatData.flags.theatreColor = theatreColor;
chatData.type = 2;
chatData.type = CONST.CHAT_MESSAGE_TYPES.IC;
// if delay emote is active
if (
Theatre.instance.isDelayEmote &&
Expand All @@ -389,7 +389,7 @@ Hooks.on("preCreateChatMessage", function(chatData) {
chatData.speaker.alias = game.i18n.localize("Theatre.UI.Chat.Narrator");
chatData.speaker.actor = null;
chatData.speaker.scene = null;
chatData.type = 2;
chatData.type = CONST.CHAT_MESSAGE_TYPES.IC;
}
}
// alter message data
Expand Down Expand Up @@ -432,7 +432,7 @@ Hooks.on("createChatMessage", function(chatEntity, _, userId) {
chatData.content.startsWith("/") ||
chatData.roll ||
chatData.emote ||
chatData.type == 1 ||
chatData.type == CONST.CHAT_MESSAGE_TYPES.OOC ||
//|| Object.keys(chatData.speaker).length == 0
chatData.content.match(/@[a-zA-Z0-9]+\[[a-zA-Z0-9]+\]/) ||
chatData.content.match(/\<div.*\>[\s\S]*\<\/div\>/)
Expand Down
43 changes: 40 additions & 3 deletions app/templates/emote_menu.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
<div class="theatre-container-column"><div class="theatre-container-row textanims-box"><div class="theatre-container-column textflyin-box"><h2> {{localize "Theatre.Flyin.Label"}}</h2><div class="theatre-container-column no-scrollbar">{{#each textFlyin as |func key|}}<div class="theatre-text-box textanim no-scrollbar" name="{{key}}" otext="{{func.label}}">{{func.label}}</div>{{/each}}</div></div><div class="theatre-container-column textstanding-box"><h2>{{localize "Theatre.Standing.Label"}}</h2><div class="theatre-container-column no-scrollbar"><div class="theatre-text-box textanim no-scrollbar" name="none" otext="{{localize 'Theatre.Standing.None'}}">{{localize 'Theatre.Standing.None'}}</div>{{#each textStanding as |func key|}}<div class="theatre-text-box textanim no-scrollbar" name="{{key}}" otext="{{func.label}}">{{func.label}}</div>{{/each}}</div></div></div><div class="theatre-container-column emote-box"><div class="emotebar"><h2>{{localize "Theatre.Emote.Label"}}</h2><select class="fontselect" title="{{localize 'Theatre.UI.Title.FontType'}}">{{#each fonts as |font key|}}<option value="{{font}}" style="font-family: {{font}};"> {{font}}</option>{{/each}}</select><div class="sizeselect theatre-control-btn" title="{{localize 'Theatre.UI.Title.FontSize'}}"></div><input class="colorselect theatre-control-btn" type="color" value="#FFFFFF" data-edit="fontcolor" title="{{localize 'Theatre.UI.Title.FontColor'}}"/></div><div class="theatre-container-row theatre-container-tiles no-scrollbar">{{#each emotes as |em key|}}
{{#if em}}<div class="emote" name="{{em.name}}" title="{{em.label}}">{{#if em.image}}<img src="{{em.image}}" draggable="false"/>{{else}}<i class="{{em.fatype}} {{em.faname}}"></i>{{/if}}</div>{{/if}}
{{/each}}</div></div></div>
<div class="theatre-container-column">
<div class="theatre-container-row textanims-box">
<div class="theatre-container-column textflyin-box">
<h2> {{localize "Theatre.Flyin.Label"}}</h2>
<div class="theatre-container-column no-scrollbar">{{#each textFlyin as |func key|}}
<div class="theatre-text-box textanim no-scrollbar" name="{{key}}" otext="{{func.label}}">
{{func.label}}</div>
{{/each}}</div>
</div>
<div class="theatre-container-column textstanding-box">
<h2>{{localize "Theatre.Standing.Label"}}</h2>
<div class="theatre-container-column no-scrollbar">
<div class="theatre-text-box textanim no-scrollbar" name="none"
otext="{{localize 'Theatre.Standing.None'}}">{{localize 'Theatre.Standing.None'}}</div>
{{#each textStanding as |func key|}}
<div class="theatre-text-box textanim no-scrollbar" name="{{key}}" otext="{{func.label}}">
{{func.label}}</div>
{{/each}}
</div>
</div>
</div>
<div class="theatre-container-column emote-box">
<div class="emotebar">
<h2>{{localize "Theatre.Emote.Label"}}</h2><select class="fontselect"
title="{{localize 'Theatre.UI.Title.FontType'}}">{{#each fonts as |font key|}}
<option value="{{font}}" style="font-family: {{font}};"> {{font}}</option>
{{/each}}</select>
<div class="sizeselect theatre-control-btn" title="{{localize 'Theatre.UI.Title.FontSize'}}"></div><input
class="colorselect theatre-control-btn" type="color" value="#FFFFFF" data-edit="fontcolor"
title="{{localize 'Theatre.UI.Title.FontColor'}}" />
</div>
<div class="theatre-container-row theatre-container-tiles no-scrollbar">{{#each emotes as |em key|}}
{{#if em}}
<div class="emote" name="{{em.name}}" title="{{em.label}}">{{#if em.image}}<img src="{{em.image}}"
draggable="false" />
{{else}}<i class="{{em.fatype}} {{em.faname}}"></i>{{/if}}</div>
{{/if}}
{{/each}}</div>
</div>
</div>
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "theatre",
"title": "Theatre Inserts",
"description": "Theater Inserts with a visual novel style made for heavy roleplay scenes",
"version": "1.1.0",
"version": "1.1.1",
"author": "Ken L, Noah Zorbaugh, U~man, KaKaRoTo",
"socket": true,
"languages": [
Expand Down Expand Up @@ -54,7 +54,7 @@
"styles" : ["app/css/theatre.css"],
"packs": [],
"url" : "https://github.com/kakaroto/fvtt-module-theatre",
"download" : "https://github.com/kakaroto/fvtt-module-theatre/releases/download/v1.1.0/theatre.zip",
"download" : "https://github.com/kakaroto/fvtt-module-theatre/releases/download/v1.1.1/theatre.zip",
"manifest" : "https://github.com/kakaroto/fvtt-module-theatre/releases/download/latest/module.json",
"minimumCoreVersion": "0.7.7",
"compatibleCoreVersion": "0.8.0"
Expand Down

0 comments on commit 805c692

Please sign in to comment.