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

tweak: Ert fix #1173

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions code/_globalvars/lists/names.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ GLOBAL_LIST_INIT(deathsquad_names, file2list("config/names/deathsquad.txt"))
GLOBAL_LIST_INIT(first_names_male, file2list("config/names/first_male.txt"))
GLOBAL_LIST_INIT(first_names_female, file2list("config/names/first_female.txt"))
GLOBAL_LIST_INIT(last_names, file2list("config/names/last.txt"))
GLOBAL_LIST_INIT(last_names_female, file2list("config/names/last_female.txt"))
GLOBAL_LIST_INIT(first_names_female_slime, file2list("config/names/first_female_slime.txt"))
GLOBAL_LIST_INIT(first_names_male_slime, file2list("config/names/first_male_slime.txt"))
GLOBAL_LIST_INIT(last_names_slime, file2list("config/names/last_slime.txt"))
Expand Down
21 changes: 21 additions & 0 deletions code/game/objects/items/weapons/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,27 @@
new /obj/item/reagent_containers/patch/synthflesh(src)
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)

/obj/item/storage/box/responseteam/machine/populate_contents()
new /obj/item/stack/cable_coil(src)
new /obj/item/stack/cable_coil(src)
new /obj/item/crowbar/small(src)
new /obj/item/flashlight/flare(src)
new /obj/item/kitchen/knife/combat(src)
new /obj/item/radio/centcom(src)
new /obj/item/weldingtool/experimental(src)
new /obj/item/stack/cable_coil(src)

/obj/item/storage/box/responseteam/plasmaman/populate_contents()
new /obj/item/tank/internals/plasmaman/belt(src)
new /obj/item/crowbar/small(src)
new /obj/item/flashlight/flare(src)
new /obj/item/kitchen/knife/combat(src)
new /obj/item/radio/centcom(src)
new /obj/item/reagent_containers/patch/synthflesh(src)
new /obj/item/reagent_containers/hypospray/autoinjector/epinephrine(src)
new /obj/item/extinguisher_refill(src)


/obj/item/storage/box/deathsquad
name = "boxed death kit"
icon_state = "doom_box"
Expand Down
36 changes: 32 additions & 4 deletions code/modules/mob/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -302,13 +302,27 @@
flags = RESTRICTED | WHITELISTED
syllables = list("click","clack")

/datum/language/kidan/get_random_name()
/datum/language/kidan/get_random_name(ert_name = FALSE, role)
var/new_name = "[pick(list("Vrax", "Krek", "Krekk", "Vriz", "Zrik", "Zarak", "Click", "Zerk", "Drax", "Zven", "Drexx", "Vrik", "Vrek", "Krax", "Varak", "Zavak", "Vrexx", "Drevk", "Krik", "Karak", "Krexx", "Zrax", "Zrexx", "Zrek", "Verk", "Drek", "Drikk", "Zvik", "Vzik", "Kviz", "Vrizk", "Vrizzk", "Krix", "Krixx", "Zark", "Xark", "Xarkk", "Xerx", "Xarak", "Karax", "Varak", "Vazak", "Vazzak", "Zirk", "Krak", "Xakk", "Zakk", "Vekk"))]"
if(prob(67))
if(prob(50))
if(prob(50) && !ert_name)
new_name += ", "
new_name += "[pick(list("Noble", "Worker", "Scout", "Carpenter", "Farmer", "Gatherer", "Soldier", "Guard", "Miner", "Priest", "Merchant", "Crafter", "Alchemist", "Historian", "Hunter", "Scholar", "Caretaker", "Artist", "Bard", "Blacksmith", "Brewer", "Mason", "Baker", "Prospector", "Laborer", "Hauler", "Servant"))]"
new_name += " of Clan "
else if(ert_name)
new_name += ", "
switch(role)
if("Commander")
new_name += "[pick("Noble", "Marshall", "Grandee", "Dignitary", "Official", "Chamberlain", "Duke")]"
if("Security")
new_name += "[pick("Scout", "Soldier", "Guard", "Hunter")]"
if("Medic")
new_name += "[pick("Healer", "Medic", "Physician", "Doctor")]"
if("Engineer")
new_name += "[pick("Engineer", "Carpenter", "Worker", "Crafter", "Mason", "Hauler", "Cooper")]"
if("Paranormal")
new_name += "[pick("Priest", "Chaplain", "Cleric")]"
new_name += " of Clan "
else
new_name += " "
new_name += "[pick(list("Tristan", "Zarlan", "Clack", "Kkraz", "Zramn", "Orlan", "Zrax", "Orax", "Oriz", "Tariz", "Kvestan"))]"
Expand Down Expand Up @@ -405,8 +419,22 @@
"må", "dag", "sjä", "vii", "vuo", "eil", "tun", "käyt", "teh", "vä", "hei",
"huo", "suo", "ää", "ten", "ja", "heu", "stu", "uhr", "kön", "we", "hön")

