mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 00:55:20 +01:00
[READY: I DID TEST]I pulled a goofball and broke pAIs (#22161)
* ghost notifications * FUCK * fuck2
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
var/datum/subsystem/pai/SSpai
|
||||
var/list/obj/item/device/paicard/pai_card_list = list()
|
||||
|
||||
/datum/subsystem/pai
|
||||
name = "pAI"
|
||||
@@ -6,6 +7,8 @@ var/datum/subsystem/pai/SSpai
|
||||
flags = SS_NO_INIT|SS_NO_FIRE
|
||||
|
||||
var/list/candidates = list()
|
||||
var/ghost_spam = FALSE
|
||||
var/spam_delay = 100
|
||||
|
||||
/datum/subsystem/pai/New()
|
||||
NEW_SS_GLOBAL(SSpai)
|
||||
@@ -26,7 +29,6 @@ var/datum/subsystem/pai/SSpai
|
||||
pai.key = candidate.key
|
||||
|
||||
card.setPersonality(pai)
|
||||
card.looking_for_personality = 0
|
||||
|
||||
ticker.mode.update_cult_icons_removed(card.pai.mind)
|
||||
ticker.mode.update_rev_icons_removed(card.pai.mind)
|
||||
@@ -73,8 +75,8 @@ var/datum/subsystem/pai/SSpai
|
||||
if("submit")
|
||||
if(candidate)
|
||||
candidate.ready = 1
|
||||
for(var/obj/item/device/paicard/p in world)
|
||||
if(p.looking_for_personality == 1)
|
||||
for(var/obj/item/device/paicard/p in pai_card_list)
|
||||
if(!p.pai)
|
||||
p.alertUpdate()
|
||||
usr << browse(null, "window=paiRecruit")
|
||||
return
|
||||
@@ -131,7 +133,18 @@ var/datum/subsystem/pai/SSpai
|
||||
|
||||
M << browse(dat, "window=paiRecruit")
|
||||
|
||||
/datum/subsystem/pai/proc/spam_again()
|
||||
ghost_spam = FALSE
|
||||
|
||||
/datum/subsystem/pai/proc/findPAI(obj/item/device/paicard/p, mob/user)
|
||||
if(!ghost_spam)
|
||||
ghost_spam = TRUE
|
||||
deadchat_broadcast("<span class='ghostalert'>Someone is requesting a pAI personality! Use the pAI button to submit yourself as one.</span>")
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!G.key || !G.client)
|
||||
continue
|
||||
G << 'sound/misc/server-ready.ogg' //Alerting them to their consideration
|
||||
addtimer(src, "spam_again", spam_delay)
|
||||
var/list/available = list()
|
||||
for(var/datum/paiCandidate/c in SSpai.candidates)
|
||||
if(c.ready)
|
||||
|
||||
@@ -6,16 +6,17 @@
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "programming=2"
|
||||
var/looking_for_personality = 0
|
||||
var/mob/living/silicon/pai/pai
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | INDESTRUCTIBLE
|
||||
|
||||
/obj/item/device/paicard/New()
|
||||
..()
|
||||
pai_card_list += src
|
||||
add_overlay("pai-off")
|
||||
|
||||
/obj/item/device/paicard/Destroy()
|
||||
//Will stop people throwing friend pAIs into the singularity so they can respawn
|
||||
pai_card_list -= src
|
||||
if(!isnull(pai))
|
||||
pai.death(0)
|
||||
return ..()
|
||||
@@ -44,10 +45,9 @@
|
||||
dat += "<font color=red><i>Radio firmware not loaded. Please install a pAI personality to load firmware.</i></font><br>"
|
||||
dat += "<A href='byond://?src=\ref[src];wipe=1'>\[Wipe current pAI personality\]</a><br>"
|
||||
else
|
||||
if(looking_for_personality)
|
||||
dat += "No personality installed.<br>"
|
||||
dat += "Searching for a personality..."
|
||||
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
|
||||
dat += "No personality installed.<br>"
|
||||
dat += "Searching for a personality... Press view available personalities to notify potential candidates."
|
||||
dat += "<A href='byond://?src=\ref[src];request=1'>\[View available personalities\]</a><br>"
|
||||
user << browse(dat, "window=paicard")
|
||||
onclose(user, "paicard")
|
||||
return
|
||||
@@ -58,7 +58,6 @@
|
||||
return
|
||||
|
||||
if(href_list["request"])
|
||||
src.looking_for_personality = 1
|
||||
SSpai.findPAI(src, usr)
|
||||
|
||||
if(pai)
|
||||
|
||||
Reference in New Issue
Block a user