mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-24 00:51:26 +00:00
This is a big PR, implements most of https://forums.aurorastation.org/topic/11276-the-small-ish-robotics-rework/ Changes: rscadd: "Added Kinetic accelerator to mechs. RND can now research and make these Kinetc accelerators. There is a regular and a burst(3 shots) version. It will be better than average-decent man-held KA." rscdel: "Added flamethrower for mechs. RND can now research and make this flamethrower. Works like man-held flamethrower." soundadd: "Added flamethrower sound." balance: "Hermes mech armour values has beeen rework. No longer it has bullet protection of millitary grade mech, and brute protection of a baby. Bomb protection increased, and fire protection decreased." bugfix: "Fixed fire spam of burst mech weapons. Before if you click fast enough you were able to bypass cooldown x number of times in a row for burst mech weapons." tweak: "Hydraulic clamp now loads all of the ores from a tile in one click into the box of mech. Just like mining satchel." tweak: "The LBX AC 10 "Scattershot" now uses shotgun sound effect." Replaces use of ':' inside of Mech's and hostile mob code
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
//Projectiles
|
|
/obj/item/projectile/kinetic
|
|
name = "kinetic force"
|
|
icon_state = null
|
|
damage = 0 //Base damage handled elsewhere.
|
|
damage_type = BRUTE
|
|
check_armour = "bomb"
|
|
range = 5
|
|
var/pressure_decrease = 0.25
|
|
|
|
/obj/item/projectile/kinetic/mech
|
|
damage = 15
|
|
|
|
/obj/item/projectile/kinetic/mech/burst
|
|
damage = 10
|
|
|
|
/obj/item/projectile/kinetic/on_impact(var/atom/A,var/aoe_scale = 1, var/damage_scale = 1)
|
|
var/turf/target_turf = get_turf(A)
|
|
if(!target_turf)
|
|
target_turf = get_turf(src)
|
|
if(istype(target_turf))
|
|
var/datum/gas_mixture/environment = target_turf.return_air()
|
|
|
|
damage *= max(1 - (environment.return_pressure()/100)*0.75,0)
|
|
|
|
if(isliving(A)) //Never do more than 15 damage to a living being per shot.
|
|
damage = min(damage,15)
|
|
|
|
strike_thing(A,aoe*aoe_scale,damage)
|
|
|
|
. = ..()
|
|
|
|
/obj/item/projectile/kinetic/proc/strike_thing(atom/target,var/new_aoe,var/damage_scale)
|
|
|
|
var/turf/target_turf = get_turf(target)
|
|
if(istype(target_turf, /turf/simulated/mineral))
|
|
var/turf/simulated/mineral/M = target_turf
|
|
M.kinetic_hit(damage,dir)
|
|
|
|
new /obj/effect/overlay/temp/kinetic_blast(target_turf)
|
|
|
|
if(new_aoe > 0)
|
|
for(var/new_target in orange(new_aoe, target_turf))
|
|
src.on_impact(new_target,0,0.5) |