Skip to content

Commit

Permalink
New tank secondaries: TOW and Micromissile pod (#16869)
Browse files Browse the repository at this point in the history
Co-authored-by: TiviPlus <[email protected]>
  • Loading branch information
TiviPlus and TiviPlus authored Jan 9, 2025
1 parent ec1ba37 commit 40dc337
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 12 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/calibers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
#define CALIBER_84MM "84mm rocket"
#define CALIBER_67MM "67mm shell"
#define CALIBER_68MM "68mm rocket"
#define CALIBER_32MM "32mm rocket"
#define CALIBER_37MM "37mm"
#define CALIBER_15CM "155mm" //Heavy Infantry Support Gun

Expand Down
2 changes: 2 additions & 0 deletions code/datums/storage/subtypes/tank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@
/obj/item/ammo_magazine/tank/secondary_flamer_tank,
/obj/item/ammo_magazine/tank/secondary_mlrs,
/obj/item/ammo_magazine/icc_mg,
/obj/item/ammo_magazine/tank/microrocket_rack,
/obj/item/ammo_magazine/tank/tow_missile,
))
1 change: 0 additions & 1 deletion code/game/objects/items/explosives/grenades/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
///Weak impact range when exploding
var/weak_impact_range = 0


/obj/item/explosive/grenade/Initialize(mapload)
. = ..()
det_time = rand(det_time - 1 SECONDS, det_time + 1 SECONDS)
Expand Down
25 changes: 25 additions & 0 deletions code/modules/projectiles/ammo_types/rocket_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,31 @@
rotate.Turn(proj.dir_angle)
animate(proj, transform = rotate, time = SSprojectiles.wait)

/datum/ammo/rocket/homing/microrocket /// this is basically a tgmc version of the above
name = "homing HE microrocket"
shell_speed = 0.3
damage = 75
penetration = 40
sundering = 10
turn_rate = 10

/datum/ammo/rocket/homing/drop_nade(turf/T)
explosion(T, 0, 0, 2, 4, 1)

/datum/ammo/rocket/homing/tow
name = "TOW-III missile"
icon_state = "rocket_he"
ammo_behavior_flags = AMMO_TARGET_TURF|AMMO_SNIPER|AMMO_SPECIAL_PROCESS|AMMO_IFF
shell_speed = 0.3
turn_rate = 10
damage = 60
penetration = 30
sundering = 10
max_range = 30

/datum/ammo/rocket/homing/tow/drop_nade(turf/T)
explosion(T, 0, 0, 4, 0, 2)

/datum/ammo/rocket/coilgun
name = "kinetic penetrator"
icon_state = "tank_coilgun"
Expand Down
10 changes: 10 additions & 0 deletions code/modules/reqs/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,16 @@ WEAPONS
contains = list(/obj/item/ammo_magazine/tank/secondary_cupola)
cost = 10

/datum/supply_packs/weapons/tow_rocket
name = "TOW Missile"
contains = list(/obj/item/ammo_magazine/tank/tow_missile)
cost = 5 // marginally cheaper due to being a single loader

/datum/supply_packs/weapons/microrocket_pod
name = "Microrocket pod"
contains = list(/obj/item/ammo_magazine/tank/microrocket_rack)
cost = 10

