Merge pull request #7023 from Citadel-Station-13/lmao

Telebatons/policebatons buffed to be a viable stun weapon (but not as good as stunbatons/prods), secways nerfed to non-sprint movespeed with sprint buffer (but this time they're actually responsive instead of being laggy and the buffer is weaker)
This commit is contained in:
deathride58
2018-07-15 17:51:12 -04:00
committed by GitHub
5 changed files with 131 additions and 6 deletions

View File

@@ -1,11 +1,13 @@
/datum/status_effect/incapacitating/knockdown/on_creation(mob/living/new_owner, set_duration, updating_canmove)
if(iscarbon(new_owner) && isnum(set_duration))
/datum/status_effect/incapacitating/knockdown/on_creation(mob/living/new_owner, set_duration, updating_canmove, override_duration, override_stam)
if(iscarbon(new_owner) && (isnum(set_duration) || isnum(override_duration)))
new_owner.resting = TRUE
new_owner.adjustStaminaLoss(set_duration*0.25)
if(set_duration > 80)
new_owner.adjustStaminaLoss(isnull(override_stam)? set_duration*0.25 : override_stam)
if(isnull(override_duration) && (set_duration > 80))
set_duration = set_duration*0.15
. = ..()
return
return ..()
else if(!isnull(override_duration))
set_duration = override_duration
return ..()
else if(updating_canmove)
new_owner.update_canmove()
qdel(src)

View File

@@ -0,0 +1,56 @@
/obj/item/melee/classic_baton
var/last_hit = 0
var/stun_stam_cost_coeff = 1.25
var/hardstun_ds = 1
var/softstun_ds = 0
var/stam_dmg = 40
cooldown = 20
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
if(!on)
return ..()
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes batons unusuable in stamina softcrit
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return //CIT CHANGE - ditto
add_fingerprint(user)
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
user.Knockdown(60 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
else
user.take_bodypart_damage(2*force)
return
if(iscyborg(target))
..()
return
if(!isliving(target))
return
if (user.a_intent == INTENT_HARM)
if(!..())
return
if(!iscyborg(target))
return
else
if(last_hit + cooldown < world.time)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
return
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
add_logs(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
last_hit = world.time
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina

View File

@@ -0,0 +1,10 @@
/mob/living/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg) //Can't go below remaining duration
if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(absorb_stun(isnull(override_hardstun)? amount : override_hardstun, ignore_canknockdown))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
K.duration = max(world.time + (isnull(override_hardstun)? amount : override_hardstun), K.duration)
else if((amount || override_hardstun) > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating, override_hardstun, override_stamdmg)
return K

View File

@@ -0,0 +1,54 @@
/obj/vehicle/ridden/secway
var/chargemax = 150
var/chargerate = 0.35
var/charge = 150
var/chargespeed = 1
var/normalspeed = 2
var/last_tick = 0
var/list/progressbars_by_rider = list()
/obj/vehicle/ridden/secway/Initialize()
. = ..()
START_PROCESSING(SSfastprocess, src)
/obj/vehicle/ridden/secway/process()
var/diff = world.time - last_tick
var/regen = chargerate * diff
charge = CLAMP(charge + regen, 0, chargemax)
last_tick = world.time
/obj/vehicle/ridden/secway/relaymove(mob/user, direction)
var/new_speed = normalspeed
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.sprinting && charge)
charge--
new_speed = chargespeed
GET_COMPONENT(D, /datum/component/riding)
D.vehicle_move_delay = new_speed
for(var/i in progressbars_by_rider)
var/datum/progressbar/B = progressbars_by_rider[i]
B.update(charge)
return ..()
/obj/vehicle/ridden/secway/buckle_mob(mob/living/M, force, check_loc)
. = ..(M, force, check_loc)
if(.)
if(progressbars_by_rider[M])
qdel(progressbars_by_rider[M])
var/datum/progressbar/D = new(M, chargemax, src)
D.update(charge)
progressbars_by_rider[M] = D
/obj/vehicle/ridden/secway/unbuckle_mob(mob/living/M, force)
. = ..(M, force)
if(.)
qdel(progressbars_by_rider[M])
progressbars_by_rider -= M
/obj/vehicle/ridden/secway/Destroy()
for(var/i in progressbars_by_rider)
qdel(progressbars_by_rider[i])
progressbars_by_rider.Cut()
STOP_PROCESSING(SSfastprocess, src)
return ..()

View File

@@ -2884,5 +2884,8 @@
#include "modular_citadel\code\modules\vore\eating\vore_vr.dm"
#include "modular_citadel\code\modules\vore\eating\voreitems.dm"
#include "modular_citadel\code\modules\vore\eating\vorepanel_vr.dm"
#include "modular_citadel\game\objects\items\melee\misc.dm"
#include "modular_citadel\interface\skin.dmf"
#include "modular_citadel\modules\mob\living\status_procs.dm"
#include "modular_citadel\modules\vehicles\secway.dm"
// END_INCLUDE