diff --git a/code/citadel/cit_crewobjectives.dm b/code/citadel/cit_crewobjectives.dm index 90a655b622..5a5d0b2384 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,8 @@ 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)]"] + //var/list/validobjs = get_valid_crew_objs(ckey(crewMind.assigned_role)) if(!validobjs || !validobjs.len) return var/selectedObj = pick(validobjs) @@ -28,15 +29,14 @@ 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) +/*/datum/controller/subsystem/ticker/proc/get_valid_crew_objs(var/job = "")//taken from old hippie with adjustments var/list/objlist = list() - for(var/hoorayhackyshit in objpaths) + for(var/hoorayhackyshit in crewobjlist) 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 + return objlist*/ /datum/objective/crew/ var/jobs = "" diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 02a9808f48..34e20ceee9 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,12 +120,20 @@ 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) + crewobjlist = typesof(/datum/objective/crew) + miscreantobjlist = typesof(/datum/objective/miscreant) + for(var/hoorayhackyshit in crewobjlist) + 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) @@ -519,11 +532,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))