mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 02:24:11 +01:00
No longer drop bodyparts still in use
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
if(!I) //If there's nothing to drop, the drop is automatically succesfull. If(unEquip) should generally be used to check for NODROP.
|
||||
return 1
|
||||
|
||||
if((I.flags & NODROP) && !force)
|
||||
if(!canUnEquip(I, force))
|
||||
return 0
|
||||
|
||||
if(I == r_hand)
|
||||
|
||||
@@ -569,6 +569,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
return 1
|
||||
return
|
||||
|
||||
|
||||
/mob/living/carbon/unEquip(obj/item/I) //THIS PROC DID NOT CALL ..()
|
||||
. = ..() //Sets the default return value to what the parent returns.
|
||||
if(!. || !I) //We don't want to set anything to null if the parent returned 0.
|
||||
@@ -1041,4 +1042,4 @@ so that different stomachs can handle things in different ways VB*/
|
||||
|
||||
/mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0)
|
||||
if(hud_used && hud_used.internals)
|
||||
hud_used.internals.icon_state = "internal[internal_state]"
|
||||
hud_used.internals.icon_state = "internal[internal_state]"
|
||||
|
||||
@@ -105,15 +105,19 @@
|
||||
if(slot_tie)
|
||||
return 1
|
||||
|
||||
// The actual dropping happens at the mob level - checks to prevent drops should
|
||||
// come here
|
||||
/mob/living/carbon/human/canUnEquip(obj/item/I, force)
|
||||
. = ..()
|
||||
var/obj/item/organ/O = I
|
||||
if(istype(O) && O.owner == src)
|
||||
. = 0 // keep a good grip on your heart
|
||||
|
||||
/mob/living/carbon/human/unEquip(obj/item/I)
|
||||
. = ..() //See mob.dm for an explanation on this and some rage about people copypasting instead of calling ..() like they should.
|
||||
if(!. || !I)
|
||||
return
|
||||
|
||||
var/obj/item/organ/internal/O = I //Organs shouldn't be removed unless you call droplimb.
|
||||
if(istype(O) && O.owner == src)
|
||||
return
|
||||
|
||||
if(I == wear_suit)
|
||||
if(s_store)
|
||||
unEquip(s_store, 1) //It makes no sense for your suit storage to stay on you if you drop your suit.
|
||||
|
||||
Reference in New Issue
Block a user