/datum/language/moth/get_random_name()
var/new_name = "[pick(list("Abbot","Archer","Arkwright","Baker","Bard","Biologist","Broker","Caller","Chamberlain","Clerk","Cooper","Culinarian","Dean","Director","Duke","Energizer","Excavator","Explorer","Fletcher","Gatekeeper","Guardian","Guide","Healer","Horner","Keeper","Knight","Laidler","Mapper","Marshall","Mechanic","Miller","Navigator","Pilot","Prior","Seeker","Seer","Smith","Stargazer","Teacher","Tech Whisperer","Tender","Thatcher","Voidcrafter","Voidhunter","Voidwalker","Ward","Watcher","Weaver","Webster","Wright"))]"
/datum/language/moth/get_random_name(ert_name = FALSE, role)
var/new_name
if(!ert_name)
new_name = "[pick(list("Abbot","Archer","Arkwright","Baker","Bard","Biologist","Broker","Caller","Chamberlain","Clerk","Cooper","Culinarian","Dean","Director","Duke","Energizer","Excavator","Explorer","Fletcher","Gatekeeper","Guardian","Guide","Healer","Horner","Keeper","Knight","Laidler","Mapper","Marshall","Mechanic","Miller","Navigator","Pilot","Prior","Seeker","Seer","Smith","Stargazer","Teacher","Tech Whisperer","Tender","Thatcher","Voidcrafter","Voidhunter","Voidwalker","Ward","Watcher","Weaver","Webster","Wright"))]"
else if(ert_name)
switch(role)
if("Commander")
new_name += "[pick("Noble", "Marshall", "Grandee", "Dignitary", "Official", "Director", "Chamerlain", "Duke", "Seer")]"
if("Security")
new_name += "[pick("Guardian", "Archer", "Voidhunter", "Knight")]"
if("Medic")
new_name += "[pick("Healer", "Medic", "Physician", "Doctor", "Biologist")]"
if("Engineer")
new_name += "[pick("Engineer", "Carpenter", "Worker", "Crafter", "Mason", "Hauler", "Mechanic")]"
if("Paranormal")
new_name += "[pick("Abbot", "Priest", "Chaplain", "Cleric")]"
new_name += "[pick(list(" of"," for"," in Service of",", Servant of"," for the Good of",", Student of"," to"))]"
new_name += " [pick(list("Alkaid","Andromeda","Antlia","Apus","Auriga","Caelum","Camelopardalis","Canes Venatici","Carinae","Cassiopeia","Centauri","Circinus","Cygnus","Dorado","Draco","Eridanus","Errakis","Fornax","Gliese","Grus","Horologium","Hydri","Lacerta","Leo Minor","Lupus","Lynx","Maffei","Megrez","Messier","Microscopium","Monocerotis","Muscae","Ophiuchi","Orion","Pegasi","Persei","Perseus","Polaris","Pyxis","Sculptor","Syrma","Telescopium","Tianyi","Triangulum","Trifid","Tucana","Tycho","Vir","Volans","Zavyava"))]"
return new_name
Expand Down
121 changes: 112 additions & 9 deletions code/modules/response_team/ert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ GLOBAL_LIST_EMPTY(ert_request_messages)
GLOB.active_team.cyborg_security_permitted = cyborg_security

GLOB.send_emergency_team = TRUE
var/list/ert_candidates = shuffle(SSghost_spawns.poll_candidates("Join the Emergency Response Team?", null, GLOB.responseteam_age, 45 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_ERT]))
var/list/ert_candidates = shuffle(SSghost_spawns.poll_candidates("Join the Emergency Response Team?", null, GLOB.responseteam_age, 5 SECONDS, TRUE, GLOB.role_playtime_requirements[ROLE_ERT]))
if(!length(ert_candidates))
GLOB.active_team.cannot_send_team()
GLOB.send_emergency_team = FALSE
Expand Down Expand Up @@ -91,23 +91,23 @@ GLOBAL_LIST_EMPTY(ert_request_messages)
var/list/ert_gender_prefs = list()
for(var/mob/M in GLOB.response_team_members)
ert_gender_prefs.Add(input_async(M, "Please select a gender (10 seconds):", list("Male", "Female")))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(get_ert_species_prefs), GLOB.response_team_members, ert_gender_prefs), 10 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(get_ert_species_prefs), GLOB.response_team_members, ert_gender_prefs), 5 SECONDS)

