Skip to content

Commit

Permalink
Abductor Baton nerf
Browse files Browse the repository at this point in the history
Adds a
  • Loading branch information
Veth-s committed Aug 22, 2024
1 parent 954ba09 commit 7ffd795
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ Congratulations! You are now trained for invasive xenobiology research!"}

var/sleep_time = 2 MINUTES
var/time_to_cuff = 3 SECONDS
var/charges = 1
var/max_charges = 1
var/list/charge_timers = list()
var/charge_time = 200 //20 seconds cooldown
var/charges = 1 //number of charges the baton starts with when spawned
var/max_charges = 1 //max number of charges the baton can hold
var/list/charge_timers = list() //list of timers for charges
var/charge_time = 200 //20 seconds cooldown for charges

/obj/item/melee/baton/abductor/proc/recharge(mob/user)
/obj/item/melee/baton/abductor/proc/recharge(mob/user) //recharge proc
charges = min(charges+1, max_charges)
playsound(src,'sound/machines/twobeep.ogg',10,TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0)
charge_timers.Remove(charge_timers[1])
Expand Down Expand Up @@ -392,7 +392,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
SEND_SIGNAL(target, COMSIG_LIVING_MINOR_SHOCK)
target.Paralyze(knockdown_time * (HAS_TRAIT(target, TRAIT_BATON_RESISTANCE) ? 0.1 : 1))
if(BATON_SLEEP)
if(charges <= 0)
if(charges <= 0) //if no charges on sleep mode, plays alien_batong_error, states that the baton is still charging, and has no effect
playsound(src,'sound/weapons/alien_batong_error.ogg',40,TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0)
to_chat(user, span_warning("<b>[src] is still recharging!"))
return
Expand Down Expand Up @@ -425,7 +425,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
target.visible_message(span_danger("[user] induces sleep in [target] with [src]!"), \
span_userdanger("You suddenly feel very drowsy!"))
target.Sleeping(sleep_time)
charges --
charges -- //takes the charge away, states remaining charges and starts the charge timer counting down
to_chat(user, span_notice("You use [src]. It now has [charges] sleep charge[charges == 1 ? "" : "s"] remaining."))
charge_timers.Add(addtimer(CALLBACK(src, PROC_REF(recharge)), charge_time, TIMER_STOPPABLE))
log_combat(user, target, "put to sleep")
Expand Down Expand Up @@ -507,7 +507,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}

/obj/item/melee/baton/abductor/examine(mob/user)
. = ..()
. += span_notice("It has [charges] sleep mode charges remaining.")
. += span_notice("It has [charges] sleep mode charges remaining.") //examining the baton gives the time left for charge to replenish.
if (length(charge_timers))
. += "[span_notice("<b>A small display on the handle reads:")]</b>"
for (var/i in 1 to length(charge_timers))
Expand Down

0 comments on commit 7ffd795

Please sign in to comment.