From 2d3fb2df4cf5babc729e2b84871c0b1c6ad0b3e7 Mon Sep 17 00:00:00 2001 From: Geeves Date: Thu, 2 Jan 2020 20:41:36 +0200 Subject: [PATCH] Tabling Changes (#7858) Tabling isn't instant anymore, it now needs to timer on the grab to be full. (The action itself is still instant) Clicking on a table with harm intent with a grab will now smash the person's face into the table. Oh, also, I wouldn't recommend smashing a colleague's face onto a table that has shards on it, might turn out messy. --- code/modules/tables/interactions.dm | 28 ++++++++++++++++------------ html/changelogs/geeves - tabling.yml | 7 +++++++ 2 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 html/changelogs/geeves - tabling.yml diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm index 2a984b76283..55f16c2e605 100644 --- a/code/modules/tables/interactions.dm +++ b/code/modules/tables/interactions.dm @@ -142,7 +142,7 @@ // Handle harm intent grabbing/tabling. if(istype(W, /obj/item/grab) && get_dist(src,user)<2) var/obj/item/grab/G = W - if (istype(G.affecting, /mob/living)) + if(istype(G.affecting, /mob/living)) var/mob/living/M = G.affecting var/obj/occupied = turf_is_crowded() if(occupied) @@ -150,7 +150,7 @@ return if(!user.Adjacent(M)) return - if (G.state < GRAB_AGGRESSIVE) + if(G.state > GRAB_AGGRESSIVE || (G.state != GRAB_PASSIVE && world.time >= (G.last_action + UPGRADE_COOLDOWN))) if(user.a_intent == I_HURT) var/blocked = M.run_armor_check(BP_HEAD, "melee") if (prob(30 * BLOCKED_MULT(blocked))) @@ -161,21 +161,26 @@ playsound(loc, material.tableslam_noise, 50, 1) else playsound(loc, 'sound/weapons/tablehit1.ogg', 50, 1) - var/list/L = take_damage(rand(1,5)) // Shards. Extra damage, plus potentially the fact YOU LITERALLY HAVE A PIECE OF GLASS/METAL/WHATEVER IN YOUR FACE - for(var/obj/item/material/shard/S in L) + var/sanity_counter = 0 + for(var/obj/item/material/shard/S in get_turf(src)) if(prob(50)) M.visible_message("\The [S] slices [M]'s face messily!", - "\The [S] slices your face messily!") + "\The [S] slices your face messily!") M.apply_damage(10, BRUTE, BP_HEAD, blocked) - M.standard_weapon_hit_effects(S, G.assailant, 10, blocked, BP_HEAD) + sanity_counter++ + if(sanity_counter >= 3) + break + G.last_action = world.time else - to_chat(user, "You need a better grip to do that!") - return + G.affecting.forceMove(src.loc) + G.affecting.Weaken(rand(2,4)) + visible_message("[G.assailant] puts [G.affecting] on \the [src].") + qdel(W) + return else - G.affecting.forceMove(src.loc) - G.affecting.Weaken(rand(2,4)) - visible_message("[G.assailant] puts [G.affecting] on \the [src].") + to_chat(user, "You need a better grip to do that!") + return qdel(W) return @@ -238,4 +243,3 @@ Note: This proc can be overwritten to allow for different types of auto-alignmen /obj/structure/table/do_simple_ranged_interaction(var/mob/user) return - diff --git a/html/changelogs/geeves - tabling.yml b/html/changelogs/geeves - tabling.yml new file mode 100644 index 00000000000..a8e67e52685 --- /dev/null +++ b/html/changelogs/geeves - tabling.yml @@ -0,0 +1,7 @@ +author: Geeves + +delete-after: True + +changes: + - tweak: "Tabling isn't instant anymore, it now needs to timer on the grab to be full. (The action itself is still instant)" + - rscadd: "Clicking on a table with harm intent with a grab will now smash the person's face into the table."