diff --git a/code/datums/vehicles.dm b/code/datums/vehicles.dm index 36ac96938c..ac71cc1fc7 100644 --- a/code/datums/vehicles.dm +++ b/code/datums/vehicles.dm @@ -26,6 +26,10 @@ name = "APC - No FPW" interior_id = "apc_no_fpw" +/datum/map_template/interior/apc_movie + name = "Movie APC" + interior_id = "apc_movie" + /datum/map_template/interior/fancy_locker name = "Fancy Locker" interior_id = "fancylocker" diff --git a/code/modules/vehicles/apc/apc_movie.dm b/code/modules/vehicles/apc/apc_movie.dm new file mode 100644 index 0000000000..aef7ad45b2 --- /dev/null +++ b/code/modules/vehicles/apc/apc_movie.dm @@ -0,0 +1,168 @@ + +/obj/vehicle/multitile/apc/movie + name = "M577A3 Armored Personnel Carrier" + desc = "An M577A3 Armored Personnel Carrier complete with a tactical operations center. Entrance on the right." + + icon = 'icons/obj/vehicles/movieapc.dmi' + icon_state = "apc_base_movie" + pixel_x = -64 + pixel_y = -64 + + bound_width = 96 + bound_height = 96 + + interior_map = /datum/map_template/interior/apc_movie + + + passengers_slots = 20 + + entrances = list( + "right rear" = list(-2, 1), + "right front" = list(-2, 0) + ) + + seats = list( + VEHICLE_DRIVER = null, + VEHICLE_GUNNER = null, + ) + + active_hp = list( + VEHICLE_DRIVER = null, + VEHICLE_GUNNER = null, + ) + +/obj/vehicle/multitile/apc/movie/add_seated_verbs(mob/living/M, seat) + if(!M.client) + return + add_verb(M.client, list( + /obj/vehicle/multitile/proc/get_status_info, + /obj/vehicle/multitile/proc/open_controls_guide, + /obj/vehicle/multitile/proc/name_vehicle, + )) + if(seat == VEHICLE_DRIVER) + add_verb(M.client, list( + /obj/vehicle/multitile/proc/toggle_door_lock, + /obj/vehicle/multitile/proc/switch_hardpoint, + /obj/vehicle/multitile/proc/cycle_hardpoint, + /obj/vehicle/multitile/proc/toggle_shift_click, + /obj/vehicle/multitile/proc/activate_horn, + )) + else if(seat == VEHICLE_GUNNER) + add_verb(M.client, list( + /obj/vehicle/multitile/proc/switch_hardpoint, + /obj/vehicle/multitile/proc/cycle_hardpoint, + /obj/vehicle/multitile/proc/toggle_shift_click, + )) + +/obj/vehicle/multitile/apc/movie/remove_seated_verbs(mob/living/M, seat) + if(!M.client) + return + remove_verb(M.client, list( + /obj/vehicle/multitile/proc/get_status_info, + /obj/vehicle/multitile/proc/open_controls_guide, + /obj/vehicle/multitile/proc/name_vehicle, + )) + SStgui.close_user_uis(M, src) + if(seat == VEHICLE_DRIVER) + remove_verb(M.client, list( + /obj/vehicle/multitile/proc/toggle_door_lock, + /obj/vehicle/multitile/proc/switch_hardpoint, + /obj/vehicle/multitile/proc/cycle_hardpoint, + /obj/vehicle/multitile/proc/toggle_shift_click, + /obj/vehicle/multitile/proc/activate_horn, + )) + else if(seat == VEHICLE_GUNNER) + remove_verb(M.client, list( + /obj/vehicle/multitile/proc/switch_hardpoint, + /obj/vehicle/multitile/proc/cycle_hardpoint, + /obj/vehicle/multitile/proc/toggle_shift_click, + )) + +/obj/vehicle/multitile/apc/movie/initialize_cameras(change_tag = FALSE) + if(!camera) + camera = new /obj/structure/machinery/camera/vehicle(src) + if(change_tag) + camera.c_tag = "#[rand(1,100)] M577A3 \"[nickname]\" APC" + if(camera_int) + camera_int.c_tag = camera.c_tag + " interior" + else + camera.c_tag = "#[rand(1,100)] M577A3 APC" + if(camera_int) + camera_int.c_tag = camera.c_tag + " interior" + +/obj/vehicle/multitile/apc/movie/set_muzzle_offsets(obj/item/hardpoint/HP) + //sets muzzle flash offsets for APC weapons as appropriate for the movie APC + switch(HP.slot) + if(HDPT_PRIMARY) //dualcannon + HP.muzzle_flash_pos = list( + "1" = list(8, -20), + "2" = list(25, 31), + "4" = list(-7, 27), + "8" = list(37, 9) + ) + if(HDPT_SECONDARY) //frontalcannon + HP.muzzle_flash_pos = list( + "1" = list(34, 70), + "2" = list(-1, -70), + "4" = list(88, -7), + "8" = list(-56, 12) + ) + if(HDPT_SUPPORT) //flare + HP.muzzle_flash_pos = list( + "1" = list(22, -20), + "2" = list(11, 32), + "4" = list(-5, 10), + "8" = list(37, 24) + ) + return ..() + +/* +** PRESETS SPAWNERS +*/ +/obj/effect/vehicle_spawner/apc_movie + name = "Movie APC Spawner" + icon = 'icons/obj/vehicles/movieapc.dmi' + icon_state = "apc_base_movie" + pixel_x = -64 + pixel_y = -64 + +/obj/effect/vehicle_spawner/apc_movie/Initialize() + . = ..() + spawn_vehicle() + qdel(src) + +//PRESET: no hardpoints +/obj/effect/vehicle_spawner/apc_movie/spawn_vehicle() + var/obj/vehicle/multitile/apc/movie/APC = new (loc) + + load_misc(APC) + load_hardpoints(APC) + handle_direction(APC) + APC.update_icon() + +//PRESET: only wheels installed +/obj/effect/vehicle_spawner/apc_movie/plain/load_hardpoints(obj/vehicle/multitile/apc/movie/V) + V.add_hardpoint(new /obj/item/hardpoint/locomotion/apc_wheels) + +//PRESET: default hardpoints, destroyed +/obj/effect/vehicle_spawner/apc_movie/decrepit/spawn_vehicle() + var/obj/vehicle/multitile/apc/movie/APC = new (loc) + + load_misc(APC) + load_hardpoints(APC) + handle_direction(APC) + load_damage(APC) + APC.update_icon() + +/obj/effect/vehicle_spawner/apc_movie/decrepit/load_hardpoints(obj/vehicle/multitile/apc/movie/V) + V.add_hardpoint(new /obj/item/hardpoint/primary/dualcannon) + V.add_hardpoint(new /obj/item/hardpoint/secondary/frontalcannon) + V.add_hardpoint(new /obj/item/hardpoint/support/flare_launcher) + V.add_hardpoint(new /obj/item/hardpoint/locomotion/apc_wheels) + +//PRESET: default hardpoints +/obj/effect/vehicle_spawner/apc_movie/fixed/load_hardpoints(obj/vehicle/multitile/apc/movie/V) + V.add_hardpoint(new /obj/item/hardpoint/primary/dualcannon) + V.add_hardpoint(new /obj/item/hardpoint/secondary/frontalcannon) + V.add_hardpoint(new /obj/item/hardpoint/support/flare_launcher) + V.add_hardpoint(new /obj/item/hardpoint/locomotion/apc_wheels) diff --git a/code/modules/vehicles/interior/areas.dm b/code/modules/vehicles/interior/areas.dm index 605b32079f..f18c4d03c8 100644 --- a/code/modules/vehicles/interior/areas.dm +++ b/code/modules/vehicles/interior/areas.dm @@ -24,6 +24,10 @@ name = "\improper CMD APC interior" icon_state = "apc_cmd" +/area/vehicle/apc/movie + name = "\improper M557A3 APC interior" + icon_state = "apc_movie" + /area/vehicle/van name = "van interior" icon_state = "van" diff --git a/code/modules/vehicles/multitile/multitile_hardpoints.dm b/code/modules/vehicles/multitile/multitile_hardpoints.dm index 2c5a343b80..b8edba78da 100644 --- a/code/modules/vehicles/multitile/multitile_hardpoints.dm +++ b/code/modules/vehicles/multitile/multitile_hardpoints.dm @@ -201,6 +201,7 @@ //ALWAYS CALL THIS WHEN ATTACHING HARDPOINTS /obj/vehicle/multitile/proc/add_hardpoint(obj/item/hardpoint/HP, mob/user) HP.owner = src + set_muzzle_offsets(HP) HP.forceMove(src) hardpoints += HP @@ -209,6 +210,9 @@ update_icon() +/obj/vehicle/multitile/proc/set_muzzle_offsets(obj/item/hardpoint/HP) + return + //General proc for taking off hardpoints //ALWAYS CALL THIS WHEN REMOVING HARDPOINTS /obj/vehicle/multitile/proc/remove_hardpoint(obj/item/hardpoint/old, mob/user) diff --git a/colonialmarines.dme b/colonialmarines.dme index 30c4089f36..f55c73ac8e 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2363,6 +2363,7 @@ #include "code\modules\vehicles\apc\apc.dm" #include "code\modules\vehicles\apc\apc_command.dm" #include "code\modules\vehicles\apc\apc_medical.dm" +#include "code\modules\vehicles\apc\apc_movie.dm" #include "code\modules\vehicles\apc\interior.dm" #include "code\modules\vehicles\hardpoints\hardpoint.dm" #include "code\modules\vehicles\hardpoints\armor\armor.dm" diff --git a/icons/obj/vehicles/interiors/apc.dmi b/icons/obj/vehicles/interiors/apc.dmi index 5855af1dc0..e12c5f68ab 100644 Binary files a/icons/obj/vehicles/interiors/apc.dmi and b/icons/obj/vehicles/interiors/apc.dmi differ diff --git a/icons/obj/vehicles/movieapc.dmi b/icons/obj/vehicles/movieapc.dmi new file mode 100644 index 0000000000..8c5faee611 Binary files /dev/null and b/icons/obj/vehicles/movieapc.dmi differ diff --git a/icons/turf/areas_interiors.dmi b/icons/turf/areas_interiors.dmi index 4da1109803..40e6e906ce 100644 Binary files a/icons/turf/areas_interiors.dmi and b/icons/turf/areas_interiors.dmi differ diff --git a/maps/interiors/apc_movie.dmm b/maps/interiors/apc_movie.dmm new file mode 100644 index 0000000000..d32b9f49ec --- /dev/null +++ b/maps/interiors/apc_movie.dmm @@ -0,0 +1,536 @@ +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +"a" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_6" + }, +/turf/open/void/vehicle, +/area/space) +"b" = ( +/obj/structure/machinery/computer/shuttle/dropship/flight/remote_control{ + name = "Alamo Remote Control Console"; + shuttleId = "dropship_alamo"; + pixel_x = 7; + pixel_y = 11 + }, +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = -16; + layer = 3.21 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_4" + }, +/area/vehicle/apc/movie) +"c" = ( +/obj/structure/machinery/computer/overwatch/almayer{ + layer = 3.2; + pixel_x = 16; + pixel_y = 23 + }, +/obj/structure/machinery/prop/almayer/CICmap{ + icon_state = "security_cam"; + layer = 2.97; + name = "Tactical Map Display"; + pixel_x = -7; + pixel_y = 11; + density = 0 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_3" + }, +/area/vehicle/apc/movie) +"d" = ( +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = -8 + }, +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = 8 + }, +/obj/effect/landmark/interior/spawn/interior_viewport{ + dir = 1; + pixel_x = 2; + pixel_y = -13 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"e" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_2"; + pixel_x = 4; + pixel_y = -4 + }, +/turf/open/void/vehicle, +/area/space) +"f" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_1"; + pixel_x = 1; + pixel_y = -4 + }, +/turf/open/void/vehicle, +/area/space) +"g" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_1" + }, +/turf/open/void/vehicle, +/area/space) +"h" = ( +/obj/effect/landmark/interior/spawn/weapons_loader, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"i" = ( +/obj/structure/interior_wall/apc{ + icon_state = "corner_inverse_R"; + opacity = 0 + }, +/turf/open/space/basic, +/area/space) +"j" = ( +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = 8 + }, +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = -8 + }, +/obj/effect/landmark/interior/spawn/interior_viewport{ + dir = 1; + pixel_x = 8; + pixel_y = -11 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"l" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall"; + opacity = 0 + }, +/turf/open/space/basic, +/area/space) +"m" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_5" + }, +/area/vehicle/apc/movie) +"n" = ( +/obj/structure/interior_wall/apc{ + icon_state = "intersection_2"; + opacity = 0 + }, +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_2"; + pixel_x = 2; + pixel_y = 8; + layer = 2 + }, +/turf/open/shuttle/vehicle, +/area/space) +"o" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_1" + }, +/turf/open/void/vehicle, +/area/space) +"p" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_4" + }, +/turf/open/void/vehicle, +/area/space) +"q" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_wheel_L_1" + }, +/turf/open/space/basic, +/area/space) +"r" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_wheel_R"; + layer = 5.2 + }, +/turf/open/space/basic, +/area/space) +"s" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall_2"; + opacity = 0 + }, +/turf/open/space/basic, +/area/space) +"t" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_0_10" + }, +/area/vehicle/apc/movie) +"u" = ( +/obj/effect/landmark/interior/spawn/interior_camera{ + dir = 10; + pixel_x = -14; + pixel_y = 38 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_3" + }, +/area/vehicle/apc/movie) +"v" = ( +/obj/structure/bed/chair/vehicle{ + pixel_x = 8 + }, +/obj/structure/bed/chair/vehicle{ + pixel_x = -8 + }, +/obj/effect/landmark/interior/spawn/interior_viewport{ + pixel_x = -7; + pixel_y = 23 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"w" = ( +/obj/structure/machinery/cm_vending/sorted/medical/wall_med/vehicle{ + pixel_x = 6; + pixel_y = 28 + }, +/obj/structure/extinguisher_cabinet/lifeboat{ + icon = 'icons/obj/vehicles/interiors/general.dmi'; + pixel_x = -8; + pixel_y = 28 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_5" + }, +/area/vehicle/apc/movie) +"y" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_5" + }, +/turf/open/void/vehicle, +/area/space) +"z" = ( +/obj/effect/landmark/interior/spawn/entrance{ + alpha = 50; + exit_type = /obj/structure/interior_exit/vehicle/apc; + name = "Right APC door"; + tag = "right rear" + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_3" + }, +/area/vehicle/apc/movie) +"A" = ( +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = 8 + }, +/obj/structure/bed/chair/vehicle{ + dir = 1; + pixel_x = -8 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"B" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_3" + }, +/area/vehicle/apc/movie) +"C" = ( +/obj/structure/interior_wall/apc{ + icon_state = "door_big_right"; + layer = 5.2; + pixel_y = 32; + alpha = 100 + }, +/turf/open/void/vehicle, +/area/space) +"D" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_5" + }, +/turf/open/void/vehicle, +/area/space) +"E" = ( +/turf/open/void/vehicle, +/area/space) +"F" = ( +/obj/structure/bed/chair/vehicle{ + pixel_x = 8 + }, +/obj/structure/bed/chair/vehicle{ + pixel_x = -8 + }, +/obj/structure/vehicle_locker{ + pixel_y = 28 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"G" = ( +/obj/structure/machinery/cm_vending/sorted/vehicle_supply{ + pixel_y = 16 + }, +/obj/effect/landmark/interior/spawn/interior_viewport{ + dir = 8; + pixel_x = 5; + pixel_y = 8 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"H" = ( +/obj/structure/interior_wall/apc{ + icon_state = "corner_inverse_L"; + opacity = 0 + }, +/turf/open/space/basic, +/area/space) +"I" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_3" + }, +/obj/structure/interior_wall/apc{ + icon_state = "front_4" + }, +/turf/open/void/vehicle, +/area/space) +"J" = ( +/obj/structure/interior_wall/apc{ + icon_state = "intersection_1"; + opacity = 0 + }, +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_2"; + pixel_x = 4; + pixel_y = 1; + layer = 2.01 + }, +/turf/open/shuttle/vehicle, +/area/space) +"K" = ( +/obj/structure/interior_wall/apc{ + icon_state = "corner_small_L"; + opacity = 0 + }, +/obj/structure/interior_wall/apc{ + icon_state = "wheel_back_top_2"; + pixel_x = -4; + pixel_y = -4 + }, +/turf/open/void/vehicle, +/area/space) +"L" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_wheel_L" + }, +/turf/open/space/basic, +/area/space) +"M" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_3" + }, +/turf/open/void/vehicle, +/area/space) +"N" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_4" + }, +/area/vehicle/apc/movie) +"O" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_2" + }, +/turf/open/void/vehicle, +/area/space) +"P" = ( +/turf/open/shuttle/vehicle{ + icon_state = "floor_0_9" + }, +/area/vehicle/apc/movie) +"Q" = ( +/obj/structure/interior_wall/apc{ + icon_state = "door_big_left"; + pixel_y = 32; + layer = 5.2; + alpha = 100 + }, +/turf/open/void/vehicle, +/area/space) +"R" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall_wheelside" + }, +/turf/open/space/basic, +/area/space) +"S" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_6" + }, +/turf/open/void/vehicle, +/area/space) +"T" = ( +/obj/effect/landmark/interior/spawn/entrance{ + alpha = 50; + exit_type = /obj/structure/interior_exit/vehicle/apc; + name = "Right APC door"; + tag = "right front" + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_1_4" + }, +/area/vehicle/apc/movie) +"U" = ( +/obj/structure/interior_wall/apc{ + icon_state = "front_wheel_R" + }, +/turf/open/space/basic, +/area/space) +"V" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wheel_back_top_1"; + pixel_x = -4; + pixel_y = -4 + }, +/turf/open/void/vehicle, +/area/space) +"W" = ( +/obj/effect/landmark/interior/spawn/vehicle_driver_seat/armor{ + dir = 4 + }, +/obj/effect/landmark/interior/spawn/interior_viewport{ + dir = 8; + pixel_x = 5 + }, +/turf/open/shuttle/vehicle{ + icon_state = "floor_2" + }, +/area/vehicle/apc/movie) +"X" = ( +/obj/structure/interior_wall/apc{ + icon_state = "wall"; + opacity = 0 + }, +/obj/structure/surface/table/reinforced/almayer_B{ + pixel_y = -18 + }, +/turf/open/space/basic, +/area/space) +"Y" = ( +/obj/structure/interior_wall/apc{ + icon_state = "rear_2" + }, +/turf/open/void/vehicle, +/area/space) +"Z" = ( +/obj/structure/interior_wall/apc{ + icon_state = "corner_small_R"; + opacity = 0 + }, +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_2"; + pixel_x = 4; + pixel_y = -4 + }, +/obj/structure/interior_wall/apc{ + icon_state = "wheel_front_top_2"; + pixel_x = 8; + pixel_y = -4; + layer = 2.03 + }, +/turf/open/void/vehicle, +/area/space) + +(1,1,1) = {" +a +D +M +M +Y +o +E +"} +(2,1,1) = {" +V +s +v +m +A +L +E +"} +(3,1,1) = {" +K +H +F +m +j +r +E +"} +(4,1,1) = {" +X +c +u +P +B +z +Q +"} +(5,1,1) = {" +X +b +N +t +N +T +C +"} +(6,1,1) = {" +Z +i +G +m +d +R +E +"} +(7,1,1) = {" +e +J +n +w +A +q +E +"} +(8,1,1) = {" +f +l +W +m +h +U +E +"} +(9,1,1) = {" +S +I +O +p +y +g +E +"}