proposal b for vampire deadchat (#34679)

This commit is contained in:
nervere
2023-07-17 12:18:35 -04:00
committed by GitHub
parent 5d7cc63601
commit 86e40e1a32
3 changed files with 3 additions and 28 deletions

View File

@@ -15,8 +15,6 @@
var/iscloaking = FALSE var/iscloaking = FALSE
var/silentbite = FALSE var/silentbite = FALSE
var/deadchat_timer = 0
var/deadchat = FALSE
var/nullified = 0 var/nullified = 0
var/smitecounter = 0 var/smitecounter = 0
@@ -273,7 +271,6 @@
handle_cloak(H) handle_cloak(H)
handle_menace(H) handle_menace(H)
handle_smite(H) handle_smite(H)
handle_deadspeak(H)
if(istype(H.loc, /turf/space)) if(istype(H.loc, /turf/space))
H.check_sun() H.check_sun()
if(istype(H.loc, /obj/structure/closet/coffin)) if(istype(H.loc, /obj/structure/closet/coffin))
@@ -341,19 +338,6 @@
C.Dizzy(20) C.Dizzy(20)
to_chat(C, "<span class='sinister'>Your heart is filled with dread, and you shake uncontrollably.</span>") to_chat(C, "<span class='sinister'>Your heart is filled with dread, and you shake uncontrollably.</span>")
/datum/role/vampire/proc/handle_deadspeak(var/mob/living/carbon/human/H)
if(deadchat)
return
if(H.stat == DEAD)
return
if((locate(/datum/power/vampire/charisma) in current_powers) && world.time > deadchat_timer)
deadchat = TRUE
//have deadchat for 30 seconds every five minutes
spawn(rand(200, 400))
if(H.stat != DEAD)
deadchat_timer = world.time + 1800 + rand(300, 1200)
deadchat = FALSE
/datum/role/vampire/proc/handle_smite(var/mob/living/carbon/human/H) /datum/role/vampire/proc/handle_smite(var/mob/living/carbon/human/H)
var/smitetemp = 0 var/smitetemp = 0
var/vampcoat = istype(H.wear_suit, /obj/item/clothing/suit/storage/draculacoat) //coat reduces smiting var/vampcoat = istype(H.wear_suit, /obj/item/clothing/suit/storage/draculacoat) //coat reduces smiting

View File

@@ -76,14 +76,9 @@ var/list/global_deadchat_listeners = list()
var/list/hearers = get_deadchat_hearers() var/list/hearers = get_deadchat_hearers()
if(hearers) if(hearers)
for(var/mob/M in hearers) for(var/mob/M in hearers)
if(isvampire(M)) var/rendered = "<span class='game deadsay'><a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a>"
var/rendered = "<span class='game deadsay'><span class='name'> [name]</span>[alt_name] <span class='message'>[message]</span></span>" rendered += "<span class='name'> [name]</span>[alt_name] <span class='message'>[message]</span></span>"
to_chat(M, rendered) to_chat(M, rendered)
continue
else
var/rendered = "<span class='game deadsay'><a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[src]'>(Follow)</a>"
rendered += "<span class='name'> [name]</span>[alt_name] <span class='message'>[message]</span></span>"
to_chat(M, rendered)
/mob/proc/get_ear() /mob/proc/get_ear()
// returns an atom representing a location on the map from which this // returns an atom representing a location on the map from which this

View File

@@ -344,10 +344,6 @@ For the main html chat area
if(istype(M, /mob/new_player)) if(istype(M, /mob/new_player))
continue continue
var/datum/role/vampire/V = isvampire(M)
if(V && V.deadchat)
hearers += M
continue
else if(M.client.prefs.toggles & CHAT_DEAD) else if(M.client.prefs.toggles & CHAT_DEAD)
if(M.client.holder && M.client.holder.rights & R_ADMIN) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above if(M.client.holder && M.client.holder.rights & R_ADMIN) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
hearers += M hearers += M