mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
ok
This commit is contained in:
@@ -16,10 +16,6 @@
|
||||
AddComponent(/datum/component/pellet_cloud, projectile_type, pellets)
|
||||
SEND_SIGNAL(src, COMSIG_PELLET_CLOUD_INIT, target, user, fired_from, randomspread, spread, zone_override, params, distro)
|
||||
|
||||
if(click_cooldown_override)
|
||||
user.changeNext_move(click_cooldown_override)
|
||||
else
|
||||
user.changeNext_move(CLICK_CD_RANGE)
|
||||
user.newtonian_move(get_dir(target, user))
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
force = 5
|
||||
item_flags = NEEDS_PERMIT
|
||||
attack_verb = list("struck", "hit", "bashed")
|
||||
attack_speed = CLICK_CD_RANGE
|
||||
|
||||
var/fire_sound = "gunshot"
|
||||
var/suppressed = null //whether or not a message is displayed when fired
|
||||
@@ -174,9 +175,6 @@
|
||||
if(firing)
|
||||
return
|
||||
var/stamloss = user.getStaminaLoss()
|
||||
if(stamloss >= STAMINA_NEAR_SOFTCRIT) //The more tired you are, the less damage you do.
|
||||
var/penalty = (stamloss - STAMINA_NEAR_SOFTCRIT)/(STAMINA_NEAR_CRIT - STAMINA_NEAR_SOFTCRIT)*STAM_CRIT_GUN_DELAY
|
||||
user.changeNext_move(CLICK_CD_RANGE+(CLICK_CD_RANGE*penalty))
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
if(target in user.contents) //can't shoot stuff inside us.
|
||||
return
|
||||
@@ -243,6 +241,17 @@
|
||||
to_chat(user, "<span class='notice'> [src] is lethally chambered! You don't want to risk harming anyone...</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/gun/CheckAttackCooldown(mob/user, atom/target)
|
||||
if((user.a_intent == INTENT_HARM) && user.Adjacent(target)) //melee
|
||||
return user.CheckActionCooldown(CLICK_CD_MELEE)
|
||||
return user.CheckActionCooldown(get_clickcd())
|
||||
|
||||
/obj/item/gun/proc/get_clickcd()
|
||||
return isnull(chambered?.click_cooldown_override)? CLICK_CD_RANGE : chambered.click_cooldown_override
|
||||
|
||||
/obj/item/gun/GetEstimatedAttackSpeed()
|
||||
return get_clickcd()
|
||||
|
||||
/obj/item/gun/proc/handle_pins(mob/living/user)
|
||||
if(no_pin_required)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user