mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 05:51:56 +00:00
Ghosts can now jump to emotes, better follow links, ghosts can now see where someone ghosted. (#8677)
This commit is contained in:
@@ -300,7 +300,7 @@
|
||||
if(D.build_path)
|
||||
var/loc_offset = get_step(src, dir)
|
||||
var/obj/new_item = D.Fabricate(loc_offset, src)
|
||||
visible_message("\The [src] pings, indicating that \the [new_item] is complete.", "You hear a ping.")
|
||||
visible_message("\The <b>[src]</b> pings, indicating that \the [new_item] is complete.", "You hear a ping.")
|
||||
if(mat_efficiency != 1)
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
for(var/i in new_item.matter)
|
||||
|
||||
@@ -669,14 +669,14 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
var/cannotzoom
|
||||
|
||||
if(M.stat || !(istype(M,/mob/living/carbon/human)))
|
||||
to_chat(M, "You are unable to focus through the [devicename]")
|
||||
if(M.stat || !(ishuman(M)))
|
||||
to_chat(M, SPAN_WARNING("You are unable to focus through \the [devicename]!"))
|
||||
cannotzoom = 1
|
||||
else if(!zoom && global_hud.darkMask[1] in M.client.screen)
|
||||
to_chat(M, "Your visor gets in the way of looking through the [devicename]")
|
||||
to_chat(M, SPAN_WARNING("Your visor gets in the way of looking through the [devicename]!"))
|
||||
cannotzoom = 1
|
||||
else if(!zoom && M.get_active_hand() != src)
|
||||
to_chat(M, "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better")
|
||||
to_chat(M, SPAN_WARNING("You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better."))
|
||||
cannotzoom = 1
|
||||
|
||||
if(!zoom && !cannotzoom)
|
||||
@@ -702,7 +702,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
M.client.pixel_x = -viewoffset
|
||||
M.client.pixel_y = 0
|
||||
|
||||
M.visible_message("[M] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
|
||||
M.visible_message("<b>[M]</b> peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
|
||||
|
||||
else
|
||||
M.client.view = world.view
|
||||
@@ -714,7 +714,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
M.client.pixel_y = 0
|
||||
|
||||
if(!cannotzoom)
|
||||
M.visible_message("[zoomdevicename ? "[M] looks up from the [src.name]" : "[M] lowers the [src.name]"].")
|
||||
M.visible_message("[zoomdevicename ? "<b>[M]</b> looks up from the [src.name]" : "<b>[M]</b> lowers the [src.name]"].")
|
||||
|
||||
/obj/item/proc/pwr_drain()
|
||||
return 0 // Process Kill
|
||||
|
||||
@@ -105,8 +105,8 @@
|
||||
log_ooc("(LOCAL) [mob.name]/[key] : [msg]",ckey=key_name(mob))
|
||||
|
||||
var/mob/source = src.mob
|
||||
var/list/messageturfs = list()//List of turfs we broadcast to.
|
||||
var/list/messagemobs = list()//List of living mobs nearby who can hear it
|
||||
var/list/messageturfs = list() //List of turfs we broadcast to.
|
||||
var/list/messagemobs = list() //List of living mobs nearby who can hear it
|
||||
|
||||
for(var/turf in range(world.view, get_turf(source)))
|
||||
messageturfs += turf
|
||||
|
||||
@@ -396,7 +396,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
moved_event.register(following, src, /atom/movable/proc/move_to_destination)
|
||||
destroyed_event.register(following, src, /mob/abstract/observer/proc/stop_following)
|
||||
|
||||
to_chat(src, "<span class='notice'>Now following \the [following]</span>")
|
||||
to_chat(src, "<span class='notice'>Now following \the [following].</span>")
|
||||
move_to_destination(following, following.loc, following.loc)
|
||||
updateghostsight()
|
||||
|
||||
@@ -915,7 +915,7 @@ mob/abstract/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
|
||||
|
||||
/proc/ghost_follow_link(var/atom/target, var/atom/ghost)
|
||||
if((!target) || (!ghost)) return
|
||||
. = "<a href='byond://?src=\ref[ghost];track=\ref[target]'>\[F\]</a>"
|
||||
. = "\[<a href='byond://?src=\ref[ghost];track=\ref[target]'>F</a>\]"
|
||||
. += target.extra_ghost_link(ghost)
|
||||
|
||||
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
//This is a central proc that all emotes are run through. This handles sending the messages to living mobs
|
||||
/mob/proc/send_emote(var/message, var/type)
|
||||
var/list/messageturfs = list()//List of turfs we broadcast to.
|
||||
var/list/messagemobs = list()//List of living mobs nearby who can hear it, and distant ghosts who've chosen to hear it
|
||||
var/list/messagemobs_neardead = list()//List of nearby ghosts who can hear it. Those that qualify ONLY go in this list
|
||||
var/list/messagemobs = list()
|
||||
var/list/ghosts = list()
|
||||
|
||||
var/hearing_aid = FALSE
|
||||
if(type == 2 && ishuman(src))
|
||||
@@ -67,17 +67,17 @@
|
||||
messageturfs += turf
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
if (!M.client || istype(M, /mob/abstract/new_player))
|
||||
if (!M.client || isnewplayer(M))
|
||||
continue
|
||||
if(get_turf(M) in messageturfs)
|
||||
if (istype(M, /mob/abstract/observer))
|
||||
messagemobs_neardead += M
|
||||
if (isobserver(M))
|
||||
ghosts += M
|
||||
continue
|
||||
else if (isliving(M) && !(type == 2 && ((sdisabilities & DEAF) && !hearing_aid) || ear_deaf > 1))
|
||||
messagemobs += M
|
||||
else if(src.client)
|
||||
if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT))
|
||||
messagemobs += M
|
||||
ghosts += M
|
||||
continue
|
||||
|
||||
for (var/mob/N in messagemobs)
|
||||
@@ -85,5 +85,5 @@
|
||||
|
||||
message = "<B>[message]</B>"
|
||||
|
||||
for (var/mob/O in messagemobs_neardead)
|
||||
O.show_message(message, type)
|
||||
for(var/mob/O in ghosts)
|
||||
O.show_message("[ghost_follow_link(src, O)] [message]", type)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
//make sure the air can transmit speech - hearer's side
|
||||
var/turf/T = get_turf(src)
|
||||
if ((T) && (!(istype(src, /mob/abstract/observer)))) //Ghosts can hear even in vacuum.
|
||||
if ((T) && (!(isobserver(speaker)))) //Ghosts can hear even in vacuum.
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/pressure = (environment)? environment.return_pressure() : 0
|
||||
if(pressure < SOUND_MINIMUM_PRESSURE && get_dist(speaker, src) > 1)
|
||||
@@ -42,7 +42,7 @@
|
||||
message = stars(message)
|
||||
|
||||
var/speaker_name = speaker.name
|
||||
if(istype(speaker, /mob/living/carbon/human))
|
||||
if(ishuman(speaker))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
speaker_name = H.GetVoice()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
message = "<i>[message]</i>"
|
||||
|
||||
var/track = null
|
||||
if(istype(src, /mob/abstract/observer))
|
||||
if(isobserver(speaker))
|
||||
if(italics && client.prefs.toggles & CHAT_GHOSTRADIO)
|
||||
return
|
||||
if(speaker_name != speaker.real_name && speaker.real_name)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
if(!stat && !resting && !buckled)
|
||||
if(prob(1))
|
||||
visible_emote(pick("dances around","chases their tail"),0)
|
||||
visible_emote(pick("dances around.","chases their tail."),0)
|
||||
INVOKE_ASYNC(src, .proc/do_dance, list(1,2,4,8,4,2,1,2,4,8,4,2,1,2,4,8,4,2))
|
||||
|
||||
/mob/living/simple_animal/corgi/proc/do_dance(list/directions = list())
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
// blind_message (optional) is what blind people will hear e.g. "You hear something!"
|
||||
|
||||
/mob/visible_message(var/message, var/self_message, var/blind_message, var/range = world.view)
|
||||
var/list/messageturfs = list()//List of turfs we broadcast to.
|
||||
var/list/messagemobs = list()//List of living mobs nearby who can hear it, and distant ghosts who've chosen to hear it
|
||||
var/list/messageturfs = list() //List of turfs we broadcast to.
|
||||
var/list/messagemobs = list() //List of living mobs nearby who can hear it, and distant ghosts who've chosen to hear it
|
||||
for (var/turf in view(range, get_turf(src)))
|
||||
messageturfs += turf
|
||||
|
||||
|
||||
@@ -558,11 +558,11 @@ proc/is_blind(A)
|
||||
/proc/announce_ghost_joinleave(O, var/joined_ghosts = 1, var/message = "")
|
||||
var/client/C
|
||||
//Accept any type, sort what we want here
|
||||
if(istype(O, /mob))
|
||||
if(ismob(O))
|
||||
var/mob/M = O
|
||||
if(M.client)
|
||||
C = M.client
|
||||
else if(istype(O, /client))
|
||||
else if(isclient(O))
|
||||
C = O
|
||||
else if(istype(O, /datum/mind))
|
||||
var/datum/mind/M = O
|
||||
@@ -584,8 +584,11 @@ proc/is_blind(A)
|
||||
name = M.real_name
|
||||
if(!name)
|
||||
name = (C.holder && C.holder.fakekey) ? C.holder.fakekey : C.key
|
||||
var/last_at = ""
|
||||
if(C.mob.lastarea)
|
||||
last_at = " at [C.mob.lastarea]"
|
||||
if(joined_ghosts)
|
||||
say_dead_direct("The ghost of <span class='name'>[name]</span> now [pick("skulks","lurks","prowls","creeps","stalks")] among the dead. [message]")
|
||||
say_dead_direct("The ghost of <span class='name'>[name]</span> now [pick("skulks","lurks","prowls","creeps","stalks")] among the dead[last_at]. [message]")
|
||||
else
|
||||
say_dead_direct("<span class='name'>[name]</span> no longer [pick("skulks","lurks","prowls","creeps","stalks")] in the realm of the dead. [message]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user