Files
Aurora.3/code/game/objects/items/devices/dociler.dm
Fluffy a3a4d46fa7 Hitby refactor (#19624)
Refactored hitby to be in line with TG's version.
Refactored item weight defines to a more clear naming scheme, also in
line with TG's version.
Refactored how the movement bumps are handled, ported signals to handle
them, in preparation for the movement update.
Fixed disposal hit bouncing the hitting atom on the wall.
Items do not push other items anymore if they are tiny.
2024-07-28 20:52:08 +00:00

70 lines
2.0 KiB
Plaintext

/obj/item/device/dociler
name = "dociler"
desc = "A complex single use recharging injector that spreads a complex neurological serum that makes animals docile and friendly. Somewhat."
w_class = WEIGHT_CLASS_NORMAL
origin_tech = list(TECH_BIO = 5, TECH_MATERIAL = 2)
// To-do track down where the hell this sprite went?
icon = 'icons/obj/guns/decloner.dmi'
icon_state = "decloner"
item_state = "decloner"
contained_sprite = TRUE
force = 0
var/loaded = 1
var/mode = "completely"
/obj/item/device/dociler/get_examine_text(mob/user, distance, is_adjacent, infix, suffix)
. = ..()
. += SPAN_NOTICE("It is currently set to [mode] docile mode.")
/obj/item/device/dociler/attack_self(var/mob/user)
if(mode == "somewhat")
mode = "completely"
else
mode = "somewhat"
to_chat(user, "You set \the [src] to [mode] docile mode.")
/obj/item/device/dociler/afterattack(var/mob/living/L, var/mob/user, proximity)
if(!proximity) return
if(!istype(L, /mob/living/simple_animal))
to_chat(user, SPAN_WARNING("\The [src] has no effect on \the [L]."))
return
if(!loaded)
to_chat(user, SPAN_WARNING("\The [src] isn't loaded!"))
return
user.visible_message("\The [user] thrusts \the [src] deep into \the [L]'s head, injecting something!")
if(mode == "somewhat")
L.faction = user.faction
else
L.faction = null
if(istype(L,/mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = L
if(!H.tameable)
to_chat(user, SPAN_WARNING("\The [src] has no effect on \the [L]."))
return
else
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
if(length(name))
L.real_name = name
L.name = name
loaded = 0
icon_state = "animal_tagger0"
addtimer(CALLBACK(src, PROC_REF(do_recharge)), 5 MINUTES)
/obj/item/device/dociler/proc/do_recharge()
loaded = 1
icon_state = "animal_tagger1"
src.visible_message("\The [src] beeps, refilling itself.")