Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@
// from /obj/item/device/binoculars/range/designator/acquire_target()
#define COMSIG_DESIGNATOR_LASE "comsig_designator_lase"
#define COMSIG_DESIGNATOR_LASE_OFF "comsig_designator_lase_off"

/// from /obj/vehicle/multitile/blackfoot/add_seated_verbs()
#define COMSIG_BLACKFOOT_ACTIONS_UPDATE "comsig_blackfoot_actions_update"
17 changes: 17 additions & 0 deletions code/modules/vehicles/blackfoot/blackfoot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
bound_y = 0

interior_map = /datum/map_template/interior/blackfoot
var/area/interior_area

move_max_momentum = 2.2
move_momentum_build_factor = 1.5
Expand All @@ -45,6 +46,7 @@
/obj/item/hardpoint/primary/blackfoot_launchers,
/obj/item/hardpoint/support/sensor_array,
/obj/item/hardpoint/secondary/doorgun,
/obj/item/hardpoint/support/recon_system,
)

entrances = list(
Expand Down Expand Up @@ -79,6 +81,9 @@

var/state = STATE_STOWED

/// used by the recon_system module to allow the VTOL to 'run dark'
var/stealth_mode = FALSE

COOLDOWN_DECLARE(turn_cooldown)
COOLDOWN_DECLARE(flight_sound_cooldown)

Expand Down Expand Up @@ -365,6 +370,9 @@
give_action(M, /datum/action/human_action/blackfoot/toggle_nvg)
give_action(M, /datum/action/human_action/blackfoot/toggle_targeting)

for(var/obj/item/hardpoint/hardpoint in hardpoints)
SEND_SIGNAL(hardpoint, COMSIG_BLACKFOOT_ACTIONS_UPDATE)

for(var/atom/movable/screen/blackfoot/screen_to_add as anything in custom_hud)
M.client.add_to_screen(screen_to_add)
screen_to_add.update(fuel, max_fuel, health, maxhealth, battery, max_battery)
Expand Down Expand Up @@ -452,6 +460,9 @@
if(launchers)
launchers.safety = TRUE

for(var/obj/item/hardpoint/hardpoint in hardpoints)
SEND_SIGNAL(hardpoint, COMSIG_BLACKFOOT_ACTIONS_UPDATE, TRUE)

for(var/atom/movable/screen/blackfoot/screen_to_remove as anything in custom_hud)
M.client.remove_from_screen(screen_to_remove)

Expand Down Expand Up @@ -900,6 +911,12 @@
vehicle.toggle_stowed()
return

/obj/vehicle/multitile/blackfoot/perform_honk()
if(stealth_mode)
to_chat(seats[VEHICLE_DRIVER], SPAN_WARNING("Perhaps sounding the horn isn't the best way to be stealthy?"))
return
if(honk_sound)
playsound(loc, honk_sound, 75, TRUE, 15) //heard within ~15 tiles

/datum/action/human_action/blackfoot/New(Target, obj/item/holder)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/vehicles/blackfoot/interior.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
if(istype(interior.exterior, /obj/vehicle/multitile/blackfoot))
var/obj/vehicle/multitile/blackfoot/linked_blackfoot = interior.exterior
loader.linked_blackfoot = linked_blackfoot
linked_blackfoot.interior_area = get_area(loader)

qdel(src)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,19 @@
return icon

/obj/item/hardpoint/primary/blackfoot_launchers/try_fire(atom/target, mob/living/user, params)
var/obj/vehicle/multitile/blackfoot/blackfoot_owner = owner

if(!blackfoot_owner)
return

if(safety)
to_chat(user, SPAN_WARNING("Targeting mode is not enabled, unable to fire."))
return

if(blackfoot_owner.stealth_mode)
to_chat(user, SPAN_WARNING("Weapons system unavailable while recon mode is active."))
return

if(ammo && ammo.current_rounds <= 0)
reload(user)
return
Expand Down
4 changes: 4 additions & 0 deletions code/modules/vehicles/hardpoints/secondary/doorgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@
if(!blackfoot_owner)
return

if(blackfoot_owner.stealth_mode)
to_chat(user, SPAN_WARNING("Weapons system unavailable while recon mode is active."))
return

if(!blackfoot_owner.back_door || !blackfoot_owner.back_door.open)
to_chat(user, SPAN_WARNING("You should probably open the rear door before firing."))
return
Expand Down
108 changes: 108 additions & 0 deletions code/modules/vehicles/hardpoints/support/recon_system.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/obj/item/hardpoint/support/recon_system
name = "\improper AQ-133 Acquisition System"
desc = "A short-range Air-to-Ground LIDAR target acquisition system designed to actively track and profile non-IFF signatures in a localized range of detection."
icon = 'icons/obj/vehicles/hardpoints/blackfoot.dmi'
icon_state = "radar"
disp_icon = "blackfoot"
disp_icon_state = "radar"

health = 250

var/active = FALSE

/datum/action/human_action/blackfoot/recon_mode
name = "Toggle Recon Mode"
action_icon_state = "nightvision"

/obj/item/hardpoint/support/recon_system/on_install(obj/vehicle/multitile/blackfoot/vehicle)
if(!vehicle)
return

RegisterSignal(src, COMSIG_BLACKFOOT_ACTIONS_UPDATE, PROC_REF(handle_action_update))

/obj/item/hardpoint/support/recon_system/on_uninstall(obj/vehicle/multitile/blackfoot/vehicle)
if(!vehicle)
return

UnregisterSignal(src, COMSIG_BLACKFOOT_ACTIONS_UPDATE)

/obj/item/hardpoint/support/recon_system/proc/handle_action_update(datum/source, should_remove_action = FALSE)
var/obj/vehicle/multitile/blackfoot/blackfoot_owner = owner

if(!blackfoot_owner)
return

var/mob/user = usr

if(!user)
return

if(should_remove_action)
remove_action(user, /datum/action/human_action/blackfoot/recon_mode)
else
give_action(user, /datum/action/human_action/blackfoot/recon_mode)

/datum/action/human_action/blackfoot/recon_mode/action_activate()
var/obj/vehicle/multitile/blackfoot/vehicle = owner.interactee

if(!istype(vehicle))
return

. = ..()

for(var/obj/item/hardpoint/support/recon_system/recon_system in vehicle.hardpoints)
if(recon_system.active)
recon_system.deactivate()
else
recon_system.activate()

/obj/item/hardpoint/support/recon_system/get_icon_image(x_offset, y_offset, new_dir)
var/obj/vehicle/multitile/blackfoot/blackfoot_owner = owner

if(!blackfoot_owner)
return

var/image/icon = image(icon = disp_icon, icon_state = "[disp_icon_state]_[blackfoot_owner.get_sprite_state()]", pixel_x = x_offset, pixel_y = y_offset, dir = new_dir)

return icon

/obj/item/hardpoint/support/recon_system/deactivate()
var/obj/vehicle/multitile/blackfoot/blackfoot_owner = owner

if(!blackfoot_owner)
return

var/mob/user = blackfoot_owner.seats[VEHICLE_DRIVER]
var/area/interior_area = blackfoot_owner.interior_area


if(!user)
return

if(interior_area)
interior_area.set_base_lighting(COLOR_WHITE, 255)

active = FALSE
blackfoot_owner.stealth_mode = FALSE

/obj/item/hardpoint/support/recon_system/proc/activate()
set name = "Toggle Recon Mode"
set desc = "Toggle between stowed and deployed mode."
set category = "Vehicle"

var/obj/vehicle/multitile/blackfoot/blackfoot_owner = owner

if(!blackfoot_owner)
return

var/mob/user = blackfoot_owner.seats[VEHICLE_DRIVER]
var/area/interior_area = blackfoot_owner.interior_area

if(!user)
return

if(interior_area)
interior_area.set_base_lighting("#BB3F3F", 200)

active = TRUE
blackfoot_owner.stealth_mode = TRUE
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2630,6 +2630,7 @@
#include "code\modules\vehicles\hardpoints\support\flare.dm"
#include "code\modules\vehicles\hardpoints\support\iwsa.dm"
#include "code\modules\vehicles\hardpoints\support\overdrive.dm"
#include "code\modules\vehicles\hardpoints\support\recon_system.dm"
#include "code\modules\vehicles\hardpoints\support\sensor_array.dm"
#include "code\modules\vehicles\hardpoints\support\support.dm"
#include "code\modules\vehicles\hardpoints\wheels\apc_wheels.dm"
Expand Down
Loading