mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Integrated BS12's improved uplink code, courtesy of SkyMarshal.
This means items now spawn in your hand if possible, items are sorted into categories, and only items you have enough telecrystals to purchase will be displayed. Also, the same basic code is now used for PDA, headset and nuke-round uplinks, and it should be easier to add new items. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3216 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1485,4 +1485,24 @@ proc/oview_or_orange(distance = world.view , center = usr , type)
|
||||
. = oview(distance,center)
|
||||
if("range")
|
||||
. = orange(distance,center)
|
||||
return
|
||||
return
|
||||
|
||||
/proc/stringsplit(txt, character)
|
||||
var
|
||||
cur_text = txt
|
||||
last_found = 1
|
||||
found_char = findtext(cur_text,character)
|
||||
list/list = list()
|
||||
if(found_char)
|
||||
var/fs = copytext(cur_text,last_found,found_char)
|
||||
list += fs
|
||||
last_found = found_char+length(character)
|
||||
found_char = findtext(cur_text,character,last_found)
|
||||
while(found_char)
|
||||
var
|
||||
found_string = copytext(cur_text,last_found,found_char)
|
||||
last_found = found_char+length(character)
|
||||
list += found_string
|
||||
found_char = findtext(cur_text,character,last_found)
|
||||
list += copytext(cur_text,last_found,length(cur_text)+1)
|
||||
return list
|
||||
Reference in New Issue
Block a user