mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 02:57:48 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user