diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index a6e1dd99782..73c92d7ee09 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -200,3 +200,47 @@ desc = "A ceremonial sword issued to Sol marine officers as part of their dress uniform." icon_state = "marineofficersword" item_state = "marineofficersword" + +/obj/item/melee/dinograbber + name = "dino grabber" + desc = "A plastic T-Rex head on a thin aluminum tube. A piece of string links the jaw and a trigger, allowing you to grab \ + objects with it. Perfect for annoying your friends!" + icon = 'icons/obj/dinograbber.dmi' + icon_state = "dinograbber" + item_state = "dinograbber" + contained_sprite = TRUE + slot_flags = SLOT_BELT + force = 0 + throwforce = 0 + w_class = WEIGHT_CLASS_NORMAL + throw_speed = 7 + throw_range = 15 + attack_verb = list("grabbed at") + var/drop_result = FALSE + +/obj/item/melee/dinograbber/attack(mob/living/target_mob, mob/living/user, target_zone) + ..() + + if(!ishuman(target_mob)) + return + drop_result = FALSE + + // 20% chance to disarm someone per hit, not including the chance to miss with the weapon + if(prob(20)) + // If hit in a valid zone, check and drop the item held in the respective hand, only working for items that are weight class small or below + switch(target_zone) + if(BP_L_HAND, BP_L_ARM) + if(target_mob.l_hand && (target_mob.l_hand != src) && target_mob.l_hand.w_class <= WEIGHT_CLASS_SMALL) + target_mob.drop_l_hand() + drop_result = TRUE + + if(BP_R_HAND, BP_R_ARM) + if(target_mob.r_hand && (target_mob.r_hand != src) && target_mob.r_hand.w_class <= WEIGHT_CLASS_SMALL) + target_mob.drop_r_hand() + drop_result = TRUE + + // Visible messages for either result. + if(drop_result) + user.visible_message(SPAN_DANGER("\The [user] disarms \the [target_mob] with \the [src]!"), SPAN_NOTICE("You successfully disarm \the [target_mob] with \the [src]!")) + else + user.visible_message(SPAN_DANGER("\The [user] fail to disarm \the [target_mob] with \the [src]!"), SPAN_NOTICE("You fail to disarm \the [target_mob] with \the [src]!")) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index f99d61646f9..357592130c4 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -149,3 +149,4 @@ to_chat(target_mob, SPAN_WARNING(" You have been banned FOR NO REISIN by [user]")) to_chat(user, SPAN_WARNING(" You have BANNED [target_mob]")) playsound(loc, 'sound/effects/adminhelp.ogg', 15) + diff --git a/code/modules/cargo/random_stock/t3_rare.dm b/code/modules/cargo/random_stock/t3_rare.dm index 39ba37bfc61..115022c0812 100644 --- a/code/modules/cargo/random_stock/t3_rare.dm +++ b/code/modules/cargo/random_stock/t3_rare.dm @@ -164,4 +164,7 @@ STOCK_ITEM_RARE(pistols, 1) var/type = pickweight(pistols) new type(L) +STOCK_ITEM_RARE(dinograbber, 1.75) + new /obj/item/melee/dinograbber(L) + STOCK_ITEM_RARE(nothing, 0) diff --git a/html/changelogs/courierbravo-dinograbber.yml b/html/changelogs/courierbravo-dinograbber.yml new file mode 100644 index 00000000000..93fdbf03fd8 --- /dev/null +++ b/html/changelogs/courierbravo-dinograbber.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: CourierBravo + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added the Dino Grabber. A toy weapon, that does no damage. But, it has a 1 in 5 chance of disarming a target you attack with it. Works the same way as whips, so targeting anywhere but the hands will not trigger the disarm." + - rscadd: "Added the Dino Grabber to the warehouse rare item spawn pool." + - imageadd: "Added an object sprite and in hand sprites for the dino grabber. Thanks to @_bluebeerry for the object sprite." diff --git a/icons/obj/dinograbber.dmi b/icons/obj/dinograbber.dmi new file mode 100644 index 00000000000..81685644abd Binary files /dev/null and b/icons/obj/dinograbber.dmi differ