Merge pull request #3307 from deathride58/crewobjtweaksgalore
Crew Obj & Miscreant system optimizations and tweaks
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,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, "<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)
|
||||
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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user