Files
Bubberstation/code/modules/projectiles/ammunition/_firing.dm
SkyratBot 1e0f6f0e12 [MIRROR] Removes Tactical Resting (#8303)
* Removes Tactical Resting (#61552)

About The Pull Request

If you are on combat mode, your bullets will hit people lying down or stunned, otherwise they pass through.
Why It's Good For The Game

The original PR that added it was labeled a fix (#55495) only mentioning it in the changelog once, when it was a balance change, as resting to avoid bullets was intentionally removed after we added crawling and a rest button, for being fucking stupid.
The thing that original pr "fixed" was mobs being bullet sponges, which you can now prevent by switching off combat mode, so it is no longer needed.
Avoiding people shooting at you while also having guns of your own you are perfectly able to shoot is stupid.
It makes mobs like beepsky super annoying, where unless youre in a large area the robot chasing you with one of the only hardstuns left in the game will be really hard to hit.
Changelog

cl
balance: If you are on Combat Mode, your bullets no longer pass through prone people
/cl

* Removes Tactical Resting

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2021-09-21 01:40:36 +01:00

79 lines
3.1 KiB
Plaintext

/obj/item/ammo_casing/proc/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, atom/fired_from)
distro += variance
var/targloc = get_turf(target)
ready_proj(target, user, quiet, zone_override, fired_from)
if(pellets == 1)
if(distro) //We have to spread a pixel-precision bullet. throw_proj was called before so angles should exist by now...
if(randomspread)
spread = round((rand() - 0.5) * distro)
else //Smart spread
spread = round(1 - 0.5) * distro
if(!throw_proj(target, targloc, user, params, spread))
return FALSE
else
if(isnull(loaded_projectile))
return FALSE
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
if(user.staminaloss > STAMINA_THRESHOLD_TIRED_CLICK_CD) //SKYRAT EDIT CHANGE BEGIN: user.changeNext_move(CLICK_CD_RANGE)
user.changeNext_move(CLICK_CD_RANGE_TIRED)
else
user.changeNext_move(CLICK_CD_RANGE) //SKYRAT EDIT END
user.newtonian_move(get_dir(target, user))
update_appearance()
return TRUE
/obj/item/ammo_casing/proc/ready_proj(atom/target, mob/living/user, quiet, zone_override = "", atom/fired_from)
if (!loaded_projectile)
return
loaded_projectile.original = target
loaded_projectile.firer = user
loaded_projectile.fired_from = fired_from
loaded_projectile.hit_prone_targets = user.combat_mode
if (zone_override)
loaded_projectile.def_zone = zone_override
else
loaded_projectile.def_zone = user.zone_selected
loaded_projectile.suppressed = quiet
if(isgun(fired_from))
var/obj/item/gun/G = fired_from
loaded_projectile.damage *= G.projectile_damage_multiplier
loaded_projectile.stamina *= G.projectile_damage_multiplier
if(reagents && loaded_projectile.reagents)
reagents.trans_to(loaded_projectile, reagents.total_volume, transfered_by = user) //For chemical darts/bullets
qdel(reagents)
/obj/item/ammo_casing/proc/throw_proj(atom/target, turf/targloc, mob/living/user, params, spread)
var/turf/curloc = get_turf(user)
if (!istype(targloc) || !istype(curloc) || !loaded_projectile)
return FALSE
var/firing_dir
if(loaded_projectile.firer)
firing_dir = loaded_projectile.firer.dir
if(!loaded_projectile.suppressed && firing_effect_type)
new firing_effect_type(get_turf(src), firing_dir)
var/direct_target
if(targloc == curloc)
if(target) //if the target is right on our location we'll skip the travelling code in the proj's fire()
direct_target = target
if(!direct_target)
var/modifiers = params2list(params)
loaded_projectile.preparePixelProjectile(target, user, modifiers, spread)
var/obj/projectile/loaded_projectile_cache = loaded_projectile
loaded_projectile = null
loaded_projectile_cache.fire(null, direct_target)
return TRUE
/obj/item/ammo_casing/proc/spread(turf/target, turf/current, distro)
var/dx = abs(target.x - current.x)
var/dy = abs(target.y - current.y)
return locate(target.x + round(gaussian(0, distro) * (dy+2)/8, 1), target.y + round(gaussian(0, distro) * (dx+2)/8, 1), target.z)