[MIRROR] Missile Sanity Checking: I made it explode better? [MDB IGNORE] (#17207)

* Missile Sanity Checking: I made it explode better? (#70813)

* Fixes robotics and nukies gaining access to the wrong type of exosuit missiles, renames the BRM-6 to the PEP-6 (Precision Explosive Projectile), ensures the defines match to which gun goes where, also renames the ammo paths to also prevent the same confusion, swaps around a whole lot of the pathing for what missile is the baseline and what is the parents, makes the PEP use the missile procs instead of its own snowflake code, inadvertently makes the missile a borg murder device but fuck it they're dense objects

* Missile Sanity Checking: I made it explode better?

Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-10-28 21:19:37 +02:00
committed by GitHub
parent 55a5f5d134
commit b8f4b11a03
10 changed files with 116 additions and 99 deletions

View File

@@ -3,18 +3,18 @@
desc = "An 84mm High Explosive rocket. Fire at people and pray."
caliber = CALIBER_84MM
icon_state = "srm-8"
projectile_type = /obj/projectile/bullet/a84mm/he
projectile_type = /obj/projectile/bullet/rocket
/obj/item/ammo_casing/caseless/rocket/hedp
name = "\improper PM-9HEDP"
desc = "An 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs."
icon_state = "84mm-hedp"
projectile_type = /obj/projectile/bullet/a84mm
/obj/item/ammo_casing/caseless/rocket/heap
name = "\improper PM-9HEAP"
desc = "An 84mm High Explosive All Purpose rocket. For when you just need something to not exist anymore."
icon_state = "84mm-heap"
projectile_type = /obj/projectile/bullet/rocket/heap
/obj/item/ammo_casing/caseless/rocket/weak
name = "\improper PM-9HE Low-Yield"
desc = "An 84mm High Explosive rocket. This one isn't quite as devastating."
projectile_type = /obj/projectile/bullet/a84mm/weak
projectile_type = /obj/projectile/bullet/rocket/weak
/obj/item/ammo_casing/caseless/a75
desc = "A .75 bullet casing."

View File

@@ -10,21 +10,20 @@
explosion(target, devastation_range = -1, light_impact_range = 2, explosion_cause = src)
return BULLET_ACT_HIT
/// PM9 HEDP rocket
/obj/projectile/bullet/a84mm
name ="\improper HEDP rocket"
desc = "USE A WEEL GUN"
icon_state= "84mm-hedp"
damage = 80
armour_penetration = 100
dismemberment = 100
embedding = null
shrapnel_type = null
/// PM9 standard HE rocket
/obj/projectile/bullet/rocket
name = "\improper HE rocket"
desc = "Boom."
icon_state= "missile"
damage = 50
ricochets_max = 0
/// Whether we do extra damage when hitting a mech or silicon
var/anti_armour_damage = 200
var/anti_armour_damage = 0
/// Whether the rocket is capable of instantly killing a living target
var/random_crits_enabled = TRUE // Worst thing Valve ever added
/obj/projectile/bullet/a84mm/on_hit(atom/target, blocked = FALSE)
if(isliving(target) && prob(1))
/obj/projectile/bullet/rocket/on_hit(atom/target, blocked = FALSE)
if(isliving(target) && prob(1) && random_crits_enabled)
var/mob/living/gibbed_dude = target
if(gibbed_dude.stat < HARD_CRIT)
gibbed_dude.say("Is that a fucking ro-", forced = "hit by rocket")
@@ -39,67 +38,81 @@
S.take_overall_damage(anti_armour_damage*0.75, anti_armour_damage*0.25)
return BULLET_ACT_HIT
/// Since some rockets have different booms depending if they hit a living target or not, this is easier than having explosive radius vars
/obj/projectile/bullet/a84mm/proc/do_boom(atom/target)
explosion(target, devastation_range = -1, heavy_impact_range = 1, light_impact_range = 3, flame_range = 4, flash_range = 1, adminlog = FALSE)
/// PM9 standard rocket
/obj/projectile/bullet/a84mm/he
name ="\improper HE missile"
desc = "Boom."
icon_state = "missile"
damage = 50
anti_armour_damage = 0
/obj/projectile/bullet/a84mm/he/do_boom(atom/target, blocked=0)
/** This proc allows us to customize the conditions necesary for the rocket to detonate, allowing for different explosions for living targets, turf targets,
among other potential differences. This granularity is helpful for things like the special rockets mechs use. */
/obj/projectile/bullet/rocket/proc/do_boom(atom/target)
if(!isliving(target)) //if the target isn't alive, so is a wall or something
explosion(target, heavy_impact_range = 1, light_impact_range = 2, flame_range = 3, flash_range = 4, explosion_cause = src)
else
explosion(target, light_impact_range = 2, flame_range = 3, flash_range = 4, explosion_cause = src)
/// PM9 weak rocket
/obj/projectile/bullet/a84mm/weak
name ="low-yield HE missile"
/// PM9 HEAP rocket - the anti-anything missile you always craved.
/obj/projectile/bullet/rocket/heap
name = "\improper HEAP rocket"
desc = "I am become death."
icon_state = "84mm-heap"
damage = 80
armour_penetration = 100
dismemberment = 100
anti_armour_damage = 200
/obj/projectile/bullet/rocket/heap/do_boom(atom/target, blocked=0)
explosion(target, devastation_range = -1, heavy_impact_range = 1, light_impact_range = 3, flame_range = 4, flash_range = 1, adminlog = FALSE)
/// PM9 weak rocket - just kind of a failure
/obj/projectile/bullet/rocket/weak
name = "low-yield rocket"
desc = "Boom, but less so."
damage = 30
anti_armour_damage = 0
/obj/projectile/bullet/a84mm/weak/do_boom(atom/target, blocked=0)
/obj/projectile/bullet/rocket/weak/do_boom(atom/target, blocked=0)
if(!isliving(target)) //if the target isn't alive, so is a wall or something
explosion(target, heavy_impact_range = 1, light_impact_range = 2, flame_range = 3, flash_range = 4, explosion_cause = src)
else
explosion(target, light_impact_range = 2, flame_range = 3, flash_range = 4, explosion_cause = src)
/// Mech BRM-6 missile
/obj/projectile/bullet/a84mm_br
name ="\improper HE missile"
desc = "Boom."
icon_state = "missile"
/** SRM-8 Missile - Used by the SRM-8 Exosuit missile rack.
* Employed by Nuclear Operatives Maulers and Nanotrasen Marauders and Seraphs to kill everything and anyone.
*
* Explodes when it hits literally anything.
*/
/obj/projectile/bullet/rocket/srm
name = "short range missile"
desc = "Today's not your day, pal."
/** PEP-6 Missile - Used by the PEP-6 Exosuit missile rack.
* Employed by Roboticists out of spite to put down enemy hereteks, mechanized nuclear operatives, the janitor's hot rod,
* the clown's 'taxi service', uppity borgs, vengeful ais, doors they don't like, the escape shuttle's hull, and more!
*
* Explodes only when it hits specifically one of the following types:
* (/obj/structure), (/obj/machinery), (/obj/vehicle), (/turf/closed), (/mob/living/silicon)
*
* Does NOT explode if it hits any random mob, or any random object. Only if it is a subtype of one of the above valid atoms.
*/
/obj/projectile/bullet/rocket/pep
name = "precise explosive missile"
desc = "Human friendly, metal unfriendly."
damage = 30
ricochets_max = 0 //it's a MISSILE
embedding = null
shrapnel_type = null
var/sturdy = list(
/turf/closed,
/obj/vehicle/sealed/mecha,
/obj/machinery/door,
/obj/structure/window,
/obj/structure/grille
)
anti_armour_damage = 80 //Doesn't (probably) kill borgs in one shot, but it will hurt
random_crits_enabled = FALSE //yeah, no
/obj/projectile/bullet/rocket/pep/do_boom(atom/target, blocked=0)
if(issilicon(target)) //if the target is a borg, just give them one of these to make it loud, most of the damage is in the projectile itself
explosion(target, light_impact_range = 1, flash_range = 2, explosion_cause = src)
return
if(isstructure(target) || isvehicle (target) || isclosedturf (target) || ismachinery (target)) //if the target is a structure, machine, vehicle or closed turf like a wall, explode that shit
if(target.density) //Dense objects get blown up a bit harder
explosion(target, heavy_impact_range = 1, light_impact_range = 1, flash_range = 2, explosion_cause = src)
return
else
explosion(target, light_impact_range = 1, flash_range = 2, explosion_cause = src)
return
else //if the target is anything else, we drop a missile on the ground and do nothing
new /obj/item/broken_missile(get_turf(src), 1)
/obj/item/broken_missile
name = "\improper broken missile"
name = "broken missile"
desc = "A missile that did not detonate. The tail has snapped and it is in no way fit to be used again."
icon = 'icons/obj/weapons/guns/projectiles.dmi'
icon_state = "missile_broken"
w_class = WEIGHT_CLASS_TINY
/obj/projectile/bullet/a84mm_br/on_hit(atom/target, blocked=0)
..()
for(var/i in sturdy)
if(istype(target, i))
explosion(target, heavy_impact_range = 1, light_impact_range = 1, flash_range = 2, explosion_cause = src)
return BULLET_ACT_HIT
//if(isclosedturf(target) || ismecha(target))
new /obj/item/broken_missile(get_turf(src), 1)