Skip to content

Commit

Permalink
Numbers subject to change,, but cluster dropship works for now
Browse files Browse the repository at this point in the history
  • Loading branch information
GriffinMan4455 committed Oct 23, 2024
1 parent aaf06be commit 50eaadb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

//Various ordnance selections
#define ORDNANCE_OPTIONS list("Banshee Missile", "Harpoon Missile", "Keeper Missile", "Napalm Missile", "Thermobaric Missile", "Widowmaker Missile", "Laser", "Minirocket", "Incendiary Minirocket", "Sentry Drop", "GAU-21", "Heavy GAU-21", "High Explosive", "Incendiary", "Cluster", "High Explosive", "Incendiary", "Fragmentation", "Flare")
#define MISSILE_ORDNANCE list("Banshee Missile", "Harpoon Missile", "Keeper Missile", "Napalm Missile", "Thermobaric Missile", "Widowmaker Missile")
#define MISSILE_ORDNANCE list("Banshee Missile", "Harpoon Missile", "Keeper Missile","Cluster Missile", "Napalm Missile", "Thermobaric Missile", "Widowmaker Missile")
#define ORBITAL_ORDNANCE list("High Explosive OB", "Incendiary OB", "Cluster OB")
#define MORTAR_ORDNANCE list("High Explosive Shell", "Incendiary Shell", "Fragmentation Shell", "Flare Shell")
#define MISC_ORDNANCE list("Laser", "Minirocket", "Incendiary Minirocket", "Sentry Drop", "GAU-21", "Heavy GAU-21")
Expand Down Expand Up @@ -126,6 +126,15 @@
QDEL_IN(target_lase, 5 SECONDS) //to stop "unused var" warnings
return TRUE

if("Cluster Missile")
var/obj/effect/overlay/temp/blinking_laser/target_lase = new(target_turf)
var/obj/structure/ship_ammo/rocket/cbu/ammo = new()

handle_dropship_ordnance(target_turf, ammo)

QDEL_IN(target_lase, 5 SECONDS) //to stop "unused var" warnings
return TRUE

if("Napalm Missile")
var/obj/effect/overlay/temp/blinking_laser/target_lase = new(target_turf)
var/obj/structure/ship_ammo/rocket/napalm/ammo = new()
Expand Down
43 changes: 43 additions & 0 deletions code/modules/cm_marines/dropship_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,49 @@
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), impact, 450, 100, EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL, null, create_cause_data(initial(name)), source_mob), 0.5 SECONDS) //Insane fall off combined with insane damage makes the Keeper useful for single targets, but very bad against multiple.
QDEL_IN(src, 0.5 SECONDS)

/obj/structure/ship_ammo/rocket/cbu
name = "\improper CBU-191 'Rockeye IX'"
desc = "The CBU-191 'Rockeye IX' is the latest in a prestigious line of wide-area anti-personnel/anti-armor wide-area cluster munitions. Designed due to increasingly frustrating experience with colonial 'Armed Protestors' being frustratingly unwilling to confront USCM forces head-on, these fat bombs deliver roughly 300 HEDP submunitions over a widespread area. Can be loaded into the LAU-444 Guided Missile Launcher."
icon_state = "paveway"
travelling_time = 60 //A slower payload due to its immense blast radius
ammo_id = "k"
point_cost = 900 //PvE don't use the printer but just in case
fire_mission_delay = 4 //We don't care because our ammo has just 1 rocket
var/shrapnel_count = 8
var/shrapnel_type = /datum/ammo/bullet/shrapnel
var/total_amount = 60 // how many times will the shell fire?
var/instant_amount = 15 // how many explosions per time it fires?
var/explosion_power = 65
var/explosion_falloff = 75
var/delay_between_clusters = 0.85 SECONDS // how long between each firing?

/obj/structure/ship_ammo/rocket/cbu/detonate_on(turf/impact, obj/structure/dropship_equipment/weapon/fired_from)
impact.ceiling_debris_check(3)
start_cluster(impact)

/obj/structure/ship_ammo/rocket/cbu/proc/start_cluster(turf/impact)
set waitfor = 0

var/range_num = 25
var/list/turf_list = RANGE_TURFS(range_num, impact)

for(var/i = 1 to total_amount)
for(var/k = 1 to instant_amount)
var/turf/selected_turf = pick(turf_list)
var/area/selected_area = get_area(selected_turf)
if(CEILING_IS_PROTECTED(selected_area?.ceiling, CEILING_PROTECTION_TIER_4))
continue
fire_in_a_hole(selected_turf)

sleep(delay_between_clusters)
QDEL_IN(src, 1 SECONDS)

/obj/structure/ship_ammo/rocket/cbu/proc/fire_in_a_hole(turf/loc)
new /obj/effect/overlay/temp/blinking_laser (loc)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(cell_explosion), loc, explosion_power, explosion_falloff, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, create_cause_data(initial(name), source_mob)), 1 SECONDS)
create_shrapnel(loc, shrapnel_count, , ,shrapnel_type, )


/obj/structure/ship_ammo/rocket/harpoon
name = "\improper AGM-184 'Harpoon II'"
desc = "The AGM-184 Harpoon II is an Anti-Ship Missile, designed and used to effectively take down enemy ships with a huge blast wave with low explosive power. This one is modified to use ground signals and can be seen as a cheaper alternative to conventional ordnance. Can be loaded into the LAU-444 Guided Missile Launcher."
Expand Down

0 comments on commit 50eaadb

Please sign in to comment.