Skip to content

Commit

Permalink
Merge branch 'project/ares/holderperk' into project/ares/tm_holder
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed May 27, 2024
2 parents cb24005 + e913a5e commit 066d974
Show file tree
Hide file tree
Showing 16 changed files with 271 additions and 66 deletions.
8 changes: 8 additions & 0 deletions code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@

/// Time until someone can respawn as Working Joe
#define JOE_JOIN_DEAD_TIME (15 MINUTES)



#define FACTION_ARES "Ares"
#define FACTION_LIST_ARES_MARINE list(FACTION_MARINE, FACTION_ARES)
#define FACTION_LIST_ARES_ALL list(FACTION_ARES, FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_ARES_WY list(FACTION_ARES, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_ARES_ALONE list(FACTION_ARES)
2 changes: 1 addition & 1 deletion code/game/jobs/job/special/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/datum/job/special/uscm/ai_tech/handle_job_options(option)
if(option != USCM_TECH)
corporate = TRUE
supervisors = "Weyland Yutani"
gear_preset = /datum/equipment_preset/uscm_event/ai_tech/corporate
else
corporate = FALSE
Expand All @@ -44,7 +45,6 @@
return FALSE

/datum/job/special/uscm/ai_tech/generate_entry_message()
supervisors = "Weyland Yutani"
entry_message_body = "You are a [corporate ? FACTION_WY : FACTION_MARINE] AI Service Technician temporarily assigned to the [MAIN_SHIP_NAME]. Your goal is to ensure the onboard AI, [MAIN_AI_SYSTEM], is operating effectively. Your job involves heavy roleplay and requires you to behave like [corporate ? "a senior corporate representative, remaining in character at all times.<br>As a Weyland Yutani Technician you have access to the Corporate Office aboard the USS Almayer. Although you should cooperate with the onboard Liaison, you are not their subordinate nor they yours. You should help The Company interests where applicable but do not abuse your access to the AI Systems." : "an officer and to stay in character at all times. You are required to adhere to and obey <a href='"+LAW_PLACEHOLDER+"'>Marine Law</a>. Failure to do so may result in punitive action against you. Godspeed."]"
return ..()

Expand Down
18 changes: 18 additions & 0 deletions code/game/machinery/ARES/ARES_interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@

data["security_vents"] = link.get_ares_vents()

data["sentry_setting"] = link.faction_label
data["sentry_setting"] = link.faction_label
data["faction_options"] = link.faction_options

return data

/obj/structure/machinery/computer/ares_console/ui_status(mob/user, datum/ui_state/state)
Expand Down Expand Up @@ -611,5 +615,19 @@
aicore_lockdown(user)
return TRUE

if("update_sentries")
playsound = FALSE
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(new_iff == link.faction_label)
return FALSE
link.change_iff(new_iff)
playsound(src, 'sound/machines/chime.ogg', 15, 1)
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE

if(playsound)
playsound(src, "keyboard_alt", 15, 1)
13 changes: 13 additions & 0 deletions code/game/machinery/ARES/ARES_interface_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@
data["access_tickets"] = logged_access

data["security_vents"] = get_ares_vents()
data["sentry_setting"] = faction_label
data["faction_options"] = faction_options

return data

Expand Down Expand Up @@ -523,3 +525,14 @@
return FALSE
aicore_lockdown(user)
return TRUE

if("update_sentries")
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
return FALSE
if(new_iff == faction_label)
return FALSE
change_iff(new_iff)
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE
16 changes: 16 additions & 0 deletions code/game/machinery/ARES/ARES_interface_apollo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@
data["access_tickets"] = logged_access

data["security_vents"] = link.get_ares_vents()
data["sentry_setting"] = link.faction_label
data["faction_options"] = link.faction_options

return data

Expand Down Expand Up @@ -444,6 +446,20 @@
aicore_lockdown(user)
return TRUE

if("update_sentries")
playsound = FALSE
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(new_iff == link.faction_label)
return FALSE
link.change_iff(new_iff)
playsound(src, 'sound/machines/chime.ogg', 15, 1)
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE

if(playsound)
playsound(src, "keyboard_alt", 15, 1)

Expand Down
28 changes: 28 additions & 0 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
var/list/waiting_ids = list()
var/list/active_ids = list()