/proc/get_ert_species_prefs(list/response_team_members, list/ert_gender_prefs)
for(var/datum/async_input/A in ert_gender_prefs)
A.close()
var/list/ert_species_prefs = list()
for(var/mob/M in GLOB.response_team_members)
ert_species_prefs.Add(input_async(M, "Please select a species (10 seconds):", list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Drask", "Kidan", "Grey", "Random")))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(get_ert_role_prefs), GLOB.response_team_members, ert_gender_prefs, ert_species_prefs), 10 SECONDS)
ert_species_prefs.Add(input_async(M, "Please select a species (10 seconds):", list("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Drask", "Kidan", "Grey", "Slime People", "Machine", "Plasmaman", "Random")))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(get_ert_role_prefs), GLOB.response_team_members, ert_gender_prefs, ert_species_prefs), 5 SECONDS)

/proc/get_ert_role_prefs(list/response_team_members, list/ert_gender_prefs, list/ert_species_prefs) // Why the FUCK is this variable the EXACT SAME as the global one
var/list/ert_role_prefs = list()
for(var/datum/async_input/A in ert_species_prefs)
A.close()
for(var/mob/M in response_team_members)
ert_role_prefs.Add(input_ranked_async(M, "Please order ERT roles from most to least preferred (20 seconds):", GLOB.active_team.get_slot_list()))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(dispatch_response_team), response_team_members, ert_gender_prefs, ert_species_prefs, ert_role_prefs), 20 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(dispatch_response_team), response_team_members, ert_gender_prefs, ert_species_prefs, ert_role_prefs), 5 SECONDS)

/proc/dispatch_response_team(list/response_team_members, list/datum/async_input/ert_gender_prefs, list/datum/async_input/ert_species_prefs, list/datum/async_input/ert_role_prefs)
var/spawn_index = 1
Expand Down Expand Up @@ -164,7 +164,7 @@ GLOBAL_LIST_EMPTY(ert_request_messages)
if(!new_species)
new_species = "Human"
if(new_species == "Random")
new_species = pick("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Drask", "Kidan", "Grey")
new_species = pick("Human", "Tajaran", "Skrell", "Unathi", "Diona", "Vulpkanin", "Nian", "Drask", "Kidan", "Grey", "Slime People", "Machine", "Plasmaman")
var/datum/species/S = GLOB.all_species[new_species]
var/species = S.type
M.set_species(species, TRUE)
Expand Down Expand Up @@ -194,16 +194,119 @@ GLOBAL_LIST_EMPTY(ert_request_messages)
M.skin_colour = hair_c_su
else
M.skin_colour = pick(su) //Pick a diffrent colour for body.

if("Slime People")
var/new_slime_skin_color
if(prob(60))
new_slime_skin_color = rand_hex_color()
else
new_slime_skin_color = pick("#3d7cc2", "#0a4db1", "5975c2", "#2b3363", "#185e9c", "#0e6dd8", "#285ef2") //NT Colors
M.skin_colour = new_slime_skin_color
var/datum/species/slime/SL = M.dna.species
SL.blend(M)

M.change_eye_color(eye_c)
M.s_tone = skin_tone
if(new_species == "Human" || new_species == "Drask")
M.s_tone = random_skin_tone(new_species)
head_organ.headacc_colour = pick("#1f138b", "#272525", "#07a035", "#8c00ff", "#a80c0c")
head_organ.h_style = random_hair_style(M.gender, head_organ.dna.species.name)
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.dna.species.name)
if(prob(40))
head_organ.f_style = random_facial_hair_style(M.gender, head_organ.dna.species.name)

if(M.dna.species.bodyflags & HAS_HEAD_ACCESSORY && prob(60))
head_organ.ha_style = random_head_accessory(new_species)

M.rename_character(null, "[pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")] [pick(GLOB.last_names)]")
M.age = rand(23,35)

var/rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")
var/gend
var/gen
if(new_gender == "Male")
gend = MALE
gen = "M"
else
gend = FEMALE
gen = "F"
switch(new_species)
if("Slime People")
M.rename_character(null, "[rank] [pick(GLOB.last_names_slime)]")
M.change_eye_color("#e2e9f2")

if(prob(50))
M.age += rand(0,40)
if("Vulpkanin")
M.rename_character(null, "[rank] [pick(GLOB.last_names_vulp)]")
if("Machine")
var/datum/response_team/ert = GLOB.active_team
var/team_type
if(istype(ert, /datum/response_team/amber))
team_type = "Amber"
if(istype(ert, /datum/response_team/red))
team_type = "Red"
if(istype(ert, /datum/response_team/gamma))
team_type = "Gamma"

