-
Notifications
You must be signed in to change notification settings - Fork 498
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to Fullscreen Edition (#8461)
* Add fullscreen mode and old TG browser stat panel * Basic RIG support for statpanel * Extended RIG support for statpanel and bugfixes * Remove obsolete RIG verbs * bag-o-fixes * fix_for_a_fix * Update code/modules/mechs/mech.dm * fix_merge_conflict
- Loading branch information
1 parent
b63f1c2
commit e2f39a3
Showing
378 changed files
with
5,448 additions
and
4,853 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
/// Represents a proc or verb path. | ||
/// | ||
/// Despite having no DM-defined static type, proc paths have some variables, | ||
/// listed below. These are not modifiable, but for a given procpath P, | ||
/// `new P(null, "Name", "Desc")` can be used to create a new procpath with the | ||
/// same code but new `name` and `desc` values. The other variables cannot be | ||
/// changed in this way. | ||
/// | ||
/// This type exists only to act as an annotation, providing reasonable static | ||
/// typing for procpaths. Previously, types like `/atom/verb` were used, with | ||
/// the `name` and `desc` vars of `/atom` thus being accessible. Proc and verb | ||
/// paths will fail `istype` and `ispath` checks against `/procpath`. | ||
/procpath | ||
// Although these variables are effectively const, if they are marked const | ||
// below, their accesses are optimized away. | ||
|
||
/// A text string of the verb's name. | ||
var/name as text | ||
/// The verb's help text or description. | ||
var/desc as text | ||
/// The category or tab the verb will appear in. | ||
var/category as text | ||
/// Only clients/mobs with `see_invisibility` higher can use the verb. | ||
var/invisibility as num | ||
/// Whether or not the verb appears in statpanel and commandbar when you press space | ||
var/hidden as num | ||
|
||
/** | ||
* handles adding verbs and updating the stat panel browser | ||
* | ||
* pass the verb type path to this instead of adding it directly to verbs so the statpanel can update | ||
* Arguments: | ||
* * target - Who the verb is being added to, client or mob typepath | ||
* * verb - typepath to a verb, or a list of verbs, supports lists of lists | ||
*/ | ||
/proc/add_verb(client/target, verb_or_list_to_add) | ||
if(!target) | ||
CRASH("add_verb called without a target") | ||
|
||
var/mob/mob_target = null | ||
if(ismob(target)) | ||
mob_target = target | ||
target = mob_target.client | ||
else if(!istype(target, /client)) | ||
CRASH("add_verb called on a non-mob and non-client") | ||
|
||
var/list/verbs_list = list() | ||
if(!islist(verb_or_list_to_add)) | ||
verbs_list += verb_or_list_to_add | ||
else | ||
var/list/verb_listref = verb_or_list_to_add | ||
var/list/elements_to_process = verb_listref.Copy() | ||
while(LAZYLEN(elements_to_process)) | ||
var/element_or_list = elements_to_process[LAZYLEN(elements_to_process)] //Last element | ||
elements_to_process.len-- | ||
if(islist(element_or_list)) | ||
elements_to_process += element_or_list //list/a += list/b adds the contents of b into a, not the reference to the list itself | ||
else | ||
verbs_list += element_or_list | ||
|
||
if(mob_target) | ||
mob_target.verbs += verbs_list | ||
if(!target) | ||
return //Our work is done. | ||
else | ||
target.verbs += verbs_list | ||
|
||
var/list/output_list = list() | ||
for(var/thing in verbs_list) | ||
var/procpath/verb_to_add = thing | ||
output_list[++output_list.len] = list(verb_to_add.category, verb_to_add.name) | ||
output_list = url_encode(json_encode(output_list)) | ||
|
||
target << output("[output_list];", "statbrowser:add_verb_list") | ||
|
||
/** | ||
* handles removing verb and sending it to browser to update, use this for removing verbs | ||
* | ||
* pass the verb type path to this instead of removing it from verbs so the statpanel can update | ||
* Arguments: | ||
* * target - Who the verb is being removed from, client or mob typepath | ||
* * verb - typepath to a verb, or a list of verbs, supports lists of lists | ||
*/ | ||
/proc/remove_verb(client/target, verb_or_list_to_remove) | ||
var/mob/mob_target = null | ||
if(ismob(target)) | ||
mob_target = target | ||
target = mob_target.client | ||
else if(!istype(target, /client)) | ||
CRASH("remove_verb called on a non-mob and non-client") | ||
|
||
var/list/verbs_list = list() | ||
if(!islist(verb_or_list_to_remove)) | ||
verbs_list += verb_or_list_to_remove | ||
else | ||
var/list/verb_listref = verb_or_list_to_remove | ||
var/list/elements_to_process = verb_listref.Copy() | ||
while(LAZYLEN(elements_to_process)) | ||
var/element_or_list = elements_to_process[LAZYLEN(elements_to_process)] //Last element | ||
elements_to_process.len-- | ||
if(islist(element_or_list)) | ||
elements_to_process += element_or_list //list/a += list/b adds the contents of b into a, not the reference to the list itself | ||
else | ||
verbs_list += element_or_list | ||
|
||
if(mob_target) | ||
mob_target.verbs -= verbs_list | ||
if(!target) | ||
return //Our work is done. | ||
else | ||
target.verbs -= verbs_list | ||
|
||
var/list/output_list = list() | ||
for(var/thing in verbs_list) | ||
var/procpath/verb_to_remove = thing | ||
output_list[++output_list.len] = list(verb_to_remove.category, verb_to_remove.name) | ||
output_list = url_encode(json_encode(output_list)) | ||
|
||
target << output("[output_list];", "statbrowser:remove_verb_list") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.