diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 32e37245ce1..4c61a95ea25 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -84,7 +84,7 @@ if (M.timeofdeath + 6000 < world.time) continue var/turf/T = get_turf(M) - if(T) continue + if(!T) continue if(T.z == 2) continue var/tmpname = M.real_name if(areaindex[tmpname]) @@ -368,4 +368,4 @@ if(com) com.icon_state = "tele0" else - icon_state = "controller" + icon_state = "controller" diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 7b6042ae299..d03ab1a6d8d 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -218,7 +218,7 @@ return 0 if(!isturf(O.loc)) return 0 - if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis) + if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.lying) return 0 if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1)) return 0 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 5adf36e57e9..3801eafcd69 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -284,6 +284,9 @@ /obj/structure/table/attackby(obj/item/weapon/W, mob/user) if (istype(W, /obj/item/weapon/grab) && get_dist(src, user) < 2) var/obj/item/weapon/grab/G = W + if(G.affecting.buckled) + user << "[G.affecting] is buckled to [G.affecting.buckled]!" + return if(G.state < GRAB_AGGRESSIVE) user << "You need a better grip to do that!" return @@ -322,8 +325,7 @@ return user.drop_item(src) - //if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl - return + return 1 /* @@ -339,6 +341,9 @@ if (istype(W, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = W + if(G.affecting.buckled) + user << "[G.affecting] is buckled to [G.affecting.buckled]!" + return if(G.state < GRAB_AGGRESSIVE) user << "You need a better grip to do that!" return @@ -357,6 +362,7 @@ playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) del(src) return + if(isrobot(user)) return if(istype(W, /obj/item/weapon/melee/energy/blade)) @@ -373,7 +379,7 @@ user.drop_item(src) //if(W && W.loc) W.loc = src.loc - return + return 1 /* @@ -390,6 +396,9 @@ if (istype(W, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = W + if(G.affecting.buckled) + user << "[G.affecting] is buckled to [G.affecting.buckled]!" + return if(G.state < GRAB_AGGRESSIVE) user << "You need a better grip to do that!" return @@ -451,7 +460,7 @@ user.drop_item(src) //if(W && W.loc) W.loc = src.loc - return + return 1 /* @@ -514,11 +523,12 @@ playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) del(src) return + if(isrobot(user)) return user.drop_item() if(W && W.loc) W.loc = src.loc - return + return 1 /obj/structure/rack/meteorhit(obj/O as obj) del(src) diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 275d35e4da1..d2498752e81 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -530,4 +530,4 @@ turf/simulated/floor/proc/update_icon() burnt = 0 broken = 0 else - user << "\blue You need more welding fuel to complete this task." \ No newline at end of file + user << "\blue You need more welding fuel to complete this task." diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index f3319758eff..60957386fcd 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -440,22 +440,31 @@ var/global/list/g_fancy_list_of_safe_types = null return if (istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - if (H.wear_id) - var/obj/item/weapon/card/id/id = H.wear_id - if(istype(H.wear_id, /obj/item/device/pda)) - var/obj/item/device/pda/pda = H.wear_id - id = pda.id + var/obj/item/worn = H.wear_id + var/obj/item/weapon/card/id/id = null + if(worn) + id = worn.GetID() + if(id) id.icon_state = "gold" - id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() + id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() else - var/obj/item/weapon/card/id/id = new/obj/item/weapon/card/id(M); - id.icon_state = "gold" - id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() + id = new /obj/item/weapon/card/id/gold(H.loc) + id.access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access() id.registered_name = H.real_name id.assignment = "Captain" id.name = "[id.registered_name]'s ID Card ([id.assignment])" - H.equip_to_slot_or_del(id, slot_wear_id) - H.update_inv_wear_id() + + if(worn) + if(istype(worn,/obj/item/device/pda)) + worn:id = id + id.loc = worn + else if(istype(worn,/obj/item/weapon/storage/wallet)) + worn:front_id = id + id.loc = worn + worn.update_icon() + else + H.equip_to_slot(id,slot_wear_id) + else alert("Invalid mob") feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 14ec3a49e10..1d51a302f34 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -36,6 +36,8 @@ //Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code. /obj/item/weapon/grab/proc/throw() if(affecting) + if(affecting.buckled) + return null if(state >= GRAB_AGGRESSIVE) return affecting return null @@ -78,6 +80,7 @@ affecting.drop_item() affecting.hand = h for(var/obj/item/weapon/grab/G in affecting.grabbed_by) + if(G == src) continue if(G.state == GRAB_AGGRESSIVE) allow_upgrade = 0 if(allow_upgrade) @@ -106,7 +109,7 @@ return if(assailant.next_move > world.time) return - if(last_upgrade > world.time + UPGRADE_COOLDOWN) + if(world.time < (last_upgrade + UPGRADE_COOLDOWN)) return if(!assailant.canmove || assailant.lying) del(src) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 627b7f26358..d5c1cc9eb22 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -122,10 +122,9 @@ /obj/item/weapon/reagent_containers/food/snacks/attackby(obj/item/weapon/W, mob/user) if(istype(W,/obj/item/weapon/storage)) ..() // -> item/attackby() - if(istype(W,/obj/item/weapon/storage)) - ..() // -> item/attackby() + return 0 if((slices_num <= 0 || !slices_num) || !slice_path) - return 1 + return 0 var/inaccurate = 0 if( \ istype(W, /obj/item/weapon/kitchenknife) || \ @@ -143,7 +142,7 @@ inaccurate = 1 else if(W.w_class <= 2 && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) if(!iscarbon(user)) - return 1 + return 0 user << "You slip [W] inside [src]." user.u_equip(W) if ((user.client && user.s_active != src)) @@ -151,9 +150,10 @@ W.dropped(user) add_fingerprint(user) contents += W - return + return 1 // no afterattack here else - return 1 + return 0 // --- this is everything that is NOT a slicing implement, and which is not being slipped into food; allow afterattack --- + if ( \ !isturf(src.loc) || \ !(locate(/obj/structure/table) in src.loc) && \ @@ -162,6 +162,7 @@ ) user << "You cannot slice [src] here! You need a table or at least a tray." return 1 + var/slices_lost = 0 if (!inaccurate) user.visible_message( \ @@ -178,7 +179,7 @@ for(var/i=1 to (slices_num-slices_lost)) var/obj/slice = new slice_path (src.loc) reagents.trans_to(slice,reagents_per_slice) - del(src) + del(src) // so long and thanks for all the fish /obj/item/weapon/reagent_containers/food/snacks/Del()