Skip to content

Commit

Permalink
TGS Test Merge (#5401)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Mar 26, 2024
2 parents 6f0e205 + 9aae279 commit f319c7f
Show file tree
Hide file tree
Showing 39 changed files with 1,326 additions and 71 deletions.
8 changes: 8 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
/// from /obj/proc/afterbuckle()
#define COSMIG_OBJ_AFTER_BUCKLE "signal_obj_after_buckle"

/// from /datum/cm_objective/retrieve_data/disk/process()
#define COMSIG_INTEL_DISK_LOST_POWER "intel_disk_lost_power"

/// from /datum/cm_objective/retrieve_data/disk/complete()
#define COMSIG_INTEL_DISK_COMPLETED "intel_disk_completed"

/// from /obj/vehicle/multitile/arc/toggle_antenna()
#define COMSIG_ARC_ANTENNA_TOGGLED "arc_antenna_toggled"
/// from /obj/structure/machinery/cryopod/go_out()
#define COMSIG_CRYOPOD_GO_OUT "cryopod_go_out"

Expand Down
3 changes: 2 additions & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
return FALSE

/atom/movable/attackby(obj/item/W, mob/living/user)
if(W)
. = ..()
if(W && !.)
if(!(W.flags_item & NOBLUDGEON))
visible_message(SPAN_DANGER("[src] has been hit by [user] with [W]."), null, null, 5, CHAT_TYPE_MELEE_HIT)
user.animation_attack_on(src)
Expand Down
14 changes: 14 additions & 0 deletions code/datums/ammo/bullet/arc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/datum/ammo/bullet/re700
name = "rotary cannon bullet"
icon_state = "autocannon"
damage_falloff = 0
flags_ammo_behavior = AMMO_BALLISTIC

accuracy = HIT_ACCURACY_TIER_7
scatter = 0
damage = 30
damage_var_high = PROJECTILE_VARIANCE_TIER_8
penetration = ARMOR_PENETRATION_TIER_2
accurate_range = 10
max_range = 12
shell_speed = AMMO_SPEED_TIER_6
87 changes: 87 additions & 0 deletions code/datums/components/disk_reader.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/datum/component/disk_reader
dupe_mode = COMPONENT_DUPE_UNIQUE
/// Ref to the inserted disk
var/obj/item/disk/objective/disk

/datum/component/disk_reader/Initialize()
. = ..()
if(!istype(parent, /obj/structure/machinery))
return COMPONENT_INCOMPATIBLE

/datum/component/disk_reader/Destroy(force, silent)
handle_qdel()
return ..()

/datum/component/disk_reader/RegisterWithParent()
..()
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, PROC_REF(on_disk_insert))
RegisterSignal(parent, COMSIG_PARENT_QDELETING, PROC_REF(handle_qdel))
RegisterSignal(parent, COMSIG_INTEL_DISK_COMPLETED, PROC_REF(on_disk_complete))
RegisterSignal(parent, COMSIG_INTEL_DISK_LOST_POWER, PROC_REF(on_power_lost))

/datum/component/disk_reader/UnregisterFromParent()
..()
handle_qdel()

/datum/component/disk_reader/proc/handle_qdel()
SIGNAL_HANDLER
QDEL_NULL(disk)

/datum/component/disk_reader/proc/on_disk_insert(datum/source, obj/item/disk/objective/potential_disk, mob/living/inserter, params)
SIGNAL_HANDLER

if(!istype(potential_disk) || !potential_disk.objective)
return

if(disk)
to_chat(inserter, SPAN_WARNING("There's already a disk inside [parent], wait for it to finish first!"))
return COMPONENT_NO_AFTERATTACK

if(potential_disk.objective.state == OBJECTIVE_COMPLETE)
to_chat(inserter, SPAN_WARNING("The reader displays a message stating this disk has already been read and refuses to accept it."))
return COMPONENT_NO_AFTERATTACK

INVOKE_ASYNC(src, PROC_REF(handle_disk_insert), potential_disk, inserter)
return COMPONENT_NO_AFTERATTACK

/datum/component/disk_reader/proc/handle_disk_insert(obj/item/disk/objective/potential_disk, mob/living/inserter)
if(tgui_input_text(inserter, "Enter the encryption key", "Decrypting [potential_disk]", "") != potential_disk.objective.decryption_password)
to_chat(inserter, SPAN_WARNING("The reader buzzes, ejecting the disk."))
return

if(disk)
to_chat(inserter, SPAN_WARNING("There's already a disk inside [parent], wait for it to finish first!"))
return

if(!(potential_disk in inserter.contents))
return

potential_disk.objective.activate()

