From d9055b985bbf1852430f45cec322b0a144a69952 Mon Sep 17 00:00:00 2001 From: RinPin <89030906+RinPin@users.noreply.github.com> Date: Sun, 2 Jul 2023 00:35:13 -0300 Subject: [PATCH 1/2] a a --- code/game/objects/items/loadout_beacons.dm | 8 ++++- code/game/objects/items/melee/f13onehanded.dm | 31 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/loadout_beacons.dm b/code/game/objects/items/loadout_beacons.dm index ee1a8d91518..e5e3928e7f4 100644 --- a/code/game/objects/items/loadout_beacons.dm +++ b/code/game/objects/items/loadout_beacons.dm @@ -783,6 +783,12 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/melee/switchblade/PopulateContents() new /obj/item/melee/onehanded/knife/switchblade(src) +/datum/loadout_box/boomerang + entry_tag = "Boomerang" + entry_flags = LOADOUT_FLAG_WASTER | LOADOUT_FLAG_TRIBAL + entry_class = LOADOUT_CAT_MELEE_ONE + spawn_thing = /obj/item/melee/f13onehanded/boomerang + /obj/item/storage/box/gun/melee/throwing name = "throwing knife case" @@ -2164,7 +2170,7 @@ GLOBAL_LIST_EMPTY(loadout_boxes) entry_flags = LOADOUT_FLAG_TRIBAL entry_class = LOADOUT_CAT_MELEE_TWO spawn_thing = /obj/item/storage/box/gun/tribal/bmprsword -*/ +*/ /datum/loadout_box/warmace entry_tag = "Warmace" diff --git a/code/game/objects/items/melee/f13onehanded.dm b/code/game/objects/items/melee/f13onehanded.dm index 65945c69813..e831a5baeae 100644 --- a/code/game/objects/items/melee/f13onehanded.dm +++ b/code/game/objects/items/melee/f13onehanded.dm @@ -640,6 +640,37 @@ obj/item/melee/onehanded/knife/switchblade add_fingerprint(user) +/obj/item/melee/f13onehanded/boomerang + name = "boomerang" + desc = "An ancient, primitive weapon used by hunters, able to return when thrown and surprisingly powerful for a piece of wood, this one seems to be equipped with non functioning electronics" + icon_state = "boomerang" + item_state = "boomerang" + force = 30 + throwforce = 35 //so it can kill weak trash mobs in one throw + throw_speed = 3 + attack_verb = list("beat", "smacked", "clubbed", "clobbered") + sharpness = SHARP_NONE + attack_speed = CLICK_CD_MELEE + var/throw_hit_chance = 99 + +/obj/item/melee/f13onehanded/boomerang/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force) + if(ishuman(thrower)) + var/mob/living/carbon/human/H = thrower + H.throw_mode_on() //so they can catch it on the return. + return ..() + +/obj/item/melee/f13onehanded/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) + var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum) + if(thrownby && !caught) + sleep(1) + if(!QDELETED(src)) + throw_at(thrownby, throw_range+2, throw_speed, null, TRUE) + else if(!thrownby) + return + return ..() + + + // Slave whip /obj/item/melee/onehanded/slavewhip name = "slave whip" From 3653c52867f067e6b0c28145004cd50c00c1856a Mon Sep 17 00:00:00 2001 From: RinPin <89030906+RinPin@users.noreply.github.com> Date: Sun, 2 Jul 2023 17:12:28 -0300 Subject: [PATCH 2/2] adds a new boomerang item to the weapon kits + "fixes" an existing bug on the boomerang code Boomerang type weapons currently deal twice the intended damage due to a bug in their code which makes them strike the target twice, this is a bandaid fix that halves the damage so they atleast deal approximately the same damage they were intended to do. --- code/game/objects/items/melee/f13onehanded.dm | 6 +++--- code/modules/clothing/glasses/_glasses.dm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/melee/f13onehanded.dm b/code/game/objects/items/melee/f13onehanded.dm index e831a5baeae..75379f09a70 100644 --- a/code/game/objects/items/melee/f13onehanded.dm +++ b/code/game/objects/items/melee/f13onehanded.dm @@ -646,8 +646,8 @@ obj/item/melee/onehanded/knife/switchblade icon_state = "boomerang" item_state = "boomerang" force = 30 - throwforce = 35 //so it can kill weak trash mobs in one throw - throw_speed = 3 + throwforce = 18 //so it can kill weak trash mobs in one throw, a bug causes boomerang type weapons to deal double the intended damage, so this is a bandaid fix meanwhile + throw_speed = 4 attack_verb = list("beat", "smacked", "clubbed", "clobbered") sharpness = SHARP_NONE attack_speed = CLICK_CD_MELEE @@ -667,7 +667,7 @@ obj/item/melee/onehanded/knife/switchblade throw_at(thrownby, throw_range+2, throw_speed, null, TRUE) else if(!thrownby) return - return ..() + return diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 4cd11c1ce9d..ec5a77ba7bf 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -265,7 +265,7 @@ icon_state = "garb" item_state = "garb" force = 23 - throwforce = 23 + throwforce = 12 throw_speed = 4 attack_verb = list("sliced") hitsound = 'sound/weapons/bladeslice.ogg' @@ -306,7 +306,7 @@ icon_state = "gar" item_state = "gar" force = 23 - throwforce = 23 + throwforce = 12 throw_speed = 4 attack_verb = list("sliced") hitsound = 'sound/weapons/bladeslice.ogg' @@ -337,7 +337,7 @@ icon_state = "supergar" item_state = "gar" force = 23 - throwforce = 23 + throwforce = 12 sharpness = SHARP_EDGED glass_colour_type = /datum/client_colour/glass_colour/red attack_speed = CLICK_CD_MELEE * 0.8