mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Augments and Robot Modules Cannot be dropped, moved, embedded (#14266)
This commit is contained in:
@@ -22,7 +22,10 @@
|
||||
//set disable_warning to disable the 'you are unable to equip that' warning.
|
||||
//unset redraw_mob to prevent the mob from being redrawn at the end.
|
||||
/mob/proc/equip_to_slot_if_possible(obj/item/W as obj, slot, del_on_fail = FALSE, disable_warning = FALSE, redraw_mob = TRUE, ignore_blocked = FALSE, assisted_equip = FALSE)
|
||||
if(!istype(W)) return 0
|
||||
if(!istype(W))
|
||||
return FALSE
|
||||
if(W.item_flags & NOMOVE) //Cannot move NOMOVE items from one inventory slot to another. Cannot do canremove here because then BSTs spawn naked.
|
||||
return FALSE
|
||||
|
||||
if(!W.mob_can_equip(src, slot, disable_warning, ignore_blocked))
|
||||
if(del_on_fail)
|
||||
@@ -393,12 +396,13 @@ var/list/slot_equipment_priority = list( \
|
||||
continue
|
||||
return TRUE //Something is stopping us. Takes off throw mode.
|
||||
|
||||
remove_from_mob(I)
|
||||
make_item_drop_sound(I)
|
||||
I.forceMove(T)
|
||||
return TRUE
|
||||
if(unEquip(I))
|
||||
make_item_drop_sound(I)
|
||||
I.forceMove(T)
|
||||
return TRUE
|
||||
|
||||
remove_from_mob(item)
|
||||
if(!unEquip(item))
|
||||
return TRUE
|
||||
|
||||
if(is_pacified())
|
||||
to_chat(src, "<span class='notice'>You set [item] down gently on the ground.</span>")
|
||||
|
||||
@@ -102,11 +102,11 @@
|
||||
apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags, I.armor_penetration)
|
||||
|
||||
//Melee weapon embedded object code.
|
||||
if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I))
|
||||
if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I) && I.canremove)
|
||||
var/damage = effective_force //just the effective damage used for sorting out embedding, no further damage is applied here
|
||||
damage *= 1 - get_blocked_ratio(hit_zone, I.damtype, I.damage_flags(), I.armor_penetration, I.force)
|
||||
|
||||
if(I.can_embed)//If this weapon is allowed to embed in people
|
||||
if(I.can_embed) //If this weapon is allowed to embed in people.
|
||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||
var/sharp = damage_flags & DAM_SHARP
|
||||
var/edge = damage_flags & DAM_EDGE
|
||||
|
||||
@@ -443,12 +443,15 @@
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
//Actually disarm them
|
||||
//Actually disarm them, if possible
|
||||
for(var/obj/item/I in holding)
|
||||
drop_from_inventory(I)
|
||||
visible_message("<span class='danger'>[M] has disarmed [src]!</span>")
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
if(unEquip(I))
|
||||
visible_message(SPAN_DANGER("\The [M] has disarmed \the [src]!"))
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
else
|
||||
to_chat(M, SPAN_WARNING("You cannot disarm \the [I] from \the [src], as it's attached to them!"))
|
||||
//No return here is intentional, as it will then try to disarm other items, and/or play a failed disarm message
|
||||
|
||||
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] attempted to disarm [src]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user