-
Notifications
You must be signed in to change notification settings - Fork 926
Tank Desant: Hardpoint Rebalances, Additions & Reworks #12586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
e523d73
370d755
81d1ed8
87dbebd
9d91bcd
0e1ad2d
44a3a7f
2a3af3d
15197d8
6b363dd
c790fa9
0958028
3575bc9
fad6163
cf63678
9097142
73fa9d8
7a19a98
582dbcb
791535b
baa1ed7
b456b34
a105c69
84a96bc
d48424a
71614ba
74c85aa
b5ec4b9
a155b18
a0162bd
853edc0
ba4b049
229c6d9
476a99e
03c0e75
5854136
a94785f
aa5578c
4e83431
a469112
af663ee
532aec6
5e4690e
1f9c719
658bf8a
bf170fa
d627caa
c657a89
51a604c
66ac197
47495bb
88aee29
3cf42c7
e524385
079e5ec
2bdcb6b
bce2a2c
802e12d
1a63247
923ed2f
959cda0
862a2f0
67f081e
ee93aa5
55c67d7
7f5e8a1
ffd9ab5
2e8e687
9f17226
69c6ec8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
@@ -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) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)) | ||
|
|
||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
|---|---|---|
|
|
@@ -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" | ||
|
|
@@ -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 | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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() | ||
| . = ..() | ||
|
|
||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
|---|---|---|
|
|
@@ -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) | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| )) | ||
|
|
||
| /datum/ammo/rocket/wp | ||
| name = "white phosphorous rocket" | ||
|
|
||
There was a problem hiding this comment.
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.