mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
baton (#9760)
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
name = "stun baton"
|
name = "stun baton"
|
||||||
desc = "A stun baton for incapacitating people with."
|
desc = "A stun baton for incapacitating people with."
|
||||||
icon_state = "stun baton"
|
icon_state = "stun baton"
|
||||||
item_state = "baton"
|
item_state = "baton0"
|
||||||
|
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/swords_axes.dmi', "right_hand" = 'icons/mob/in-hand/right/swords_axes.dmi')
|
||||||
flags = FPRINT
|
flags = FPRINT
|
||||||
slot_flags = SLOT_BELT
|
slot_flags = SLOT_BELT
|
||||||
force = 10
|
force = 10
|
||||||
@@ -47,10 +48,19 @@
|
|||||||
/obj/item/weapon/melee/baton/update_icon()
|
/obj/item/weapon/melee/baton/update_icon()
|
||||||
if(status)
|
if(status)
|
||||||
icon_state = "[initial(name)]_active"
|
icon_state = "[initial(name)]_active"
|
||||||
|
item_state = "baton1"
|
||||||
else if(!bcell)
|
else if(!bcell)
|
||||||
icon_state = "[initial(name)]_nocell"
|
icon_state = "[initial(name)]_nocell"
|
||||||
|
item_state = "baton0"
|
||||||
else
|
else
|
||||||
icon_state = "[initial(name)]"
|
icon_state = "[initial(name)]"
|
||||||
|
item_state = "baton0"
|
||||||
|
|
||||||
|
if (istype(loc,/mob/living/carbon))
|
||||||
|
var/mob/living/carbon/M = loc
|
||||||
|
M.update_inv_back()
|
||||||
|
M.update_inv_l_hand()
|
||||||
|
M.update_inv_r_hand()
|
||||||
|
|
||||||
/obj/item/weapon/melee/baton/examine(mob/user)
|
/obj/item/weapon/melee/baton/examine(mob/user)
|
||||||
..()
|
..()
|
||||||
@@ -86,6 +96,7 @@
|
|||||||
user.simple_message("<span class='warning'>You grab the [src] on the wrong side.</span>",
|
user.simple_message("<span class='warning'>You grab the [src] on the wrong side.</span>",
|
||||||
"<span class='danger'>The [name] blasts you with its power!</span>")
|
"<span class='danger'>The [name] blasts you with its power!</span>")
|
||||||
user.Weaken(stunforce*3)
|
user.Weaken(stunforce*3)
|
||||||
|
playsound(loc, "sparks", 75, 1, -1)
|
||||||
deductcharge(hitcost)
|
deductcharge(hitcost)
|
||||||
return
|
return
|
||||||
if(bcell && bcell.charge >= hitcost)
|
if(bcell && bcell.charge >= hitcost)
|
||||||
@@ -102,6 +113,7 @@
|
|||||||
else
|
else
|
||||||
user.simple_message("<span class='warning'>[src] is out of charge.</span>",
|
user.simple_message("<span class='warning'>[src] is out of charge.</span>",
|
||||||
"<span class='warning'>[src] refuses to obey you.</span>")
|
"<span class='warning'>[src] refuses to obey you.</span>")
|
||||||
|
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
|
/obj/item/weapon/melee/baton/attack(mob/M, mob/user)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
Reference in New Issue
Block a user