inserter.drop_inv_item_to_loc(potential_disk, parent)
disk = potential_disk
to_chat(inserter, SPAN_NOTICE("You insert [potential_disk] and enter the decryption key."))
inserter.count_niche_stat(STATISTICS_NICHE_DISK)

/datum/component/disk_reader/proc/on_disk_complete(datum/source)
SIGNAL_HANDLER
var/atom/atom_parent = parent

atom_parent.visible_message("[atom_parent] pings softly as the upload finishes and ejects [disk].")
playsound(atom_parent, 'sound/machines/screen_output1.ogg', 25, 1)
disk.forceMove(get_turf(atom_parent))
disk.name = "[disk.name] (complete)"
disk.objective.award_points()
disk.retrieve_objective.state = OBJECTIVE_ACTIVE
disk.retrieve_objective.activate()
disk = null

/datum/component/disk_reader/proc/on_power_lost(datum/source)
SIGNAL_HANDLER
var/atom/atom_parent = parent

atom_parent.visible_message(SPAN_WARNING("[atom_parent] powers down mid-operation as the area loses power."))
playsound(atom_parent, 'sound/machines/terminal_shutdown.ogg', 25, 1)
SSobjectives.stop_processing_objective(src)
disk.forceMove(get_turf(atom_parent))
disk = null
2 changes: 1 addition & 1 deletion code/datums/elements/bullet_trait/iff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
// The cache is reset when the user drops their ID
/datum/element/bullet_trait_iff/proc/get_user_iff_group(mob/living/carbon/human/user)
if(!ishuman(user))
return user.faction_group
return user?.faction_group

var/iff_group = LAZYACCESS(iff_group_cache, user)
if(isnull(iff_group))
Expand Down
8 changes: 6 additions & 2 deletions code/datums/skills/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_SPEC_WEAPONS = SKILL_SPEC_ALL,
SKILL_EXECUTION = SKILL_EXECUTION_TRAINED, //can BE people
SKILL_INTEL = SKILL_INTEL_EXPERT
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/commander
Expand All @@ -261,7 +262,8 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_EXECUTION = SKILL_EXECUTION_TRAINED, //can BE people
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED //can change ship alt
SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED, //can change ship alt
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/XO
Expand All @@ -282,6 +284,7 @@ COMMAND STAFF
SKILL_JTAC = SKILL_JTAC_MASTER,
SKILL_INTEL = SKILL_INTEL_EXPERT,
SKILL_NAVIGATIONS = SKILL_NAVIGATIONS_TRAINED,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/SO
Expand All @@ -298,6 +301,7 @@ COMMAND STAFF
SKILL_POWERLOADER = SKILL_POWERLOADER_TRAINED,
SKILL_JTAC = SKILL_JTAC_EXPERT,
SKILL_INTEL = SKILL_INTEL_TRAINED,
SKILL_VEHICLE = SKILL_VEHICLE_LARGE,
)

/datum/skills/SEA
Expand Down
12 changes: 12 additions & 0 deletions code/datums/supply_packs/vehicle_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,15 @@
containertype = /obj/structure/closet/crate/ammo
containername = "M-87F Flare Launcher ammo crate"
group = "Vehicle Ammo"

/datum/supply_packs/ammo_arcsentry
name = "RE700 Rotary Cannon magazines (x3)"
contains = list(
/obj/item/ammo_magazine/hardpoint/arc_sentry,
/obj/item/ammo_magazine/hardpoint/arc_sentry,
/obj/item/ammo_magazine/hardpoint/arc_sentry,
)
cost = 20
containertype = /obj/structure/closet/crate/ammo
containername = "RE700 Rotary Cannon ammo crate"
group = "Vehicle Ammo"
9 changes: 9 additions & 0 deletions code/datums/supply_packs/vehicle_equipment.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/datum/supply_packs/arcsentry_replacement
name = "Replacement RE700 Rotary Cannon (x1)"
contains = list(
/obj/item/hardpoint/primary/arc_sentry,
)
cost = 25
containertype = /obj/structure/closet/crate/weapon
containername = "RE700 Rotary Cannon crate"
group = "Vehicle Equipment"
4 changes: 4 additions & 0 deletions code/datums/vehicles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@
/datum/map_template/interior/van
name = "Van"
interior_id = "van"

/datum/map_template/interior/arc
name = "ARC"
interior_id = "arc"
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
2 changes: 1 addition & 1 deletion code/game/machinery/computer/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
src.attack_alien(user)
return
src.attack_hand(user)
return
return ..()

