Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
e523d73
Tank Desant: Rideable Tank And Overhauled Interactions
SunriseOverYourHead Sep 6, 2025
370d755
Tank Desant: Collide with open_space turfs
SunriseOverYourHead Sep 7, 2025
81d1ed8
Reduces mob stun time from medium vehicle collision
SunriseOverYourHead Sep 22, 2025
87dbebd
Marines can crawl away from underneath the tank
SunriseOverYourHead Sep 22, 2025
9d91bcd
Entities atop the tank now get a pixel_y offset
SunriseOverYourHead Sep 22, 2025
0e1ad2d
Being pulled off the tank is less punishing
SunriseOverYourHead Sep 22, 2025
44a3a7f
WIELDED weapons accuracy debuff when fired atop moving tank
SunriseOverYourHead Sep 22, 2025
2a3af3d
TANK DESANT now wont block VTOL open_space movement
SunriseOverYourHead Sep 22, 2025
15197d8
removes debug statements from gun.dm
SunriseOverYourHead Sep 23, 2025
6b363dd
improves climb_down logic
SunriseOverYourHead Sep 23, 2025
c790fa9
Projectile interaction changes upon colliding with TANK
SunriseOverYourHead Sep 23, 2025
0958028
Edge case fix: Dropping hauled mob atop tank
SunriseOverYourHead Sep 23, 2025
3575bc9
Item Desant: Part 1
SunriseOverYourHead Nov 1, 2025
fad6163
Improves roller beds and stasis bags on tank
SunriseOverYourHead Nov 8, 2025
cf63678
Optimizes rider jousting and rider motion
SunriseOverYourHead Nov 8, 2025
9097142
Fixes item layering bug when dropped atop tank
SunriseOverYourHead Nov 8, 2025
73fa9d8
Fixes mobs atop not falling down
SunriseOverYourHead Nov 8, 2025
7a19a98
medevac rollers can't deploy atop tank
SunriseOverYourHead Nov 10, 2025
582dbcb
resin doors now properly block tank movement
SunriseOverYourHead Nov 10, 2025
791535b
climb up and down time tweaks.
SunriseOverYourHead Nov 10, 2025
baa1ed7
prevents xenos from hiding atop the tank.
SunriseOverYourHead Nov 10, 2025
b456b34
Adds more tank riding layers
SunriseOverYourHead Nov 10, 2025
a105c69
runner pounce fix
SunriseOverYourHead Nov 10, 2025
84a96bc
tank now goes over cargo trolleys
SunriseOverYourHead Nov 10, 2025
d48424a
penalty from being run over now scales with momentum
SunriseOverYourHead Nov 10, 2025
71614ba
Tank momentum and jousting refactor
SunriseOverYourHead Nov 10, 2025
74c85aa
Linters: space indentation fix
SunriseOverYourHead Nov 10, 2025
b5ec4b9
Removes leftover debug statements
SunriseOverYourHead Nov 10, 2025
a155b18
fixes movement collision oversight
SunriseOverYourHead Nov 10, 2025
a0162bd
Merge branch 'master' into tankFixes
SunriseOverYourHead Nov 10, 2025
853edc0
fixes movement collision oversight
SunriseOverYourHead Nov 10, 2025
ba4b049
Merge branch 'tankFixes' of https://github.com/SunriseOverYourHead/cm…
SunriseOverYourHead Nov 10, 2025
229c6d9
Merge branch 'master' into tankFixes
SunriseOverYourHead Jan 4, 2026
476a99e
Merge branch 'master' into tankFixes
SunriseOverYourHead Jan 24, 2026
03c0e75
Linters Fix
SunriseOverYourHead Feb 4, 2026
5854136
Merge branch 'master' into tankFixes
SunriseOverYourHead Feb 19, 2026
a94785f
Merge branch 'master' into tankFixes
SunriseOverYourHead Mar 4, 2026
aa5578c
Merge branch 'master' into tankFixes
SunriseOverYourHead Mar 23, 2026
4e83431
Merge branch 'master' into tankFixes
SunriseOverYourHead Apr 26, 2026
a469112
Merge branch 'master' into tankFixes
SunriseOverYourHead May 17, 2026
af663ee
First round of linter fixes
SunriseOverYourHead May 17, 2026
532aec6
Prevents tank riders from being FF'd by non IFF projectiles.
SunriseOverYourHead May 17, 2026
5e4690e
Barricades no longer 'HARD CRASH' the tank.
SunriseOverYourHead May 18, 2026
1f9c719
Merge branch 'master' into tankFixes
SunriseOverYourHead Jun 23, 2026
658bf8a
one letter var removals, changes for clarity, tank_on_top weakref
SunriseOverYourHead Jul 1, 2026
bf170fa
weather layer increased
SunriseOverYourHead Jul 1, 2026
d627caa
forgot the .dme
SunriseOverYourHead Jul 1, 2026
c657a89
Tank INTERCOMM system
SunriseOverYourHead Jul 4, 2026
51a604c
Turret aim rework: Debug verbs, Arc-transversal & Gun slaving
SunriseOverYourHead Jul 4, 2026
66ac197
LTB Rework: Lock-on Mechanic & Sniper-like Tracking
SunriseOverYourHead Jul 4, 2026
47495bb
LTB Rework: Single-Shot ammo, magazine removal
SunriseOverYourHead Jul 4, 2026
88aee29
LTB Rework: HE damage adjustment; IFF
SunriseOverYourHead Jul 4, 2026
3cf42c7
LZR-N; DRG-N: Double-Mode Capability; Custom Reagents
SunriseOverYourHead Jul 4, 2026
e524385
Turret Smoke Launcher -> Turret Flare Launcher
SunriseOverYourHead Jul 4, 2026
079e5ec
LTB Rebalance: Shorter firerate & Readd to Vendor
SunriseOverYourHead Jul 4, 2026
2bdcb6b
LZR-N & DRG-N: Custom fuel greyscale sprite overlays
SunriseOverYourHead Jul 4, 2026
bce2a2c
Mounted UA FLAG module
SunriseOverYourHead Jul 4, 2026
802e12d
Mounted BRUTE Module
SunriseOverYourHead Jul 4, 2026
1a63247
M56D Tweak: Now takes M56D Drums instead of Snowflake-y Tank Ammo
SunriseOverYourHead Jul 4, 2026
923ed2f
Minigun rebalance: Shorter spinup, low scatter; huge falloff
SunriseOverYourHead Jul 4, 2026
959cda0
Autocannon Rebalance; See DESC
SunriseOverYourHead Jul 4, 2026
862a2f0
Adds recommended to Cupola; Removes from Flamer
SunriseOverYourHead Jul 4, 2026
67f081e
Final .dme Update
SunriseOverYourHead Jul 4, 2026
ee93aa5
Linter fix
SunriseOverYourHead Jul 4, 2026
55c67d7
Second linter fix
SunriseOverYourHead Jul 4, 2026
7f5e8a1
Third linter fix?
SunriseOverYourHead Jul 4, 2026
ffd9ab5
Forgot the var, lol. Fourth linter fix.
SunriseOverYourHead Jul 4, 2026
2e8e687
Fifth linter fix. Adds a return type to get_rotation_owner()
SunriseOverYourHead Jul 4, 2026
9f17226
bug fixes; see desc
SunriseOverYourHead Jul 7, 2026
69c6ec8
Artillery Module: Nerf & Buff
SunriseOverYourHead Jul 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
#define COMSIG_MOB_MOUSEDOWN "mob_mousedown" //from /client/MouseDown(): (atom/object, turf/location, control, params)
#define COMSIG_MOB_MOUSEUP "mob_mouseup" //from /client/MouseUp(): (atom/object, turf/location, control, params)
#define COMSIG_MOB_MOUSEDRAG "mob_mousedrag" //from /client/MouseDrag(): (atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params)
#define COMSIG_MOB_MOUSEMOVE "mob_mousemove" //from /client/MouseMove(): (atom/object, turf/location, control, params)
#define COMSIG_MOB_CLICK_CANCELED (1<<0)
#define COMSIG_MOB_CLICK_HANDLED (1<<1)

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#define COMSIG_BULLET_PRE_HANDLE_TURF "bullet_pre_handle_turf"
#define COMPONENT_BULLET_PASS_THROUGH (1<<0)
#define COMSIG_BULLET_TERMINAL "bullet_terminal"
/// From /obj/projectile/fly(), every tick of flight (unlike COMSIG_BULLET_TERMINAL, which only fires once, right before impact): ()
#define COMSIG_BULLET_STEP "bullet_step"

