Skip to content

Commit

Permalink
sentry settings
Browse files Browse the repository at this point in the history
sentries part 2

x

s
  • Loading branch information
realforest2001 committed May 27, 2024
1 parent 542f934 commit 2bbe3da
Show file tree
Hide file tree
Showing 14 changed files with 167 additions and 59 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
2 changes: 2 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,8 @@

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

data["sentry_setting"] = link.faction_label

return data

/obj/structure/machinery/computer/ares_console/ui_status(mob/user, datum/ui_state/state)
Expand Down
2 changes: 2 additions & 0 deletions code/game/machinery/ARES/ARES_interface_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@

data["security_vents"] = get_ares_vents()

data["sentry_setting"] = faction_label

return data


Expand Down
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 @@ -143,6 +143,9 @@

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

data["sentry_setting"] = link.faction_label
data["faction_options"] = list(FACTION_MARINE, FACTION_WY, "USCM-WY", FACTION_ARES)

return data

/obj/structure/machinery/computer/working_joe/ui_status(mob/user, datum/ui_state/state)
Expand Down Expand Up @@ -444,6 +447,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)
return TRUE

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

Expand Down
27 changes: 27 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,11 @@ 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/core_sentries = list()

/datum/ares_link/New()
admin_interface = new
datacore = GLOB.ares_datacore
Expand Down Expand Up @@ -70,6 +75,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
2 changes: 2 additions & 0 deletions code/game/machinery/ARES/apollo_pda.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@

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

data["sentry_setting"] = link.faction_label

return data

/obj/item/device/working_joe_pda/ui_status(mob/user, datum/ui_state/state)
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
59 changes: 27 additions & 32 deletions tgui/packages/tgui/interfaces/AresInterface.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,38 +401,33 @@ const MainMenu = (props) => {
{(access_level === 3 || access_level >= 6) && (
<Section>
<h1 align="center">Core Security Protocols</h1>
<Stack>
<Stack.Item grow>
<Button
align="center"
tooltip="Release stored CN20-X nerve gas from security vents."
icon="wind"
color="red"
ml="auto"
px="2rem"
width="100%"
bold
onClick={() => act('page_core_sec')}
>
Nerve Gas Control
</Button>
</Stack.Item>
<Stack.Item grow>
<Button.Confirm
align="center"
tooltip="Activate/Deactivate the AI Core Lockdown."
icon="lock"
color="red"
ml="auto"
px="2rem"
width="100%"
bold
onClick={() => act('security_lockdown')}
>
AI Core Lockdown
</Button.Confirm>
</Stack.Item>
</Stack>

<Button
align="center"
tooltip="Release stored CN20-X nerve gas from security vents."
icon="wind"
color="red"
ml="auto"
px="2rem"
width="100%"
bold
onClick={() => act('page_core_sec')}
>
Nerve Gas Control
</Button>
<Button.Confirm
align="center"
tooltip="Activate/Deactivate the AI Core Lockdown."
icon="lock"
color="red"
ml="auto"
px="2rem"
width="100%"
bold
onClick={() => act('security_lockdown')}
>
AI Core Lockdown
</Button.Confirm>
</Section>
)}
</>
Expand Down
Loading

0 comments on commit 2bbe3da

Please sign in to comment.