/obj/structure/machinery/computer/attack_hand()
. = ..()
Expand Down
8 changes: 8 additions & 0 deletions code/game/machinery/vending/vendor_types/crew/vehicle_crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@
else
display_list = GLOB.cm_vending_vehicle_crew_tank_spare

else if(selected_vehicle == "ARC")
display_list = GLOB.cm_vending_vehicle_crew_arc

else if(selected_vehicle == "APC")
if(available_categories)
display_list = GLOB.cm_vending_vehicle_crew_apc
Expand Down Expand Up @@ -245,6 +248,11 @@ GLOBAL_LIST_INIT(cm_vending_vehicle_crew_apc_spare, list(
list("WHEELS", 0, null, null, null),
list("APC Wheels", 200, /obj/item/hardpoint/locomotion/apc_wheels, null, VENDOR_ITEM_REGULAR)))

GLOBAL_LIST_INIT(cm_vending_vehicle_crew_arc, list(
list("STARTING KIT SELECTION:", 0, null, null, null),

list("WHEELS", 0, null, null, null),
list("Replacement ARC Wheels", 0, /obj/item/hardpoint/locomotion/arc_wheels, VEHICLE_TREADS_AVAILABLE, VENDOR_ITEM_MANDATORY)))

//------------WEAPONS RACK---------------

Expand Down
8 changes: 8 additions & 0 deletions code/game/supplyshuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
"Operations",
"Weapons",
"Vehicle Ammo",
"Vehicle Equipment",
"Attachments",
"Ammo",
"Weapons Specialist Ammo",
Expand Down Expand Up @@ -1365,6 +1366,13 @@ GLOBAL_DATUM_INIT(supply_controller, /datum/controller/supply, new())
name = "Barebones M577 Armored Personal Carrier"
ordered_vehicle = /obj/effect/vehicle_spawner/apc/unarmed/broken

/datum/vehicle_order/arc
name = "M540 Armored Recon Carrier"
ordered_vehicle = /obj/effect/vehicle_spawner/arc

/datum/vehicle_order/arc/has_vehicle_lock()
return

/obj/structure/machinery/computer/supplycomp/vehicle/Initialize()
. = ..()

Expand Down
7 changes: 6 additions & 1 deletion code/modules/almayer/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

/obj/structure/machinery/prop/almayer/CICmap
name = "map table"
desc = "A table that displays a map of the current target location"
desc = "A table that displays a map of the current operation location."
icon = 'icons/obj/structures/machinery/computer.dmi'
icon_state = "maptable"
anchored = TRUE
Expand Down Expand Up @@ -103,6 +103,11 @@

map.tgui_interact(user)

/obj/structure/machinery/prop/almayer/CICmap/computer
name = "map terminal"
desc = "A terminal that displays a map of the current operation location."
icon_state = "security"

/obj/structure/machinery/prop/almayer/CICmap/upp
minimap_type = MINIMAP_FLAG_UPP
faction = FACTION_UPP
Expand Down
3 changes: 3 additions & 0 deletions code/modules/cm_marines/overwatch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -865,6 +865,9 @@
/obj/structure/machinery/computer/overwatch/almayer/broken
name = "Broken Overwatch Console"

/obj/structure/machinery/computer/overwatch/almayer/small
icon_state = "engineering_terminal"

/obj/structure/machinery/computer/overwatch/clf
faction = FACTION_CLF
/obj/structure/machinery/computer/overwatch/upp
Expand Down
40 changes: 40 additions & 0 deletions code/modules/cm_tech/techs/marine/tier1/arc.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/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 = "upgrade"

required_points = 5

tier = /datum/tier/one

announce_name = "M540 ARC ACQUIRED"
announce_message = "An M540 Armored Recon Carrier has been authorized and will be delivered in the vehicle bay."

flags = TREE_FLAG_MARINE

/datum/tech/arc/on_unlock()
. = ..()

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

comp.spent = FALSE
QDEL_NULL_LIST(comp.vehicles)
comp.vehicles = list(
new /datum/vehicle_order/arc()
)
comp.allowed_roles = list(JOB_SYNTH, JOB_SEA, JOB_SO, JOB_XO, JOB_CO, JOB_GENERAL)
comp.req_access = list(ACCESS_MARINE_COMMAND)
comp.req_one_access = list()
comp.spent = FALSE

gearcomp.req_access = list(ACCESS_MARINE_COMMAND)
gearcomp.req_one_access = list()
gearcomp.vendor_role = list()
gearcomp.selected_vehicle = "ARC"
gearcomp.available_categories = VEHICLE_ALL_AVAILABLE

return TRUE
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)
Loading

0 comments on commit f319c7f

Please sign in to comment.