Files
30fbcfe9b4 Belts & Trashbags (#7443)
requires #6644 

Entirely replaces how (most) belts perform insertion checks.

This pretty much allows belts to hold most things.

Armor vests are next.

Trashbags will also use the systems we use on main.

Closes #7256 and #7435

---------

Co-authored-by: silicons <silicons@silicons.dev>
2025-12-28 22:05:06 -05:00

51 lines
1.4 KiB
Plaintext

/**
* A thing you can throw that goes boom. Simple, really, but not always.
*
* TODO: /datum/grenade_effect, much like reagent / projectile effects for composition-based
* grenades
*/
/obj/item/grenade
name = "grenade"
desc = "A hand held grenade, with an adjustable timer."
w_class = WEIGHT_CLASS_SMALL
icon = 'icons/obj/grenade.dmi'
icon_state = "grenade"
item_state = "grenade"
throw_speed = 4
throw_range = 20
slot_flags = SLOT_MASK|SLOT_BELT
suit_storage_class = SUIT_STORAGE_CLASS_SOFTWEAR | SUIT_STORAGE_CLASS_HARDWEAR
belt_storage_class = BELT_CLASS_SMALL
// todo: legacy var
var/loadable = TRUE
/obj/item/grenade/on_attack_self(datum/event_args/actor/e_args)
. = ..()
if(.)
return
if(activate_inhand(e_args))
return CLICKCHAIN_DID_SOMETHING
/**
* @return TRUE to stop further inhand actions
*/
/obj/item/grenade/proc/activate_inhand(datum/event_args/actor/actor)
on_activate_inhand(actor)
return TRUE
/obj/item/grenade/proc/on_activate_inhand(datum/event_args/actor/actor)
activate(actor)
/obj/item/grenade/proc/activate_shot_from_gun(obj/item/gun/gun, datum/gun_firing_cycle/cycle)
on_activate_shot_from_gun(gun, cycle)
/obj/item/grenade/proc/on_activate_shot_from_gun(obj/item/gun/gun, datum/gun_firing_cycle/cycle)
activate(cycle.firing_actor)
/obj/item/grenade/proc/activate(datum/event_args/actor/actor)
on_activate(actor)
/obj/item/grenade/proc/on_activate(datum/event_args/actor/actor)
SHOULD_CALL_PARENT(TRUE)