From d58cb2fa301d59859154d735f7dab705f6290ad5 Mon Sep 17 00:00:00 2001 From: Mykhailo Bykhovtsev Date: Sun, 17 May 2020 05:23:42 -0700 Subject: [PATCH] KA and turret controls mapping fixes (#8893) --- code/game/machinery/turret_control.dm | 2 +- code/modules/custom_ka/projectiles.dm | 23 +++++++++++--- html/changelogs/Sindorman-bugfixes.yml | 42 ++++++++++++++++++++++++++ maps/aurora/aurora-3_sublevel.dmm | 1 - maps/aurora/aurora-4_mainlevel.dmm | 1 - maps/aurora/aurora-5_interstitial.dmm | 1 - maps/aurora/aurora-6_surface.dmm | 10 +++--- 7 files changed, 66 insertions(+), 14 deletions(-) create mode 100644 html/changelogs/Sindorman-bugfixes.yml diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm index 755006c93d1..3f1e7f9f3ac 100644 --- a/code/game/machinery/turret_control.dm +++ b/code/game/machinery/turret_control.dm @@ -4,7 +4,7 @@ /area // Turrets use this list to see if individual power/lethal settings are allowed var/list/turret_controls = list() - var/list/turrets + var/list/turrets = list() /obj/machinery/turretid diff --git a/code/modules/custom_ka/projectiles.dm b/code/modules/custom_ka/projectiles.dm index 7b7c068ab95..c37409a7150 100644 --- a/code/modules/custom_ka/projectiles.dm +++ b/code/modules/custom_ka/projectiles.dm @@ -25,6 +25,8 @@ if(istype(target_turf) && !aoe_shot) aoe_shot = TRUE strike_thing(A) + else if(aoe_shot) + do_damage(A) /obj/item/projectile/kinetic/proc/do_damage(var/atom/A) var/turf/target_turf = get_turf(A) @@ -51,8 +53,19 @@ for(var/new_target in orange(aoe, target_turf)) new /obj/effect/overlay/temp/kinetic_blast(get_turf(new_target)) var/obj/item/projectile/kinetic/spread = new /obj/item/projectile/kinetic - spread.aoe_shot = TRUE - spread.damage = max(base_damage - base_damage * get_dist(new_target, target_turf) * 0.25, 0) - spread.do_damage(new_target) - spread.Collide(new_target) - CHECK_TICK \ No newline at end of file + if(istype(get_turf(new_target), /turf/simulated/mineral)) + spread.aoe_shot = TRUE + spread.damage = max(base_damage - base_damage * get_dist(new_target, target_turf) * 0.25, 0) + spread.base_damage = base_damage + var/turf/simulated/mineral/M = new_target + M.kinetic_hit(spread.base_damage, dir) + qdel(spread) + CHECK_TICK + continue + else + spread.aoe_shot = TRUE + spread.damage = max(base_damage - base_damage * get_dist(new_target, target_turf) * 0.25, 0) + spread.base_damage = base_damage + spread.do_damage(new_target) + spread.Collide(new_target) + CHECK_TICK \ No newline at end of file diff --git a/html/changelogs/Sindorman-bugfixes.yml b/html/changelogs/Sindorman-bugfixes.yml new file mode 100644 index 00000000000..360300ce919 --- /dev/null +++ b/html/changelogs/Sindorman-bugfixes.yml @@ -0,0 +1,42 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: PoZe + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "T-comms, Vault, Station self-destruct turrets controllers are now properly mapped and connect to turrets." + - bugfix: "KA AOE now properly works for asteroid mining and deals proper damage." diff --git a/maps/aurora/aurora-3_sublevel.dmm b/maps/aurora/aurora-3_sublevel.dmm index fa380d9d55a..e8126eedac1 100644 --- a/maps/aurora/aurora-3_sublevel.dmm +++ b/maps/aurora/aurora-3_sublevel.dmm @@ -11127,7 +11127,6 @@ pixel_y = -5 }, /obj/machinery/turretid/stun{ - control_area = null; name = "AI Upload turret control"; pixel_x = 24; pixel_y = 6 diff --git a/maps/aurora/aurora-4_mainlevel.dmm b/maps/aurora/aurora-4_mainlevel.dmm index 47db6ecb317..6e5ffee0712 100644 --- a/maps/aurora/aurora-4_mainlevel.dmm +++ b/maps/aurora/aurora-4_mainlevel.dmm @@ -19727,7 +19727,6 @@ /obj/machinery/turretid/lethal{ ailock = 1; check_synth = 1; - control_area = "\improper Vault"; desc = "A firewall prevents AIs from interacting with this device."; name = "Vault lethal turret control"; pixel_x = -28; diff --git a/maps/aurora/aurora-5_interstitial.dmm b/maps/aurora/aurora-5_interstitial.dmm index 3589d344dcc..b4f0ddf0347 100644 --- a/maps/aurora/aurora-5_interstitial.dmm +++ b/maps/aurora/aurora-5_interstitial.dmm @@ -4199,7 +4199,6 @@ /obj/machinery/turretid/lethal{ ailock = 1; check_synth = 1; - control_area = "\improper Command - Station Authentication Terminal Safe"; desc = "A firewall prevents AIs from interacting with this device."; name = "SAT turrets control"; pixel_x = 0; diff --git a/maps/aurora/aurora-6_surface.dmm b/maps/aurora/aurora-6_surface.dmm index 25f4c2edb8b..ca3f25df83e 100644 --- a/maps/aurora/aurora-6_surface.dmm +++ b/maps/aurora/aurora-6_surface.dmm @@ -2170,7 +2170,7 @@ /obj/machinery/porta_turret/stationary, /obj/effect/decal/warning_stripes, /turf/simulated/floor/airless, -/area/turret_protected/tcomsat) +/area/turret_protected/tcomfoyer) "dV" = ( /turf/simulated/wall/r_wall, /area/tcommsat/chamber) @@ -3152,7 +3152,7 @@ /obj/machinery/turretid/stun{ ailock = 1; check_synth = 1; - control_area = "\improper Telecoms Foyer"; + control_area = null; desc = "A firewall prevents AIs from interacting with this device."; name = "Telecoms Foyer turret control"; pixel_y = 29; @@ -16501,7 +16501,7 @@ }, /obj/effect/decal/warning_stripes, /turf/simulated/floor/plating, -/area/turret_protected/tcomfoyer) +/area/tcommsat/entrance) "DI" = ( /turf/simulated/wall/shuttle/unique/research{ desc = "The largest commercially available sublight engine, with a shuttle built around it and painted in NanoTrasen research division colors. Looks sleek, and fast."; @@ -22954,7 +22954,7 @@ /obj/machinery/turretid/lethal{ ailock = 1; check_synth = 1; - control_area = "\improper Telecoms Exterior"; + control_area = null; desc = "A firewall prevents AIs from interacting with this device."; name = "Telecoms lethal turret control"; pixel_y = 29; @@ -23700,7 +23700,7 @@ icon_state = "4-8" }, /turf/simulated/floor/plating, -/area/turret_protected/tcomfoyer) +/area/tcommsat/entrance) "Rh" = ( /obj/structure/weightlifter, /obj/effect/floor_decal/corner/red/full{