mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 12:29:46 +01:00
Melee Toy, Sprites - Dino Grabber (#19900)
Adds a dino grabber toy to the game. It counts as a weapon, and uses modified whip code to have a chance of disarming people. Its also now in the warehouse spawn pool as a rare item, with the weight of 1.75. It should only show up every 2-3 rounds. Also adds an object sprite and in hand sprites. --------- Signed-off-by: courierbravo <73250577+courierbravo@users.noreply.github.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Co-authored-by: Hazelrat <ric.whe.don@gmail.com>
This commit is contained in:
co-authored by
Fluffy
Hazelrat
parent
bef0f2694e
commit
86d7e8237e
@@ -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]!"))
|
||||
|
||||
@@ -149,3 +149,4 @@
|
||||
to_chat(target_mob, SPAN_WARNING("<b> You have been banned FOR NO REISIN by [user]</b>"))
|
||||
to_chat(user, SPAN_WARNING(" You have <b>BANNED</b> [target_mob]"))
|
||||
playsound(loc, 'sound/effects/adminhelp.ogg', 15)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user