mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-11 03:10:28 +00:00
* Painus * Yep * Moar * Let the agony begin * text.dm * scramble.dm * time.dm * fix * unsorted.dm * job_controller.dm * _legacy * computerfiles.dm * events.dm * global_iterator.dm * topic_input.dm * underwear.dm * uplink * periodic_news.dm again * areas * genes Also renamed midget to dwarfism as it's a slur. * changeling * Cult * gamemodes * machinery * mecha * effects * objects part 1 * Fine I'll commit the YAML * objects part 2 * moar * atmos * ooga * ahrde * You can tell my sanity is going down * Second-To-Last Step * Almost * Poggers * nvm we're not ready for that <.< * Test * minor
61 lines
1.2 KiB
Plaintext
61 lines
1.2 KiB
Plaintext
/datum/topic_input
|
|
var/href
|
|
var/list/href_list
|
|
|
|
/datum/topic_input/New(thref,list/thref_list)
|
|
href = thref
|
|
href_list = thref_list.Copy()
|
|
return
|
|
|
|
/datum/topic_input/proc/get(i)
|
|
return SAFEACCESS(href_list,i)
|
|
|
|
/datum/topic_input/proc/getAndLocate(i)
|
|
var/t = get(i)
|
|
if(t)
|
|
t = locate(t)
|
|
return t || null
|
|
|
|
/datum/topic_input/proc/getNum(i)
|
|
var/t = get(i)
|
|
if(t)
|
|
t = text2num(t)
|
|
return isnum(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getObj(i)
|
|
var/t = getAndLocate(i)
|
|
return isobj(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getMob(i)
|
|
var/t = getAndLocate(i)
|
|
return ismob(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getTurf(i)
|
|
var/t = getAndLocate(i)
|
|
return isturf(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getAtom(i)
|
|
return getType(i,/atom)
|
|
|
|
/datum/topic_input/proc/getArea(i)
|
|
var/t = getAndLocate(i)
|
|
return isarea(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getStr(i)//params should always be text, but...
|
|
var/t = get(i)
|
|
return istext(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getType(i,type)
|
|
var/t = getAndLocate(i)
|
|
return istype(t,type) ? t : null
|
|
|
|
/datum/topic_input/proc/getPath(i)
|
|
var/t = get(i)
|
|
if(t)
|
|
t = text2path(t)
|
|
return ispath(t) ? t : null
|
|
|
|
/datum/topic_input/proc/getList(i)
|
|
var/t = getAndLocate(i)
|
|
return islist(t) ? t : null
|