Merge pull request #1666 from Citadel-Station-13/upstream-merge-28407

[MIRROR] [READY]Adds examine tooltips
This commit is contained in:
LetterJay
2017-06-20 01:29:44 -05:00
committed by GitHub
6 changed files with 79 additions and 1 deletions
+2
View File
@@ -19,6 +19,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//game-preferences
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
var/ooccolor = null
var/enable_tips = TRUE
var/tip_delay = 500 //tip delay in milliseconds
//Antag preferences
var/list/be_special = list() //Special role selection
+6 -1
View File
@@ -183,6 +183,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["inquisitive_ghost"] >> inquisitive_ghost
S["uses_glasses_colour"]>> uses_glasses_colour
S["clientfps"] >> clientfps
S["menuoptions"] >> menuoptions
S["enable_tips"] >> enable_tips
S["tip_delay"] >> tip_delay
S["parallax"] >> parallax
S["menuoptions"] >> menuoptions
//citadel code
@@ -249,6 +252,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["clientfps"] << clientfps
S["parallax"] << parallax
S["menuoptions"] << menuoptions
S["enable_tips"] << enable_tips
S["tip_delay"] << tip_delay
//citadel code
S["arousable"] << arousable
@@ -561,4 +566,4 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
var/savefile/S = new /savefile(path)
S.ImportText("/",file("[path].txt"))
#endif
#endif
+20
View File
@@ -0,0 +1,20 @@
/client/verb/toggle_tips()
set name = "Toggle examine tooltips"
set desc = "Toggles examine hover-over tooltips"
set category = "OOC"
prefs.enable_tips = !prefs.enable_tips
prefs.save_preferences()
to_chat(usr, "<span class='danger'>Examine tooltips [prefs.enable_tips ? "en" : "dis"]abled.</span>")
/client/verb/change_tip_delay()
set name = "Set examine tooltip delay"
set desc = "Sets the delay in milliseconds before examine tooltips appear"
set category = "OOC"
var/indelay = stripped_input(usr, "Enter the tooltip delay in milliseconds (default: 500)", "Enter tooltip delay", "", 10)
indelay = text2num(indelay)
if(usr)//is this what you mean?
prefs.tip_delay = indelay
prefs.save_preferences()
to_chat(usr, "<span class='danger'>Tooltip delay set to [indelay] milliseconds.</span>")