Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nt recruiter First DLC (emag and other tweaks) #22427

Merged
merged 20 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from 18 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
59 changes: 50 additions & 9 deletions code/game/machinery/computer/arcade_games/recruiter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
desc = "Weed out the good from bad employees and build the perfect manifest to work aboard the station."
icon_state = "arcade_recruiter"
icon_screen = "nanotrasen"
light_color = LIGHT_COLOR_WHITE
circuit = /obj/item/circuitboard/arcade/recruiter
var/candidate_name
var/candidate_gender
Expand All @@ -27,6 +28,8 @@
var/employment_records
/// Current "turn" of the game
var/curriculums
/// Total number of "turns" to win
var/total_curriculums = 7
/// Which unique candidate is he?
var/unique_candidate

Expand All @@ -49,15 +52,15 @@
var/list/records = list("Ex-convict, reformed after lengthy rehabilitation, doesn't normally ask for good salaries", "Charged with three counts of aggravated silliness",
"Awarded the medal of service for outstanding work in botany", "Hacked into the Head of Personnel's office to save Ian",
"Has proven knowledge of SOP, but no working experience", "Has worked at Mr Changs",
"Spent 8 years as a freelance journalist", "Known as a hero for keeping stations clean during attacks",
"Spent 2 years as a freelance journalist", "Known as a hero for keeping stations clean during attacks",
"Worked as a bureaucrat for SolGov", "Worked in Donk Corporation's R&D department",
"Did work for USSP as an translator", "Took care of Toxins, Xenobiology, Robotics and R&D as a single worker in the Research department",
"Served for 4 years as a soldier of the Prospero Order", "Traveled through various systems as an businessman",
"Worked as a waiter for one year", "Has previous experience as a cameraman",
"Spent years of their life being a janitor at Clown College", "Was given numerous good reviews for delivering cargo requests on time",
"Helped old people cross the holostreet", "Has proven ability to read", "Served 4 years in NT navy",
"Properly set station shields before a massive meteor shower", "Previously assisted people as an assistant",
"Created golems for the purpose of making them work for the company", "Worked at the space IRS for 5 years",
"Created golems for the purpose of making them work for the company", "Worked at the space IRS for 3 years",
"Awarded a medal for hosting a fashion contest against the syndicate",
"Is certified for EVA repairs", "Known for storing important objects in curious places",
"Improved efficiency of Research Outpost by 5.7% through dismissal of underperforming workers", "Skilled in Enterprise Resource Planning",
Expand All @@ -81,7 +84,7 @@
var/list/hirable_species = list(/datum/species/human, /datum/species/unathi, /datum/species/skrell,
/datum/species/tajaran, /datum/species/kidan, /datum/species/drask,
/datum/species/diona, /datum/species/machine, /datum/species/slime,
/datum/species/moth)
/datum/species/moth, /datum/species/vox)
/// Species that are NOT hirable in the eyes of NT
var/list/incorrect_species = list(/datum/species/abductor, /datum/species/monkey, /datum/species/nucleation,
/datum/species/shadow, /datum/species/skeleton, /datum/species/golem)
Expand All @@ -92,6 +95,8 @@
var/reason
/// In which screen are we?
var/game_status = RECRUITER_STATUS_START
/// Used to stop players from spamming the buttons
COOLDOWN_DECLARE(spam_cooldown)

/obj/machinery/computer/arcade/recruiter/proc/generate_candidate()
if(prob(PROB_CANDIDATE_ERRORS)) // Species
Expand All @@ -106,7 +111,7 @@
good_candidate = FALSE

if(prob(PROB_CANDIDATE_ERRORS)) // Age
age = pick(initial(cand_species.max_age) + rand(10, 100), (initial(cand_species.min_age) - rand(1, 7))) // Its either too young or too old for the job
age = pick(initial(cand_species.max_age) + rand(20, 100), (initial(cand_species.min_age) - rand(1, 7))) // Its either too young or too old for the job
good_candidate = FALSE
else
age = rand(initial(cand_species.min_age), initial(cand_species.max_age))
Expand Down Expand Up @@ -178,7 +183,11 @@
/obj/machinery/computer/arcade/recruiter/proc/win()
game_status = RECRUITER_STATUS_START
atom_say("Congratulations recruiter, the company is going to have a productive shift thanks to you.")
playsound(loc, 'sound/arcade/recruiter_win.ogg', 30)
playsound(loc, 'sound/arcade/recruiter_win.ogg', 20)
if(emagged)
new /obj/item/stamp/chameleon(get_turf(src))
new /obj/item/clothing/accessory/medal/recruiter(get_turf(src))
emagged = FALSE
prizevend(50)

/obj/machinery/computer/arcade/recruiter/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
Expand All @@ -200,6 +209,7 @@
"cand_records" = employment_records,

"cand_curriculum" = curriculums,
"total_curriculums" = total_curriculums,

"reason" = reason
)
Expand All @@ -213,15 +223,27 @@
add_fingerprint(user)
. = TRUE

if(!COOLDOWN_FINISHED(src, spam_cooldown))
return

COOLDOWN_START(src, spam_cooldown, 0.4 SECONDS)

