mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
prevents xenos catching thrown items they can't hold (#21766)
* prevents xenos catching thrown items they can't hold * gogo gadget duplicate code * trait solution
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
..(AM, hitpush = FALSE)
|
||||
if(!skipcatch && in_throw_mode && !HAS_TRAIT(src, TRAIT_HANDS_BLOCKED) && HAS_TRAIT(AM, TRAIT_XENO_INTERACTABLE) && !restrained())
|
||||
throw_mode_off()
|
||||
AM.attack_hand(src)
|
||||
..(AM, skipcatch = TRUE, hitpush = FALSE)
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
/obj/item/clothing/mask/facehugger/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/proximity_monitor)
|
||||
ADD_TRAIT(src, TRAIT_XENO_INTERACTABLE, UID())
|
||||
|
||||
/obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
..()
|
||||
@@ -36,9 +37,6 @@
|
||||
/obj/item/clothing/mask/facehugger/attackby(obj/item/O, mob/user, params)
|
||||
return O.attack_obj(src, user, params)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_alien(mob/user) //can be picked up by aliens
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_hand(mob/user)
|
||||
if((stat != DEAD && !sterile) && !isalien(user))
|
||||
if(Attach(user))
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
if(AM.GetComponent(/datum/component/two_handed))
|
||||
if(get_inactive_hand())
|
||||
return FALSE
|
||||
throw_mode_off()
|
||||
put_in_active_hand(AM)
|
||||
visible_message("<span class='warning'>[src] catches [AM]!</span>")
|
||||
throw_mode_off()
|
||||
SEND_SIGNAL(src, COMSIG_CARBON_THROWN_ITEM_CAUGHT, AM)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user