Crew objective/miscreant system tweaks (#3213)

* Loadsa tweaks

* adds miscreant pref, other fixes

* fixes runtime

* fixes compiling errors for REAL now hopefully

* HOPEFULLY fixes compiling errors

* COMPILE!
This commit is contained in:
deathride58
2017-10-08 17:05:40 +00:00
committed by kevinz000
parent c222fa42f9
commit 5d0853e16a
8 changed files with 25 additions and 38 deletions
+1 -1
View File
@@ -70,4 +70,4 @@
#define ADMIN_MARKREAD(client) "(<a href='?_src_=holder;markedread=\ref[client]'>MARK READ</a>)"//marks an adminhelp as read and under investigation
#define ADMIN_IC(client) "(<a href='?_src_=holder;icissue=\ref[client]'>IC</a>)"//marks and adminhelp as an IC issue
#define ADMIN_REJECT(client) "(<a href='?_src_=holder;rejectadminhelp=\ref[client]'>REJT</a>)"//Rejects an adminhelp for being unclear or otherwise unhelpful. resets their adminhelp timer
#define ADMIN_REJECT(client) "(<a href='?_src_=holder;rejectadminhelp=\ref[client]'>REJT</a>)"//Rejects an adminhelp for being unclear or otherwise unhelpful. resets their adminhelp timer
+3 -1
View File
@@ -24,6 +24,7 @@
#define ROLE_SERVANT_OF_RATVAR "servant of Ratvar"
#define ROLE_BORER "borer"
#define ROLE_BROTHER "blood brother"
#define ROLE_MISCREANT "miscreant"
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
@@ -46,7 +47,8 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_ABDUCTOR = /datum/game_mode/abduction,
ROLE_DEVIL = /datum/game_mode/devil,
ROLE_BORER,
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult,
ROLE_MISCREANT
))
//Job defines for what happens when you fail to qualify for any job during job selection
+3 -2
View File
@@ -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)
if(prob(2) && !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))
@@ -25,7 +25,8 @@
return
newObjective.owner = crewMind
crewMind.objectives += newObjective
to_chat(crewMind, "<B>Your objective:</B> [newObjective.explanation_text]")
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)
+6 -1
View File
@@ -7,6 +7,8 @@
return
if(!crewMind.assigned_role)
return
if(ROLE_MISCREANT in crewMind.current.client.prefs.be_special)
return
if(jobban_isbanned(crewMind, "Syndicate"))
return
var/list/objectiveTypes = typesof(/datum/objective/miscreant) - /datum/objective/miscreant
@@ -58,4 +60,7 @@
explanation_text = "Act as out of character as you possibly can."
/datum/objective/miscreant/racism
explanation_text = "Attempt to establish superiority of your race."
explanation_text = "Attempt to establish superiority of your species."
/datum/objective/miscreant/cargonia
explanation_text = "Attempt to establish independence of your department."
@@ -185,29 +185,6 @@
else
return FALSE
/datum/objective/crew/departmentclothes
var/obj/item/clothing/under/rank/targetuniform
explanation_text = "Be wearing a (Yo, this objective broke. report this to citadels discord via the development channel) at the end of the shift."
jobs = "assistant"
/datum/objective/crew/departmentclothes/New()
. = ..()
var/list/blacklist = list(/obj/item/clothing/under/rank, /obj/item/clothing/under/rank/miner, /obj/item/clothing/under/rank/medical/blue, /obj/item/clothing/under/rank/medical/green, /obj/item/clothing/under/rank/medical/purple, /obj/item/clothing/under/rank/security/grey, /obj/item/clothing/under/rank/warden/grey, /obj/item/clothing/under/rank/head_of_security/grey, /obj/item/clothing/under/rank/mailman, /obj/item/clothing/under/rank/psyche, /obj/item/clothing/under/rank/clown/sexy, /obj/item/clothing/under/rank/centcom_officer, /obj/item/clothing/under/rank/centcom_commander, /obj/item/clothing/under/rank/security/navyblue/russian, /obj/item/clothing/under/rank/security/blueshirt)
var/list/validclothes = typesof(/obj/item/clothing/under/rank) - blacklist
targetuniform = pick(validclothes)
update_explanation_text()
/datum/objective/crew/departmentclothes/update_explanation_text()
. = ..()
explanation_text = "Be wearing a [initial(targetuniform.name)] at the end of the shift."
/datum/objective/crew/departmentclothes/check_completion()
if(owner && owner.current)
var/mob/living/carbon/human/H = owner.current
if(istype(H.w_uniform, targetuniform))
return TRUE
return FALSE
/datum/objective/crew/pwrgame //ported from Goon with adjustments
var/obj/item/clothing/targettidegarb
explanation_text = "Get your grubby hands on a (Dear god something broke. Report this to Citadel's development dicussion channel)."
@@ -215,7 +192,9 @@
/datum/objective/crew/pwrgame/New()
. = ..()
var/list/muhvalids = list(/obj/item/clothing/mask/gas, /obj/item/clothing/head/welding, /obj/item/clothing/head/ushanka, /obj/item/clothing/gloves/color/yellow, /obj/item/clothing/mask/gas/owl_mask, /obj/item/clothing/suit/space)
var/list/muhvalids = list(/obj/item/clothing/mask/gas, /obj/item/clothing/head/welding, /obj/item/clothing/head/ushanka, /obj/item/clothing/gloves/color/yellow, /obj/item/clothing/mask/gas/owl_mask)
if(prob(10))
muhvalids += list(/obj/item/clothing/suit/space)
targettidegarb = pick(muhvalids)
update_explanation_text()
@@ -74,7 +74,7 @@
return FALSE
/datum/objective/crew/noinfections
explanation_text = "Ensure no living crew members are infected with harmful viruses at the end of the shift"
explanation_text = "Make sure there are no crew members with harmful diseases at the end of the shift."
jobs = "virologist"
/datum/objective/crew/noinfections/check_completion()
+6 -6
View File
@@ -258,7 +258,7 @@ SUBSYSTEM_DEF(ticker)
//Deleting Startpoints but we need the ai point to AI-ize people later
if(S.name != "AI")
qdel(S)
//assign crew objectives and generate miscreants
if(CONFIG_GET(flag/allow_extended_miscreants) && GLOB.master_mode == "extended")
GLOB.miscreants_allowed = TRUE
@@ -282,7 +282,7 @@ SUBSYSTEM_DEF(ticker)
qdel(bomb)
if(epi)
explosion(epi, 0, 256, 512, 0, TRUE, TRUE, 0, TRUE)
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/mob/dead/new_player/player in GLOB.player_list)
if(player.ready == PLAYER_READY_TO_PLAY && player.mind)
@@ -472,13 +472,13 @@ 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>). <B>Objective</B>: [MO.explanation_text]"
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>"
for(var/datum/objective/crew/CO in crewMind.objectives)
if(CO.check_completion())
to_chat(crewMind.current, "<br><B>Your 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>). <B>Objective</B>: [CO.explanation_text]"
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>"
else
to_chat(crewMind.current, "<br><B>Your objective</B>: [CO.explanation_text] <font color='red'><B>Failed.</B></font>")
to_chat(crewMind.current, "<br><B>Your optional objective</B>: [CO.explanation_text] <font color='red'><B>Failed.</B></font>")
if (successfulCrew.len)
var/completedObjectives = "<B>The following crew members completed their Crew Objectives:</B><BR>"
@@ -80,7 +80,7 @@
if(SSticker.current_state == GAME_STATE_PREGAME)
var/time_remaining = SSticker.GetTimeLeft()
if(time_remaining > 0)
stat("Time To Start:", "[round(time_remaining/10)]s")
stat("Time To Start:", "[round(time_remaining/10)]s")
else if(time_remaining == -10)
stat("Time To Start:", "DELAYED")
else
@@ -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)
if(prob(2) && !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))