mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
Merge pull request #11606 from Markolie/ghostqol
Observer/hud improvements and fixes
This commit is contained in:
@@ -7,21 +7,27 @@
|
||||
|
||||
/datum/event/blob/start()
|
||||
processing = FALSE //so it won't fire again in next tick
|
||||
|
||||
var/turf/T = pick(blobstart)
|
||||
if(!T)
|
||||
return kill()
|
||||
|
||||
var/list/candidates = pollCandidates("Do you want to play as a blob infested mouse?", ROLE_BLOB, 1)
|
||||
if(!candidates.len)
|
||||
return kill()
|
||||
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.all_vent_pumps)
|
||||
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
|
||||
if(temp_vent.parent.other_atmosmch.len > 50)
|
||||
vents += temp_vent
|
||||
|
||||
var/obj/vent = pick(vents)
|
||||
var/mob/living/simple_animal/mouse/blobinfected/B = new(vent.loc)
|
||||
var/mob/M = pick(candidates)
|
||||
B.key = M.key
|
||||
SSticker.mode.update_blob_icons_added(B.mind)
|
||||
|
||||
to_chat(B, "<span class='userdanger'>You are now a mouse, infected with blob spores. Find somewhere isolated... before you burst and become the blob! Use ventcrawl (alt-click on vents) to move around.</span>")
|
||||
notify_ghosts("Infected Mouse has appeared in [get_area(B)].", source = B)
|
||||
processing = TRUE // Let it naturally end, if it runs successfully
|
||||
@@ -1,6 +1,8 @@
|
||||
/datum/event/sentience
|
||||
|
||||
/datum/event/sentience/start()
|
||||
processing = FALSE //so it won't fire again in next tick
|
||||
|
||||
var/ghostmsg = "Do you want to awaken as a sentient being?"
|
||||
var/list/candidates = pollCandidates(ghostmsg, ROLE_SENTIENT, 1)
|
||||
var/list/potential = list()
|
||||
@@ -41,6 +43,7 @@
|
||||
SA.del_on_death = FALSE
|
||||
greet_sentient(SA)
|
||||
print_command_report(sentience_report, "[command_name()] Update")
|
||||
processing = TRUE // Let it naturally end, if it runs successfully
|
||||
|
||||
/datum/event/sentience/proc/greet_sentient(var/mob/living/carbon/human/M)
|
||||
to_chat(M, "<span class='userdanger'>Hello world!</span>")
|
||||
|
||||
@@ -58,19 +58,20 @@
|
||||
if(message)
|
||||
log_emote(message, src)
|
||||
|
||||
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
// Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
if(istype(M, /mob/new_player))
|
||||
continue
|
||||
if(findtext(message," snores.")) //Because we have so many sleeping people.
|
||||
break
|
||||
if(M.stat == DEAD && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
M.show_message(message)
|
||||
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
|
||||
if(findtext(message, " snores.")) //Because we have so many sleeping people.
|
||||
break
|
||||
|
||||
if(isobserver(M) && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting.
|
||||
M.show_message(message)
|
||||
|
||||
// Type 1 (Visual) emotes are sent to anyone in view of the item
|
||||
if(m_type & EMOTE_VISUAL)
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
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)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(pressure < ONE_ATMOSPHERE * 0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
|
||||
italics = 1
|
||||
italics = TRUE
|
||||
sound_vol *= 0.5
|
||||
|
||||
if(sleeping || stat == UNCONSCIOUS)
|
||||
@@ -87,8 +87,6 @@
|
||||
|
||||
var/track = null
|
||||
if(isobserver(src))
|
||||
if(italics && client.prefs.toggles & CHAT_GHOSTRADIO)
|
||||
return
|
||||
if(speaker_name != speaker.real_name && speaker.real_name)
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
track = "([ghost_follow_link(speaker, ghost=src)]) "
|
||||
|
||||
@@ -455,6 +455,7 @@
|
||||
colour = "alien"
|
||||
key = "y"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/wryn/check_special_condition(mob/other)
|
||||
var/mob/living/carbon/M = other
|
||||
@@ -485,7 +486,7 @@
|
||||
colour = "alien"
|
||||
key = "a"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = 1
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/terrorspider
|
||||
name = "Spider Hivemind"
|
||||
@@ -496,7 +497,7 @@
|
||||
colour = "terrorspider"
|
||||
key = "ts"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = 1
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/ling
|
||||
name = "Changeling"
|
||||
@@ -505,10 +506,11 @@
|
||||
colour = "changeling"
|
||||
key = "g"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/ling/broadcast(mob/living/speaker, message, speaker_mask)
|
||||
if(speaker.mind && speaker.mind.changeling)
|
||||
..(speaker,message,speaker.mind.changeling.changelingID)
|
||||
..(speaker, message, speaker.mind.changeling.changelingID)
|
||||
else if(speaker.mind && speaker.mind.linglink)
|
||||
..()
|
||||
else
|
||||
@@ -521,6 +523,7 @@
|
||||
colour = "shadowling"
|
||||
key = "8"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/shadowling/broadcast(mob/living/speaker, message, speaker_mask)
|
||||
if(speaker.mind && speaker.mind.special_role == SPECIAL_ROLE_SHADOWLING)
|
||||
@@ -539,6 +542,7 @@
|
||||
colour = "abductor"
|
||||
key = "zw" //doesn't matter, this is their default and only language
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/abductor/broadcast(mob/living/speaker, message, speaker_mask)
|
||||
..(speaker,message,speaker.real_name)
|
||||
@@ -567,6 +571,7 @@
|
||||
colour = "alien"
|
||||
key = "bo"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/corticalborer/broadcast(mob/living/speaker, message, speaker_mask)
|
||||
var/mob/living/simple_animal/borer/B
|
||||
@@ -590,7 +595,7 @@
|
||||
exclaim_verb = "declares"
|
||||
key = "b"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = 1
|
||||
follow = TRUE
|
||||
var/drone_only
|
||||
|
||||
/datum/language/binary/broadcast(mob/living/speaker, message, speaker_mask)
|
||||
@@ -636,8 +641,8 @@
|
||||
colour = "say_quote"
|
||||
key = "d"
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
drone_only = 1
|
||||
follow = 1
|
||||
drone_only = TRUE
|
||||
follow = TRUE
|
||||
|
||||
/datum/language/drone
|
||||
name = "Drone"
|
||||
@@ -647,7 +652,7 @@
|
||||
exclaim_verb = "declares"
|
||||
key = "]"
|
||||
flags = RESTRICTED
|
||||
follow = 1
|
||||
follow = TRUE
|
||||
syllables = list ("beep", "boop")
|
||||
|
||||
/datum/language/swarmer
|
||||
@@ -659,7 +664,7 @@
|
||||
colour = "say_quote"
|
||||
key = "z"//Zwarmer...Or Zerg!
|
||||
flags = RESTRICTED | HIVEMIND
|
||||
follow = 1
|
||||
follow = TRUE
|
||||
|
||||
// Language handling.
|
||||
/mob/proc/add_language(language)
|
||||
|
||||
@@ -73,7 +73,11 @@
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
health = maxHealth - getOxyLoss() - getFireLoss() - getBruteLoss() - getCloneLoss()
|
||||
|
||||
update_stat("updatehealth([reason])")
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
handle_hud_icons_health()
|
||||
|
||||
/mob/living/carbon/alien/handle_environment(var/datum/gas_mixture/environment)
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
. = -1 //hunters are sanic
|
||||
. += ..() //but they still need to slow down on stun
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_hud_icons_health()
|
||||
..() //-Yvarov
|
||||
|
||||
if(healths)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
|
||||
/mob/living/carbon/alien/humanoid/sentinel/handle_hud_icons_health()
|
||||
..() //-Yvarov
|
||||
|
||||
if(healths)
|
||||
|
||||
@@ -48,29 +48,26 @@
|
||||
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress
|
||||
/mob/living/carbon/alien/humanoid/empress/handle_hud_icons_health()
|
||||
..() //-Yvarov
|
||||
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..() //-Yvarov
|
||||
|
||||
if(src.healths)
|
||||
if(src.stat != 2)
|
||||
switch(health)
|
||||
if(250 to INFINITY)
|
||||
src.healths.icon_state = "health0"
|
||||
if(175 to 250)
|
||||
src.healths.icon_state = "health1"
|
||||
if(100 to 175)
|
||||
src.healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
src.healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
src.healths.icon_state = "health4"
|
||||
else
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
if(healths)
|
||||
if(stat != 2)
|
||||
switch(health)
|
||||
if(250 to INFINITY)
|
||||
healths.icon_state = "health0"
|
||||
if(175 to 250)
|
||||
healths.icon_state = "health1"
|
||||
if(100 to 175)
|
||||
healths.icon_state = "health2"
|
||||
if(50 to 100)
|
||||
healths.icon_state = "health3"
|
||||
if(0 to 50)
|
||||
healths.icon_state = "health4"
|
||||
else
|
||||
healths.icon_state = "health5"
|
||||
else
|
||||
healths.icon_state = "health6"
|
||||
|
||||
/mob/living/carbon/alien/humanoid/empress/verb/lay_egg()
|
||||
set name = "Lay Egg (250)"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
. = ..()
|
||||
. += 3
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/handle_regular_hud_updates()
|
||||
/mob/living/carbon/alien/humanoid/queen/handle_hud_icons_health()
|
||||
..() //-Yvarov
|
||||
|
||||
if(healths)
|
||||
|
||||
@@ -946,9 +946,13 @@
|
||||
// Maybe some people are okay with that.
|
||||
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
if(!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers and new players
|
||||
if(M.stat == DEAD && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
if(!M.client)
|
||||
continue
|
||||
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
|
||||
if(isobserver(M) && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting.
|
||||
M.show_message(message)
|
||||
|
||||
switch(m_type)
|
||||
|
||||
@@ -59,8 +59,7 @@
|
||||
handle_status_effects() //all special effects, stunned, weakened, jitteryness, hallucination, sleeping, etc
|
||||
|
||||
if(client)
|
||||
//regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT
|
||||
handle_regular_hud_updates() //IT JUST REMOVES FUCKING HUD IMAGES
|
||||
handle_regular_hud_updates()
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
message_range = 1
|
||||
|
||||
if(pressure < ONE_ATMOSPHERE * 0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
|
||||
italics = 1
|
||||
italics = TRUE
|
||||
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
|
||||
|
||||
var/list/hear = hear(message_range, T)
|
||||
@@ -236,12 +236,20 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
continue
|
||||
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
if(M.stat == DEAD && M.client && M.get_preference(CHAT_GHOSTEARS) && client) // client is so that ghosts don't have to listen to mice
|
||||
listening |= M
|
||||
continue
|
||||
|
||||
if(isobserver(M))
|
||||
if(M.get_preference(CHAT_GHOSTEARS) && client) // The client check is so that ghosts don't have to listen to mice.
|
||||
listening |= M
|
||||
continue
|
||||
|
||||
if(message_range < world.view && (get_dist(T, M) <= world.view))
|
||||
listening |= M
|
||||
continue
|
||||
|
||||
if(get_turf(M) in hearturfs)
|
||||
listening |= M
|
||||
|
||||
@@ -291,10 +299,13 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
log_emote(message, src)
|
||||
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
if(!M.client || istype(M, /mob/new_player))
|
||||
continue //skip monkeys, leavers and new players //who the hell knows why new players are in the dead mob list
|
||||
if(!M.client)
|
||||
continue //skip monkeys and leavers
|
||||
|
||||
if(M.stat == DEAD && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
|
||||
if(isobserver(M) && M.get_preference(CHAT_GHOSTSIGHT) && !(M in viewers(src, null)) && client) // The client check makes sure people with ghost sight don't get spammed by simple mobs emoting.
|
||||
M.show_message(message)
|
||||
|
||||
switch(type)
|
||||
@@ -380,7 +391,7 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
|
||||
var/list/hearturfs = list()
|
||||
|
||||
//Pass whispers on to anything inside the immediate listeners.
|
||||
// Pass whispers on to anything inside the immediate listeners.
|
||||
// This comes before the ghosts do so that ghosts don't act as whisper relays
|
||||
for(var/atom/L in listening)
|
||||
if(ismob(L))
|
||||
@@ -391,22 +402,26 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
if(isobj(L))
|
||||
hearturfs += get_turf(L)
|
||||
|
||||
//ghosts
|
||||
for(var/mob/M in GLOB.dead_mob_list) //does this include players who joined as observers as well?
|
||||
// Loop through all players to see if they need to hear it.
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M.stat == DEAD && M.client && M.get_preference(CHAT_GHOSTEARS))
|
||||
listening |= M
|
||||
|
||||
// This, in tandem with "hearturfs", lets nested mobs hear whispers that are in range
|
||||
// Grifted from saycode above.
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(!M.client || isnewplayer(M))
|
||||
continue //skip monkeys and leavers
|
||||
if(isnewplayer(M))
|
||||
continue
|
||||
|
||||
if(isobserver(M))
|
||||
if(M.get_preference(CHAT_GHOSTEARS)) // The client check is so that ghosts don't have to listen to mice.
|
||||
listening |= M
|
||||
continue
|
||||
|
||||
if(message_range < world.view && (get_dist(whisper_loc, M) <= world.view))
|
||||
listening |= M
|
||||
continue
|
||||
|
||||
if(get_turf(M) in hearturfs)
|
||||
listening |= M
|
||||
|
||||
|
||||
//pass on the message to objects that can hear us.
|
||||
for(var/obj/O in view(message_range, whisper_loc))
|
||||
spawn(0)
|
||||
|
||||
@@ -482,6 +482,8 @@ var/list/intents = list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM)
|
||||
if(A)
|
||||
if(O.client.prefs && O.client.prefs.UI_style)
|
||||
A.icon = ui_style2icon(O.client.prefs.UI_style)
|
||||
if(title)
|
||||
A.name = title
|
||||
A.desc = message
|
||||
A.action = action
|
||||
A.target = source
|
||||
|
||||
Reference in New Issue
Block a user