///Sentry faction stuff
var/faction_label = FACTION_MARINE
var/list/faction_group = FACTION_LIST_ARES_MARINE
var/list/faction_options = list(FACTION_MARINE, FACTION_WY, "USCM-WY", FACTION_ARES)
var/list/core_sentries = list()

/datum/ares_link/New()
admin_interface = new
datacore = GLOB.ares_datacore
Expand Down Expand Up @@ -70,6 +76,28 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
security_vents += list(current_vent)
return security_vents

/datum/ares_link/proc/change_iff(selection)
faction_label = selection
var/list/new_iff = list()
var/setting
switch(selection)
if("USCM-WY")
setting = "all USCM and Corporate personnel!"
new_iff = FACTION_LIST_ARES_ALL
if(FACTION_WY)
setting = "Corporate personnel only!"
new_iff = FACTION_LIST_ARES_WY
if(FACTION_ARES)
setting = "authenticated Core Assets!"
new_iff = FACTION_LIST_ARES_ALONE
else
setting = "USCM personnel only!"
faction_label = FACTION_MARINE
new_iff = FACTION_LIST_ARES_MARINE
faction_group = new_iff
ares_apollo_talk("Security IFF systems updated to [setting]")
for(var/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/sentry in core_sentries)
sentry.sync_iff()

