[MIRROR] Adds a subtle ghost poll [MDB IGNORE] (#24503)

* Adds a subtle ghost poll (#79105)

## About The Pull Request
This makes a new ghost poll system which doesn't give TGUI popups -
instead, users are prompted to follow the POI and one of the orbiters is
chosen. The old system remains in place, so you can still prompt if you
want to.

This gives two things:
1. A deadchat notification:

![image](https://github.com/tgstation/tgstation/assets/42397676/073fcfff-b1ed-47c3-bae0-4abf9c599144)
2. A screen alert:

![image](https://github.com/tgstation/tgstation/assets/42397676/92a4e566-614a-43ca-8680-3cb4ff86ced9)

## Why It's Good For The Game
As stated in #76507, popups are pretty annoying. This is halfway between
a screen alert with no time limit and an event with more important
pings. This is better because:
1. Less popup fatigue
2. You can SEE how many you're competing with
4. DRY
## Changelog
🆑
add: Adds a subtle ghost poll. This pings in dead chat and gives a
screen alert, but no TGUI popup. Orbit the point of interest to be
selected for the role.
refactor: A number of ghost spawns now feature this alert. Write an
issue report if anything breaks.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>

* Adds a subtle ghost poll

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-10-22 00:23:55 +02:00
committed by GitHub
parent 181db63737
commit 6348fa7cf8
11 changed files with 261 additions and 91 deletions
+25 -13
View File
@@ -425,19 +425,31 @@
using = TRUE
balloon_alert(user, "you hold the scythe up...")
ADD_TRAIT(src, TRAIT_NODROP, type)
var/list/mob/dead/observer/candidates = poll_ghost_candidates("Do you want to play as [user.real_name]'s soulscythe?", ROLE_PAI, FALSE, 100, POLL_IGNORE_POSSESSED_BLADE)
if(LAZYLEN(candidates))
var/mob/dead/observer/picked_ghost = pick(candidates)
soul.ckey = picked_ghost.ckey
soul.copy_languages(user, LANGUAGE_MASTER) //Make sure the sword can understand and communicate with the user.
soul.faction = list("[REF(user)]")
balloon_alert(user, "the scythe glows up")
add_overlay("soulscythe_gem")
density = TRUE
if(!ismob(loc))
reset_spin()
else
balloon_alert(user, "the scythe is dormant!")
var/datum/callback/to_call = CALLBACK(src, PROC_REF(on_poll_concluded), user)
AddComponent(/datum/component/orbit_poll, \
ignore_key = POLL_IGNORE_POSSESSED_BLADE, \
job_bans = ROLE_PAI, \
to_call = to_call, \
)
/// Ghost poll has concluded and a candidate has been chosen.
/obj/item/soulscythe/proc/on_poll_concluded(mob/living/master, mob/dead/observer/ghost)
if(isnull(ghost))
balloon_alert(master, "the scythe is dormant!")
REMOVE_TRAIT(src, TRAIT_NODROP, type)
using = FALSE
return
soul.ckey = ghost.ckey
soul.copy_languages(master, LANGUAGE_MASTER) //Make sure the sword can understand and communicate with the master.
soul.faction = list("[REF(master)]")
balloon_alert(master, "the scythe glows")
add_overlay("soulscythe_gem")
density = TRUE
if(!ismob(loc))
reset_spin()
REMOVE_TRAIT(src, TRAIT_NODROP, type)
using = FALSE