diff --git a/code/game/objects/stacks/glass.dm b/code/game/objects/stacks/glass.dm index c52585376a7..645936a6fc2 100644 --- a/code/game/objects/stacks/glass.dm +++ b/code/game/objects/stacks/glass.dm @@ -19,15 +19,9 @@ SHARDS user << "\b There is not enough wire in this coil. You need 5 lengths." return CC.use(5) - src.use(1) user << "\blue You attach wire to the [name]." new /obj/item/stack/light_w(user.loc) - if(CC && CC.amount <= 0) //CC may have already been deleted by 'CC.use(5)' a few lines up. - user.u_equip(CC) - del(CC) - if(src.amount <= 0) - user.u_equip(src) - del(src) + src.use(1) else if( istype(W, /obj/item/stack/rods) ) var/obj/item/stack/rods/V = W var/obj/item/stack/sheet/rglass/RG = new (user.loc) diff --git a/code/game/throwing.dm b/code/game/throwing.dm index b0ffcacb647..884557438a8 100644 --- a/code/game/throwing.dm +++ b/code/game/throwing.dm @@ -27,7 +27,6 @@ /mob/living/carbon/proc/throw_item(atom/target) src.throw_mode_off() - if(usr.stat || !target) return if(target.type == /obj/screen) return @@ -36,14 +35,28 @@ if(!item) return + if (istype(item, /obj/item/weapon/grab)) + var/obj/item/weapon/grab/G = item + item = G.throw() //throw the person instead of the grab + if(ismob(item)) + var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors + var/turf/end_T = get_turf(target) + if(start_T && end_T) + var/mob/M = item + var/start_T_descriptor = "tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]" + var/end_T_descriptor = "tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]" + + M.attack_log += text("\[[time_stamp()]\] Has been thrown by [usr.name] ([usr.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") + usr.attack_log += text("\[[time_stamp()]\] Has thrown [M.name] ([M.ckey]) from [start_T_descriptor] with the target [end_T_descriptor]") + + if(!item) return //Grab processing has a chance of returning null + u_equip(item) update_icons() if(src.client) src.client.screen -= item - item.loc = src.loc - if (istype(item, /obj/item/weapon/grab)) - item = item:throw() //throw the person instead of the grab + item.loc = src.loc if(istype(item, /obj/item)) item:dropped(src) // let it know it's been dropped diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 60e01b7c661..31a79218fb8 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -21,17 +21,17 @@ if(affecting) if(state >= 2) var/grabee = affecting - spawn(0) + spawn(1) del(src) return grabee else - spawn(0) + spawn(1) del(src) return null else if(structure) var/grabee = structure - spawn(0) + spawn(1) del(src) return grabee