diff --git a/code/citadel/cit_crewobjectives.dm b/code/citadel/cit_crewobjectives.dm
index 90a655b622..6afa92af65 100644
--- a/code/citadel/cit_crewobjectives.dm
+++ b/code/citadel/cit_crewobjectives.dm
@@ -1,6 +1,6 @@
/datum/controller/subsystem/ticker/proc/generate_crew_objectives()
for(var/datum/mind/crewMind in SSticker.minds)
- if(prob(2) && !issilicon(crewMind.current) && !jobban_isbanned(crewMind, "Syndicate") && GLOB.miscreants_allowed && ROLE_MISCREANT in crewMind.current.client.prefs.be_special)
+ if(prob(5) && !issilicon(crewMind.current) && !jobban_isbanned(crewMind, "Syndicate") && GLOB.miscreants_allowed && ROLE_MISCREANT in crewMind.current.client.prefs.be_special)
generate_miscreant_objectives(crewMind)
else
if(CONFIG_GET(flag/allow_crew_objectives))
@@ -16,7 +16,7 @@
return
if(!crewMind.assigned_role)
return
- var/list/validobjs = get_valid_crew_objs(ckey(crewMind.assigned_role))
+ var/list/validobjs = crewobjjobs["[ckey(crewMind.assigned_role)]"]
if(!validobjs || !validobjs.len)
return
var/selectedObj = pick(validobjs)
@@ -28,16 +28,6 @@
to_chat(crewMind, "As a part of Nanotrasen's anti-tide efforts, you have been assigned an optional objective. It will be checked at the end of the shift. Performing traitorous acts in pursuit of your objective may result in termination of your employment.")
to_chat(crewMind, "Your optional objective: [newObjective.explanation_text]")
-/datum/controller/subsystem/ticker/proc/get_valid_crew_objs(var/job = "")//taken from old hippie with adjustments
- var/list/objpaths = typesof(/datum/objective/crew)
- var/list/objlist = list()
- for(var/hoorayhackyshit in objpaths)
- var/datum/objective/crew/obj = hoorayhackyshit //dm is not a sane language in any way, shape, or form.
- var/list/availableto = splittext(initial(obj.jobs),",")
- if(job in availableto)
- objlist += obj
- return objlist
-
/datum/objective/crew/
var/jobs = ""
explanation_text = "Yell on the development discussion channel on Citadels discord if this ever shows up. Something just broke here, dude"
diff --git a/code/citadel/cit_miscreants.dm b/code/citadel/cit_miscreants.dm
index e658fad097..ec5ff0156f 100644
--- a/code/citadel/cit_miscreants.dm
+++ b/code/citadel/cit_miscreants.dm
@@ -11,7 +11,7 @@
return
if(jobban_isbanned(crewMind, "Syndicate"))
return
- var/list/objectiveTypes = typesof(/datum/objective/miscreant) - /datum/objective/miscreant
+ var/list/objectiveTypes = miscreantobjlist
if(!objectiveTypes.len)
return
var/selectedType = pick(objectiveTypes)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 50e3dab667..8f36661ca4 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -66,6 +66,11 @@ SUBSYSTEM_DEF(ticker)
var/modevoted = FALSE //Have we sent a vote for the gamemode?
+ //Crew Objective/Miscreant stuff
+ var/list/crewobjlist = list()
+ var/list/crewobjjobs = list()
+ var/list/miscreantobjlist = list()
+
/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()
@@ -87,7 +92,7 @@ SUBSYSTEM_DEF(ticker)
var/list/provisional_title_music = flist("config/title_music/sounds/")
var/list/music = list()
var/use_rare_music = prob(1)
-
+
for(var/S in provisional_title_music)
var/lower = lowertext(S)
var/list/L = splittext(lower,"+")
@@ -115,7 +120,7 @@ SUBSYSTEM_DEF(ticker)
if(byond_sound_formats[ext])
continue
music -= S
-
+
if(isemptylist(music))
music = world.file2list(ROUND_START_MUSIC_LIST, "\n")
login_music = pick(music)
@@ -123,6 +128,14 @@ SUBSYSTEM_DEF(ticker)
login_music = "config/title_music/sounds/[pick(music)]"
+ crewobjlist = typesof(/datum/objective/crew)
+ miscreantobjlist = (typesof(/datum/objective/miscreant) - /datum/objective/miscreant)
+ for(var/hoorayhackyshit in crewobjlist) //taken from old Hippie's "job2obj" proc with adjustments.
+ var/datum/objective/crew/obj = hoorayhackyshit //dm is not a sane language in any way, shape, or form.
+ var/list/availableto = splittext(initial(obj.jobs),",")
+ for(var/job in availableto)
+ crewobjjobs["[job]"] += list(obj)
+
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase()
if(!GLOB.syndicate_code_response)
@@ -521,11 +534,11 @@ SUBSYSTEM_DEF(ticker)
if(!crewMind.current || !crewMind.objectives.len)
continue
for(var/datum/objective/miscreant/MO in crewMind.objectives)
- miscreants += "[crewMind.current.real_name] (Played by: [crewMind.key])
Objective: [MO.explanation_text] (Optional)
"
+ miscreants += "[crewMind.current.real_name] (Played by: [crewMind.key])
Objective: [MO.explanation_text] (Optional)"
for(var/datum/objective/crew/CO in crewMind.objectives)
if(CO.check_completion())
to_chat(crewMind.current, "
Your optional objective: [CO.explanation_text] Success!")
- successfulCrew += "[crewMind.current.real_name] (Played by: [crewMind.key])
Objective: [CO.explanation_text] Success! (Optional)
"
+ successfulCrew += "[crewMind.current.real_name] (Played by: [crewMind.key])
Objective: [CO.explanation_text] Success! (Optional)"
else
to_chat(crewMind.current, "
Your optional objective: [CO.explanation_text] Failed.")
diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm
index b692ab2d32..1eb4ced083 100644
--- a/code/modules/mob/dead/new_player/new_player.dm
+++ b/code/modules/mob/dead/new_player/new_player.dm
@@ -375,7 +375,7 @@
if(GLOB.highlander)
to_chat(humanc, "THERE CAN BE ONLY ONE!!!")
humanc.make_scottish()
- if(prob(2) && !issilicon(humanc) && !jobban_isbanned(humanc.mind, "Syndicate") && GLOB.miscreants_allowed && ROLE_MISCREANT in humanc.client.prefs.be_special)
+ if(prob(5) && !issilicon(humanc) && !jobban_isbanned(humanc.mind, "Syndicate") && GLOB.miscreants_allowed && ROLE_MISCREANT in humanc.client.prefs.be_special)
SSticker.generate_miscreant_objectives(humanc.mind)
else
if(CONFIG_GET(flag/allow_crew_objectives))