mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Re-adds metadata support.
Adds ghost sight as its own verb to see all emotes in the world. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3419 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -33,6 +33,7 @@
|
|||||||
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
|
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
|
||||||
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
|
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
|
||||||
var/Tensioner_Active = 0 // If the tensioner is running.
|
var/Tensioner_Active = 0 // If the tensioner is running.
|
||||||
|
var/allow_Metadata = 0 // Metadata is suported.
|
||||||
|
|
||||||
var/list/mode_names = list()
|
var/list/mode_names = list()
|
||||||
var/list/modes = list() // allowed modes
|
var/list/modes = list() // allowed modes
|
||||||
@@ -230,6 +231,9 @@
|
|||||||
if ("feature_object_spell_system")
|
if ("feature_object_spell_system")
|
||||||
config.feature_object_spell_system = 1
|
config.feature_object_spell_system = 1
|
||||||
|
|
||||||
|
if ("allow_metadata")
|
||||||
|
config.allow_Metadata = 1
|
||||||
|
|
||||||
if ("traitor_scaling")
|
if ("traitor_scaling")
|
||||||
config.traitor_scaling = 1
|
config.traitor_scaling = 1
|
||||||
|
|
||||||
|
|||||||
@@ -467,15 +467,17 @@
|
|||||||
if (message)
|
if (message)
|
||||||
log_emote("[name]/[key] : [message]")
|
log_emote("[name]/[key] : [message]")
|
||||||
|
|
||||||
/* Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||||
|
// Maybe some people are okay with that.
|
||||||
|
|
||||||
for(var/mob/M in world)
|
for(var/mob/M in world)
|
||||||
if (!M.client)
|
if (!M.client)
|
||||||
continue //skip monkeys and leavers
|
continue //skip monkeys and leavers
|
||||||
if (istype(M, /mob/new_player))
|
if (istype(M, /mob/new_player))
|
||||||
continue
|
continue
|
||||||
if(M.stat == 2 && M.client.ghost_ears && !(M in viewers(src,null)))
|
if(M.stat == 2 && M.client.ghost_sight && !(M in viewers(src,null)))
|
||||||
M.show_message(message)
|
M.show_message(message)
|
||||||
*/
|
|
||||||
|
|
||||||
if (m_type & 1)
|
if (m_type & 1)
|
||||||
for (var/mob/O in viewers(src, null))
|
for (var/mob/O in viewers(src, null))
|
||||||
|
|||||||
@@ -489,6 +489,19 @@
|
|||||||
else
|
else
|
||||||
usr << "\blue Now you hear speech only from nearest creatures."
|
usr << "\blue Now you hear speech only from nearest creatures."
|
||||||
|
|
||||||
|
/client/var/ghost_sight = 1
|
||||||
|
/client/verb/toggle_ghost_sight()
|
||||||
|
set name = "Ghost sight"
|
||||||
|
set category = "OOC"
|
||||||
|
set desc = "Hear emotes from everywhere"
|
||||||
|
ghost_sight = !ghost_sight
|
||||||
|
if (ghost_sight)
|
||||||
|
usr << "\blue Now you hear all emotes in the world"
|
||||||
|
else
|
||||||
|
usr << "\blue Now you hear emotes only from nearest creatures."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/verb/observe()
|
/mob/verb/observe()
|
||||||
set name = "Observe"
|
set name = "Observe"
|
||||||
set category = "OOC"
|
set category = "OOC"
|
||||||
@@ -1145,4 +1158,30 @@ note dizziness decrements automatically in the mob's Life() proc.
|
|||||||
for(var/file in args)
|
for(var/file in args)
|
||||||
src << browse_rsc(file)
|
src << browse_rsc(file)
|
||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/verb/Examine_OOC()
|
||||||
|
set name = "Examine Meta-Info (OOC)"
|
||||||
|
set category = "OOC"
|
||||||
|
set src in view()
|
||||||
|
|
||||||
|
|
||||||
|
if(config.allow_Metadata)
|
||||||
|
usr << "[src]'s Metainfo:"
|
||||||
|
|
||||||
|
if(src.storedpreferences)
|
||||||
|
usr << "[src]'s OOC Notes: [src.storedpreferences.metadata]"
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
usr << "[src] does not have any stored infomation!"
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
usr << "OOC Metadata is not supported by this server!"
|
||||||
|
|
||||||
|
return
|
||||||
@@ -58,6 +58,7 @@ datum/preferences
|
|||||||
midis = 1
|
midis = 1
|
||||||
//Toggle ghost ears
|
//Toggle ghost ears
|
||||||
ghost_ears = 1
|
ghost_ears = 1
|
||||||
|
ghost_sight = 1
|
||||||
//Saved changlog filesize to detect if there was a change
|
//Saved changlog filesize to detect if there was a change
|
||||||
lastchangelog = 0
|
lastchangelog = 0
|
||||||
|
|
||||||
@@ -113,6 +114,9 @@ datum/preferences
|
|||||||
job_engsec_med = 0
|
job_engsec_med = 0
|
||||||
job_engsec_low = 0
|
job_engsec_low = 0
|
||||||
|
|
||||||
|
// OOC Metadata:
|
||||||
|
metadata = ""
|
||||||
|
|
||||||
|
|
||||||
New()
|
New()
|
||||||
hair_style = new/datum/sprite_accessory/hair/short
|
hair_style = new/datum/sprite_accessory/hair/short
|
||||||
@@ -139,6 +143,10 @@ datum/preferences
|
|||||||
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == UI_NEW ? "New" : "Old"]</b></a><br>"
|
dat += "<b>UI Style:</b> <a href=\"byond://?src=\ref[user];preferences=1;UI=input\"><b>[UI == UI_NEW ? "New" : "Old"]</b></a><br>"
|
||||||
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
|
dat += "<b>Play admin midis:</b> <a href=\"byond://?src=\ref[user];preferences=1;midis=input\"><b>[midis == 1 ? "Yes" : "No"]</b></a><br>"
|
||||||
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_ears=input\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
dat += "<b>Ghost ears:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_ears=input\"><b>[ghost_ears == 0 ? "Nearest Creatures" : "All Speech"]</b></a><br>"
|
||||||
|
dat += "<b>Ghost sight:</b> <a href=\"byond://?src=\ref[user];preferences=1;ghost_sight=input\"><b>[ghost_sight == 0 ? "Nearest Creatures" : "All Emotes"]</b></a><br>"
|
||||||
|
|
||||||
|
if(config.allow_Metadata)
|
||||||
|
dat += "<b>OOC Notes/ERP Preferences:</b> <a href='byond://?src=\ref[user];preferences=1;OOC=input'> Edit </a><br>"
|
||||||
|
|
||||||
if((user.client) && (user.client.holder) && (user.client.holder.rank) && (user.client.holder.level >= 5))
|
if((user.client) && (user.client.holder) && (user.client.holder.rank) && (user.client.holder.level >= 5))
|
||||||
dat += "<hr><b>OOC</b><br>"
|
dat += "<hr><b>OOC</b><br>"
|
||||||
@@ -419,6 +427,23 @@ datum/preferences
|
|||||||
if("random")
|
if("random")
|
||||||
age = rand (20, 45)
|
age = rand (20, 45)
|
||||||
|
|
||||||
|
if(link_tags["OOC"])
|
||||||
|
var/tempnote = ""
|
||||||
|
tempnote = input(user, "Please enter your OOC/ERP Notes!:", "OOC notes" , metadata) as text
|
||||||
|
var/list/bad_characters = list("_", "\"", "<", ">", ";", "\[", "\]", "{", "}", "|", "\\","0","1","2","3","4","5","6","7","8","9")
|
||||||
|
|
||||||
|
for(var/c in bad_characters)
|
||||||
|
tempnote = dd_replacetext(tempnote, c, "")
|
||||||
|
|
||||||
|
if(length(tempnote) >= 255)
|
||||||
|
alert("That name is too long. (255 character max, please)")
|
||||||
|
return
|
||||||
|
|
||||||
|
metadata = tempnote
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(link_tags["b_type"])
|
if(link_tags["b_type"])
|
||||||
switch(link_tags["b_type"])
|
switch(link_tags["b_type"])
|
||||||
@@ -563,6 +588,9 @@ datum/preferences
|
|||||||
if(link_tags["ghost_ears"])
|
if(link_tags["ghost_ears"])
|
||||||
ghost_ears = !ghost_ears
|
ghost_ears = !ghost_ears
|
||||||
|
|
||||||
|
if(link_tags["ghost_sight"])
|
||||||
|
ghost_sight = !ghost_sight
|
||||||
|
|
||||||
if(link_tags["underwear"])
|
if(link_tags["underwear"])
|
||||||
switch(link_tags["underwear"])
|
switch(link_tags["underwear"])
|
||||||
if("inputmale")
|
if("inputmale")
|
||||||
@@ -705,6 +733,7 @@ datum/preferences
|
|||||||
C.be_pai = be_special & BE_PAI
|
C.be_pai = be_special & BE_PAI
|
||||||
if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile.
|
if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile.
|
||||||
C.ghost_ears = src.ghost_ears
|
C.ghost_ears = src.ghost_ears
|
||||||
|
C.ghost_sight = src.ghost_sight
|
||||||
|
|
||||||
|
|
||||||
#undef UI_OLD
|
#undef UI_OLD
|
||||||
|
|||||||
@@ -57,9 +57,12 @@ datum/preferences/proc/savefile_save(mob/user)
|
|||||||
F["UI"] << src.UI
|
F["UI"] << src.UI
|
||||||
F["midis"] << src.midis
|
F["midis"] << src.midis
|
||||||
F["ghost_ears"] << src.ghost_ears
|
F["ghost_ears"] << src.ghost_ears
|
||||||
|
F["ghost_sight"] << src.ghost_sight
|
||||||
F["ooccolor"] << src.ooccolor
|
F["ooccolor"] << src.ooccolor
|
||||||
F["lastchangelog"] << src.lastchangelog
|
F["lastchangelog"] << src.lastchangelog
|
||||||
|
|
||||||
|
F["OOC_Notes"] << src.metadata
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
// loads the savefile corresponding to the mob's ckey
|
// loads the savefile corresponding to the mob's ckey
|
||||||
@@ -108,6 +111,8 @@ datum/preferences/proc/savefile_load(mob/user)
|
|||||||
F["midis"] >> src.midis
|
F["midis"] >> src.midis
|
||||||
F["ghost_ears"] >> src.ghost_ears
|
F["ghost_ears"] >> src.ghost_ears
|
||||||
if(isnull(ghost_ears)) ghost_ears = 1 //Hotfix
|
if(isnull(ghost_ears)) ghost_ears = 1 //Hotfix
|
||||||
|
F["ghost_sight"] >> src.ghost_sight
|
||||||
|
if(isnull(ghost_sight)) ghost_sight = 1 //Hotfix
|
||||||
F["ooccolor"] >> src.ooccolor
|
F["ooccolor"] >> src.ooccolor
|
||||||
F["lastchangelog"] >> src.lastchangelog
|
F["lastchangelog"] >> src.lastchangelog
|
||||||
F["UI"] >> src.UI
|
F["UI"] >> src.UI
|
||||||
@@ -125,6 +130,11 @@ datum/preferences/proc/savefile_load(mob/user)
|
|||||||
F["job_engsec_med"] >> src.job_engsec_med
|
F["job_engsec_med"] >> src.job_engsec_med
|
||||||
F["job_engsec_low"] >> src.job_engsec_low
|
F["job_engsec_low"] >> src.job_engsec_low
|
||||||
|
|
||||||
|
F[OOC_Notes"] >> src.metadata
|
||||||
|
|
||||||
|
if(isnull(metadata))
|
||||||
|
metadata = ""
|
||||||
|
|
||||||
//NOTE: Conversion things go inside this if statement
|
//NOTE: Conversion things go inside this if statement
|
||||||
//When updating the save file remember to add 1 to BOTH the savefile constants
|
//When updating the save file remember to add 1 to BOTH the savefile constants
|
||||||
//Also take the old conversion things that no longer apply out of this if
|
//Also take the old conversion things that no longer apply out of this if
|
||||||
|
|||||||
@@ -178,6 +178,7 @@
|
|||||||
#define FILE_DIR "icons/vending_icons"
|
#define FILE_DIR "icons/vending_icons"
|
||||||
#define FILE_DIR "interface"
|
#define FILE_DIR "interface"
|
||||||
#define FILE_DIR "maps"
|
#define FILE_DIR "maps"
|
||||||
|
#define FILE_DIR "maps/backup"
|
||||||
#define FILE_DIR "sound"
|
#define FILE_DIR "sound"
|
||||||
#define FILE_DIR "sound/AI"
|
#define FILE_DIR "sound/AI"
|
||||||
#define FILE_DIR "sound/ambience"
|
#define FILE_DIR "sound/ambience"
|
||||||
|
|||||||
Reference in New Issue
Block a user