M.rename_character(null, "[rank] NT RK-[gen]-[team_type]-[role]-[pick(GLOB.alphabet_uppercase)][pick(GLOB.alphabet_uppercase)]-[rand(1,999)]")
if("Diona")
var/datum/language/diona/D = new()
M.rename_character(null, "[rank] [D.get_random_name()]")
if(prob(50))
M.age += rand(0,50)
if("Kidan")
var/datum/language/kidan/K = new()
M.rename_character(null, "[rank] [K.get_random_name(TRUE, role)]")
if("Tajaran")
M.rename_character(null, "[rank] [pick("Hadii","Kaytam","Zhan-Khazan","Hharar","Njarir'Akhan")]")
if("Drask")
M.rename_character(null, "[rank] [pick("Hoorm","Viisk","Saar","Mnoo","Oumn","Fmong","Gnii","Vrrm","Oorm","Dromnn","Ssooumn","Ovv", "Hoorb","Vaar","Gaar","Goom","Ruum","Rumum")]")
if(prob(50))
M.age += rand(0,60)
if("Nian")
var/datum/language/moth/MO = new()
M.rename_character(null, "[rank] [MO.get_random_name(TRUE, role)]")
if("Human")
var/last_name
if(gend == MALE)
last_name = pick(GLOB.last_names)
else
last_name = pick(GLOB.last_names_female)

M.rename_character(null, "[rank] [last_name]")
if("Skrell")
var/datum/language/skrell/SK = new()
var/count = rand(4,8)

var/skrell_name

while(count)
skrell_name += pick(SK.syllables)
if(count == 2 || count == 5 && prob(40))
skrell_name += "'"
count--

skrell_name = capitalize(skrell_name)
M.rename_character(null, "[rank] [skrell_name]")
if("Unathi")
var/datum/language/unathi/SU = new()
var/count = rand(2,5)

var/unathi_name

while(count)
unathi_name += pick(SU.syllables)
count--

unathi_name = capitalize(unathi_name)
M.rename_character(null, "[rank] [unathi_name]")
if("Grey")
var/grey_name = pick(GLOB.greek_letters)
M.rename_character(null, "[rank] [pick(GLOB.alphabet_uppercase)]-[grey_name]")
if("Plasmaman")
M.rename_character(null, "[rank] [pick("Argon", "Hydrogen", "Nitrogen", "Boron", "Dihydrogen", "Radium", "Monoxide", "Plasma")] [pick(rand(1,999))]")

if(prob(50))
M.age += rand(0,30)

M.regenerate_icons()
M.update_body()

Expand Down
124 changes: 122 additions & 2 deletions code/modules/response_team/ert_outfits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,106 @@

H.job = rt_mob_job

if(istype(H.dna.species, /datum/species/plasmaman))
var/obj/item/organ/internal/cyberimp/mouth/breathing_tube/hardened/BT = new /obj/item/organ/internal/cyberimp/mouth/breathing_tube/hardened(H)
BT.insert(H)

if(findtext(H.job, "Commander"))
head = /obj/item/clothing/head/helmet/space/plasmaman/captain
uniform = /obj/item/clothing/under/plasmaman/captain
if(findtext(H.job, "Security"))
head = /obj/item/clothing/head/helmet/space/plasmaman/security/hos
uniform = /obj/item/clothing/under/plasmaman/security/hos
if(findtext(H.job, "Medic"))
head = /obj/item/clothing/head/helmet/space/plasmaman/cmo
uniform = /obj/item/clothing/under/plasmaman/cmo
if(findtext(H.job, "Engineer"))
head = /obj/item/clothing/head/helmet/space/plasmaman/engineering/ce
uniform = /obj/item/clothing/under/plasmaman/engineering/ce
suit_store = /obj/item/tank/internals/plasmaman/full
if(findtext(H.job, "Paranormal"))
head = /obj/item/clothing/head/helmet/space/plasmaman/chaplain
uniform = /obj/item/clothing/under/plasmaman/chaplain
if(findtext(H.job, "Janitor"))
head = /obj/item/clothing/head/helmet/space/plasmaman/janitor
uniform = /obj/item/clothing/under/plasmaman/janitor

box = /obj/item/storage/box/responseteam/plasmaman
var/obj/item/clothing/under/plasmaman/U = H.w_uniform
U.extinguish_cooldown -= 50
U.extinguishes_left += 5
U.strip_delay += 80
var/datum/armor/p_a = U.armor
p_a.setRating(20,10,10,10,10,10,INFINITY,INFINITY)

var/obj/item/clothing/head/helmet/space/plasmaman/L = H.head
var/datum/armor/p_h = L.armor
p_h.setRating(25,15,15,15,15,15,INFINITY,INFINITY)
L.brightness_on += 4
L.strip_delay += 80

H.update_action_buttons_icon()
H.rejuvenate()

if(istype(H.dna.species, /datum/species/machine))
box = /obj/item/storage/box/responseteam/machine
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
H.set_nutrition(NUTRITION_LEVEL_FULL)

if(prob(40))
for(var/obj/item/organ/external/E in H.bodyparts)
E.robotize("Hesphiastos Industries")
head_organ.robotize("Hesphiastos Industries alt.")

var/color

if(findtext(H.job, "Commander"))
color = pick("#2a59b6", "#0e35cf")

if(findtext(H.job, "Security"))
color = pick("#8a1139", "#630a28", "#cb1717", "#750d0d", "#75221d", "#dc4040")

if(findtext(H.job, "Medic"))
color = pick("#cae3e9", "#9aa6a9", "#a5bccb")

if(findtext(H.job, "Engineer"))
color = pick("#c25d1a", "#ad3b02", "#b1563f", "#e54e17", "#d4ac40", "#ad9708", "#ad9708")

if(findtext(H.job, "Paranormal"))
color = pick("#ad9708", "#5aa44e", "#1e861e", "#43cf5f", "#395f36", "#0a4e18")

if(findtext(H.job, "Janitor"))
color = pick("#4b3075", "#22174e", "#320970", "#3d234e")

if(prob(30)) //nah, just nt color
color = pick("#3d7cc2", "#0a4db1", "5975c2", "#2b3363", "#185e9c", "#0e6dd8", "#285ef2")

H.skin_colour = color
head_organ.hair_colour = color
head_organ.headacc_colour = color

var/obj/item/organ/internal/cyberimp/chest/ipc_repair/hardened/R = new
R.insert(H)

var/obj/item/organ/internal/cyberimp/eyes/hud/diagnostic/DI = new
DI.insert(H)

if(istype(H.dna.species, /datum/species/skrell))
if(findtext(H.job, "Commander"))
H.skin_colour = pick("#b6eecc", "#84e9ba", "#a2d4a6")
if(findtext(H.job, "Engineer"))
H.skin_colour = pick("#cf354a", "#b65e12", "#d8d062", "#26242b")
if(findtext(H.job, "Security"))
H.skin_colour = pick("#28ad31", "#4646cb", "#342b2c", "#ba1313", "#ba1313", "#bac245")

if(findtext(H.job, "Medic") && !istype(H.dna.species, /datum/species/machine))
var/obj/item/organ/internal/cyberimp/eyes/hud/diagnostic/DI = new /obj/item/organ/internal/cyberimp/eyes/hud/diagnostic(H)
DI.insert(H)


H.regenerate_icons()
H.update_body()

//////////////////// COMMANDER ///////////////////

/datum/outfit/job/centcom/response_team/commander
Expand All @@ -45,8 +145,28 @@
/datum/outfit/job/centcom/response_team/commander/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
. = ..()

H.rename_character(null, "[pick("Lieutenant", "Captain", "Major")] [pick(GLOB.last_names)]")
H.age = rand(35, 45)
var/list/low_ranks = list("Corporal", "Sergeant", "Staff Sergeant", "Sergeant First Class", "Master Sergeant", "Sergeant Major")

H.age += rand(15, 25)

while(length(low_ranks))
var/the_rank = pick_n_take(low_ranks)
if(findtext(H.real_name, the_rank))
var/new_name = replacetext(H.real_name, the_rank, pick("Lieutenant", "Captain", "Major"))
H.rename_character(null, new_name)
break

/datum/outfit/job/centcom/response_team/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
. = ..()

if(istype(H.dna.species, /datum/species/plasmaman))
var/obj/item/tank/internal_tank
internal_tank = new /obj/item/tank/internals/plasmaman/belt/full(H)
if(!H.equip_to_appropriate_slot(internal_tank) && !H.put_in_any_hand_if_possible(internal_tank))
H.unEquip(H.r_hand)
H.equip_or_collect(internal_tank, SLOT_HUD_RIGHT_HAND)
H.internal = internal_tank
H.update_action_buttons_icon()

/datum/outfit/job/centcom/response_team/commander/amber
name = "RT Commander (Amber)"
Expand Down
Loading
Loading