Migrate cookie summoning book to the new attack chain. (#32307)

* Migrate cookie summoning book to the new attack chain.

* Add fingerprint.
This commit is contained in:
Alan
2026-08-01 06:15:29 +00:00
committed by GitHub
parent 4be7b2edf7
commit fac8c05323
+16 -7
View File
@@ -24,22 +24,31 @@
icon = 'icons/obj/library.dmi'
icon_state = "book"
var/datum/middle_click_override/clickBehavior = new /datum/middle_click_override/badmin_clicker
new_attack_chain = TRUE
/obj/item/badmin_book/activate_self(mob/living/user as mob)
if(..())
return ITEM_INTERACT_COMPLETE
/obj/item/badmin_book/attack_self__legacy__attackchain(mob/living/user as mob)
if(user.middleClickOverride)
to_chat(user, SPAN_WARNING("You try to draw power from [src], but you cannot hold the power at this time!"))
return
return ITEM_INTERACT_COMPLETE
add_fingerprint(user)
user.middleClickOverride = clickBehavior
to_chat(user, SPAN_NOTICE("You draw a bit of power from [src], you can use <b>middle click</b> or <b>alt click</b> to release the power!"))
return ITEM_INTERACT_COMPLETE
/datum/middle_click_override/badmin_clicker
var/summon_path = /obj/item/food/cookie
/datum/middle_click_override/badmin_clicker/onClick(atom/A, mob/living/user)
var/atom/movable/newObject = new summon_path
newObject.loc = get_turf(A)
to_chat(user, SPAN_NOTICE("You release the power you had stored up, summoning \a [newObject.name]!"))
usr.loc.visible_message(SPAN_NOTICE("[user] waves [user.p_their()] hand and summons \a [newObject.name]!"))
/datum/middle_click_override/badmin_clicker/onClick(atom/target, mob/living/user)
var/atom/movable/new_object = new summon_path(get_turf(target))
user.visible_message(
SPAN_NOTICE("[user] waves [user.p_their()] hand and summons \a [new_object]!"),
SPAN_NOTICE("You release the power you had stored up, summoning \a [new_object]!"),
SPAN_HEAR("You're not sure, but you think you hear \a [new_object] appear out of thin air!")
)
..()
/datum/middle_click_override/shock_implant