eh it works
This commit is contained in:
@@ -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, "<B>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. <font color=red>Performing traitorous acts in pursuit of your objective may result in termination of your employment.</font></B>")
|
||||
to_chat(crewMind, "<B>Your optional objective:</B> [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 = ""
|
||||
|
||||
@@ -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 += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>)<BR><B>Objective</B>: [MO.explanation_text] <font color='grey'>(Optional)</font><BR>"
|
||||
miscreants += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>)<BR><B>Objective</B>: [MO.explanation_text] <font color='grey'>(Optional)</font>"
|
||||
for(var/datum/objective/crew/CO in crewMind.objectives)
|
||||
if(CO.check_completion())
|
||||
to_chat(crewMind.current, "<br><B>Your optional objective</B>: [CO.explanation_text] <font color='green'><B>Success!</B></font>")
|
||||
successfulCrew += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>)<BR><B>Objective</B>: [CO.explanation_text] <font color='green'><B>Success!</B></font> <font color='grey'>(Optional)</font><BR>"
|
||||
successfulCrew += "<B>[crewMind.current.real_name]</B> (Played by: <B>[crewMind.key]</B>)<BR><B>Objective</B>: [CO.explanation_text] <font color='green'><B>Success!</B></font> <font color='grey'>(Optional)</font>"
|
||||
else
|
||||
to_chat(crewMind.current, "<br><B>Your optional objective</B>: [CO.explanation_text] <font color='red'><B>Failed.</B></font>")
|
||||
|
||||
|
||||
@@ -375,7 +375,7 @@
|
||||
if(GLOB.highlander)
|
||||
to_chat(humanc, "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>")
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user