/// Called when a bullet hits a living mob on a sprite click (original target is final target)
#define COMSIG_BULLET_DIRECT_HIT "bullet_direct_hit"
1 change: 1 addition & 0 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
#define COMSIG_KB_VEHICLE_CHANGE_SELECTED_WEAPON "keybinding_change_selected_weapon"
#define COMSIG_KB_VEHICLE_ACTIVATE_HORN "keybinding_activate_horn"
#define COMSIG_KB_VEHICLE_RELOAD_WEAPON "keybinding_reload_weapon"
#define COMSIG_KB_VEHICLE_TOGGLE_HARDPOINT_FIRE_MODE "keybinding_vehicle_toggle_hardpoint_fire_mode"

#define CATEGORY_CLIENT "CLIENT"
#define CATEGORY_EMOTE "EMOTE"
Expand Down
15 changes: 14 additions & 1 deletion code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,21 @@
#define FACEHUGGER_LAYER 4.13
/// For Signs above everything but below weather
#define BILLBOARD_LAYER 4.13

/// For objs atop a tank
#define TANK_RIDER_OBJ_LAYER 4.505
/// Mostly for bodybags atop a tank
/// Not used yet. This is a reminder for me to add a specific tank_layer var to OBJs to keep track of
/// ...which specific layer they need to go when brought atop.
#define TANK_RIDER_ABOVE_OBJ_LAYER 4.506
/// For mobs riding atop a tank
#define TANK_BELOW_RIDER_LAYER 4.508
#define TANK_LYING_RIDER_LAYER 4.509
#define TANK_RIDER_LAYER 4.51
#define TANK_ABOVE_RIDER_LAYER 4.515

