mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Stun batons and Stun prods that are turned on cannot be stored (#20303)
* active batons and stunprods cannot be stored * now checks if baton was turned off by removing its cell or running out of charge * won't fit in bags of holding now * Update code/game/objects/items/weapons/stunbaton.dm Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Reworked to not use weight class but instead can_store and mob_can_equip * removed W_class_on var that I added, it's redundandt now that this does not use weight class * Update code/game/objects/items/weapons/stunbaton.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> * Update code/game/objects/items/weapons/stunbaton.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * disable_warning = TRUE * Update code/game/objects/items/weapons/stunbaton.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --------- Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
co-authored by
Ryan
SteelSlayer
Luc
S34N
parent
55ae864821
commit
5db00d7095
@@ -81,6 +81,18 @@
|
||||
/obj/item/melee/baton/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/melee/baton/mob_can_equip(mob/user, slot, disable_warning = TRUE)
|
||||
if(turned_on && (slot == slot_belt || slot == slot_s_store))
|
||||
to_chat(user, "<span class='warning'>You can't equip [src] while it's active!</span>")
|
||||
return FALSE
|
||||
return ..(user, slot, disable_warning = TRUE) // call parent but disable warning
|
||||
|
||||
/obj/item/melee/baton/can_enter_storage(obj/item/storage/S, mob/user)
|
||||
if(turned_on)
|
||||
to_chat(user, "<span class='warning'>[S] can't hold [src] while it's active!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/**
|
||||
* Removes the specified amount of charge from the batons power cell.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user