[MIRROR] Fixes voice of god runtime when a target resists the command [MDB IGNORE] (#16264)

* Fixes voice of god runtime when a target resists the command (#69921)

* Fixes voice of god runtime when a target resisted your command and adds a grep to avoid it being a problem again in the future.

* Fixes voice of god runtime when a target resists the command

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-09-17 20:46:05 +02:00
committed by GitHub
parent c801ecf056
commit dcf4c2a960
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ GLOBAL_LIST_INIT(voice_of_god_commands, init_voice_of_god_commands())
for(var/mob/living/candidate in candidates)
if(candidate.stat != DEAD && candidate.can_hear())
if(candidate.can_block_magic(MAGIC_RESISTANCE_HOLY|MAGIC_RESISTANCE_MIND, charge_cost = 0))
to_chat(span_userdanger("Something's wrong! [candidate] seems to be resisting your commands."))
to_chat(user, span_userdanger("Something's wrong! [candidate] seems to be resisting your commands."))
continue
listeners += candidate
@@ -882,7 +882,6 @@
do_teleport(nearby_mob, get_turf(holder.my_atom), 3, no_effects=TRUE)
nearby_mob.Knockdown(20, TRUE)
nearby_mob.add_atom_colour("#cebfff", WASHABLE_COLOUR_PRIORITY)
to_chat()
do_sparks(3,FALSE,nearby_mob)
clear_products(holder, step_volume_added)
+5
View File
@@ -244,6 +244,11 @@ done < <(find . -type f -name '*.dm')
echo -e "${BLUE}Checking for common mistakes...${NC}"
if grep -P 'to_chat\((?!.*,).*\)' code/**/*.dm; then
echo
echo -e "${RED}ERROR: to_chat() missing arguments.${NC}"
st=1
fi;
if grep -P 'addtimer\((?=.*TIMER_OVERRIDE)(?!.*TIMER_UNIQUE).*\)' code/**/*.dm; then
echo
echo -e "${RED}ERROR: TIMER_OVERRIDE used without TIMER_UNIQUE.${NC}"