* Ghost bar initial changes

* more changes

* we ball again brothers

* we are (once again) SO back

* Update code/modules/admin/verbs/debug.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/_onclick/hud/alert.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/_onclick/hud/alert.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/modules/ruins/ghost_bar.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/ruins/ghost_bar.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/ruins/ghost_bar.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/ruins/ghost_bar.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/modules/ruins/ghost_bar.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update code/game/objects/items/weapons/cards_ids.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* deck of cards and shittt

* global placement

* Update code/modules/ruins/ghost_bar.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* readded

* hotfix

* zamn

* fixes

* greyfix

* last of the fixes

* can't stop me baby

* bam

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
GDN
2023-10-09 19:47:17 +01:00
committed by GitHub
co-authored by Luc Henri215
parent b02ce067bf
commit 6df2c2e3d2
72 changed files with 2640 additions and 1123 deletions
@@ -93,6 +93,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
..()
plane = GAME_PLANE
add_observer_verbs()
ADD_TRAIT(src, TRAIT_RESPAWNABLE, GHOSTED)
/mob/dead/observer/Destroy()
toggle_all_huds_off()
@@ -178,9 +179,8 @@ Works together with spawning an observer, noted above.
flags &= ~GHOST_CAN_REENTER
var/mob/dead/observer/ghost = new(src, flags) //Transfer safety to observer spawning proc.
ghost.timeofdeath = src.timeofdeath //BS12 EDIT
remove_from_respawnable_list()
if(ghost.can_reenter_corpse)
ghost.add_to_respawnable_list()
ADD_TRAIT(ghost, TRAIT_RESPAWNABLE, GHOSTED)
else
GLOB.non_respawnable_keys[ckey] = 1
ghost.key = key
@@ -203,6 +203,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
message_admins("[key_name_admin(src)] tried to ghost while admin frozen")
return
if(HAS_TRAIT(M, TRAIT_RESPAWNABLE))
ghostize(1)
return
if(P)
if(TOO_EARLY_TO_GHOST)
warningmsg = "It's too early in the shift to enter cryo"
@@ -280,7 +283,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
statpanel("Status")
if(client.statpanel == "Status")
show_stat_emergency_shuttle_eta()
stat(null, "Respawnability: [(src in GLOB.respawnable_list) ? "Yes" : "No"]")
stat(null, "Respawnability: [HAS_TRAIT(src, TRAIT_RESPAWNABLE) ? "Yes" : "No"]")
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
@@ -6,4 +6,4 @@
if(GLOB.non_respawnable_keys[ckey])
can_reenter_corpse = 0
remove_from_respawnable_list()
REMOVE_TRAIT(src, TRAIT_RESPAWNABLE, GHOSTED)
@@ -100,6 +100,7 @@
owner.cut_overlay(overlay)
var/mob/living/carbon/alien/larva/new_xeno = new(owner.drop_location())
new_xeno.key = C.key
dust_if_respawnable(C)
if(SSticker && SSticker.mode)
SSticker.mode.xenos += new_xeno.mind
new_xeno.mind.name = new_xeno.name
+2 -2
View File
@@ -52,9 +52,9 @@
B.brainmob = null
brainmob.container = src
brainmob.forceMove(src)
REMOVE_TRAIT(brainmob, TRAIT_RESPAWNABLE, GHOSTED)
brainmob.set_stat(CONSCIOUS)
brainmob.see_invisible = initial(brainmob.see_invisible)
brainmob.remove_from_respawnable_list()
GLOB.dead_mob_list -= brainmob//Update dem lists
GLOB.alive_mob_list += brainmob
@@ -159,7 +159,7 @@
brainmob.container = null//Reset brainmob mmi var.
brainmob.forceMove(held_brain) //Throw mob into brain.
brainmob.add_to_respawnable_list()
ADD_TRAIT(brainmob, TRAIT_RESPAWNABLE, GHOSTED)
GLOB.alive_mob_list -= brainmob//Get outta here
held_brain.brainmob = brainmob//Set the brain to use the brainmob
held_brain.brainmob.cancel_camera()
+1 -1
View File
@@ -78,7 +78,7 @@
GLOB.dead_mob_list += src
if(mind)
mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
add_to_respawnable_list()
ADD_TRAIT(src, TRAIT_RESPAWNABLE, GHOSTED)
if(mind.name && !isbrain(src)) // !isbrain() is to stop it from being called twice
var/turf/T = get_turf(src)
@@ -49,7 +49,7 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
var/mob/dead/observer/O = locate(href_list["signup"])
if(!O)
return
if(!(O in GLOB.respawnable_list))
if(!HAS_TRAIT(O, TRAIT_RESPAWNABLE))
to_chat(O, "You've given up your ability to respawn!")
return
if(!check_recruit(O))
@@ -232,7 +232,7 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
var/list/available = list()
for(var/datum/pai_save/c in GLOB.paiController.pai_candidates)
var/found = 0
for(var/mob/o in GLOB.respawnable_list)
for(var/mob/dead/observer/o in GLOB.player_list)
if(o.ckey == c.owner.ckey)
found = 1
if(found)
@@ -357,7 +357,7 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo
return 0
if(cannotPossess(O))
return 0
if(!(O in GLOB.respawnable_list))
if(!HAS_TRAIT(O, TRAIT_RESPAWNABLE))
return 0
if(O.client)
return 1
@@ -63,7 +63,7 @@
ghost_can_reenter = 1
break
for(var/mob/living/simple_animal/S in GLOB.player_list)
if(S in GLOB.respawnable_list)
if(HAS_TRAIT(S, TRAIT_RESPAWNABLE))
ghost_can_reenter = 1
break
if(!ghost_can_reenter)
@@ -234,6 +234,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
if(boosted)
mychild.key = elitemind.key
mychild.sentience_act()
dust_if_respawnable(elitemind)
notify_ghosts("\A [mychild] has been awakened in \the [get_area(src)]!", enter_link="<a href=?src=[UID()];follow=1>(Click to help)</a>", source = mychild, action = NOTIFY_FOLLOW)
icon_state = "tumor_popped"
RegisterSignal(mychild, COMSIG_PARENT_QDELETING, PROC_REF(onEliteLoss))
@@ -1,9 +1,9 @@
/mob/living/simple_animal/hostile/poison/terror_spider/Topic(href, href_list)
if(href_list["activate"])
var/mob/dead/observer/ghost = usr
if(istype(ghost))
humanize_spider(ghost)
var/mob/user = usr
if(HAS_TRAIT(user, TRAIT_RESPAWNABLE))
humanize_spider(user)
/mob/living/simple_animal/hostile/poison/terror_spider/attack_ghost(mob/user)
humanize_spider(user)
@@ -24,7 +24,7 @@
error_on_humanize = "Dying spiders are not player-controllable."
else if(stat == DEAD)
error_on_humanize = "Dead spiders are not player-controllable."
else if(!(user in GLOB.respawnable_list))
else if(!HAS_TRAIT(user, TRAIT_RESPAWNABLE))
error_on_humanize = "You are not able to rejoin the round."
if(jobban_isbanned(user, ROLE_SYNDICATE) || jobban_isbanned(user, ROLE_TSPIDER))
to_chat(user, "<span class='warning'>You are jobbanned from role of syndicate and/or terror spider.</span>")
+1 -3
View File
@@ -62,9 +62,7 @@
GLOB.dead_mob_list -= src
GLOB.alive_mob_list |= src
if(mind)
remove_from_respawnable_list()
REMOVE_TRAIT(src, TRAIT_RESPAWNABLE, GHOSTED)
timeofdeath = null
if(updating)
+2 -12
View File
@@ -1148,14 +1148,6 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
/mob/proc/activate_hand(selhand)
return
/mob/proc/add_to_respawnable_list()
GLOB.respawnable_list += src
RegisterSignal(src, COMSIG_PARENT_QDELETING, PROC_REF(remove_from_respawnable_list))
/mob/proc/remove_from_respawnable_list()
GLOB.respawnable_list -= src
UnregisterSignal(src, COMSIG_PARENT_QDELETING)
/mob/dead/observer/verb/respawn()
set name = "Respawn as NPC"
set category = "Ghost"
@@ -1168,7 +1160,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
to_chat(src, "<span class='warning'>You can't respawn as an NPC before the game starts!</span>")
return
if((usr in GLOB.respawnable_list) && (stat == DEAD || isobserver(usr)))
if((HAS_TRAIT(usr, TRAIT_RESPAWNABLE)) && (stat == DEAD || isobserver(usr)))
var/list/creatures = list("Mouse")
for(var/mob/living/simple_animal/L in GLOB.alive_mob_list)
if(!(is_station_level(L.z) || is_admin_level(L.z))) // Prevents players from spawning in space
@@ -1178,12 +1170,10 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
var/picked = input("Please select an NPC to respawn as", "Respawn as NPC") as null|anything in creatures
switch(picked)
if("Mouse")
if(become_mouse()) // Only remove respawnability if the player successfully becomes a mouse
remove_from_respawnable_list()
become_mouse()
else
var/mob/living/NPC = picked
if(istype(NPC) && !NPC.key)
remove_from_respawnable_list()
NPC.key = key
else
to_chat(usr, "You are not dead or you have given up your right to be respawned!")
+2
View File
@@ -308,6 +308,8 @@
return
if(INTENT_HARM) //This checks that the user is on harm intent.
if(HAS_TRAIT(user, TRAIT_PACIFISM))
return
if(last_hit_zone == "head") //This checks the hitzone the user has selected. In this specific case, they have the head selected.
if(IS_HORIZONTAL(affecting))
return
+9 -2
View File
@@ -184,6 +184,7 @@
message_admins("[key_name_admin(theghost)] has taken control of ([key_name_admin(M)])")
M.ghostize()
M.key = theghost.key
dust_if_respawnable(theghost)
else
to_chat(M, "There were no ghosts willing to take control.")
message_admins("No ghosts were willing to take control of [key_name_admin(M)])")
@@ -521,6 +522,9 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
else
name = realname
for(var/obj/item/radio/deadsay_radio_system as anything in GLOB.deadsay_radio_systems)
deadsay_radio_system.attempt_send_deadsay_message(subject, message)
for(var/mob/M in GLOB.player_list)
if(M.client && ((!isnewplayer(M) && M.stat == DEAD) || check_rights(R_ADMIN|R_MOD,0,M)) && M.get_preference(PREFTOGGLE_CHAT_DEAD))
var/follow
@@ -547,8 +551,8 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
to_chat(M, "<span class='deadsay'>[lname][follow][message]</span>")
/proc/notify_ghosts(message, ghost_sound = null, enter_link = null, title = null, atom/source = null, image/alert_overlay = null, flashwindow = TRUE, action = NOTIFY_JUMP, role = null) //Easy notification of ghosts.
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.client && (!role || (role in O.client.prefs.be_special)))
for(var/mob/O in GLOB.player_list)
if(O.client && HAS_TRAIT(O, TRAIT_RESPAWNABLE) && (!role || (role in O.client.prefs.be_special)))
to_chat(O, "<span class='ghostalert'>[message][(enter_link) ? " [enter_link]" : ""]</span>")
if(ghost_sound)
SEND_SOUND(O, sound(ghost_sound))
@@ -797,3 +801,6 @@ GLOBAL_LIST_INIT(intents, list(INTENT_HELP,INTENT_DISARM,INTENT_GRAB,INTENT_HARM
return "unconscious"
if(DEAD)
return "dead"
/mob/proc/attempt_listen_to_deadsay()
+1 -1
View File
@@ -203,7 +203,7 @@
observer.real_name = client.prefs.active_character.real_name
observer.name = observer.real_name
observer.key = key
observer.add_to_respawnable_list()
ADD_TRAIT(observer, TRAIT_RESPAWNABLE, GHOSTED)
qdel(src)
return TRUE
return FALSE