Animal Renaming Fixes (#11498)

This commit is contained in:
Doxxmedearly
2021-03-20 21:32:17 -05:00
committed by GitHub
parent b5892c2d50
commit f23b903258
4 changed files with 15 additions and 7 deletions

View File

@@ -50,6 +50,7 @@
H.LoseTarget()
H.attack_same = 0
H.friends += user
H.hostile_nameable = TRUE
L.desc += "<br><span class='notice'>It looks especially docile.</span>"
var/name = input(user, "Would you like to rename \the [L]?", "Dociler", L.name) as text

View File

@@ -44,11 +44,10 @@
return ..()
/mob/living/simple_animal/hostile/can_name(var/mob/living/M)
if(hostile_nameable)
return ..()
if(faction && faction == M.faction) //In case the mob had a dociler used on it
return ..()
return FALSE
if(!hostile_nameable)
to_chat(M, SPAN_WARNING("\The [src] cannot be renamed."))
return FALSE
return ..()
/mob/living/simple_animal/hostile/proc/FindTarget()

View File

@@ -662,8 +662,9 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
set category = "IC"
set src in view(1)
var/mob/living/M = usr
if(!M)
var/mob/living/carbon/M = usr
if(!istype(M))
to_chat(usr, SPAN_WARNING("You aren't allowed to rename \the [src]."))
return
if(can_name(M))