From 813e88a8cbf9cfdcad8955516cbd6fe81b274f4e Mon Sep 17 00:00:00 2001
From: Contrabang <91113370+Contrabang@users.noreply.github.com>
Date: Fri, 15 Jul 2022 07:16:23 -0700
Subject: [PATCH] Changes body collision to knockdown, adds a throw_range of 4
to carbon/human (#18363)
* Begone Weaken()
* throw range
* little spacin is good
* requested changes are changed
---
code/controllers/subsystem/throwing.dm | 2 +-
code/modules/mob/living/carbon/carbon.dm | 17 ++++++++++-------
code/modules/mob/living/carbon/human/human.dm | 1 +
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm
index d991167b3e2..5e7ceb9d036 100644
--- a/code/controllers/subsystem/throwing.dm
+++ b/code/controllers/subsystem/throwing.dm
@@ -138,7 +138,7 @@ SUBSYSTEM_DEF(throwing)
thrownthing.newtonian_move(init_dir)
if(target)
- thrownthing.throw_impact(target, src)
+ thrownthing.throw_impact(target, src, speed)
if(callback)
callback.Invoke()
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 8aa88b6b5d9..a60c40ea169 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -556,7 +556,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
//Throwing stuff
-/mob/living/carbon/throw_impact(atom/hit_atom, throwingdatum)
+/mob/living/carbon/throw_impact(atom/hit_atom, throwingdatum, speed = 1)
. = ..()
if(has_status_effect(STATUS_EFFECT_CHARGING))
var/hit_something = FALSE
@@ -587,6 +587,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
return
var/hurt = TRUE
+ var/damage = 10 + 1.5 * speed // speed while thrower is standing still is 2, while walking with an aggressive grab is 2.4, highest speed is 14
/*if(istype(throwingdatum, /datum/thrownthing))
var/datum/thrownthing/D = throwingdatum
if(isrobot(D.thrower))
@@ -595,17 +596,19 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
hurt = FALSE*/
if(hit_atom.density && isturf(hit_atom))
if(hurt)
- Weaken(2 SECONDS)
- take_organ_damage(10)
+ visible_message("[src] slams into [hit_atom]!", "You slam into [hit_atom]!")
+ take_organ_damage(damage)
+ KnockDown(3 SECONDS)
+ playsound(src, 'sound/weapons/punch1.ogg', 35, 1)
if(iscarbon(hit_atom) && hit_atom != src)
var/mob/living/carbon/victim = hit_atom
if(victim.flying)
return
if(hurt)
- victim.take_organ_damage(10)
- take_organ_damage(10)
- victim.Weaken(2 SECONDS)
- Weaken(2 SECONDS)
+ victim.take_organ_damage(damage)
+ take_organ_damage(damage)
+ victim.KnockDown(3 SECONDS)
+ KnockDown(3 SECONDS)
visible_message("[src] crashes into [victim], knocking them both over!", "You violently crash into [victim]!")
playsound(src, 'sound/weapons/punch1.ogg', 50, 1)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 96c48f37a53..878f63b5fbf 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -6,6 +6,7 @@
icon_state = "body_m_s"
appearance_flags = KEEP_TOGETHER|TILE_BOUND|PIXEL_SCALE|LONG_GLIDE
deathgasp_on_death = TRUE
+ throw_range = 4
/mob/living/carbon/human/New(loc)
icon = null // This is now handled by overlays -- we just keep an icon for the sake of the map editor.