From e84747510c616f1b81dcdd0a84a76e2ec159eca2 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 24 Apr 2014 21:01:01 -0700 Subject: [PATCH] Cleaned up reference to outdated proc Removed references to outdated get_equipped_items(). Still one left. Removed unnecessary override for belts. --- code/game/objects/items.dm | 12 ---------- .../objects/items/weapons/storage/belt.dm | 24 ------------------- code/modules/clothing/spacesuits/alien.dm | 6 ++++- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index f2b5e850f41..d0afa8a5764 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -237,18 +237,6 @@ /obj/item/proc/equipped(var/mob/user, var/slot) return -//returns 1 if the item is equipped by a mob, 0 otherwise. -//This might need some error trapping, not sure if get_equipped_items() is safe for non-human mobs. -/obj/item/proc/is_equipped() - if(!ismob(loc)) - return 0 - - var/mob/M = loc - if(src in M.get_equipped_items()) - return 1 - else - return 0 - //the mob M is attempting to equip this item into the slot passed through as 'slot'. Return 1 if it can do this and 0 if it can't. //If you are making custom procs but would like to retain partial or complete functionality of this one, include a 'return ..()' to where you want this to happen. //Set disable_warning to 1 if you wish it to not give you outputs. diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 3841d485a4f..2c1a9977fde 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -8,30 +8,6 @@ slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") - -/obj/item/weapon/storage/belt/proc/can_use() - return is_equipped() - - -/obj/item/weapon/storage/belt/MouseDrop(obj/over_object as obj, src_location, over_location) - var/mob/M = usr - if(!istype(over_object, /obj/screen)) - return ..() - if (src.use_sound) - playsound(src.loc, src.use_sound, 50, 1, -5) - if (!M.restrained() && !M.stat && can_use()) - switch(over_object.name) - if("r_hand") - M.u_equip(src) - M.put_in_r_hand(src) - if("l_hand") - M.u_equip(src) - M.put_in_l_hand(src) - src.add_fingerprint(usr) - return - - - /obj/item/weapon/storage/belt/utility name = "tool-belt" //Carn: utility belt is nicer, but it bamboozles the text parsing. desc = "Can hold various tools." diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index f038aa4456e..8016a99e72f 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -206,10 +206,14 @@ user << "You relax your deathgrip on the flooring." else //make sure these can only be used when equipped. - if (!is_equipped()) + if(!ishuman(user)) + return + var/mob/living/carbon/human/H = user + if (H.shoes != src) user << "You will have to put on the [src] before you can do that." return + flags |= NOSLIP magpulse = 1 canremove = 0 //kinda hard to take off magclaws when you are gripping them tightly.