mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-03 14:12:29 +00:00
* Update robot_items.dm * if () > if() * Apply suggestions from code review Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> * Update code/game/objects/items/robot/robot_items.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> --------- Signed-off-by: CRUNCH <143041327+Fordoxia@users.noreply.github.com> Co-authored-by: chuga-git <98280110+chuga-git@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
41 lines
1.3 KiB
Plaintext
41 lines
1.3 KiB
Plaintext
/**********************************************************************
|
|
Cyborg Spec Items
|
|
***********************************************************************/
|
|
/obj/item/borg
|
|
icon = 'icons/mob/robot_items.dmi'
|
|
var/powerneeded // Percentage of power remaining required to run item
|
|
|
|
/*
|
|
The old, instant-stun borg arm.
|
|
Keeping it in for adminabuse but the malf one is /obj/item/melee/baton/borg_stun_arm
|
|
*/
|
|
/obj/item/borg/stun
|
|
name = "electrically-charged arm"
|
|
icon_state = "elecarm_active"
|
|
new_attack_chain = TRUE
|
|
var/charge_cost = 30
|
|
|
|
/obj/item/borg/stun/attack(mob/living/target, mob/living/silicon/robot/user, params)
|
|
if(..())
|
|
return FINISH_ATTACK
|
|
|
|
if(ishuman(target))
|
|
var/mob/living/carbon/human/H = target
|
|
if(H.check_shields(src, 0, "[target]'s [name]", MELEE_ATTACK))
|
|
playsound(target, 'sound/weapons/genhit.ogg', 50, TRUE)
|
|
return FINISH_ATTACK
|
|
|
|
if(isrobot(user))
|
|
if(!user.cell.use(charge_cost))
|
|
return FINISH_ATTACK
|
|
|
|
user.do_attack_animation(target)
|
|
target.Weaken(10 SECONDS)
|
|
target.apply_effect(STUTTER, 10 SECONDS)
|
|
|
|
target.visible_message("<span class='danger'>[user] has prodded [target] with [src]!</span>", \
|
|
"<span class='userdanger'>[user] has prodded you with [src]!</span>")
|
|
|
|
playsound(loc, 'sound/weapons/egloves.ogg', 50, TRUE, -1)
|
|
add_attack_logs(user, target, "Stunned with [src] ([uppertext(user.a_intent)])")
|