Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SandPoot committed Dec 6, 2023
2 parents 42fdd30 + a91e099 commit ae873bd
Show file tree
Hide file tree
Showing 51 changed files with 611 additions and 613 deletions.
8 changes: 8 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -828,3 +828,11 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
if(prob(15))
corrupted_text += pick(corruption_options)
return corrupted_text

/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")

/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
/proc/sanitize_css_class_name(name)
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
return replacetext(name, regex, "")
3 changes: 0 additions & 3 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -764,9 +764,6 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
return 1
return 0

/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")

/proc/check_target_facings(mob/living/initator, mob/living/target)
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
Given how click code currently works (Nov '13), the initiating mob will be facing the target mob most of the time
Expand Down
Loading

0 comments on commit ae873bd

Please sign in to comment.