Update flavor_text.dm

Modern, better
This commit is contained in:
xhianil
2024-02-24 18:41:43 -07:00
committed by GitHub
parent 4599d0b6c4
commit e6cabf5f3d
+2 -2
View File
@@ -172,11 +172,11 @@ GLOBAL_LIST_EMPTY(mobs_with_editable_flavor_text) //et tu, hacky code
return
// Validate the headshot URL
var/static/link_regex = regex("https://i\\.gyazo\\.com|https://media\\.discordapp\\.net|https://cdn\\.discordapp\\.com|https://media\\.discordapp\\.net$")
var/static/link_regex = regex("https://i\\.gyazo\\.com|https://media\\.discordapp\\.net|https://cdn\\.discordapp\\.com|https://media\\.discordapp\\.net$|https://static1\\.e621\\.net")
var/static/end_regex = regex("\\.jpg|\\.png|\\.jpeg$")
if(!findtext(new_headshot, link_regex))
to_chat(src, span_warning("The link needs to be an unshortened Gyazo or Discordapp link!"))
to_chat(src, span_warning("The link needs to be an unshortened Gyazo, E621, or Discordapp link!"))
return
if(!findtext(new_headshot, end_regex))
to_chat(src, span_warning("You need either \".png\", \".jpg\", or \".jpeg\" in the link!"))