Reward for Patreons!

Introduces alittle heart into chat, for the supporters!
This commit is contained in:
QuoteFox
2020-07-02 20:54:22 +01:00
parent 6837442a55
commit 49f8093b5b
9 changed files with 29 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ GLOBAL_VAR(restart_counter)
#endif
load_admins()
load_patreons()
LoadVerbs(/datum/verbs/menu)
if(CONFIG_GET(flag/usewhitelist))
load_whitelist()
+3
View File
@@ -206,6 +206,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/current_tab = 0
var/unlock_content = 0
var/vip = 0
var/list/ignoring = list()
@@ -244,6 +245,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
unlock_content = C.IsByondMember()
if(unlock_content)
max_save_slots = 16
if(clientckey in GLOB.patreons)
vip = 1
var/loaded_preferences_successfully = load_preferences()
if(loaded_preferences_successfully)
if(load_character())
+4
View File
@@ -56,9 +56,13 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
mob.log_talk(raw_msg, LOG_OOC, tag="(OOC)")
var/keyname = key
if(prefs.unlock_content)
if(prefs.toggles & MEMBER_PUBLIC)
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : GLOB.normal_ooc_colour]'>[icon2html('icons/member_content.dmi', world, "blag")][keyname]</font>"
if(prefs.vip) //patreon supporter!
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : GLOB.normal_ooc_colour]'>[icon2html('hyperstation/icons/chat/reward.dmi', world, "vip")] [keyname]</font>"
//The linkify span classes and linkify=TRUE below make ooc text get clickable chat href links if you pass in something resembling a url
for(var/client/C in GLOB.clients)
if(C.prefs.chat_toggles & CHAT_OOC)
+5
View File
@@ -0,0 +1,5 @@
//Patreon Supporters go here, and get a special little icon in OOC, Keep each name to one line
User1
User2
User3
@@ -0,0 +1,15 @@
#define PATREONFILE "[global.config.directory]/patreons.txt"
GLOBAL_LIST_EMPTY(patreons)
/proc/load_patreons()
GLOB.patreons = list()
for(var/line in world.file2list(PATREONFILE))
if(!line)
continue
GLOB.patreons += ckey(line)
/proc/check_patreons(var/ckey)
if(!GLOB.patreons)
return FALSE
. = (ckey in GLOB.patreons)
Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+1
View File
@@ -2889,6 +2889,7 @@
#include "hyperstation\code\modules\antagonists\werewolf\werewolf.dm"
#include "hyperstation\code\modules\clothing\head.dm"
#include "hyperstation\code\modules\crafting\recipes.dm"
#include "hyperstation\code\modules\patreon\patreon.dm"
#include "hyperstation\code\modules\resize\holder_micro.dm"
#include "hyperstation\code\modules\resize\resizing.dm"
#include "hyperstation\code\modules\resize\sizegun.dm"