Skip to content

Commit

Permalink
we ball
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Jan 7, 2024
1 parent d92ac03 commit fc36fdd
Show file tree
Hide file tree
Showing 16 changed files with 288 additions and 108 deletions.
5 changes: 4 additions & 1 deletion code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
if(orbiting)
orbiting.end_orbit(src)
orbiting = null
vis_contents.Cut()

vis_locs = null //clears this atom out of all viscontents
if(length(vis_contents))
vis_contents.Cut()
. = ..()
moveToNullspace() //so we move into null space. Must be after ..() b/c atom's Dispose handles deleting our lighting stuff

Expand Down
4 changes: 0 additions & 4 deletions code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1453,10 +1453,6 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
world.log << "## ERROR: Eek. The supply/elevator datum is missing somehow."
return

if(!should_block_game_interaction(SSshuttle.vehicle_elevator))
to_chat(usr, SPAN_WARNING("The elevator needs to be in the cargo bay dock to call a vehicle up. Ask someone to send it away."))
return

if(ismaintdrone(usr))
return

Expand Down
6 changes: 3 additions & 3 deletions code/modules/cm_tech/techs/marine/tier1/arc.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/datum/tech/arc
name = "M540 Armored Recon Carrier"
desc = "Purchase an M540 Armored Recon Carrier, specialized in assisting groundside command. Able to be driven by Staff Officers, Executive Officers, and Commanding Officers."
icon_state = "ltb" //zonenote changeme
icon_state = "upgrade"

required_points = 0 //zonenote

Expand All @@ -15,8 +15,8 @@
/datum/tech/arc/on_unlock()
. = ..()

var/obj/structure/machinery/computer/supplycomp/vehicle/comp = VehicleElevatorConsole
var/obj/structure/machinery/cm_vending/gear/vehicle_crew/gearcomp = VehicleGearConsole
var/obj/structure/machinery/computer/supplycomp/vehicle/comp = GLOB.VehicleElevatorConsole
var/obj/structure/machinery/cm_vending/gear/vehicle_crew/gearcomp = GLOB.VehicleGearConsole

if(!comp || !gearcomp)
return FALSE
Expand Down
23 changes: 23 additions & 0 deletions code/modules/mob/living/carbon/human/human_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -605,3 +605,26 @@ CULT

var/mob/living/carbon/human/human_user = owner
SEND_SIGNAL(human_user, COMSIG_MOB_MG_EXIT)

/datum/action/human_action/toggle_arc_antenna
name = "Toggle Sensor Antenna"
action_icon_state = "recoil_compensation"

/datum/action/human_action/toggle_arc_antenna/give_to(mob/user)
. = ..()
RegisterSignal(user, COMSIG_MOB_RESET_VIEW, PROC_REF(remove_from))

/datum/action/human_action/toggle_arc_antenna/remove_from(mob/user)
. = ..()
UnregisterSignal(user, COMSIG_MOB_RESET_VIEW)

/datum/action/human_action/toggle_arc_antenna/action_activate()
if(!can_use_action())
return

var/mob/living/carbon/human/human_user = owner
if(istype(human_user.buckled, /obj/structure/bed/chair/comfy/vehicle))
var/obj/structure/bed/chair/comfy/vehicle/vehicle_chair = human_user.buckled
if(istype(vehicle_chair.vehicle, /obj/vehicle/multitile/arc))
var/obj/vehicle/multitile/arc/vehicle = vehicle_chair.vehicle
vehicle.toggle_antenna(human_user)
5 changes: 3 additions & 2 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,8 @@

else
direct_hit = TRUE
SEND_SIGNAL(firer, COMSIG_BULLET_DIRECT_HIT, L)
if(firer)
SEND_SIGNAL(firer, COMSIG_BULLET_DIRECT_HIT, L)

// At present, Xenos have no inherent effects or localized damage stemming from limb targeting
// Therefore we exempt the shooter from direct hit accuracy penalties as well,
Expand Down Expand Up @@ -582,7 +583,7 @@
if(SEND_SIGNAL(src, COMSIG_BULLET_POST_HANDLE_MOB, L, .) & COMPONENT_BULLET_PASS_THROUGH)
return FALSE

