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.
This commit is contained in:
Kashargul
2023-10-21 20:25:49 +02:00
committed by GitHub
parent cd1cc30346
commit 3e82757231
5 changed files with 46 additions and 5 deletions
+20 -2
View File
@@ -219,7 +219,7 @@ Proc for attack log creation, because really why not
if(target?.flags & IS_BUSY)
to_chat(user, "<span class='warning'>Someone is already doing something with \the [target].</span>")
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, "<span class='warning'>Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup.</span>")
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, "<span class='warning'>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.</span>")
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, "<span class='warning'>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.</span>")
return TRUE
return FALSE
@@ -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)
@@ -90,6 +90,11 @@
if(jobban_isbanned(user, "GhostRoles"))
to_chat(user, "<span class='warning'>You cannot inhabit this creature because you are banned from playing ghost roles.</span>")
return
//No OOC notes
if (not_has_ooc_text(user))
return
//VOREStation Add End
if(used)
to_chat(user, "<span class='warning'>Another spirit appears to have gotten to \the [src] before you. Sorry.</span>")
@@ -15,6 +15,10 @@
to_chat(user, "<span class='warning'>You cannot inhabit this creature because you are banned from playing ghost roles.</span>")
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)
ghostpod_startup(spawn_active)
+7 -2
View File
@@ -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,"<span class='warning'>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.</span>")
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,"<span class='warning'>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.</span>")
pass = FALSE
//No OOC notes
if (config.allow_Metadata && (!client?.prefs?.metadata || length(client.prefs.metadata) < 15))
to_chat(src,"<span class='warning'>Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup.</span>")
@@ -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
return pass