From cd1cf1e1e32c95c7154241a432c08af799e44757 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 8 Dec 2019 22:01:50 -0700
Subject: [PATCH 1/8] Update carbon.dm
---
code/modules/mob/living/carbon/carbon.dm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 3a9495a5cb..568edaa8d5 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -157,6 +157,7 @@
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
to_chat(src, "You're too exhausted.")
return
+ var/random_turn = a_itnent == INTENT_DISARM
//END OF CIT CHANGES
var/atom/movable/thrown_thing
@@ -960,4 +961,4 @@
/mob/living/carbon/transfer_ckey(mob/new_mob, send_signal = TRUE)
if(combatmode)
toggle_combat_mode(TRUE, TRUE)
- return ..()
\ No newline at end of file
+ return ..()
From f8c6f0eb8a92e0025e9921df3cfbb92dfb407e92 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 8 Dec 2019 22:03:35 -0700
Subject: [PATCH 2/8] Update items.dm
---
code/game/objects/items.dm | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index c5d198c05f..b7f6ef550f 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -578,21 +578,22 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
itempush = 0 //too light to push anything
return A.hitby(src, 0, itempush)
-/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
+/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, messy_throw = TRUE)
thrownby = thrower
- callback = CALLBACK(src, .proc/after_throw, callback) //replace their callback with our own
+ callback = CALLBACK(src, .proc/after_throw, callback, messy_throw) //replace their callback with our own
. = ..(target, range, speed, thrower, spin, diagonals_first, callback)
-/obj/item/proc/after_throw(datum/callback/callback)
+/obj/item/proc/after_throw(datum/callback/callback, messy_throw)
if (callback) //call the original callback
. = callback.Invoke()
throw_speed = initial(throw_speed) //explosions change this.
item_flags &= ~IN_INVENTORY
- var/matrix/M = matrix(transform)
- M.Turn(rand(-170, 170))
- transform = M
- pixel_x = rand(-8, 8)
- pixel_y = rand(-8, 8)
+ if(messy_throw)
+ var/matrix/M = matrix(transform)
+ M.Turn(rand(-170, 170))
+ transform = M
+ pixel_x = rand(-8, 8)
+ pixel_y = rand(-8, 8)
/obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage
if(!newLoc)
From 5cbcc064976ce515786218a5ead8e68e7252e165 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 8 Dec 2019 22:04:32 -0700
Subject: [PATCH 3/8] Update objs.dm
---
code/game/objects/objs.dm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index e6c7f987d5..da9cd6ba82 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -80,13 +80,12 @@
SEND_SIGNAL(src, COMSIG_OBJ_SETANCHORED, anchorvalue)
anchored = anchorvalue
-/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback)
- ..()
+/obj/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, messy_throw)
+ . = ..()
if(obj_flags & FROZEN)
visible_message("[src] shatters into a million pieces!")
qdel(src)
-
/obj/assume_air(datum/gas_mixture/giver)
if(loc)
return loc.assume_air(giver)
From 4ba64f5fa767f62a065dfd01a7755cce954f2fea Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 8 Dec 2019 22:05:13 -0700
Subject: [PATCH 4/8] Update atoms_movable.dm
---
code/game/atoms_movable.dm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index ef20b6e35e..6bc960332d 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -515,10 +515,10 @@
step(src, AM.dir)
..()
-/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback)
- return throw_at(target, range, speed, thrower, spin, diagonals_first, callback)
+/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback, messy_throw = TRUE)
+ return throw_at(target, range, speed, thrower, spin, diagonals_first, callback, messy_throw)
-/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback) //If this returns FALSE then callback will not be called.
+/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback, messy_throw = TURE) //If this returns FALSE then callback will not be called.
. = FALSE
if (!target || speed <= 0)
return
From 0dc69942a9411dee111c95f5778b7a10e7b2223b Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 8 Dec 2019 22:08:29 -0700
Subject: [PATCH 5/8] Update carbon.dm
---
code/modules/mob/living/carbon/carbon.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 568edaa8d5..413bfb0f14 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -194,7 +194,7 @@
do_attack_animation(target, no_effect = 1)
playsound(loc, 'sound/weapons/punchmiss.ogg', 50, 1, -1)
newtonian_move(get_dir(target, src))
- thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src)
+ thrown_thing.throw_at(target, thrown_thing.throw_range, thrown_thing.throw_speed, src, null, null, null, random_turn)
/mob/living/carbon/restrained(ignore_grab)
. = (handcuffed || (!ignore_grab && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE))
From 1866276d38d577601625d7d5cd221a46be6e05b7 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Sun, 8 Dec 2019 22:13:15 -0700
Subject: [PATCH 6/8] wrong intent
---
code/modules/mob/living/carbon/carbon.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 413bfb0f14..e3ee7db90e 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -157,7 +157,7 @@
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
to_chat(src, "You're too exhausted.")
return
- var/random_turn = a_itnent == INTENT_DISARM
+ var/random_turn = a_intent == INTENT_HARM
//END OF CIT CHANGES
var/atom/movable/thrown_thing
From d8dd0a4db599beecd064c010ee74d2403b18064a Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Mon, 9 Dec 2019 12:45:27 -0700
Subject: [PATCH 7/8] bet
Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>
---
code/game/objects/items.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index b7f6ef550f..a410827347 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -580,7 +580,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, messy_throw = TRUE)
thrownby = thrower
- callback = CALLBACK(src, .proc/after_throw, callback, messy_throw) //replace their callback with our own
+ callback = CALLBACK(src, .proc/after_throw, callback, (spin && messy_throw)) //replace their callback with our own
. = ..(target, range, speed, thrower, spin, diagonals_first, callback)
/obj/item/proc/after_throw(datum/callback/callback, messy_throw)
From f42164964752c99470b200cb2186c5fb86834f4d Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Mon, 9 Dec 2019 23:00:59 -0700
Subject: [PATCH 8/8] Update atoms_movable.dm
---
code/game/atoms_movable.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 6bc960332d..7c57de74a4 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -518,7 +518,7 @@
/atom/movable/proc/safe_throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback, messy_throw = TRUE)
return throw_at(target, range, speed, thrower, spin, diagonals_first, callback, messy_throw)
-/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback, messy_throw = TURE) //If this returns FALSE then callback will not be called.
+/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback, messy_throw = TRUE) //If this returns FALSE then callback will not be called.
. = FALSE
if (!target || speed <= 0)
return