/obj/item/projectile/proc/check_canhit(turf/current_turf, turf/next_turf)
/obj/projectile/proc/check_canhit(turf/current_turf, turf/next_turf)
var/proj_dir = get_dir(current_turf, next_turf)
if((proj_dir & (proj_dir - 1)) && !current_turf.Adjacent(next_turf))
ammo.on_hit_turf(current_turf, src)
Expand Down
26 changes: 19 additions & 7 deletions code/modules/vehicles/arc/arc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "An M540-A Armored Recon Carrier. A lightly armored reconnaissance and intelligence vehicle. Entrances on the sides."

icon = 'icons/obj/vehicles/arc.dmi'
icon_state = "arc_base" //Holdover until thwomp does his thing
icon_state = "arc_base"
pixel_x = -48
pixel_y = -48

Expand All @@ -16,7 +16,7 @@
interior_map = /datum/map_template/interior/arc

passengers_slots = 3
xenos_slots = 8
xenos_slots = 5

entrances = list(
"left" = list(2, 0),
Expand All @@ -37,6 +37,7 @@
hardpoints_allowed = list(
/obj/item/hardpoint/locomotion/apc_wheels,
/obj/item/hardpoint/primary/arc_sentry,
/obj/item/hardpoint/support/arc_antenna,
)

seats = list(
Expand Down Expand Up @@ -85,6 +86,9 @@

RegisterSignal(src, COMSIG_ARC_ANTENNA_TOGGLED, PROC_REF(on_antenna_toggle))

/obj/vehicle/multitile/arc/crew_mousedown(datum/source, atom/object, turf/location, control, params)
return

/obj/vehicle/multitile/arc/proc/on_antenna_toggle(datum/source)
SIGNAL_HANDLER

Expand Down Expand Up @@ -136,12 +140,19 @@
RRS.total = 1
role_reserved_slots += RRS

/obj/vehicle/multitile/arc/set_seated_mob(seat, mob/living/M)
. = ..()
if(!.)
return

give_action(M, /datum/action/human_action/toggle_arc_antenna)

/obj/vehicle/multitile/arc/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/arc/open_controls_guide,
//obj/vehicle/multitile/proc/open_controls_guide,
/obj/vehicle/multitile/proc/toggle_door_lock,
/obj/vehicle/multitile/proc/activate_horn,
/obj/vehicle/multitile/proc/name_vehicle,
Expand All @@ -153,7 +164,7 @@
return
remove_verb(M.client, list(
/obj/vehicle/multitile/proc/get_status_info,
/obj/vehicle/multitile/arc/proc/open_controls_guide,
//obj/vehicle/multitile/proc/open_controls_guide,
/obj/vehicle/multitile/proc/toggle_door_lock,
/obj/vehicle/multitile/proc/activate_horn,
/obj/vehicle/multitile/proc/name_vehicle,
Expand All @@ -165,11 +176,11 @@
if(!camera)
camera = new /obj/structure/machinery/camera/vehicle(src)
if(change_tag)
camera.c_tag = "#[rand(1,100)] M540 \"[nickname]\" ARC"
camera.c_tag = "#[rand(1,100)] M540-A \"[nickname]\" ARC"
if(camera_int)
camera_int.c_tag = camera.c_tag + " interior"
else
camera.c_tag = "#[rand(1,100)] 540 ARC"
camera.c_tag = "#[rand(1,100)] 540-A ARC"
if(camera_int)
camera_int.c_tag = camera.c_tag + " interior"

Expand Down Expand Up @@ -197,5 +208,6 @@
ARC.update_icon()

/obj/effect/vehicle_spawner/arc/load_hardpoints(obj/vehicle/multitile/arc/vehicle)
vehicle.add_hardpoint(new /obj/item/hardpoint/locomotion/apc_wheels)
vehicle.add_hardpoint(new /obj/item/hardpoint/locomotion/arc_wheels)
vehicle.add_hardpoint(new /obj/item/hardpoint/primary/arc_sentry)
vehicle.add_hardpoint(new /obj/item/hardpoint/support/arc_antenna)
46 changes: 36 additions & 10 deletions code/modules/vehicles/arc/verbs.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/obj/vehicle/multitile/arc/proc/toggle_antenna()
/obj/vehicle/multitile/arc/proc/toggle_antenna(mob/toggler)
set name = "Toggle Sensor Antenna"
set desc = "Raises or lowers the external sensor antenna. While raised, the ARC cannot move."
set category = "Vehicle"

var/mob/user = usr
var/mob/user = toggler || usr
if(!user || !istype(user))
return

Expand All @@ -24,24 +24,50 @@
to_chat(user, SPAN_WARNING("[vehicle]'s hull is too damaged to operate!"))
return

var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in vehicle.hardpoints
if(!antenna)
to_chat(user, SPAN_WARNING("[vehicle] has no antenna mounted!"))
return

if(antenna.health <= 0)
to_chat(user, SPAN_WARNING("[antenna] is broken!"))
return

if(vehicle.antenna_deployed)
to_chat(user, SPAN_NOTICE("You begin to retract the antenna..."))
if(!do_after(user, vehicle.antenna_toggle_time, target = vehicle))
to_chat(user, SPAN_NOTICE("You begin to retract [antenna]..."))
if(!do_after(user, max(vehicle.antenna_toggle_time - antenna.deploy_animation_time, 1 SECONDS), target = vehicle))
to_chat(user, SPAN_NOTICE("You stop retracting [antenna]."))
return
STOP_PROCESSING(SSslowobj, vehicle)
to_chat(user, SPAN_NOTICE("You retract the antenna, enabling the ARC to move again."))

antenna.retract_antenna()
addtimer(CALLBACK(vehicle, PROC_REF(finish_antenna_retract), vehicle, user), antenna.deploy_animation_time)

else
to_chat(user, SPAN_NOTICE("You begin to extend the antenna..."))
if(!do_after(user, vehicle.antenna_toggle_time, target = vehicle))
to_chat(user, SPAN_NOTICE("You begin to extend [antenna]..."))
if(!do_after(user, max(vehicle.antenna_toggle_time - antenna.deploy_animation_time, 1 SECONDS), target = vehicle))
to_chat(user, SPAN_NOTICE("You stop extending [antenna]."))
return
START_PROCESSING(SSslowobj, vehicle)
to_chat(user, SPAN_NOTICE("You extend the antenna, locking the ARC in place."))

antenna.deploy_antenna()
addtimer(CALLBACK(vehicle, PROC_REF(finish_antenna_deploy), vehicle, user), antenna.deploy_animation_time)

/obj/vehicle/multitile/arc/proc/finish_antenna_retract(obj/vehicle/multitile/arc/vehicle, mob/user)
var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in vehicle.hardpoints
STOP_PROCESSING(SSslowobj, vehicle)
to_chat(user, SPAN_NOTICE("You retract [antenna], enabling the ARC to move again."))
playsound(user, 'sound/machines/hydraulics_2.ogg', 80, TRUE)
vehicle.antenna_deployed = !vehicle.antenna_deployed
vehicle.update_icon()
SEND_SIGNAL(vehicle, COMSIG_ARC_ANTENNA_TOGGLED)

/obj/vehicle/multitile/arc/proc/finish_antenna_deploy(obj/vehicle/multitile/arc/vehicle, mob/user)
var/obj/item/hardpoint/support/arc_antenna/antenna = locate() in vehicle.hardpoints
START_PROCESSING(SSslowobj, vehicle)
to_chat(user, SPAN_NOTICE("You extend [antenna], locking the ARC in place."))
playsound(user, 'sound/machines/hydraulics_2.ogg', 80, TRUE)
vehicle.antenna_deployed = !vehicle.antenna_deployed
vehicle.update_icon()
SEND_SIGNAL(vehicle, COMSIG_ARC_ANTENNA_TOGGLED)

/obj/vehicle/multitile/arc/open_controls_guide()
set name = "Vehicle Controls Guide"
Expand Down
1 change: 0 additions & 1 deletion code/modules/vehicles/hardpoints/hardpoint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,6 @@

/// Wrapper proc for the autofire system to ensure the important args aren't null.
/obj/item/hardpoint/proc/fire_wrapper(atom/target, mob/living/user, params)
SHOULD_NOT_OVERRIDE(TRUE)
if(!target)
target = src.target
if(!user)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/ammo_magazine/hardpoint/arc_sentry
name = "\improper RE700 Rotary Cannon Magazine"
desc = "A magazine for RE700 Rotary Cannon filled with 20mm rounds. Slightly contuses targets upon hit. Supports IFF."
desc = "A magazine for RE700 Rotary Cannon filled with 20mm rounds. Supports IFF."
caliber = "20mm"
icon_state = "ace_autocannon" //zonenote
w_class = SIZE_LARGE
Expand Down
Loading

0 comments on commit fc36fdd

Please sign in to comment.