mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Allows us to drop NODROP items if there is other way to get rid of them (#21080)
* adds proc to check if we can drop nodrop items * C:/Program Files/Git/obj/effect/proc_holder/spell/touch refactor, support for wizard spells, xeno spells and changeling shield * bug fixes, cleanup * moved to signals, added support for mime fingergun * fixed bugs * cleanup * same proc for removing weapon from active or any hand * changeling fast swap exist again * cleanup * fix runtime * signals cleanup * review update * Update code/datums/spells/mime.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/datums/spells/mime.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/datums/spells/touch_attacks.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * review updates * fixing bug --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -99,17 +99,32 @@
|
||||
action_icon_state = "fingergun"
|
||||
action_background_icon_state = "bg_mime"
|
||||
var/gun = /obj/item/gun/projectile/revolver/fingergun
|
||||
var/obj/item/gun/projectile/revolver/fingergun/current_gun
|
||||
|
||||
/obj/effect/proc_holder/spell/mime/fingergun/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/human/C in targets)
|
||||
if(!istype(C.get_active_hand(), gun) && !istype(C.get_inactive_hand(), gun))
|
||||
if(!current_gun)
|
||||
to_chat(user, "<span class='notice'>You draw your fingers!</span>")
|
||||
current_gun = new gun(get_turf(user), src)
|
||||
C.drop_item()
|
||||
C.put_in_hands(new gun)
|
||||
C.put_in_hands(current_gun)
|
||||
RegisterSignal(C, COMSIG_MOB_WILLINGLY_DROP, PROC_REF(holster_hand))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Holster your fingers first.</span>")
|
||||
holster_hand(user, TRUE)
|
||||
revert_cast(user)
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell/mime/fingergun/Destroy()
|
||||
current_gun = null
|
||||
return ..()
|
||||
|
||||
/obj/effect/proc_holder/spell/mime/fingergun/proc/holster_hand(atom/target, any=FALSE)
|
||||
SIGNAL_HANDLER
|
||||
if(!current_gun || !any && action.owner.get_active_hand() != current_gun)
|
||||
return
|
||||
to_chat(action.owner, "<span class='notice'>You holster your fingers. Another time perhaps...</span>")
|
||||
QDEL_NULL(current_gun)
|
||||
|
||||
/obj/effect/proc_holder/spell/mime/fingergun/fake
|
||||
desc = "Pretend you're shooting bullets out of your fingers! 3 bullets available per cast. Use your fingers to holster them manually."
|
||||
gun = /obj/item/gun/projectile/revolver/fingergun/fake
|
||||
|
||||
Reference in New Issue
Block a user