/* BELOW ARE IN AdminAres.dm
/datum/ares_link/tgui_interact(mob/user, datum/tgui/ui)
Expand Down
16 changes: 16 additions & 0 deletions code/game/machinery/ARES/apollo_pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@
data["access_tickets"] = logged_access

data["security_vents"] = link.get_ares_vents()
data["sentry_setting"] = link.faction_label
data["faction_options"] = link.faction_options

return data

Expand Down Expand Up @@ -470,6 +472,20 @@
aicore_lockdown(user)
return TRUE

if("update_sentries")
playsound = FALSE
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(new_iff == link.faction_label)
return FALSE
link.change_iff(new_iff)
playsound(src, 'sound/machines/chime.ogg', 15, 1)
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE

if(playsound)
var/sound = pick('sound/machines/pda_button1.ogg', 'sound/machines/pda_button2.ogg')
playsound(src, sound, 15, TRUE)
15 changes: 15 additions & 0 deletions code/game/machinery/ARES/debug_pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@
data["access_tickets"] = logged_access

data["security_vents"] = link.get_ares_vents()
data["sentry_setting"] = link.faction_label
data["faction_options"] = link.faction_options

return data

Expand Down Expand Up @@ -735,6 +737,19 @@
sec_vent.create_gas(VENT_GAS_CN20_XENO, 6, 5 SECONDS)
log_admin("[key_name(user)] released nerve gas from Vent '[sec_vent.vent_tag]' via ARES.")

if("update_sentries")
playsound = FALSE
var/new_iff = params["chosen_iff"]
if(!new_iff)
to_chat(user, SPAN_WARNING("ERROR: Unknown setting."))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(new_iff == link.faction_label)
return FALSE
link.change_iff(new_iff)
playsound(src, 'sound/machines/chime.ogg', 15, 1)
to_chat(user, SPAN_WARNING("Sentry IFF settings updated!"))
return TRUE

if(playsound)
var/sound = pick('sound/machines/pda_button1.ogg', 'sound/machines/pda_button2.ogg')
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/sentry_holder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini

/obj/structure/machinery/sentry_holder/almayer/mini/aicore
turret_path = /obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares

/obj/structure/machinery/sentry_holder/almayer/mini/aicore/Initialize()
. = ..()
Expand Down
29 changes: 29 additions & 0 deletions code/modules/defenses/sentry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,35 @@
handheld_type = /obj/item/defenses/handheld/sentry/mini
composite_icon = FALSE

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares
name = "UA X512-S mini sentry"
faction_group = FACTION_LIST_ARES_MARINE

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/Initialize()
link_sentry()
..()

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/Destroy()
delink_sentry()
..()

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/start_processing()
sync_iff()
..()

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/proc/sync_iff()
var/datum/ares_link/ares_link = GLOB.ares_link
if(!ares_link || !ares_link.faction_group)
faction_group = FACTION_LIST_ARES_MARINE
faction_group = ares_link.faction_group

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/proc/link_sentry()
var/datum/ares_link/link = GLOB.ares_link
link.core_sentries += src

/obj/structure/machinery/defenses/sentry/premade/deployable/almayer/mini/ares/proc/delink_sentry()
var/datum/ares_link/link = GLOB.ares_link
link.core_sentries -= src

//the turret inside the shuttle sentry deployment system
/obj/structure/machinery/defenses/sentry/premade/dropship
Expand Down
2 changes: 1 addition & 1 deletion code/modules/gear_presets/synths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
name = "Synthetic - Working Joe"
flags = EQUIPMENT_PRESET_START_OF_ROUND|EQUIPMENT_PRESET_MARINE
faction = FACTION_MARINE
faction_group = list(FACTION_MARINE)
faction_group = FACTION_LIST_ARES_MARINE
assignment = JOB_WORKING_JOE
rank = JOB_WORKING_JOE
skills = /datum/skills/working_joe
Expand Down
4 changes: 2 additions & 2 deletions code/modules/gear_presets/uscm_event.dm
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@
name = "AI Technician (USCM)"
flags = EQUIPMENT_PRESET_EXTRA
faction = FACTION_MARINE
faction_group = list(FACTION_MARINE)
faction_group = FACTION_LIST_ARES_MARINE
assignment = JOB_AI_TECH
rank = JOB_AI_TECH
paygrade = PAY_SHORT_MO2
Expand Down Expand Up @@ -524,7 +524,7 @@

/datum/equipment_preset/uscm_event/ai_tech/corporate
name = "AI Technician (Contractor)"
faction_group = FACTION_LIST_MARINE_WY
faction_group = FACTION_LIST_ARES_ALL
paygrade = PAY_SHORT_WYC5

idtype = /obj/item/card/id/silver/cl
Expand Down
26 changes: 21 additions & 5 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -10805,6 +10805,14 @@
icon_state = "plate"
},
/area/almayer/maint/hull/upper/u_m_p)
"bia" = (
/obj/structure/machinery/camera/autoname/almayer/containment/ares{
dir = 8;
c_tag = "AI - Reception Desk";
autoname = 0
},
/turf/open/floor/almayer/aicore/no_build,
/area/almayer/command/airoom)
"biq" = (
/obj/structure/surface/table/almayer,
/obj/item/reagent_container/glass/beaker/large,
Expand Down Expand Up @@ -26345,7 +26353,7 @@
dir = 8;
pixel_y = 2;
autoname = 0;
c_tag = "AI - Reception Exterior"
c_tag = "AI - Reception Corridor"
},
/turf/open/floor/almayer{
dir = 4;
Expand Down Expand Up @@ -29259,6 +29267,12 @@
"fVe" = (
/turf/closed/wall/almayer/outer,
/area/almayer/maint/hull/upper/u_a_p)
"fVh" = (
/obj/structure/machinery/sentry_holder/almayer/mini/aicore,
/turf/open/floor/almayer/aicore/no_build{
icon_state = "w_ai_floor1"
},
/area/almayer/command/aist_office)
"fVk" = (
/obj/structure/machinery/door/airlock/almayer/maint,
/turf/open/floor/almayer{
Expand Down Expand Up @@ -58027,7 +58041,9 @@
/area/almayer/hallways/upper/midship_hallway)
"pLH" = (
/obj/structure/machinery/camera/autoname/almayer/containment/ares{
dir = 4
dir = 4;
c_tag = "AI - AIST Office";
autoname = 0
},
/turf/open/floor/almayer/aicore/glowing/no_build{
icon_state = "w_ai_silver";
Expand Down Expand Up @@ -69679,7 +69695,7 @@
"tCC" = (
/obj/structure/machinery/camera/autoname/almayer/containment/ares{
dir = 1;
c_tag = "AI - Reception Interior";
c_tag = "AI - Reception Lobby";
autoname = 0
},
/turf/open/floor/almayer/aicore/no_build,
Expand Down Expand Up @@ -123104,7 +123120,7 @@ ryn
ryn
mOi
xdA
qQS
bia
fnt
aqU
aHq
Expand Down Expand Up @@ -138390,7 +138406,7 @@ gPo
pym
mBA
kXv
ngZ
fVh
qSH
mrS
iBn
Expand Down
Loading

0 comments on commit 066d974

Please sign in to comment.