mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Merge branch 'thespookisreal' of https://github.com/Miauw62/-tg-station into 2spooky
This commit is contained in:
+13
-13
@@ -25,6 +25,19 @@
|
||||
* Text sanitization
|
||||
*/
|
||||
|
||||
//this proc strips html properly, but it's not lazy like the other procs.
|
||||
//this means that it doesn't just remove < and > and call it a day. seriously, who the fuck thought that would be useful.
|
||||
/proc/strip_html_properly(var/input)
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(!closetag || !opentag)
|
||||
break
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
return input
|
||||
|
||||
//Simply removes < and > and limits the length of the message
|
||||
/proc/strip_html_simple(var/t,var/limit=MAX_MESSAGE_LEN)
|
||||
var/list/strip_chars = list("<",">")
|
||||
@@ -363,16 +376,3 @@ var/list/binary = list("0","1")
|
||||
temp = findtextEx(haystack, ascii2text(text2ascii(needles,i)), start, end) //Note: ascii2text(text2ascii) is faster than copytext()
|
||||
if(temp) end = temp
|
||||
return end
|
||||
|
||||
//this proc strips html properly, but it's not lazy like the other procs.
|
||||
//this means that it doesn't just remove < and > and call it a day. seriously, who the fuck thought that would be useful.
|
||||
/proc/strip_html_properly(var/input)
|
||||
var/opentag = 1 //These store the position of < and > respectively.
|
||||
var/closetag = 1
|
||||
while(1)
|
||||
opentag = findtext(input, "<")
|
||||
closetag = findtext(input, ">")
|
||||
if(!closetag || !opentag)
|
||||
break
|
||||
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
|
||||
return input
|
||||
|
||||
@@ -9,7 +9,10 @@
|
||||
/datum/round_event/spooky/start()
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
if(H.dna)
|
||||
hardset_dna(H, null, null, null, null, /datum/species/skeleton)
|
||||
if(prob(50))
|
||||
hardset_dna(H, null, null, null, null, /datum/species/skeleton)
|
||||
else
|
||||
hardset_dna(H, null, null, null, null, /datum/species/zombie)
|
||||
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
|
||||
Ian.place_on_head(new /obj/item/weapon/bedsheet(Ian))
|
||||
|
||||
|
||||
@@ -61,6 +61,11 @@
|
||||
icon_state = "skeletonmeat"
|
||||
desc = "There's a point where this needs to stop and clearly we have passed it"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/zombie
|
||||
name = "-meat (rotten)"
|
||||
icon_state = "lizardmeat" //Close enough.
|
||||
desc = "Halfway to becoming fertilizer for your garden."
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meat/monkey
|
||||
//same as plain meat
|
||||
|
||||
|
||||
@@ -18,29 +18,3 @@
|
||||
|
||||
/mob/dead/observer/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
|
||||
src << message
|
||||
|
||||
/*
|
||||
for (var/mob/M in hearers(null, null))
|
||||
if (!M.stat)
|
||||
if(M.job == "Chaplain")
|
||||
if (prob (49))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
if(prob(20))
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
|
||||
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
if(prob(30))
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
if (prob(50))
|
||||
return
|
||||
else if (prob (95))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
if(prob(20))
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
|
||||
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
*/
|
||||
@@ -214,10 +214,7 @@
|
||||
return 1
|
||||
|
||||
/datum/species/fly/handle_speech(message)
|
||||
if(copytext(message, 1, 2) != "*")
|
||||
message = replacetext(message, "z", stutter("zz"))
|
||||
|
||||
return message
|
||||
return replacetext(message, "z", stutter("zz"))
|
||||
|
||||
/*
|
||||
SKELETONS
|
||||
@@ -229,3 +226,30 @@
|
||||
id = "skeleton"
|
||||
sexes = 0
|
||||
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/skeleton
|
||||
/*
|
||||
ZOMBIES
|
||||
*/
|
||||
|
||||
/datum/species/zombie
|
||||
// 1spooky
|
||||
name = "Brain-Munching Zombie"
|
||||
id = "zombie"
|
||||
say_mod = "moans"
|
||||
sexes = 0
|
||||
meat = /obj/item/weapon/reagent_containers/food/snacks/meat/human/mutant/zombie
|
||||
|
||||
/datum/species/zombie/handle_speech(message)
|
||||
var/list/message_list = text2list(message, " ")
|
||||
var/maxchanges = max(round(message_list.len / 1.5), 2)
|
||||
|
||||
for(var/i = rand(maxchanges / 2, maxchanges), i > 0, i--)
|
||||
var/insertpos = rand(1, message_list.len - 1)
|
||||
var/inserttext = message_list[insertpos]
|
||||
|
||||
if(!(copytext(inserttext, length(inserttext) - 2) == "..."))
|
||||
message_list[insertpos] = inserttext + "..."
|
||||
|
||||
if(prob(20) && message_list.len > 3)
|
||||
message_list.Insert(insertpos, "[pick("BRAINS", "Brains", "Braaaiinnnsss", "BRAAAIIINNSSS")]...")
|
||||
|
||||
return list2text(message_list, " ")
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Reference in New Issue
Block a user