/// For WEATHER
#define WEATHER_LAYER 4.14
#define WEATHER_LAYER 5

//#define FLY_LAYER 5

Expand Down
26 changes: 26 additions & 0 deletions code/__DEFINES/vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,29 @@
#define BUCKLE_PREVENTS_PULL (1<<3)
#define BUCKLE_NEEDS_HAND (1<<4)
#define BUCKLE_NEEDS_TWO_HANDS (1<<5)

//Tank turret mouse-aim rotation

/// How close current_angle needs to be to desired_angle before the turret rotation loop considers itself settled and stops ticking.
#define ROTATION_SETTLE_TOLERANCE 0.5
/// How close current_angle needs to be to the angle-to-target before a turret-mounted weapon is allowed to fire.
#define FIRING_GATE_TOLERANCE 5
/// Baseline turn speed (degrees per decisecond) for a turret whose median mounted traverse_arc equals TURRET_ARC_NORMALIZATION.
#define TURRET_BASE_ANGULAR_VELOCITY 6
/// The traverse_arc value that maps 1:1 onto TURRET_BASE_ANGULAR_VELOCITY.
#define TURRET_ARC_NORMALIZATION 90
/// Turn speed floor, so a turret can never be fully immobilized by a degenerate (e.g. 0) traverse_arc value.
#define TURRET_MIN_ANGULAR_VELOCITY 2
/// Turn speed used when the turret has no weapons mounted at all.
#define TURRET_DEFAULT_ANGULAR_VELOCITY 4
/// Flat angular acceleration (degrees per decisecond^2) used to ramp angular_velocity up/down.
#define TURRET_ANGULAR_ACCEL 1
/// Half-width, in degrees, of the arc a self_gimballed weapon's driver-controlled aim is clamped to around the turret's own current facing (see /obj/item/hardpoint/proc/update_desired_angle()) - keeps the visual swivel (see /obj/item/hardpoint/holder/tank_turret/get_hardpoint_image()) to a modest look-around instead of a full swing to any absolute angle.
#define SLAVED_GIMBAL_ARC_HALF_WIDTH 30

