diff --git a/code/game/mob/keyboard.dm b/code/game/mob/keyboard.dm index 50970bfcf2..ab31c80e86 100644 --- a/code/game/mob/keyboard.dm +++ b/code/game/mob/keyboard.dm @@ -4,7 +4,10 @@ if (ishuman(src) && !src.stat) var/mob/living/human/H = src - H.look_into_distance(src) + if (H.using_drone) + using_drone.toggle_state() + else + H.look_into_distance(src) return return FALSE diff --git a/code/game/objects/controls.dm b/code/game/objects/controls.dm index 4e0bdc212f..8717786be7 100644 --- a/code/game/objects/controls.dm +++ b/code/game/objects/controls.dm @@ -17,7 +17,6 @@ icon = 'icons/obj/structures.dmi' icon_state = "blast_control" anchored = TRUE - cooldown = 3 distance = 5 density = FALSE not_movable = TRUE @@ -325,7 +324,6 @@ icon = 'icons/obj/structures.dmi' icon_state = "gate_control" anchored = TRUE - cooldown = 0 distance = 6 density = TRUE not_movable = TRUE @@ -419,7 +417,6 @@ layer = MOB_LAYER + 0.01 climbable = TRUE open = FALSE - cooldown = 0 bound_width = 32 bound_height = 64 // Only left facing version present because the rest of those variables, a solution would be to separate the open states from the closed states by making two separate .dmi files, where one's icon sizes are 64x32px, while the other one is 32x64px (not tested though) @@ -541,7 +538,6 @@ icon = 'icons/obj/structures.dmi' icon_state = "lift_panel2" anchored = TRUE - cooldown = 5 distance = 5 density = FALSE not_movable = TRUE diff --git a/code/game/objects/effects/explosion_particles.dm b/code/game/objects/effects/explosion_particles.dm index 73d4cc0894..1626be717f 100644 --- a/code/game/objects/effects/explosion_particles.dm +++ b/code/game/objects/effects/explosion_particles.dm @@ -57,12 +57,13 @@ if (istype(loca, /turf/)) location = loca else location = get_turf(loca) -/datum/effect/system/explosion/proc/start() +/datum/effect/system/explosion/proc/start(var/create_smoke) new/obj/effect/explosion( location ) var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles() P.set_up(10,location) P.start() - spawn(5) - var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread() - S.set_up(5,0,location,null) - S.start() \ No newline at end of file + if(create_smoke) + spawn(5) + var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread() + S.set_up(5,0,location,null) + S.start() \ No newline at end of file diff --git a/code/game/objects/explosion.dm b/code/game/objects/explosion.dm index f716d8955c..7e417f7a3a 100644 --- a/code/game/objects/explosion.dm +++ b/code/game/objects/explosion.dm @@ -1,5 +1,5 @@ -/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = TRUE, z_transfer = UP|DOWN, is_rec = config.use_recursive_explosions, sound = "explosion") +/proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = TRUE, z_transfer = UP|DOWN, is_rec = config.use_recursive_explosions, sound = "explosion", create_smoke = TRUE) /* // TODO: splits explosions bigger than 5x5 into sub-explosions var/num_explosions = devastation_range/5 @@ -23,6 +23,7 @@ data.rec_pow = max(0,devastation_range) * 2 + max(0,heavy_impact_range) + max(0,light_impact_range) if (sound) data.sound = sound + data.create_smoke = create_smoke // queue work processes.callproc.queue(processes.explosion, TYPE_PROC_REF(/process/explosion, queue), list(data), 1) diff --git a/code/game/objects/items/devices/drone.dm b/code/game/objects/items/devices/drone.dm index 90bddb064b..3b7b71c8b8 100644 --- a/code/game/objects/items/devices/drone.dm +++ b/code/game/objects/items/devices/drone.dm @@ -49,9 +49,9 @@ /obj/item/drone_controller/proc/start_move_drone(var/direction) moving_dir = direction if(!connected_drone) return - - if(connected_drone.broken) - if(controller) + if(!connected_drone.can_move) return + if(connected_drone.broken && controller) + if(!connected_drone.can_fly) to_chat(controller, SPAN_DANGER("\The [connected_drone]\'s tracks are broken, repair it with a welding tool.")) return if(!is_moving) @@ -61,6 +61,7 @@ /obj/item/drone_controller/proc/move_drone() if(!is_moving) return if(!connected_drone) return + if(!connected_drone.can_move) return if(connected_drone.broken) return if(executing_move) return executing_move = TRUE @@ -71,6 +72,11 @@ executing_move = FALSE move_drone() +/obj/item/drone_controller/proc/toggle_state() + if(connected_drone && connected_drone.can_fly && !connected_drone.broken) + to_chat(controller, SPAN_NOTICE("You [connected_drone.flying ? "decent \the [src] to the ground." : "fly \the [src] into the air."]")) + connected_drone.toggle_state() + /obj/structure/drone name = "drone" desc = "A movable drone." @@ -78,16 +84,26 @@ icon_state = "goliath" var/obj/item/drone_controller/connected_controller = null var/movement_delay = 5 - var/movement_sound = 'sound/machines/rc_car.ogg' - var/has_special = FALSE + var/health = 100 var/broken = FALSE + var/can_move = TRUE + var/can_fly = FALSE + var/flying = FALSE + + var/obj/item/weapon/grenade/payload = null + var/has_special = FALSE + + var/movement_sound = 'sound/machines/rc_car.ogg' + + var/starting_snd = null + var/running_snd = null + var/ending_snd = null + + var/starting_snd_len = 26 + var/running_snd_len = 11 heavy_armor_penetration = 0 - var/devastation_range = 2 - var/heavy_impact_range = 3 - var/light_impact_range = 5 - var/flash_range = 6 /obj/structure/drone/attackby(obj/item/I as obj, mob/user) if(istype(I, /obj/item/drone_controller)) @@ -109,6 +125,27 @@ else ..() +/obj/structure/drone/proc/toggle_state() + if(can_fly) + can_move = FALSE + if(!flying) + animate(src, pixel_y = 16, time = starting_snd_len, easing = CUBIC_EASING | EASE_IN) + playsound(loc, starting_snd, 50, FALSE, 2) + spawn(starting_snd_len) + can_move = TRUE + flying = TRUE + icon_state = "[initial(icon_state)]_flying" + running_sound() + else + + playsound(loc, ending_snd, 50, FALSE, 2) + spawn(5) + animate(src, pixel_y = 0, time = 5, easing = BOUNCE_EASING | EASE_OUT) + spawn(5) + can_move = TRUE + flying = FALSE + icon_state = initial(icon_state) + /obj/structure/drone/proc/try_destroy() if (health <= 0) health = 0 @@ -148,9 +185,30 @@ ..() /obj/structure/drone/proc/do_special() + return + +/obj/structure/drone/Move() + ..() + playsound(loc, movement_sound, 100, TRUE) + +/obj/structure/drone/proc/running_sound() + if (flying) + playsound(loc, pick(running_snd), 50, FALSE, 2) + spawn(running_snd_len) + running_sound() + return + +/obj/structure/drone/goliath + name = "Goliath SdKfz. 302" + desc = "The SdKfz. 302, also known as the Goliath, is a remote-controlled tracked mine carrying either 60 or 100 kg of high explosives. It is used for destroying tanks, disrupting dense infantry formations, and the demolition of buildings or bridges." + movement_delay = 4.5 + has_special = TRUE + heavy_armor_penetration = 40 + +/obj/structure/drone/goliath/do_special() var/turf/T = get_turf(src) qdel(src) - explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range) + explosion(T, 2, 3, 5, 6) for(var/obj/structure/vehicleparts/frame/F in range(1,src)) for (var/mob/M in F.axis.transporting) shake_camera(M, 3, 3) @@ -211,17 +269,20 @@ F.update_icon() return -/obj/structure/drone/Move() - ..() - playsound(loc, movement_sound, 100, TRUE) +/obj/structure/drone/flying + name = "drone" + desc = "A flying drone." + icon_state = "drone" + health = 50 + movement_delay = 2 + movement_sound = null + can_fly = TRUE -/obj/structure/drone/goliath - name = "Goliath SdKfz. 302" - desc = "The SdKfz. 302, also known as the Goliath, is a remote-controlled tracked mine carrying either 60 or 100 kg of high explosives. It is used for destroying tanks, disrupting dense infantry formations, and the demolition of buildings or bridges." - movement_delay = 4.5 - has_special = TRUE - heavy_armor_penetration = 40 - devastation_range = 2 - heavy_impact_range = 3 - light_impact_range = 5 - flash_range = 6 + movement_sound = null + + starting_snd = 'sound/machines/drone_startup.ogg' + running_snd = list('sound/machines/drone_active1.ogg', 'sound/machines/drone_active2.ogg', 'sound/machines/drone_active3.ogg') + ending_snd = 'sound/machines/drone_shutdown.ogg' + +/obj/structure/drone/flying/Move() + ..() diff --git a/code/game/objects/structures/transports.dm b/code/game/objects/structures/transports.dm index ebf35dd4d7..afa45a279e 100644 --- a/code/game/objects/structures/transports.dm +++ b/code/game/objects/structures/transports.dm @@ -17,6 +17,7 @@ var/wheeled = FALSE var/obj/item/vehicleparts/wheel/dwheel = null var/moving = FALSE + var/movement_processes = 0 var/obj/structure/engine/internal/engine = null var/obj/structure/vehicleparts/axis/axis = null var/obj/item/weapon/reagent_containers/glass/barrel/fueltank/fueltank = null @@ -117,12 +118,14 @@ movementloop() /obj/structure/vehicle/proc/movementloop() - if (moving == TRUE && driver) + if (moving && driver && !movement_processes) + movement_processes++ if (do_vehicle_check() && axis.currentspeed > 0) do_move(driver.dir) else axis.currentspeed = 0 spawn(vehicle_m_delay+1) + movement_processes-- movementloop() return else diff --git a/code/modules/1713/machinery/modular_vehicles/axis.dm b/code/modules/1713/machinery/modular_vehicles/axis.dm index 759a155cb0..52d0ad0511 100644 --- a/code/modules/1713/machinery/modular_vehicles/axis.dm +++ b/code/modules/1713/machinery/modular_vehicles/axis.dm @@ -9,6 +9,7 @@ var/global/list/tank_names_nato = list("Alpha", "Bravo", "Charlie", "Delta", "Ec var/maxdist = 5 //the highest of length and width var/turntimer = 15 var/doorcode = 0 + var/movement_processes = 0 /obj/structure/vehicleparts/axis/ex_act(severity) switch(severity) if (1.0) @@ -46,12 +47,14 @@ var/global/list/tank_names_nato = list("Alpha", "Bravo", "Charlie", "Delta", "Ec movementsound() /obj/structure/vehicleparts/axis/proc/movementloop() - if (moving == TRUE) + if (moving && !movement_processes) get_weight() + movement_processes++ if (do_vehicle_check() && currentspeed > 0) for (var/obj/structure/vehicleparts/movement/W in wheels) if (W.broken) moving = FALSE + movement_processes-- stopmovementloop() return else @@ -60,9 +63,11 @@ var/global/list/tank_names_nato = list("Alpha", "Bravo", "Charlie", "Delta", "Ec else currentspeed = 0 moving = FALSE + movement_processes-- stopmovementloop() return spawn(vehicle_m_delay+1) + movement_processes-- movementloop() return else diff --git a/code/modules/1713/machinery/modular_vehicles/carparts/apcs.dm b/code/modules/1713/machinery/modular_vehicles/carparts/apcs.dm index f33caaf8e3..ccb375595d 100644 --- a/code/modules/1713/machinery/modular_vehicles/carparts/apcs.dm +++ b/code/modules/1713/machinery/modular_vehicles/carparts/apcs.dm @@ -233,40 +233,40 @@ override_roof_icon = "mt_front_left_roof" override_frame_icon = "mt_front_left_frame" +/obj/structure/vehicleparts/frame/cv90/front + w_front = list("mt_front_frame",TRUE,TRUE,35,50,FALSE,FALSE) + override_roof_icon = "mt_front_roof" + override_frame_icon = "mt_front_frame" + /obj/structure/vehicleparts/frame/cv90/rf w_front = list("mt_front_left_frame",TRUE,TRUE,35,50,FALSE,FALSE) w_right = list("c_wall",TRUE,TRUE,35,50,FALSE,FALSE) override_roof_icon = "mt_front_right_roof" override_frame_icon = "mt_front_right_frame" -/obj/structure/vehicleparts/frame/cv90/lfc +/obj/structure/vehicleparts/frame/cv90/left w_left = list("mt_left_frame",TRUE,TRUE,35,50,FALSE,FALSE) override_roof_icon = "mt_left_roof" override_frame_icon = "mt_left_frame" -/obj/structure/vehicleparts/frame/cv90/rfc +/obj/structure/vehicleparts/frame/cv90/right w_right = list("mt_right_frame",TRUE,TRUE,35,50,FALSE,FALSE) override_roof_icon = "mt_right_roof" override_frame_icon = "mt_right_frame" -/obj/structure/vehicleparts/frame/cv90/lbc - w_left = list("mt_left_frame",TRUE,TRUE,35,50,FALSE,FALSE) - override_roof_icon = "mt_front_left_roof" - override_frame_icon = "mt_front_left_frame" - -/obj/structure/vehicleparts/frame/cv90/rbc - w_right = list("mt_right_frame",TRUE,TRUE,35,50,FALSE,FALSE) - override_roof_icon = "mt_front_right_roof" - override_frame_icon = "mt_front_right_frame" - /obj/structure/vehicleparts/frame/cv90/lb - w_back = list("mt_back_left_frame",TRUE,TRUE,35,50,TRUE,TRUE) + w_back = list("mt_back_left_frame",TRUE,TRUE,35,50,FALSE,FALSE) w_left = list("c_wall",TRUE,TRUE,35,50,FALSE,FALSE) override_roof_icon = "mt_back_left_roof" override_frame_icon = "mt_back_left_frame" +/obj/structure/vehicleparts/frame/cv90/back + w_back = list("mt_back_door_frame",TRUE,TRUE,35,50,TRUE,TRUE) + override_roof_icon = "mt_back_door_roof" + override_frame_icon = "mt_back_door_frame" + /obj/structure/vehicleparts/frame/cv90/rb - w_back = list("mt_right_back_frame",TRUE,TRUE,35,50,TRUE,TRUE) + w_back = list("mt_right_back_frame",TRUE,TRUE,35,50,FALSE,FALSE) w_right = list("c_wall",TRUE,TRUE,35,50,FALSE,FALSE) override_roof_icon = "mt_back_right_roof" override_frame_icon = "mt_back_right_frame" diff --git a/code/modules/1713/machinery/modular_vehicles/carparts/premade.dm b/code/modules/1713/machinery/modular_vehicles/carparts/premade.dm index 07687c9267..96702673fd 100644 --- a/code/modules/1713/machinery/modular_vehicles/carparts/premade.dm +++ b/code/modules/1713/machinery/modular_vehicles/carparts/premade.dm @@ -1175,16 +1175,20 @@ axis = /obj/structure/vehicleparts/axis/heavy/cv90 tocreate = list( "1,1" = list(/obj/structure/vehicleparts/movement/tracks/right,/obj/structure/vehicleparts/frame/cv90/rf), - "2,1" = list(/obj/structure/vehicleparts/movement/tracks/left,/obj/structure/vehicleparts/frame/cv90/lf,/obj/structure/bed/chair/drivers/tank), + "2,1" = list(/obj/structure/vehicleparts/frame/cv90/front), + "3,1" = list(/obj/structure/vehicleparts/movement/tracks/left,/obj/structure/vehicleparts/frame/cv90/lf,/obj/structure/bed/chair/drivers/tank), - "1,2" = list(/obj/structure/vehicleparts/frame/cv90/rfc,/obj/structure/turret/cv90{density = 0}), - "2,2" = list(/obj/structure/vehicleparts/frame/cv90/lfc), + "1,2" = list(/obj/structure/vehicleparts/frame/cv90/right,/obj/structure/lamp/lamp_small/tank/red,/obj/item/ammo_magazine/a35mm_fap,/obj/item/ammo_magazine/a35mm_fap,/obj/item/ammo_magazine/a35mm_hei,/obj/item/ammo_magazine/a35mm_hei), + "2,2" = list(/obj/structure/vehicleparts/frame/cv90,/obj/structure/turret/cv90{density = 0}), + "3,2" = list(/obj/structure/vehicleparts/frame/cv90/left,/obj/item/ammo_magazine/m249,/obj/item/ammo_magazine/m249,/obj/item/ammo_magazine/m249), - "1,3" = list(/obj/structure/vehicleparts/frame/cv90/rbc,/obj/structure/lamp/lamp_small/tank/red,/obj/item/ammo_magazine/a35mm_fap,/obj/item/ammo_magazine/a35mm_fap,/obj/item/ammo_magazine/a35mm_hei,/obj/item/ammo_magazine/a35mm_hei), - "2,3" = list(/obj/structure/vehicleparts/frame/cv90/lbc,/obj/item/ammo_magazine/m249,/obj/item/ammo_magazine/m249,/obj/item/ammo_magazine/m249), + "1,3" = list(/obj/structure/vehicleparts/frame/cv90/right), + "2,3" = list(/obj/structure/vehicleparts/frame/cv90), + "3,3" = list(/obj/structure/vehicleparts/frame/cv90/left), "1,4" = list(/obj/structure/vehicleparts/movement/tracks/left/reversed,/obj/structure/vehicleparts/frame/cv90/rb,/obj/structure/engine/internal/diesel/premade/btr80,/obj/item/weapon/reagent_containers/glass/barrel/fueltank/tank/fueleddiesel{density = 0}), - "2,4" = list(/obj/structure/vehicleparts/movement/tracks/right/reversed,/obj/structure/vehicleparts/frame/cv90/lb), + "2,4" = list(/obj/structure/vehicleparts/frame/cv90/back), + "3,4" = list(/obj/structure/vehicleparts/movement/tracks/right/reversed,/obj/structure/vehicleparts/frame/cv90/lb), ) /obj/effects/premadevehicles/apc/bradley diff --git a/code/modules/1713/machinery/modular_vehicles/ships/axis.dm b/code/modules/1713/machinery/modular_vehicles/ships/axis.dm index 7026bffa37..1a38723a6b 100644 --- a/code/modules/1713/machinery/modular_vehicles/ships/axis.dm +++ b/code/modules/1713/machinery/modular_vehicles/ships/axis.dm @@ -28,14 +28,16 @@ movementsound() /obj/structure/vehicleparts/axis/ship/movementloop() - if (moving == TRUE) + if (moving && !movement_processes) get_weight() + movement_processes++ if (masts.len) check_sails() if (do_vehicle_check() && currentspeed > 0) for (var/obj/structure/vehicleparts/movement/sail/S in masts) if (!S.sails || S.broken) moving = FALSE + movement_processes-- stopmovementloop() return FALSE else @@ -44,9 +46,11 @@ else currentspeed = 0 moving = FALSE + movement_processes-- stopmovementloop() return FALSE spawn(vehicle_m_delay+1) + movement_processes-- movementloop() return FALSE else diff --git a/code/modules/1713/siege/piece.dm b/code/modules/1713/siege/piece.dm index e8421d82ae..a58caa8b67 100644 --- a/code/modules/1713/siege/piece.dm +++ b/code/modules/1713/siege/piece.dm @@ -36,6 +36,7 @@ var/obj/structure/bed/chair/gunner/gunner_chair = null var/see_amount_loaded = FALSE var/autoloader = FALSE + var/is_loading = FALSE var/azimuth = 180 var/distance = 5 @@ -411,34 +412,39 @@ playsound(loc, 'sound/effects/lever.ogg',100, TRUE) return else - var/list/loadable = list() - for (var/obj/structure/shellrack/autoloader/AL in range(1,src)) - if (AL.storage.contents) - for (var/obj/item/cannon_ball/shell/tank/TS in AL.storage.contents) - if (istype(TS, ammotype)) - if (caliber != TS.caliber && caliber != null && caliber != 0) - user << SPAN_WARNING("\The [TS] is of the wrong caliber! You need [caliber] mm shells for this cannon.") - continue - loadable += TS - /* if (!(/obj/structure/shellrack/autoloader in range(1,src))) - user << SPAN_WARNING("There are no shell racks to load from nearby.") - return */ - - playsound(loc, 'sound/machines/autoloader.ogg', 100, TRUE) - var/obj/item/cannon_ball/shell/tank/chosen - - user << SPAN_NOTICE("The autoloader begins loading a shell.") - spawn (6 SECONDS) - if (!loadable.len) - user << SPAN_WARNING("There are no shells to load.") - return - chosen = WWinput(usr, "Select a tank shell to load", "Load Tank Shell", loadable[1], WWinput_list_or_null(loadable)) - if (!chosen || chosen == "") + if (!is_loading) + is_loading = TRUE + var/list/loadable = list() + for (var/obj/structure/shellrack/autoloader/AL in range(1,src)) + if (AL.storage.contents) + for (var/obj/item/cannon_ball/shell/tank/TS in AL.storage.contents) + if (istype(TS, ammotype)) + if (caliber != TS.caliber && caliber != null && caliber != 0) + to_chat(user, SPAN_WARNING("\The [TS] is of the wrong caliber! You need [caliber] mm shells for this cannon.")) + continue + loadable += TS + /* if (!(/obj/structure/shellrack/autoloader in range(1,src))) + to_chat(user, SPAN_WARNING("There are no shell racks to load from nearby.") + return */ + + playsound(loc, 'sound/machines/autoloader.ogg', 100, TRUE) + var/obj/item/cannon_ball/shell/tank/chosen + + to_chat(user, SPAN_NOTICE("The autoloader begins loading a shell.")) + spawn (6 SECONDS) + if (!loadable.len) + to_chat(user, SPAN_WARNING("There are no shells to load.")) + return + chosen = WWinput(usr, "Select a tank shell to load", "Load Tank Shell", loadable[1], WWinput_list_or_null(loadable)) + if (!chosen || chosen == "") + return + chosen.loc = src + loaded += chosen + to_chat(user, SPAN_NOTICE("The autoloader loads \the [src].")) + is_loading = FALSE return - chosen.loc = src - loaded += chosen - user << SPAN_NOTICE("The autoloader loads \the [src].") - return + else + to_chat(user, SPAN_WARNING("The autoloader is currently in use.")) else if (istype(src, /obj/structure/cannon/modern) || istype(src, /obj/structure/cannon/mortar)) var/obj/item/cannon_ball/M = loaded[1] diff --git a/code/modules/1713/siege/turret.dm b/code/modules/1713/siege/turret.dm index cc317a46c8..ea497b5387 100644 --- a/code/modules/1713/siege/turret.dm +++ b/code/modules/1713/siege/turret.dm @@ -312,31 +312,36 @@ to_chat(user, SPAN_NOTICE("You unload \the [src].")) if(istype(weapons[selected_weapon], /obj/structure/cannon/modern/tank/autoloader)) var/obj/structure/cannon/modern/tank/autoloader/A = weapons[selected_weapon] - var/list/loadable = list() - for (var/obj/structure/shellrack/autoloader/AL in range(1,src)) - if (AL.storage.contents) - for (var/obj/item/cannon_ball/shell/tank/TS in AL.storage.contents) - if (istype(TS, A.ammotype)) - if (A.caliber != TS.caliber && A.caliber != null && A.caliber != 0) - to_chat(user, SPAN_WARNING("\The [TS] is of the wrong caliber! You need [A.caliber] mm shells for this cannon.")) - continue - loadable += TS - - playsound(loc, 'sound/machines/autoloader.ogg', 100, TRUE) - var/obj/item/cannon_ball/shell/tank/chosen - - to_chat(user, SPAN_NOTICE("The autoloader begins loading a shell.")) - spawn (6 SECONDS) - if (!loadable.len) - to_chat(user, SPAN_WARNING("There are no shells to load.")) + if (!A.is_loading) + A.is_loading = TRUE + var/list/loadable = list() + for (var/obj/structure/shellrack/autoloader/AL in range(1,src)) + if (AL.storage.contents) + for (var/obj/item/cannon_ball/shell/tank/TS in AL.storage.contents) + if (istype(TS, A.ammotype)) + if (A.caliber != TS.caliber && A.caliber != null && A.caliber != 0) + to_chat(user, SPAN_WARNING("\The [TS] is of the wrong caliber! You need [A.caliber] mm shells for this cannon.")) + continue + loadable += TS + + playsound(loc, 'sound/machines/autoloader.ogg', 100, TRUE) + var/obj/item/cannon_ball/shell/tank/chosen + + to_chat(user, SPAN_NOTICE("The autoloader begins loading a shell.")) + spawn (6 SECONDS) + if (!loadable.len) + to_chat(user, SPAN_WARNING("There are no shells to load.")) + return + chosen = WWinput(usr, "Select a tank shell to load", "Load Tank Shell", loadable[1], WWinput_list_or_null(loadable)) + if (!chosen || chosen == "") + return + chosen.loc = src + A.loaded += chosen + to_chat(user, SPAN_NOTICE("The autoloader loads \the [src].")) + A.is_loading = FALSE return - chosen = WWinput(usr, "Select a tank shell to load", "Load Tank Shell", loadable[1], WWinput_list_or_null(loadable)) - if (!chosen || chosen == "") - return - chosen.loc = src - A.loaded += chosen - to_chat(user, SPAN_NOTICE("The autoloader loads \the [src].")) - return + else + to_chat(user, SPAN_WARNING("The autoloader is currently in use.")) do_html(user) /obj/structure/turret/proc/do_html(var/mob/m) @@ -1141,8 +1146,8 @@ icon = 'icons/obj/guns/mgs.dmi' icon_state = "autocannon" - turret_x = 16 - turret_y = 24 + turret_x = 0 + turret_y = 0 gunner_x = -8 gunner_y = 0 diff --git a/code/modules/1713/weapons/guns/mg/lmg.dm b/code/modules/1713/weapons/guns/mg/lmg.dm index f30c99bd9e..d0a4a0cc3b 100644 --- a/code/modules/1713/weapons/guns/mg/lmg.dm +++ b/code/modules/1713/weapons/guns/mg/lmg.dm @@ -284,7 +284,7 @@ var/cover_close_sound = 'sound/weapons/guns/interact/lmg_close.ogg' /obj/item/weapon/gun/projectile/automatic/manual/special_check(mob/user) - if (cover_open) + if (cover_open && !istype(loc, /obj/structure/turret)) to_chat(user, SPAN_WARNING("\The [src]'s cover is open! Close it before firing!")) return FALSE return ..() @@ -318,13 +318,13 @@ overlays += mag_image /obj/item/weapon/gun/projectile/automatic/manual/load_ammo(var/obj/item/A, mob/user) - if (!cover_open) + if (!cover_open && !istype(loc, /obj/structure/turret)) to_chat(user, SPAN_WARNING("You need to open the cover to load \the [src].")) return ..() /obj/item/weapon/gun/projectile/automatic/manual/unload_ammo(mob/user, var/allow_dump=1) - if (!cover_open) + if (!cover_open && !istype(loc, /obj/structure/turret)) to_chat(user, SPAN_WARNING("You need to open the cover to unload \the [src].")) return ..() diff --git a/code/modules/1713/weapons/guns/mg/stationary/mg.dm b/code/modules/1713/weapons/guns/mg/stationary/mg.dm index 8aa2b767fc..a35ac1e835 100644 --- a/code/modules/1713/weapons/guns/mg/stationary/mg.dm +++ b/code/modules/1713/weapons/guns/mg/stationary/mg.dm @@ -554,7 +554,7 @@ magazine_type = /obj/item/ammo_magazine/a35mm_fap good_mags = list(/obj/item/ammo_magazine/a35mm_fap, /obj/item/ammo_magazine/a35mm_hei) firemodes = list( - list(name = "automatic", burst=1, burst_delay=3, accuracy=list(2)), + list(name = "automatic", burst=1, burst_delay=5, accuracy=list(2)), ) ammo_type = /obj/item/ammo_casing/a30mm_ap full_auto = TRUE @@ -571,7 +571,7 @@ magazine_type = /obj/item/ammo_magazine/a25mm_ap/bradley good_mags = list(/obj/item/ammo_magazine/a25mm_ap/bradley, /obj/item/ammo_magazine/a25mm_he/bradley) firemodes = list( - list(name = "automatic", burst=1, burst_delay=3, accuracy=list(2)) + list(name = "automatic", burst=1, burst_delay=5, accuracy=list(2)) ) ammo_type = /obj/item/ammo_casing/a25mm_ap diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index bdab7bc1fa..9c318d0975 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -683,7 +683,9 @@ if (istype(src, /obj/item/projectile/shell)) var/obj/item/projectile/shell/S = src - if(S.initiated) + if (!istype(src, /obj/item/projectile/shell/missile)) + S.initiate(previous_step) + else on_impact(T) S.initiate(T) diff --git a/code/modules/projectiles/projectile/cannon.dm b/code/modules/projectiles/projectile/cannon.dm index 8c26c568a7..d5191efef2 100644 --- a/code/modules/projectiles/projectile/cannon.dm +++ b/code/modules/projectiles/projectile/cannon.dm @@ -19,6 +19,7 @@ impact_type = /obj/effect/projectile/impact/heavy var/turf/targloc = null var/initiated = FALSE + var/create_smoke = TRUE /obj/item/projectile/shell/New() ..() @@ -109,7 +110,8 @@ return var/caliber_modifier = clamp(round(caliber / 50), 0, 4) if (!istype(T, /turf/floor/beach) && !istype(T, /turf/floor/broken_floor) && !istype(T, /turf/floor/trench)) - T.ChangeTurf(/turf/floor/dirt/burned) + if(caliber >= 37) + T.ChangeTurf(/turf/floor/dirt/burned) if (atype == "HE") var/he_range = caliber_modifier var/list/fragment_types = list(/obj/item/projectile/bullet/pellet/fragment/short_range = 1) @@ -124,13 +126,15 @@ var/ap_range = clamp(round(caliber_modifier / 2), 0, 4) var/list/fragment_types = list(/obj/item/projectile/bullet/pellet/fragment/short_range = 1) if(caliber >= 37) - explosion(T, ap_range, ap_range + 1, ap_range + 2, 3) + if(caliber >= 50) + explosion(T, ap_range, ap_range + 1, ap_range + 2, 3) fragmentate(T, 8, 7, fragment_types) loc = null qdel(src) else if (atype == "APCR") if(!initiated) - explosion(T, 0, 0, 1, 0) + if(caliber >= 40) + explosion(T, 0, 0, 1, 0) loc = null qdel(src) return @@ -194,6 +198,8 @@ /obj/item/projectile/shell/autocannon icon = 'icons/obj/projectiles.dmi' icon_state = "bullet" + damage = 50 + create_smoke = FALSE /obj/item/projectile/shell/autocannon/New() ..() @@ -226,7 +232,7 @@ /obj/item/projectile/shell/autocannon/a35_fap atype = "APCR" - heavy_armor_penetration = 127 + heavy_armor_penetration = 102 caliber = 35 /obj/item/projectile/shell/autocannon/a35_hei diff --git a/code/processes/explosion.dm b/code/processes/explosion.dm index ec1c187ded..6692c580bb 100644 --- a/code/processes/explosion.dm +++ b/code/processes/explosion.dm @@ -54,6 +54,7 @@ var/z_transfer = data.z_transfer var/power = data.rec_pow var/sound = data.sound + var/create_smoke = data.create_smoke if (!sound) sound = get_sfx("explosion") @@ -92,7 +93,7 @@ log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ") if (heavy_impact_range > 0) - var/datum/effect/system/explosion/E = new/datum/effect/system/explosion() + var/datum/effect/system/explosion/E = new/datum/effect/system/explosion(create_smoke) E.set_up(epicenter) E.start() @@ -226,4 +227,5 @@ var/is_rec var/rec_pow var/list/objects_with_immunity = list() - var/sound = null \ No newline at end of file + var/sound = null + var/create_smoke = TRUE \ No newline at end of file diff --git a/icons/obj/vehicles/tankparts.dmi b/icons/obj/vehicles/tankparts.dmi index d3aa139468..cc007f5e5d 100644 Binary files a/icons/obj/vehicles/tankparts.dmi and b/icons/obj/vehicles/tankparts.dmi differ diff --git a/icons/obj/vehicles/vehicleparts.dmi b/icons/obj/vehicles/vehicleparts.dmi index 0b7fe723ca..f64f86f531 100644 Binary files a/icons/obj/vehicles/vehicleparts.dmi and b/icons/obj/vehicles/vehicleparts.dmi differ diff --git a/sound/machines/drone_active1.ogg b/sound/machines/drone_active1.ogg new file mode 100644 index 0000000000..32cdc6f17e Binary files /dev/null and b/sound/machines/drone_active1.ogg differ diff --git a/sound/machines/drone_active2.ogg b/sound/machines/drone_active2.ogg new file mode 100644 index 0000000000..d22b4946a8 Binary files /dev/null and b/sound/machines/drone_active2.ogg differ diff --git a/sound/machines/drone_active3.ogg b/sound/machines/drone_active3.ogg new file mode 100644 index 0000000000..3a2980297f Binary files /dev/null and b/sound/machines/drone_active3.ogg differ diff --git a/sound/machines/drone_shutdown.ogg b/sound/machines/drone_shutdown.ogg new file mode 100644 index 0000000000..83ff3d9dce Binary files /dev/null and b/sound/machines/drone_shutdown.ogg differ diff --git a/sound/machines/drone_startup.ogg b/sound/machines/drone_startup.ogg new file mode 100644 index 0000000000..b455a0856b Binary files /dev/null and b/sound/machines/drone_startup.ogg differ