/*******************************************************************************
EXPLOSIVES
*******************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion code/modules/vehicles/armored/_multitile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
soft_armor = list(MELEE = 50, BULLET = 100 , LASER = 90, ENERGY = 60, BOMB = 60, BIO = 60, FIRE = 50, ACID = 50)
hard_armor = list(MELEE = 0, BULLET = 20, LASER = 20, ENERGY = 20, BOMB = 0, BIO = 0, FIRE = 0, ACID = 0)
permitted_mods = list(/obj/item/tank_module/overdrive, /obj/item/tank_module/ability/zoom, /obj/item/tank_module/ability/smoke_launcher)
permitted_weapons = list(/obj/item/armored_weapon, /obj/item/armored_weapon/ltaap, /obj/item/armored_weapon/secondary_weapon, /obj/item/armored_weapon/secondary_flamer)
permitted_weapons = list(/obj/item/armored_weapon, /obj/item/armored_weapon/ltaap, /obj/item/armored_weapon/secondary_weapon, /obj/item/armored_weapon/secondary_flamer, /obj/item/armored_weapon/tow, /obj/item/armored_weapon/microrocket_pod)
max_occupants = 4
move_delay = 0.75 SECONDS
glide_size = 2.5
Expand Down
29 changes: 19 additions & 10 deletions code/modules/vehicles/armored/ammo_magazine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@
default_ammo = /datum/ammo/flamethrower/tank_flamer
max_rounds = 120

/obj/item/ammo_magazine/tank/towlauncher
name = "TOW Launcher Magazine"
desc = "A secondary armament rocket magazine"
caliber = CALIBER_68MM
icon_state = "quad_rocket"
icon = 'icons/obj/items/ammo/rocket.dmi'
w_class = WEIGHT_CLASS_GIGANTIC
default_ammo = /datum/ammo/rocket/ap //Fun fact, AP rockets seem to be a straight downgrade from normal rockets. Maybe I'm missing something...
max_rounds = 5

/obj/item/ammo_magazine/tank/secondary_cupola
name = "HSG-102 Cupola Magazine"
desc = "A secondary armament MG magazine"
Expand Down Expand Up @@ -187,3 +177,22 @@
max_rounds = 1
loading_sound = 'sound/vehicles/weapons/ltb_reload.ogg'

/obj/item/ammo_magazine/tank/tow_missile
name = "\improper TOW-III missile"
desc = "A TOw-III homing missile for the secondary TOW launcher."
caliber = CALIBER_68MM
icon_state = "seekerammo"
w_class = WEIGHT_CLASS_GIGANTIC
default_ammo = /datum/ammo/rocket/homing/tow
max_rounds = 1
loading_sound = 'sound/weapons/guns/interact/launcher_reload.ogg'

/obj/item/ammo_magazine/tank/microrocket_rack
name = "microrocket pod rack"
desc = "A 3x2 rack containing high explosive homing microrockets."
caliber = CALIBER_32MM
icon_state = "secondary_rocketpod"
w_class = WEIGHT_CLASS_GIGANTIC
default_ammo = /datum/ammo/rocket/homing/microrocket
max_rounds = 6
loading_sound = 'sound/weapons/guns/interact/launcher_reload.ogg'
31 changes: 31 additions & 0 deletions code/modules/vehicles/armored/armored_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,34 @@
)
projectile_delay = 1 // spray visuals
hud_state_empty = "flame_empty"

/obj/item/armored_weapon/tow
name = "\improper TOW-III launcher"
desc = "A single-shot, homing, vehicle-mounted TOW-III launcher designed for precision strikes against armored targets. Equipped with IFF."
icon_state = "seeker"
fire_sound = SFX_RPG_FIRE
armored_weapon_flags = MODULE_SECONDARY
ammo = /obj/item/ammo_magazine/tank/tow_missile
accepted_ammo = list(/obj/item/ammo_magazine/tank/tow_missile)
fire_mode = GUN_FIREMODE_SEMIAUTO
maximum_magazines = 13
projectile_delay = 2 SECONDS
variance = 10
rearm_time = 1 SECONDS
hud_state_empty = "rocket_empty"

/obj/item/armored_weapon/microrocket_pod
name = "microrocket pod"
desc = "A TGMC secondary vehicle-mounted multiple launch rocket system with a total of 6 homing microrockets. Capable of unleashing its entire payload in rapid succession."
icon_state = "secondary_rocket_multiple"
fire_sound = 'sound/weapons/guns/fire/launcher.ogg'
armored_weapon_flags = MODULE_SECONDARY
ammo = /obj/item/ammo_magazine/tank/microrocket_rack
accepted_ammo = list(/obj/item/ammo_magazine/tank/microrocket_rack)
fire_mode = GUN_FIREMODE_BURSTFIRE
projectile_delay = 2 SECONDS
variance = 40
burst_amount = 6
projectile_burst_delay = 0.1 SECONDS
rearm_time = 5 SECONDS
hud_state_empty = "rocket_empty"
Binary file modified icons/obj/armored/3x3/tank_gun.dmi
Binary file not shown.
Binary file modified icons/obj/armored/3x3/tank_interior.dmi
Binary file not shown.
Binary file modified icons/obj/armored/hardpoint_modules.dmi
Binary file not shown.
Binary file modified icons/obj/items/ammo/tank.dmi
Binary file not shown.

0 comments on commit 40dc337

Please sign in to comment.