// Flamer hardpoint fire modes - see /obj/item/hardpoint/proc/toggle_fire_mode()
/// Directional line stream (walks toward the target, self-propagating tile by tile).
#define FLAME_MODE_STREAM "stream"
/// Single traveling projectile that plants one AOE ignition point on impact.
#define FLAME_MODE_GLOB "glob"
/// should these go into a _DEFINES for hardpoints instead???

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left this comment here for maintainers. At this rate, these defines would probably work better in a separate file, since they're intrinsic to hardpoints / turrets, and not 'vehicles.' Let me know if you agree and I'll change it.

40 changes: 38 additions & 2 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@
// GLOBAL PROCS //

/// Gives X position on pixel grid of an object, accounting for offsets
/proc/get_pixel_position_x(atom/subject, relative = FALSE)
/proc/get_pixel_position_x(atom/subject, relative = FALSE, include_size_adjustment = TRUE)
. = subject.pixel_x + subject.base_pixel_x
if(!relative)
. += world.icon_size * subject.x

if(!include_size_adjustment)
return

if(ismob(subject)) // Mobs use baked in icon_size due to eg. Xenos only using a visual size
var/mob/mob_subject = subject
. += (mob_subject.icon_size - world.icon_size) / 2
Expand All @@ -77,11 +80,14 @@
. += (big_subject.bound_width - world.icon_size) / 2

/// Gives Y position on pixel grid of an object, accounting for offsets
/proc/get_pixel_position_y(atom/subject, relative = FALSE)
/proc/get_pixel_position_y(atom/subject, relative = FALSE, include_size_adjustment = TRUE)
. = subject.pixel_y + subject.base_pixel_y
if(!relative)
. += world.icon_size * subject.y

if(!include_size_adjustment)
return

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

those early returns just prevent a visual & mechanical bug with the new aim pivoting system, where tall sprites force the gun barrel to aim 'north' of the tile the queen or the king is in. V. annoying.


if(ismob(subject)) // Mobs use baked in icon_size due to eg. Xenos only using a visual size
var/mob/mob_subject = subject
. += (mob_subject.icon_size - world.icon_size) / 2
Expand All @@ -106,12 +112,42 @@
var/dx = get_pixel_position_x(end) - get_pixel_position_x(start)
return delta_to_angle(dx, dy)

/**
* Same as Get_Angle(), but skips the automatic "sprite is bigger than a tile, so nudge the position
* by half the extra size" compensation baked into get_pixel_position_x/y()
*
* only used for actual tturret aiming/hit-resolution math (update_desired_angle(), track_and_charge()), not for purely
* cosmetic uses (LTB reticle placement, muzzle flashes, beams).
*
* That automatic guess assumes a sprite bigger than world.icon_size is centered on its tile, which
* is wrong for a mob like the Queen (icon_size 64) whose sprite is anchored at the feet and simply
* extends upward...
*/
/proc/Get_Angle_Grounded(atom/start, atom/end)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because Get_angle gets called in dozens of unrelated places, its easier to just make a new proc for turrett aiming instead of adjusting 5000 cases across multiple files

if(!start || !end)
return 0
if(!start.z)
start = get_turf(start)
if(!start)
return 0
if(!end.z)
end = get_turf(end)
if(!end)
return 0
var/dy = get_pixel_position_y(end, include_size_adjustment = FALSE) - get_pixel_position_y(start, include_size_adjustment = FALSE)
var/dx = get_pixel_position_x(end, include_size_adjustment = FALSE) - get_pixel_position_x(start, include_size_adjustment = FALSE)
return delta_to_angle(dx, dy)

/// Calculate the angle produced by a pair of x and y deltas. Uses north-clockwise convention: NORTH = 0, EAST = 90, etc.
/proc/delta_to_angle(dx, dy)
. = arctan(dy, dx) //y-then-x results in north-clockwise convention: https://en.wikipedia.org/wiki/Atan2#East-counterclockwise,_north-clockwise_and_south-clockwise_conventions,_etc.
if(. < 0)
. += 360

