From 3e82757231cde9fd80c5bddb79324c1fdf17c8a2 Mon Sep 17 00:00:00 2001
From: Kashargul <144968721+Kashargul@users.noreply.github.com>
Date: Sat, 21 Oct 2023 20:25:49 +0200
Subject: [PATCH] Attempt to prevent players joining with neither OOC notes nor
flavour
-> Added a check on the "Default" robot flavour text for players joining as robot. Default is overwritten by module specific text, but anyone setting those specific ones up most likely has a default one anyway.
-> Added a check for OOC notes texts for ghosts trying to activate a ghost pod or getting ghost even popups.
-> Mouses and drones have not been included for either as some players prefer to play them sneakily. Can be discussed.
---
code/_helpers/mobs.dm | 22 +++++++++++++++++--
.../objects/structures/ghost_pods/event_vr.dm | 9 ++++++++
.../structures/ghost_pods/ghost_pods.dm | 5 +++++
.../structures/ghost_pods/ghost_pods_vr.dm | 6 ++++-
code/modules/mob/new_player/new_player_vr.dm | 9 ++++++--
5 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm
index 6cd91a852b..4a5bf5e9b0 100644
--- a/code/_helpers/mobs.dm
+++ b/code/_helpers/mobs.dm
@@ -219,7 +219,7 @@ Proc for attack log creation, because really why not
if(target?.flags & IS_BUSY)
to_chat(user, "Someone is already doing something with \the [target].")
return FALSE
-
+
var/atom/target_loc = null
if(target)
target_loc = target.loc
@@ -243,7 +243,7 @@ Proc for attack log creation, because really why not
if(exclusive & TASK_USER_EXCLUSIVE)
user.status_flags |= DOING_TASK
-
+
if(target && (exclusive & TASK_TARGET_EXCLUSIVE))
target.flags |= IS_BUSY
@@ -315,3 +315,21 @@ Proc for attack log creation, because really why not
else
. = getCompoundIcon(desired)
cached_character_icons[cachekey] = .
+
+/proc/not_has_ooc_text(mob/user)
+ if (config.allow_Metadata && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15))
+ to_chat(user, "Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup.")
+ return TRUE
+ return FALSE
+
+/proc/not_has_flavor_text(mob/user)
+ if (config.require_flavor && (!user.client?.prefs?.flavor_texts["general"] || length(user.client.prefs.flavor_texts["general"]) < 30))
+ to_chat(user, "Please set your general flavor text to give a basic description of your character. Set it using the 'Set Flavor text' button on the 'General' tab in character setup, and choosing 'General' category.")
+ return TRUE
+ return FALSE
+
+/proc/not_has_flavor_text_robot(mob/user)
+ if (config.require_flavor && (!user.client?.prefs?.flavour_texts_robot["Default"] || length(user.client.prefs.flavour_texts_robot["Default"]) < 30))
+ to_chat(user, "Please set your default robot flavor text to give a basic description of your character. Set it using the 'Set Robot Flavor text' button on the 'General' tab in character setup, and choosing 'Default' category.")
+ return TRUE
+ return FALSE
diff --git a/code/game/objects/structures/ghost_pods/event_vr.dm b/code/game/objects/structures/ghost_pods/event_vr.dm
index e2d02959ab..95aac206ab 100644
--- a/code/game/objects/structures/ghost_pods/event_vr.dm
+++ b/code/game/objects/structures/ghost_pods/event_vr.dm
@@ -73,6 +73,10 @@
reset_ghostpod()
return
+ //No OOC notes
+ if (not_has_ooc_text(M))
+ return
+
while(finalized == "No" && M.client)
choice = tgui_input_list(M, "What type of predator do you want to play as?", "Maintpred Choice", possible_mobs)
if(!choice) //We probably pushed the cancel button on the mob selection. Let's just put the ghost pod back in the list.
@@ -122,6 +126,11 @@
/obj/structure/ghost_pod/ghost_activated/morphspawn/create_occupant(var/mob/M)
..()
+
+ //No OOC notes
+ if (not_has_ooc_text(M))
+ return
+
var/mob/living/simple_mob/vore/morph/newMorph = new /mob/living/simple_mob/vore/morph(get_turf(src))
if(M.mind)
M.mind.transfer_to(newMorph)
diff --git a/code/game/objects/structures/ghost_pods/ghost_pods.dm b/code/game/objects/structures/ghost_pods/ghost_pods.dm
index 5a5ed5db2f..82845de15f 100644
--- a/code/game/objects/structures/ghost_pods/ghost_pods.dm
+++ b/code/game/objects/structures/ghost_pods/ghost_pods.dm
@@ -90,6 +90,11 @@
if(jobban_isbanned(user, "GhostRoles"))
to_chat(user, "You cannot inhabit this creature because you are banned from playing ghost roles.")
return
+
+ //No OOC notes
+ if (not_has_ooc_text(user))
+ return
+
//VOREStation Add End
if(used)
to_chat(user, "Another spirit appears to have gotten to \the [src] before you. Sorry.")
diff --git a/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm b/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm
index 28ea62182f..2ae1a6f496 100644
--- a/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm
+++ b/code/game/objects/structures/ghost_pods/ghost_pods_vr.dm
@@ -15,6 +15,10 @@
to_chat(user, "You cannot inhabit this creature because you are banned from playing ghost roles.")
return
+ //No OOC notes
+ if (not_has_ooc_text(user))
+ return
+
if(!remains_active || busy)
return
@@ -51,4 +55,4 @@
/obj/structure/ghost_pod/ghost_activated/Initialize(var/mapload)
. = ..()
if(!mapload)
- ghostpod_startup(spawn_active)
\ No newline at end of file
+ ghostpod_startup(spawn_active)
diff --git a/code/modules/mob/new_player/new_player_vr.dm b/code/modules/mob/new_player/new_player_vr.dm
index fdbbcb10d0..79ad2676ad 100644
--- a/code/modules/mob/new_player/new_player_vr.dm
+++ b/code/modules/mob/new_player/new_player_vr.dm
@@ -7,10 +7,15 @@
return TRUE
//No Flavor Text
- if (config.require_flavor && !client?.prefs?.flavor_texts["general"] && !(J.mob_type & JOB_SILICON))
+ if (config.require_flavor && !(J.mob_type & JOB_SILICON) && (!client?.prefs?.flavor_texts["general"] || length(client.prefs.flavor_texts["general"]) < 30))
to_chat(src,"Please set your general flavor text to give a basic description of your character. Set it using the 'Set Flavor text' button on the 'General' tab in character setup, and choosing 'General' category.")
pass = FALSE
+ //No Robot Flavor Text
+ if (config.require_flavor && (J.mob_type & JOB_SILICON) && (!client?.prefs?.flavour_texts_robot["Default"] || length(client.prefs.flavour_texts_robot["Default"]) < 30))
+ to_chat(src,"Please set your default robot flavor text to give a basic description of your character. Set it using the 'Set Robot Flavor text' button on the 'General' tab in character setup, and choosing 'Default' category.")
+ pass = FALSE
+
//No OOC notes
if (config.allow_Metadata && (!client?.prefs?.metadata || length(client.prefs.metadata) < 15))
to_chat(src,"Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup.")
@@ -72,4 +77,4 @@
//Final popup notice
if (!pass)
tgui_alert_async(src,"There were problems with spawning your character. Check your message log for details.","Error")
- return pass
\ No newline at end of file
+ return pass