Fixes issues with pen bbcode. Replacetext did not work correctly after I changed text2list - (It was missing 'needles' at the beginning of 'haystacks').

>dd_replacetext and dd_replacetext_case are now replacetext and replacetextEx respectively.
>replacetext and replacetextEx works using strings only; it doesn't convert it into a list and then back into a string.

Fixes some dumb-dumbs in textlist and text2listEx
> "<" where there should be a "<="
> no else case for when the separator is longer than the text (causing empty lists to be returned)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4971 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-10-27 21:21:17 +00:00
parent 6af0e6ab84
commit 4d9876fd65
28 changed files with 231 additions and 212 deletions
+6 -6
View File
@@ -163,19 +163,19 @@ move an amendment</a> to the drawing.</p>
/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
if (!oldtitle) // or dd_replacetext goes to infinite loop
if (!oldtitle) // or replacetext goes to infinite loop
return
for(var/area/RA in A.related)
for(var/obj/machinery/alarm/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/power/apc/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
M.name = replacetext(M.name,oldtitle,title)
for(var/obj/machinery/door/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
M.name = replacetext(M.name,oldtitle,title)
//TODO: much much more. Unnamed airlocks, cameras, etc.
/obj/item/blueprints/proc/check_tile_is_border(var/turf/T2,var/dir)
+1 -1
View File
@@ -536,7 +536,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
if (mode == 1)
note = dd_replacetext(n, "\n", "<BR>")
note = replacetext(n, "\n", "<BR>")
notehtml = n
else
U << browse(null, "window=pda")
+2 -2
View File
@@ -18,9 +18,9 @@ A list of items and costs is stored under the datum of every game mode, alongsid
/obj/item/device/uplink/New()
welcome = ticker.mode.uplink_welcome
if(!item_data)
items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
items = replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
else
items = dd_replacetext(item_data)
items = replacetext(item_data)
ItemList = text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
+4 -4
View File
@@ -330,7 +330,7 @@
proc/compilesong()
var/compilestring = ""
var/strippedsourcestring = dd_replacetext(currentsong.sourcestring, "\n", "")
var/strippedsourcestring = replacetext(currentsong.sourcestring, "\n", "")
strippedsourcestring = unbayify(strippedsourcestring)
@@ -601,7 +601,7 @@
updateUsrDialog()
else if(href_list["export"])
var/output = dd_replacetext(currentsong.sourcestring, "\n", "")
var/output = replacetext(currentsong.sourcestring, "\n", "")
var/list/sourcelist = text2list(output, ",")
@@ -728,8 +728,8 @@
var/input = html_encode(input(usr, "", "Edit", currentsong.sourcestring) as message|null)
if(isnull(input)) return
input = dd_replacetext(input, " ", "")
input = dd_replacetext(input, "\t", "")
input = replacetext(input, " ", "")
input = replacetext(input, "\t", "")
if(lentext(input)>4000)
statusmsg("Editor Error: Song too long, end was cutoff (max 4000)")