/// Shortest signed angle difference from b to a, in the range -180..180. Positive means a is clockwise of b.
/proc/angle_delta(a, b)
return ((a - b + 540) % 360) - 180

/proc/angle_to_dir(angle)
angle = ((angle % 360) + 382.5) % 360
switch(angle) //diagonal directions get priority over straight directions in edge cases
Expand Down
13 changes: 13 additions & 0 deletions code/_onclick/click_hold.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@
// Add the hovered atom to the trace
LAZYADD(mouse_trace_history, over_obj)

// Fires at near-pixel granularity while the cursor moves over the map, even with no button held.
// if this ever gets used anywhere else, be careful: Listeners are expected to rate-limit themselves - BWSB

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this would be pretty performance-heavy which is why I added that little warning. Still, this proc coudl be used for things like the VTOL, door gunners, APC, etc...

Shouldn't have much issue if it's only used by one gunner, but if you run an event where there are 50 tanks, it'll add up fastt.

/client/MouseMove(atom/object, turf/location, control, params)
if(!object)
return

var/click_catcher_click = FALSE
CONVERT_CLICK_CATCHER(object, location, click_catcher_click)
if(click_catcher_click)
params += CLICK_CATCHER_ADD_PARAM

SEND_SIGNAL(mob, COMSIG_MOB_MOUSEMOVE, object, location, control, params)

/client/MouseDrop(datum/src_object, datum/over_object, src_location, over_location, src_control, over_control, params)
. = ..()
if(HAS_TRAIT(usr, TRAIT_HAULED))
Expand Down
17 changes: 17 additions & 0 deletions code/_onclick/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,23 @@

grab_level = GRAB_CARRY

var/obj/vehicle/multitile/tank/tank = get_tank_on_top_of()
if(tank && !target.get_tank_on_top_of())

if(istype(tank))
var/turf/target_turf = get_turf(target)
var/adjacent_to_tank = FALSE
for(var/turf/tank_turf in tank.locs)
if(get_dist(target_turf, tank_turf) <= 1 && target_turf != tank_turf)
adjacent_to_tank = TRUE
break

if(adjacent_to_tank)
target.forceMove(user.loc)
tank.mark_on_top(target)
target.update_transform(TRUE)
return

target.Move(user.loc, get_dir(target.loc, user.loc))
target.update_transform(TRUE)

Expand Down
38 changes: 28 additions & 10 deletions code/datums/ammo/bullet/tank.dm

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole idea here is to make the autocannon something like an 'amr spec lite'. You get a good amount of damage. Good ammo economy. Good performance at medium ranges. However, you'll struggle to hit shoots at long range and you won't have too much agility at close range with how little DPS you have.

Safe pick. Effective. Good for new players. Minimal risk of FF.

Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,48 @@
sound_hit = 'sound/weapons/sting_boom_small1.ogg'
damage_falloff = 0
flags_ammo_behavior = AMMO_BALLISTIC
accurate_range_min = 4
accurate_range_min = 3

accuracy = HIT_ACCURACY_TIER_8
scatter = 0
damage = 60
damage = 140
damage_var_high = PROJECTILE_VARIANCE_TIER_8
penetration = ARMOR_PENETRATION_TIER_6
accurate_range = 32
max_range = 32
shell_speed = AMMO_SPEED_TIER_6

/datum/ammo/bullet/tank/flak/on_hit_mob(mob/M,obj/projectile/P)
burst(get_turf(M),P,damage_type, 2 , 3)
burst(get_turf(M),P,damage_type, 1 , 3 , 0)
create_shrapnel(get_turf(M), 24, rand(0, 359), 180, /datum/ammo/bullet/shrapnel/flak, P.weapon_cause_data, FALSE, 0.15, TRUE)
apply_micro_stun(M)

/datum/ammo/bullet/tank/flak/on_near_target(turf/T, obj/projectile/P)
burst(get_turf(T),P,damage_type, 2 , 3)
burst(get_turf(T),P,damage_type, 1 , 3, 0)
create_shrapnel(get_turf(T), 24, rand(0, 359), 180, /datum/ammo/bullet/shrapnel/flak, P.weapon_cause_data, FALSE, 0.15, TRUE)
return 1

