From 9a091cd9f3a6bc8935738effcdc2bbe5c823c854 Mon Sep 17 00:00:00 2001 From: yuni Date: Fri, 2 Aug 2024 02:34:44 +0200 Subject: [PATCH] Add Leonard Nimoy's death poem --- src/chat.rs | 14 ++++++++++++++ src/chats/serenity.yaml | 3 +-- src/data/deathpoems.in | 7 +++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index aa01e9b..3ec6663 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -955,6 +955,7 @@ pub fn handle_chat_scripts( pub fn update_chat_variables( mut vars: ResMut, + settings: Res, q_player: Query<&actor::Suit, With>, prefs: ResMut, ) { @@ -974,5 +975,18 @@ pub fn update_chat_variables( "state_luna_intro", if prefs.state_luna_intro { 1 } else { 0 }.to_string(), ); + let wears_chefhat = if let Some(ava) = hud::PLAYER_AR_AVATARS.get(settings.ar_avatar) { + match ava.0 { + hud::Avatar::ChefHat => 1, + _ => 0, + } + } else { + 0 + }; + vars.set_in_scope( + "$", + "chefhat", + wears_chefhat.to_string(), + ); } } diff --git a/src/chats/serenity.yaml b/src/chats/serenity.yaml index 8c7cc9b..bd50f1c 100644 --- a/src/chats/serenity.yaml +++ b/src/chats/serenity.yaml @@ -364,7 +364,7 @@ - No problem at all! - set: grateful 0 - goto: mainnode -- if: "$$state_luna_intro" +- if: "$$chefhat" Outer Woods: - if $explained: - ... @@ -496,7 +496,6 @@ - I don't believe you. - But there is obviously one way we can easily validate this. - set: $explained - - script: save_state_luna_intro - "Kill yourself. Then come back to me, and make the first thing you say to me: Outer Woods." - That's genius.: - Thank you! diff --git a/src/data/deathpoems.in b/src/data/deathpoems.in index 86db966..7e513ed 100644 --- a/src/data/deathpoems.in +++ b/src/data/deathpoems.in @@ -1,3 +1,10 @@ +A life is like a garden. +Perfect moments can be had, +but not preserved, +except in memory. +Live long and prosper. +- Leonard Nimoy, 2015 + Though I heard Everyone goes this road Eventually