mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Appreciation Day (#10547)
Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
74abab6b5b
commit
9c3cbe4152
@@ -163,6 +163,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
#define FIRE_PRIORITY_ATC 1
|
||||
#define FIRE_PRIORITY_APPRECIATE 2
|
||||
#define FIRE_PRIORITY_PLAYERTIPS 5
|
||||
#define FIRE_PRIORITY_SHUTTLES 5
|
||||
#define FIRE_PRIORITY_SUPPLY 5
|
||||
|
||||
110
code/controllers/subsystems/appreciation_messages.dm
Normal file
110
code/controllers/subsystems/appreciation_messages.dm
Normal file
@@ -0,0 +1,110 @@
|
||||
//A system to create fun little species appreciation announcements, build primarily by following ATC as an example
|
||||
//The system is simple, it just creates an appreciation message about 90 minutes into a shift, where it picks a species to appreciate for the day. Then will make infrequent reminders of this throughout the rest of the shift.
|
||||
//It also has the ability to choose a random player's species to appreciate, even if it's a custom one, as long as there at least 5 human mob players.
|
||||
|
||||
SUBSYSTEM_DEF(appreciation)
|
||||
name = "Appreciation Messages"
|
||||
priority = FIRE_PRIORITY_APPRECIATE
|
||||
runlevels = RUNLEVEL_GAME
|
||||
wait = 2 MINUTES //This really does not need to fire very often at all
|
||||
flags = SS_NO_INIT | SS_BACKGROUND
|
||||
|
||||
VAR_PRIVATE/next_tick = 0
|
||||
VAR_PRIVATE/delay_min = 90 MINUTES //How long between announcements, minimum
|
||||
VAR_PRIVATE/delay_max = 180 MINUTES //Ditto, maximum
|
||||
//Shorter delays are probably too spammy, 90-180 minutes means a message every two hours or so, which shouldn't be too intrusive.
|
||||
VAR_PRIVATE/backoff_delay = 5 MINUTES //How long to back off if we can't talk and want to. Default is 5 mins.
|
||||
VAR_PRIVATE/initial_delay = 90 MINUTES //How long to wait before sending the first message of the shift.
|
||||
VAR_PRIVATE/squelched = FALSE //If appreciation messages are squelched currently
|
||||
|
||||
var/list/current_player_list = list()
|
||||
var/list/human_list = list()
|
||||
var/appreciated
|
||||
var/required_humans = 5 //The minimum number of humans in the list needed to allow it to choose one of their species.
|
||||
|
||||
/datum/controller/subsystem/appreciation/fire(resumed = FALSE)
|
||||
if(times_fired < 1)
|
||||
return
|
||||
if(times_fired == 1)
|
||||
next_tick = world.time + initial_delay
|
||||
return
|
||||
|
||||
if(!resumed)
|
||||
if(world.time < next_tick)
|
||||
return
|
||||
if(squelched)
|
||||
next_tick = world.time + backoff_delay
|
||||
return
|
||||
next_tick = world.time + rand(delay_min,delay_max)
|
||||
|
||||
if(appreciated)
|
||||
do_appreciate()
|
||||
return
|
||||
|
||||
current_player_list = player_list.Copy()
|
||||
|
||||
while(current_player_list.len)
|
||||
var/mob/M = current_player_list[current_player_list.len]
|
||||
current_player_list.len--
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
human_list += H
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
current_player_list.Cut()
|
||||
build_appreciation()
|
||||
human_list.Cut()
|
||||
|
||||
if(squelched)
|
||||
next_tick = world.time + backoff_delay
|
||||
return
|
||||
|
||||
do_appreciate()
|
||||
|
||||
|
||||
/datum/controller/subsystem/appreciation/proc/build_appreciation()
|
||||
if(human_list.len < required_humans)
|
||||
appreciated = pick(loremaster.appreciation_targets)
|
||||
return
|
||||
|
||||
if(prob(50))
|
||||
appreciated = pick(loremaster.appreciation_targets)
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = pick(human_list)
|
||||
if(!istype(H))
|
||||
appreciated = pick(loremaster.appreciation_targets)
|
||||
return
|
||||
|
||||
if(H.custom_species)
|
||||
appreciated = H.custom_species
|
||||
return
|
||||
|
||||
appreciated = H.species.name
|
||||
|
||||
|
||||
/datum/controller/subsystem/appreciation/proc/do_appreciate()
|
||||
var/appreciation_message = pick(loremaster.appreciation_messages)
|
||||
var/terrible_factoid = pick(loremaster.terrible_factoids)
|
||||
msg("Today is [appreciated] appreciation day! [terrible_factoid] [appreciation_message]")
|
||||
|
||||
/datum/controller/subsystem/appreciation/proc/msg(var/message,var/sender)
|
||||
ASSERT(message)
|
||||
global_announcer.autosay("[message]", sender ? sender : "Cultural Awareness")
|
||||
|
||||
/datum/controller/subsystem/appreciation/proc/is_squelched()
|
||||
return squelched
|
||||
|
||||
/datum/controller/subsystem/appreciation/proc/cancel_appreciation(var/yes = 1,var/silent = FALSE)
|
||||
if(yes)
|
||||
if(!squelched && !silent)
|
||||
msg("Today's appreciation day has been suspended.")
|
||||
squelched = 1
|
||||
return
|
||||
|
||||
if(squelched && !silent)
|
||||
msg("Appreciation day has been resumed, get appreciating!")
|
||||
squelched = 0
|
||||
128
code/modules/appreciation/appreciation.dm
Normal file
128
code/modules/appreciation/appreciation.dm
Normal file
@@ -0,0 +1,128 @@
|
||||
/datum/lore/loremaster
|
||||
var/list/appreciation_targets = list(
|
||||
"human",
|
||||
"tajaran",
|
||||
"vulpkanin",
|
||||
"akula",
|
||||
"altevian",
|
||||
"shadekin",
|
||||
"promethean",
|
||||
"protean",
|
||||
"skrell",
|
||||
"unathi",
|
||||
"sergal",
|
||||
"synth",
|
||||
"drone",
|
||||
"cyborg",
|
||||
"AI",
|
||||
"teshari",
|
||||
"unathi",
|
||||
"vasilissan",
|
||||
"vox",
|
||||
"zaddat",
|
||||
"diona",
|
||||
"zorren",
|
||||
"goth",
|
||||
"catgirl",
|
||||
"catgirl (male)",
|
||||
"dog",
|
||||
"wolf",
|
||||
"cat",
|
||||
"mouse",
|
||||
"fox",
|
||||
"big cat",
|
||||
"bear",
|
||||
"bunny",
|
||||
"squirrel",
|
||||
"otter",
|
||||
"sheep",
|
||||
"scel",
|
||||
"fish",
|
||||
"mermaid",
|
||||
"bovine",
|
||||
"capybara",
|
||||
"reptile",
|
||||
"lizard",
|
||||
"frog",
|
||||
"snake",
|
||||
"lamia",
|
||||
"centaur",
|
||||
"minotaur",
|
||||
"wolftaur",
|
||||
"dragon",
|
||||
"amphibian",
|
||||
"wyvern",
|
||||
"food",
|
||||
"bird",
|
||||
"angel",
|
||||
"demon",
|
||||
"incubus",
|
||||
"succubus",
|
||||
"demi-human",
|
||||
"vampire",
|
||||
"plant",
|
||||
"insect",
|
||||
"arachnid",
|
||||
"monster",
|
||||
"scene girl", //Now getting into a few sillier ones
|
||||
"jock",
|
||||
"problem causer",
|
||||
"old person",
|
||||
"coworker",
|
||||
"enemy",
|
||||
"boss",
|
||||
"chav",
|
||||
"janitor",
|
||||
"friend",
|
||||
"loser",
|
||||
"politician",
|
||||
"employee",
|
||||
"somebody",
|
||||
"NanoTrasen",
|
||||
"INSERT SPECIES HERE"
|
||||
)
|
||||
|
||||
var/list/appreciation_messages = list(
|
||||
"Be sure to show them your love today!",
|
||||
"Get out there and appreciate them!",
|
||||
"Wait... Is that right? Well, it's what it says. So, yeah.",
|
||||
"Maybe spend a little more time getting to know them today!",
|
||||
"Oh! I'm one of those!",
|
||||
"There's got to be some of those around here somewhere, so go appreciate them.",
|
||||
"Never met one in my life, honestly, but there you go.",
|
||||
"It's true, look it up.",
|
||||
"Maybe find the time to give them a gift or something.",
|
||||
"When's appreciation day announcer appreciation day?",
|
||||
"I will tell you, I sure do appreciate them!",
|
||||
"NanoTrasen wants it's appreciation for their general existence to be heard.",
|
||||
"I'm sure they'd appreciate a hug or something. Maybe not though, ask first.",
|
||||
"God, I wish I was one. Is that okay to say?",
|
||||
"Lots of love, NanoTrasen. Ex-Oh, Ex-Oh, Ex-Oh, mwha, mwha, mwha.",
|
||||
"Okay?",
|
||||
"Funny seeing those all the way out here, right?",
|
||||
"Great time to learn a bit about their culture!",
|
||||
"They really are, truly, very appreciated.",
|
||||
"They're just rad.",
|
||||
"They are JUST like me!"
|
||||
)
|
||||
|
||||
var/list/terrible_factoids = list(
|
||||
"They are well known for their diverse modes of expression, which is said to be the cornerstone of their creative arts.",
|
||||
"They're known for their strong connection to their herritage, and their passing on of knowledge from one generation to the next.",
|
||||
"Their customs and rituals are renowned across the galaxy, and are the foundation of their society.",
|
||||
"Once tied to their homeworld(s), they are now proud spacefarers and an essential part of the greater galactic diaspora.",
|
||||
"Adaptability is said to be a fundamental strength found amongst every one of them.",
|
||||
"Known for their forward thinking mindset and interspecies empathy, they hold seats in intergalactic politics.",
|
||||
"The producers of many great technology that are proudly shared with the galactic community.",
|
||||
"NanoTrasen is proud to have strong relationships with them, intergrating them well in our many workplaces.",
|
||||
"Famous for their excellent culinary utility, they leave many an employee watering at the mouth.",
|
||||
"Kinship is a dominant trait amongst them, each of us would be lucky to hold their friendship.",
|
||||
"There are rumours that they are the direct inheritors of a precursor species.",
|
||||
"They have mastered the art of problem solving, particularly in respect to the unique challenges that they face.",
|
||||
"Unfortunately, they do not have any inherent magical ability, having to get by on their mundane skill.",
|
||||
"They have a biology not entirely unlike others that you might encounter here, whilst still retaining many distinct features that set them apart.",
|
||||
"It is said that they have evolved around an innate sense of social networking.",
|
||||
"Did you know that whilst they might seem to have a specific naming scheme, this is actually as varied as any other within their native tongue.",
|
||||
"To be honest, they're just, like, really neat.",
|
||||
"Whilst it is easy to think that you know them from their outward appearance, you should really consider getting beyond the surface, see who they are on the inside."
|
||||
)
|
||||
@@ -387,6 +387,7 @@
|
||||
#include "code\controllers\subsystems\air_traffic.dm"
|
||||
#include "code\controllers\subsystems\airflow.dm"
|
||||
#include "code\controllers\subsystems\alarm.dm"
|
||||
#include "code\controllers\subsystems\appreciation_messages.dm"
|
||||
#include "code\controllers\subsystems\asset_loading.dm"
|
||||
#include "code\controllers\subsystems\assets.dm"
|
||||
#include "code\controllers\subsystems\atoms.dm"
|
||||
@@ -2113,6 +2114,7 @@
|
||||
#include "code\modules\alarm\fire_alarm.dm"
|
||||
#include "code\modules\alarm\motion_alarm.dm"
|
||||
#include "code\modules\alarm\power_alarm.dm"
|
||||
#include "code\modules\appreciation\appreciation.dm"
|
||||
#include "code\modules\artifice\cursedform.dm"
|
||||
#include "code\modules\artifice\deadringer.dm"
|
||||
#include "code\modules\artifice\telecube.dm"
|
||||
|
||||
Reference in New Issue
Block a user