/datum/ammo/bullet/tank/flak/on_hit_obj(obj/O,obj/projectile/P)
burst(get_turf(P),P,damage_type, 2 , 3)
burst(get_turf(P),P,damage_type, 1 , 3 , 0)
create_shrapnel(get_turf(P), 24, rand(0, 359), 180, /datum/ammo/bullet/shrapnel/flak, P.weapon_cause_data, FALSE, 0.15, TRUE)

/datum/ammo/bullet/tank/flak/on_hit_turf(turf/T,obj/projectile/P)
burst(get_turf(T),P,damage_type, 2 , 3)
burst(get_turf(T),P,damage_type, 1 , 3 , 0)
create_shrapnel(get_turf(T), 24, rand(0, 359), 180, /datum/ammo/bullet/shrapnel/flak, P.weapon_cause_data, FALSE, 0.15, TRUE)

// applies a micro-stun modelled after the AMR SPEC's second shot.
// unlike the AMR spec, this only works on xenos that aren't big sized.
/datum/ammo/bullet/tank/flak/proc/apply_micro_stun(mob/living/living_mob)
if(!isxeno(living_mob) || living_mob.mob_size >= MOB_SIZE_BIG)
return
var/mob/living/carbon/xenomorph/target = living_mob
target.KnockDown(0.15)

/datum/ammo/bullet/tank/flak/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)
))

/// same shrapnel as any other fragmentation source, just capped to a 4 tile radius
/datum/ammo/bullet/shrapnel/flak
max_range = 4

/datum/ammo/bullet/tank/dualcannon
name = "dualcannon bullet"
Expand Down Expand Up @@ -90,6 +105,9 @@
damage = 40
penetration = ARMOR_PENETRATION_TIER_6
damage_armor_punch = 1
// Close-range weapon by design: full damage out to 4 tiles, roughly halved by 7 tiles, tapers to nothing by 10 tiles.
effective_range_max = 4
damage_falloff = 6.7

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brutal falloff for the minigun. This PR turns it into a chainsaw. You kill things very fast if you 'rush in', but you'll also expose yourself.


/datum/ammo/bullet/tank/setup_faction_clash_values()
. = ..()
Expand Down
55 changes: 49 additions & 6 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,41 @@
/datum/ammo/flamethrower/do_at_max_range(obj/projectile/P)
drop_flame(get_turf(P), P.weapon_cause_data)

// "Glob shot" mode ammo for the tank's primary/secondary flamer hardpoints
/datum/ammo/flamethrower/tank_flamer
flamer_reagent_id = "highdamagenapalm"
max_range = 8
shell_speed = 1.5
var/loaded_chem_id

/datum/ammo/flamethrower/tank_flamer/drop_flame(turf/turf, datum/cause_data/cause_data)
if(!istype(turf))
return

var/datum/reagent/napalm/high_damage/reagent = new()
var/datum/reagent/reagent = loaded_chem_id ? GLOB.chemical_reagents_list[loaded_chem_id] : null
if(!reagent)
reagent = new /datum/reagent/napalm/high_damage()
new /obj/flamer_fire(turf, cause_data, reagent, 1)

var/datum/effect_system/smoke_spread/landingsmoke = new /datum/effect_system/smoke_spread
landingsmoke.set_up(1, 0, turf, null, 4, cause_data)
landingsmoke.start()
landingsmoke = null

/// Same as tank_flamer above, but for the secondary flamer hardpoint's smaller glob.
/datum/ammo/flamethrower/tank_flamer_secondary
flamer_reagent_id = "highdamagenapalm"
max_range = 8
shell_speed = 1.5
var/loaded_chem_id

/datum/ammo/flamethrower/tank_flamer_secondary/drop_flame(turf/turf, datum/cause_data/cause_data)
if(!istype(turf))
return

var/datum/reagent/reagent = loaded_chem_id ? GLOB.chemical_reagents_list[loaded_chem_id] : null
if(!reagent)
reagent = new /datum/reagent/napalm/high_damage()
new /obj/flamer_fire(turf, cause_data, reagent, 1)

