Merge pull request #11017 from Couls/toggle-karma-hotfix

Toggle Karma Hotfix
This commit is contained in:
variableundefined
2019-03-11 08:39:58 +08:00
committed by GitHub
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -383,6 +383,9 @@
if(prefs.toggles & DISABLE_KARMA) // activates if karma is disabled
if(establish_db_connection())
to_chat(src,"<span class='notice'>You have disabled karma gains.") // reminds those who have it disabled
else
if(establish_db_connection())
to_chat(src,"<span class='notice'>You have enabled karma gains.")
if(!void)
void = new()
@@ -224,10 +224,10 @@
set name = "Toggle Karma Gains"
set category = "Special Verbs"
set desc = "This button will allow you to stop other people giving you karma."
if (prefs.toggles & DISABLE_KARMA)
prefs.toggles ^= DISABLE_KARMA
prefs.save_preferences(src)
if(prefs.toggles & DISABLE_KARMA)
to_chat(usr, "<span class='notice'>You have disabled karma gains.")
else
to_chat(usr, "<span class='notice'>You have enabled karma gains.")
prefs.toggles ^= DISABLE_KARMA
prefs.save_preferences(src)
return