mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
removes var/ inside all procs (#19450)
* removes var/ inside all procs * . * ugh
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
var/list/indexed_pages = list() // Assoc list with search terms pointing to a ref of the page. It's created on New().
|
||||
var/list/history = list() // List of pages we previously visited. // now a 2D list
|
||||
|
||||
/datum/codex_tree/New(var/new_holder, var/new_root_type)
|
||||
/datum/codex_tree/New(new_holder, new_root_type)
|
||||
holder = new_holder
|
||||
root_type = new_root_type
|
||||
generate_pages()
|
||||
@@ -20,13 +20,13 @@
|
||||
indexed_pages = home.index_page() // changed from current_page to home.
|
||||
|
||||
// Changes current_page to its parent, assuming one exists.
|
||||
/datum/codex_tree/proc/go_to_parent(var/mob/user)
|
||||
/datum/codex_tree/proc/go_to_parent(mob/user)
|
||||
var/datum/lore/codex/D = current_page["[user]"]
|
||||
if(istype(D) && D.parent)
|
||||
current_page["[user]"] = D.parent
|
||||
|
||||
// Changes current_page to a specific page or category.
|
||||
/datum/codex_tree/proc/go_to_page(var/datum/lore/codex/new_page, var/dont_record_history = FALSE, var/mob/user)
|
||||
/datum/codex_tree/proc/go_to_page(datum/lore/codex/new_page, dont_record_history = FALSE, mob/user)
|
||||
var/datum/lore/codex/D = current_page["[user]"]
|
||||
if(new_page && istype(D)) // Make sure we're not going to a null page for whatever reason.
|
||||
current_page["[user]"] = new_page
|
||||
@@ -37,13 +37,13 @@
|
||||
H.Add(new_page)
|
||||
history["[user]"] = H
|
||||
|
||||
/datum/codex_tree/proc/quick_link(var/search_word, var/mob/user)
|
||||
/datum/codex_tree/proc/quick_link(search_word, mob/user)
|
||||
for(var/word in indexed_pages)
|
||||
if(lowertext(search_word) == lowertext(word)) // Exact matches unfortunately limit our ability to perform SEOs.
|
||||
go_to_page(indexed_pages[word], FALSE, user)
|
||||
return
|
||||
|
||||
/datum/codex_tree/proc/get_page_from_type(var/desired_type)
|
||||
/datum/codex_tree/proc/get_page_from_type(desired_type)
|
||||
for(var/word in indexed_pages)
|
||||
var/datum/lore/codex/C = indexed_pages[word]
|
||||
if(C.type == desired_type)
|
||||
@@ -51,7 +51,7 @@
|
||||
return null
|
||||
|
||||
// Returns to the last visited page, based on the history list.
|
||||
/datum/codex_tree/proc/go_back(var/mob/user)
|
||||
/datum/codex_tree/proc/go_back(mob/user)
|
||||
var/list/H = history["[user]"]
|
||||
var/datum/lore/codex/D = current_page["[user]"]
|
||||
if(!LAZYLEN(H) || !istype(D))
|
||||
@@ -67,7 +67,7 @@
|
||||
else
|
||||
go_to_page(H[H.len], TRUE, user)
|
||||
|
||||
/datum/codex_tree/proc/get_tree_position(var/mob/user)
|
||||
/datum/codex_tree/proc/get_tree_position(mob/user)
|
||||
var/datum/lore/codex/checked = current_page["[user]"]
|
||||
if(istype(checked))
|
||||
var/output = ""
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/lore/codex/category/auto_org
|
||||
var/desired_type = null // Exclude other types of organizations
|
||||
|
||||
/datum/lore/codex/category/auto_org/New(var/new_holder, var/new_parent)
|
||||
/datum/lore/codex/category/auto_org/New(new_holder, new_parent)
|
||||
..(new_holder, new_parent)
|
||||
for(var/path in GLOB.loremaster.organizations)
|
||||
var/datum/lore/organization/O = GLOB.loremaster.organizations[path]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
var/desired_type = null
|
||||
var/auto_keywords = list()
|
||||
|
||||
/datum/lore/codex/category/auto_org/New(var/new_holder, var/new_parent)
|
||||
/datum/lore/codex/category/auto_org/New(new_holder, new_parent)
|
||||
..(new_holder, new_parent)
|
||||
keywords += auto_keywords
|
||||
for(var/path in GLOB.loremaster.organizations)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/keywords = list() // Used for searching.
|
||||
var/datum/codex_tree/holder = null
|
||||
|
||||
/datum/lore/codex/New(var/new_holder, var/new_parent)
|
||||
/datum/lore/codex/New(new_holder, new_parent)
|
||||
..()
|
||||
holder = new_holder
|
||||
parent = new_parent
|
||||
@@ -35,7 +35,7 @@
|
||||
return
|
||||
|
||||
// Use this to quickly link to a different page
|
||||
/datum/lore/codex/proc/quick_link(var/target, var/word_to_display)
|
||||
/datum/lore/codex/proc/quick_link(target, word_to_display)
|
||||
if(isnull(word_to_display))
|
||||
word_to_display = target
|
||||
return "<a href='byond://?src=\ref[src];quick_link=[target]'>[word_to_display]</a>"
|
||||
|
||||
Reference in New Issue
Block a user