var/datum/effect_system/smoke_spread/landingsmoke = new /datum/effect_system/smoke_spread
Expand Down Expand Up @@ -336,6 +361,29 @@
damage = 2.5
flare_type = /obj/item/device/flashlight/flare/on/starshell_ash

// Fired from the tank turret's flare launcher
/datum/ammo/flare/starshell/burst
name = "star shell burst"
max_range = 7

/datum/ammo/flare/starshell/burst/on_hit_mob(mob/M, obj/projectile/P)
detonate(get_turf(M), P)

/datum/ammo/flare/starshell/burst/on_hit_obj(obj/O, obj/projectile/P)
detonate(get_turf(O), P)

/datum/ammo/flare/starshell/burst/on_hit_turf(turf/T, obj/projectile/P)
if(T.density && isturf(P.loc))
detonate(P.loc, P)
else
detonate(T, P)

/datum/ammo/flare/starshell/burst/do_at_max_range(obj/projectile/P, mob/firer)
detonate(get_turf(P), P)

/datum/ammo/flare/starshell/burst/proc/detonate(turf/hit_turf, obj/projectile/fired_projectile)
create_shrapnel(hit_turf, 8, fired_projectile.dir, 360, /datum/ammo/flare/starshell, fired_projectile.weapon_cause_data, FALSE, 0)

/datum/ammo/flare/starshell/set_bullet_traits()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff),
Expand Down Expand Up @@ -440,11 +488,6 @@
/datum/ammo/grenade_container/rifle
flags_ammo_behavior = NO_FLAGS

/datum/ammo/grenade_container/smoke
name = "smoke grenade shell"
nade_type = /obj/item/explosive/grenade/smokebomb
icon_state = "smoke_shell"

/datum/ammo/grenade_container/tank_glauncher
max_range = 8

Expand Down
22 changes: 14 additions & 8 deletions code/datums/ammo/rocket.dm

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values aren't arbitrary.

They are at the threshold of damage values that won't stun the king or the queen, or even a Crusher. But they'll still stun T3s, T2s and T1s.

Reasoning is: LTB shouldn't stop a push or guarantee a queen kill. If the autocannon is the 'amr spec lite' option for the tank, the LTB is the 'sadar spec lite'. Demo Spec is most impactful when it can guarantee a queen kill. LTB can't do that anymore. But it can sure as hell fuck up every other xeno.

Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,26 @@
shell_speed = AMMO_SPEED_TIER_3

/datum/ammo/rocket/ltb/on_hit_mob(mob/mob, obj/projectile/projectile)
cell_explosion(get_turf(mob), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(mob), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(mob), 200, 200, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(mob), 100, 25, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)

/datum/ammo/rocket/ltb/on_hit_obj(obj/object, obj/projectile/projectile)
cell_explosion(get_turf(object), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(object), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(object), 200, 200, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(object), 100, 25, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)

/datum/ammo/rocket/ltb/on_hit_turf(turf/turf, obj/projectile/projectile)
cell_explosion(get_turf(turf), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(turf), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(turf), 200, 200, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(turf), 100, 25, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)

/datum/ammo/rocket/ltb/do_at_max_range(obj/projectile/projectile)
cell_explosion(get_turf(projectile), 220, 50, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(projectile), 200, 100, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(projectile), 200, 200, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)
cell_explosion(get_turf(projectile), 100, 25, EXPLOSION_FALLOFF_SHAPE_LINEAR, null, projectile.weapon_cause_data)

/datum/ammo/rocket/ltb/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
BULLET_TRAIT_ENTRY(/datum/element/bullet_trait_iff)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reasoning for giving LTB and Autocannon IFF is the same:

They're long ranged weapons and their effectiveness is going to be quartered without it.
Besides, tank already makes engaging enemies difficult enough. This is a big QoL for the tank crew. Besides... Why wouldn't the USCM tanks have IFF hardware?

))

/datum/ammo/rocket/wp
name = "white phosphorous rocket"
Expand Down
Loading