switch(action)
if("hire")
playsound(user, 'sound/items/handling/standard_stamp.ogg', 50, TRUE)
if(!good_candidate)
game_status = RECRUITER_STATUS_GAMEOVER
playsound(loc, 'sound/misc/compiler-failure.ogg', 3, TRUE)
if(emagged)
reason = "YOU ENDED UP HIRING A SYNDICATE AGENT IN DISGUISE!"
playsound(src, 'sound/misc/for_the_syndicate.ogg', 50)
atom_say("FOR THE SYNDICATE!")
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(explosion), src, 1, 0, 2, null, 1, 0, 0, 0, 1, null, FALSE), 1.5 SECONDS)
emagged = FALSE
return
reason = "You ended up hiring incompetent candidates and now the company is wasting lots of resources to fix what you caused..."
playsound(loc, 'sound/misc/compiler-failure.ogg', 3, TRUE)
return
if(curriculums >= 5)
if(curriculums >= total_curriculums)
win()
return
curriculums++
Expand All @@ -235,10 +257,17 @@
playsound(user, 'sound/items/handling/standard_stamp.ogg', 50, TRUE)
if(good_candidate)
game_status = RECRUITER_STATUS_GAMEOVER
playsound(loc, 'sound/misc/compiler-failure.ogg', 3, TRUE)
if(emagged)
reason = "MANIFEST HIRED STAFF IS NOW RESPONSIBLE FOR IMPORTANT TASKS!"
playsound(src, 'sound/misc/what_this_button_do.ogg', 50)
atom_say("What does this button do?")
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(explosion), src, 1, 0, 2, null, 1, 0, 0, 0, 1, null, FALSE), 1.5 SECONDS)
emagged = FALSE
return
reason = "You ended up dismissing a competent candidate and now the company is suffering with the lack of crew..."
playsound(loc, 'sound/misc/compiler-failure.ogg', 3, TRUE)
return
if(curriculums >= 5)
if(curriculums >= total_curriculums)
win()
return
curriculums++
Expand Down Expand Up @@ -269,6 +298,18 @@
/obj/machinery/computer/arcade/recruiter/attack_hand(mob/user)
ui_interact(user)

/obj/machinery/computer/arcade/recruiter/emag_act(mob/user)
if(emagged)
return
if(user)
to_chat(user, "<span class='notice'>You override the menu and revert the game to its previous version.</span>")
add_hiddenprint(user)
game_status = RECRUITER_STATUS_START
name = "NT Recruiter Simulator HARDCORE EDITION"
desc = "The advanced version of Nanotrasen's recruiting simulator, used to train the highest echelon of Nanotrasen recruiters. Has double the application count, and supposedly includes some routines to weed out the less skilled."
total_curriculums = 14
emagged = TRUE

#undef PROB_CANDIDATE_ERRORS
#undef PROB_UNIQUE_CANDIDATE
#undef UNIQUE_STEVE
Expand Down
6 changes: 5 additions & 1 deletion code/modules/clothing/under/accessories/accessory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
desc = "An award issued by Captains to heads of department who do an excellent job managing their department. Made of pure silver."


// BRONZE (awarded by heads of department, except for the bronze heart)
// BRONZE (awarded by heads of department, except for the bronze heart and recruiter medals)



Expand Down Expand Up @@ -267,6 +267,10 @@
name = "stable supply medal"
desc = "An award issued by the Quartermaster to supply staff dedicated to being effective."

/obj/item/clothing/accessory/medal/recruiter // Prize for the NT Recruiter emagged arcade
name = "nanotrasen recruiter medal"
desc = "A prize for those who completed the company's most difficult training, use it to earn the respect of everyone in human resources."

/obj/item/clothing/accessory/medal/heart
name = "bronze heart medal"
desc = "A rarely-awarded medal for those who sacrifice themselves in the line of duty to save their fellow crew."
Expand Down
Binary file added sound/misc/for_the_syndicate.ogg
Binary file not shown.
Binary file added sound/misc/what_this_button_do.ogg
Binary file not shown.
5 changes: 3 additions & 2 deletions tgui/packages/tgui/interfaces/NTRecruiter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const NTRecruiter = (props, context) => {
cand_job,
cand_records,
cand_curriculum,
total_curriculums,
reason,
} = data;
if (gamestatus === 0) {
Expand Down Expand Up @@ -79,7 +80,7 @@ export const NTRecruiter = (props, context) => {
>
<LabeledList>
<LabeledListItem label="1#" color="silver">
To win this game you must hire/dismiss <b>FIVE</b> candidates,
To win this game you must hire/dismiss <b>{total_curriculums}</b> candidates,
one wrongly made choice leads to a game over.
</LabeledListItem>
<LabeledListItem label="2#" color="silver">
Expand Down Expand Up @@ -205,7 +206,7 @@ export const NTRecruiter = (props, context) => {
textAlign="center"
pt="10px"
>
FINAL SCORE: {cand_curriculum - 1}/5
FINAL SCORE: {cand_curriculum - 1}/{total_curriculums}
</Flex.Item>
<Flex.Item pt="20px">
<Button
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/public/tgui.bundle.js

Large diffs are not rendered by default.