Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
Curse command
lockdown as optin
secret no ooc
  • Loading branch information
Ace committed Aug 27, 2020
1 parent f38f6b9 commit 6b957c4
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Curse/Checks/SelfMessageCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function SelfMessageCheck(msg) {
// Gagged OOC
if (
cursedConfig.hasBlockedOOC && cursedConfig.hasIntenseVersion
&& isNormalMsg
&& !Player.CanTalk() && originalMsg.includes("(")
&& (isNormalMsg || cursedConfig.secretNoOOC)
&& !Player.CanTalk() && (originalMsg.includes("(") || (cursedConfig.secretNoOOC && isWhisper))
) {
NotifyOwners({ Tag: "SelfMsgCheckNotifyGagOOC" });
popChatSilent({ Tag: "SelfMsgCheckWearerWarnGagOOC" });
Expand Down
2 changes: 1 addition & 1 deletion Curse/Constants/CursedConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function InitCursedConfig() {
hasFullCurse: false,
disabledCommands: [],
optinCommands: [
{ command: "forcedsay", isEnabled: false }, { command: "disableblocking", isEnabled: false }
{ command: "asylumlockdown", isEnabled: false }, { command: "forcedsay", isEnabled: false }, { command: "disableblocking", isEnabled: false }
],
chatlog: [],
savedSilent: [],
Expand Down
12 changes: 12 additions & 0 deletions Curse/Room/CommandsV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,18 @@ const CommonCommands = [
* @type {ICommand[]}
*/
const AdditionalCommands = [
{
Tag: 'curse',
Description: ', open curse setting screen',
Prerequisite: () => window.cursedConfig != null,
Action: () => {
document.getElementById("InputChat").style.display = "none";
document.getElementById("TextAreaChatLog").style.display = "none";
CursePreferenceRun();
CurrentScreen = "CursePreference";
CursePreferenceReturnRoom = "ChatRoom";
}
},
{
Tag: 'logoff',
Description: ', disconnect from server',
Expand Down
11 changes: 8 additions & 3 deletions Curse/Room/CursePreference.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ var CursePreferenceMainLoaded = false;
var CursePreferenceErrorMessage = null;
var CursePreferenceErrorMessageTime = null;
var CursePreferenceCurrentTip = "";
var CursePreferenceReturnRoom = "CurseRoom";

//////////////////////////////////////////////////////////////////MAIN
// Validates updated data
Expand Down Expand Up @@ -256,14 +257,18 @@ function CursePreferenceUnload() {
// When the user exit the preference screen, we save all valid info or block with error message
function CursePreferenceExit() {
if (cursedConfig) {
CursePreferenceUnload();
cursedConfig = { ...CursePreferenceTemporaryConfig };
SaveConfigs();
DrawCustomBeepText("Curse data saved.");
}
CursePreferenceUnload();
CursePreferenceTemporaryConfig = null;
CurseRoomRun();
CurrentScreen = "CurseRoom";
if (CursePreferenceReturnRoom == "CurseRoom") {
CurseRoomRun();
CurrentScreen = "CurseRoom";
} else {
CommonSetScreen("Online", "ChatRoom");
}
}


Expand Down
2 changes: 2 additions & 0 deletions Curse/Room/CurseRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function CurseRoomClick() {
if (MouseIn(1885, 265, 90, 90)) {
CursePreferenceRun();
CurrentScreen = "CursePreference";
CursePreferenceReturnRoom = "CurseRoom";
}
}

Expand Down Expand Up @@ -199,6 +200,7 @@ async function CurseRoomCursedInfo() {
DialogLeave();
CursePreferenceRun();
CurrentScreen = "CursePreference";
CursePreferenceReturnRoom = "CurseRoom";
}

function CurseRoomEyeGlow() {
Expand Down

0 comments on commit 6b957c4

Please sign in to comment.