diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index 6cf01ec8ff..f95ebf82b5 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -102,9 +102,8 @@ //stops TK grabs being equipped anywhere but into hands /obj/item/tk_grab/equipped(mob/user, slot) if(slot == SLOT_HANDS) - return + return ..() qdel(src) - return /obj/item/tk_grab/examine(user) if (focus) diff --git a/code/datums/martial/boxing.dm b/code/datums/martial/boxing.dm index e3c7726d61..4682595aec 100644 --- a/code/datums/martial/boxing.dm +++ b/code/datums/martial/boxing.dm @@ -58,12 +58,10 @@ var/datum/martial_art/boxing/style = new /obj/item/clothing/gloves/boxing/equipped(mob/user, slot) - if(!ishuman(user)) - return - if(slot == SLOT_GLOVES) + . = ..() + if(ishuman(user) && slot == SLOT_GLOVES) var/mob/living/carbon/human/H = user style.teach(H,TRUE) - return /obj/item/clothing/gloves/boxing/dropped(mob/user) . = ..() diff --git a/code/datums/martial/krav_maga.dm b/code/datums/martial/krav_maga.dm index 50438d9d8d..c2fe24a20d 100644 --- a/code/datums/martial/krav_maga.dm +++ b/code/datums/martial/krav_maga.dm @@ -196,9 +196,8 @@ var/datum/martial_art/krav_maga/style = new /obj/item/clothing/gloves/krav_maga/equipped(mob/user, slot) - if(!ishuman(user)) - return - if(slot == SLOT_GLOVES) + . = ..() + if(ishuman(user) && slot == SLOT_GLOVES) var/mob/living/carbon/human/H = user style.teach(H,1) diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm index 87fcf78964..18fd8e7b18 100644 --- a/code/datums/martial/wrestling.dm +++ b/code/datums/martial/wrestling.dm @@ -377,7 +377,7 @@ var/turf/ST = null var/falling = 0 var/damage = damage_roll(A,D) - + for (var/obj/O in oview(1, A)) if (O.density == 1) if (O == A) @@ -472,12 +472,10 @@ var/datum/martial_art/wrestling/style = new /obj/item/storage/belt/champion/wrestling/equipped(mob/user, slot) - if(!ishuman(user)) - return - if(slot == SLOT_BELT) + . = ..() + if(ishuman(user) && slot == SLOT_BELT) var/mob/living/carbon/human/H = user style.teach(H,1) - return /obj/item/storage/belt/champion/wrestling/dropped(mob/user) . = ..() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9f1b830cf0..e998cf69bd 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -68,6 +68,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb var/click_delay = CLICK_CD_MELEE var/slot_flags = 0 //This is used to determine on which slots an item can fit. + var/current_equipped_slot pass_flags = PASSTABLE pressure_resistance = 4 var/obj/item/master = null @@ -315,6 +316,10 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb return if(anchored) return + if(loc == user && current_equipped_slot && current_equipped_slot != SLOT_HANDS) + if(current_equipped_slot in user.check_obscured_slots()) + to_chat(src, "You are unable to unequip that while wearing other garments over it!") + return FALSE if(resistance_flags & ON_FIRE) var/mob/living/carbon/C = user @@ -336,7 +341,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb C.update_damage_overlays() return - if(acid_level > 20 && !ismob(loc))// so we can still remove the clothes on us that have acid. + if(acid_level > 20 && ismob(loc))// so we can still remove the clothes on us that have acid. var/mob/living/carbon/C = user if(istype(C)) if(!C.gloves || (!(C.gloves.resistance_flags & (UNACIDABLE|ACID_PROOF)))) @@ -379,6 +384,11 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb return if(anchored) return + if(loc == user && current_equipped_slot && current_equipped_slot != SLOT_HANDS) + if(current_equipped_slot in user.check_obscured_slots()) + to_chat(src, "You are unable to unequip that while wearing other garments over it!") + return FALSE + SEND_SIGNAL(loc, COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE) @@ -423,6 +433,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb /obj/item/proc/dropped(mob/user) SHOULD_CALL_PARENT(TRUE) + current_equipped_slot = null for(var/X in actions) var/datum/action/A = X A.Remove(user) @@ -470,7 +481,9 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb // for items that can be placed in multiple slots // note this isn't called during the initial dressing of a player /obj/item/proc/equipped(mob/user, slot) + SHOULD_CALL_PARENT(TRUE) . = SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) + current_equipped_slot = slot if(!(. & COMPONENT_NO_GRANT_ACTIONS)) for(var/X in actions) var/datum/action/A = X diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index bfbacb1a34..de32375642 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -794,6 +794,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM reagents.clear_reagents() /obj/item/clothing/mask/vape/equipped(mob/user, slot) + . = ..() if(slot == SLOT_WEAR_MASK) if(!screw) to_chat(user, "You start puffing on the vape.") diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 4b8728e426..1f69cdae2e 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -355,6 +355,7 @@ emaggedhitdamage = 0 /obj/item/borg/lollipop/equipped() + . = ..() check_amount() /obj/item/borg/lollipop/dropped(mob/user) diff --git a/code/modules/awaymissions/mission_code/Academy.dm b/code/modules/awaymissions/mission_code/Academy.dm index f714a86f22..129e6d7a2b 100644 --- a/code/modules/awaymissions/mission_code/Academy.dm +++ b/code/modules/awaymissions/mission_code/Academy.dm @@ -189,6 +189,8 @@ if(!ishuman(user) || !user.mind || (user.mind in SSticker.mode.wizards)) to_chat(user, "You feel the magic of the dice is restricted to ordinary humans! You should leave it alone.") user.dropItemToGround(src) + return + return ..() /obj/item/dice/d20/fate/proc/effect(var/mob/living/carbon/human/user,roll) diff --git a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm deleted file mode 100644 index e2537f0f4f..0000000000 --- a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm +++ /dev/null @@ -1,5 +0,0 @@ -/mob/living/carbon/alien/humanoid/doUnEquip(obj/item/I) - . = ..() - if(!. || !I) - return - diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index eb1b38b9ff..e35c905539 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -88,6 +88,7 @@ Die() /obj/item/clothing/mask/facehugger/equipped(mob/M) + . = ..() Attach(M) /obj/item/clothing/mask/facehugger/Crossed(atom/target) @@ -254,7 +255,7 @@ return FALSE if(AmBloodsucker(M)) return FALSE - + if(ismonkey(M)) return 1 diff --git a/tgstation.dme b/tgstation.dme index c43a6de0e4..736c9de89d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2415,7 +2415,6 @@ #include "code\modules\mob\living\carbon\alien\humanoid\death.dm" #include "code\modules\mob\living\carbon\alien\humanoid\humanoid.dm" #include "code\modules\mob\living\carbon\alien\humanoid\humanoid_defense.dm" -#include "code\modules\mob\living\carbon\alien\humanoid\inventory.dm" #include "code\modules\mob\living\carbon\alien\humanoid\life.dm" #include "code\modules\mob\living\carbon\alien\humanoid\queen.dm" #include "code\modules\mob\living\carbon\alien\humanoid\update_icons.dm"