[MIRROR] Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message [MDB IGNORE] (#19407)

* Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message (#73453)

## About The Pull Request

### Refactor

Turns all the behavior for the nuke disk raising lone op probability
when unsecured into a new component, the "Keep Me Secure" component. As
an example (and really, I made it to test that the component was
actually working), there is a new admin plush called the "whiny plushie"
that will change icon depending on whether it is secure or not. Useful!

### Examine

I also added an examine message. Will explain below

## Why It's Good For The Game

The examine message was really what this entire pr's purpose was really
for.

>
[Capsandi](https://tgstation13.org/phpBB/memberlist.php?mode=viewprofile&u=7767)
wrote:
[↑](https://tgstation13.org/phpBB/viewtopic.php?p=665827#p665827)Wed Feb
15, 2023 2:42 pm
Someone needs to pr some sort of indicator as to whether the disk is
'secure' or not so players who don't know about the niche lone op
mechanic won't make the same intuitive assumption (though swat has been
trolled for putting it in the safe before).

I agree with this for the same reasons I did #73016 so I'll restate the
point with it here: A piece of banning a captain recently was that they
didn't secure the disk, but there is no indication in game that the disk
has special condiitons that trigger lone op, just that it should be kept
safe (which yeah, nuke ops want it). I'd rather remove the ambiguity of
a captain knowing this mechanic or not for the sake of the game, a
single examine for it is harmless

I'm considering this administration, not a feature. If maints want me to
take it out and have this be refactor only, that's fine with me

## Changelog
🆑
refactor: Refactors how nuclear activation disk works. Shouldn't notice
a whole lot but if you do, it might be because of this.
admin: Disk now has an examine message for whether it's secure or not,
to make it less ambiguous for players.
/🆑

* Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message

---------

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-02 22:06:22 -08:00
committed by GitHub
co-authored by tralezab
parent 8946091ddb
commit f9f4c80055
5 changed files with 148 additions and 46 deletions
+47
View File
@@ -586,6 +586,53 @@
. = ..()
AddComponent(/datum/component/edit_complainer)
/obj/item/toy/plush/whiny_plushie
name = "whiny plushie"
desc = "An ancient plushie that demands constant companionship, after being forgotten for too long."
icon_state = "plushie_whiny"
inhand_icon_state = null
/// static list of cry messages it picks from to speak when it is insecure from no movement
var/static/list/cry_still_messages
/// static list of cry messages it picks from to speak when it is insecure from no holder
var/static/list/cry_alone_messages
/// cooldown for it sending messages, it will every 10 seconds
COOLDOWN_DECLARE(cry_cooldown)
/obj/item/toy/plush/whiny_plushie/Initialize(mapload)
. = ..()
if(!cry_still_messages)
cry_still_messages = list(
"WHY DID WE STOP MOVING?! ARE YOU GOING TO LEAVE ME?!!",
"WE COULD GET ATTACKED WE'RE SITTING DUCKS MOVE MOOOOOOOVE!!",
"YOU'RE PLANNING ON DROPPING ME AREN'T YOU I KNOW YOU AAAAAAAREE!!",
"THE SYNDICATE ARE TRIANGULATING OUR LOCAAAAAAAATIONNN!!",
"THIS PLACE IS SCARY I WANNA LEEEEEAAAAAVVVEEEEEE!!",
"CHELP, CHELP CCCCHHHHEEEEEEEEEEEEEEELLLLLLLPPPPPP!!",
)
cry_alone_messages = list(
"NOOOOOOOOOOOOOOOOOO DON'T LEAVE MEEEEE!!",
"WUH WHERE DID EVERYONE GOOOOOOHHHHHHH WAHHH!!",
"SOMEONE, ANYONEEEEEEEEE PICK ME UPP!!",
"I DIDN'T DESERVE ITTTTTTTTTT!!",
"I WILL DIE TO JUST ONE ATTTTTTAAAAACKKKKKK!!",
"I WILLLLLL NOT DROP GOOOD IITITTEEEEEMMMS!!",
)
AddComponent(/datum/component/keep_me_secure, CALLBACK(src, PROC_REF(secured_process)) , CALLBACK(src, PROC_REF(unsecured_process)))
/obj/item/toy/plush/whiny_plushie/proc/secured_process(last_move)
icon_state = initial(icon_state)
/obj/item/toy/plush/whiny_plushie/proc/unsecured_process(last_move)
if(!COOLDOWN_FINISHED(src, cry_cooldown))
return
COOLDOWN_START(src, cry_cooldown, 10 SECONDS)
icon_state = "plushie_whiny_crying"
if(isturf(loc))
say(pick(cry_alone_messages))
else
say(pick(cry_still_messages))
playsound(src, 'sound/items/intents/Help.ogg', 50, FALSE)
/obj/item/toy/plush/beeplushie
name = "bee plushie"
desc = "A cute toy that resembles an even cuter bee."