Just deleted about 400 bot accounts and a bunch of spam. To mitigate this in the future, we've enabled reCaptcha on signup. Let me know if someone got caught in the crossfire.

Commit dcf6bbe3 authored by DrCelt's avatar DrCelt Committed by ComicIronic
Browse files

Fixes #10005 (#10644)

* Fixes #10005
fixes #10005 by making you have to type out the real name of the target

* NAME_CAST
parent 198b63d1
......@@ -118,7 +118,7 @@
range = -2 //the world
max_targets = 1
selection_type = "view"
spell_flags = SELECTABLE
spell_flags = SELECTABLE|NAME_CAST
override_base = "genetic"
hud_state = "gen_project"
......@@ -135,6 +135,9 @@
return
for(var/mob/living/carbon/human/target in targets)
if(tinfoil_check(target))
to_chat(user, "<span class='warning'>You are unable to target this person.</span>")
return
if(M_REMOTE_TALK in target.mutations)
target.show_message("<span class='notice'>You hear [user.real_name]'s voice: [say]</span>")
else
......
......@@ -72,9 +72,21 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
if(possible_targets.len)
if(spell_flags & SELECTABLE) //if we are allowed to choose. see setup.dm for details
var/mob/temp_target = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
if(temp_target)
targets += temp_target
if(spell_flags & NAME_CAST)
var/target_name = input(user, "What is the name of the person you wish to target?.", "Targeting")
var/matchfound = 0
for(var/mob/target in possible_targets)
if(target.real_name == target_name)
targets += target
matchfound = 1
break
if(!matchfound)
to_chat(user, "<span class='warning'>You are unable to target this person.</span>")
return
else
var/mob/temp_target = input(user, "Choose the target for the spell.", "Targeting") as null|mob in possible_targets
if(temp_target)
targets += temp_target
else
targets += pick(possible_targets)
//Adds a safety check post-input to make sure those targets are actually in range.
......
......@@ -1228,6 +1228,7 @@ var/default_colour_matrix = list(1,0,0,0,\
#define CONSTRUCT_CHECK 256 //used by construct spells - checks for nullrods
#define NO_BUTTON 512 //spell won't show up in the HUD with this
#define WAIT_FOR_CLICK 1024//spells wait for you to click on a target to cast
#define NAME_CAST 2048//spells require you to know the name of the person you are casting it upon
//invocation
#define SpI_SHOUT "shout"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment