Skip to content

Commit

Permalink
Journalism, vol 2. Freedom Unbecoming. (#4999)
Browse files Browse the repository at this point in the history
Implements this: https://forums.aurorastation.org/viewtopic.php?f=21&t=11375&start=10#p101753

Basically: journalists get immunity from D-notices, corporate reports get extended access. Also added a mechanism to add alt title based access more easily.
  • Loading branch information
skull132 committed Jul 22, 2018
1 parent 2b67f34 commit 39a6aac
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion code/controllers/subsystems/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
return
else
C = new job.idtype(H)
C.access = job.get_access()
C.access = job.get_access(title)
else
C = new /obj/item/weapon/card/id(H)
if(C)
Expand Down
1 change: 1 addition & 0 deletions code/game/jobs/job/civilian.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@
access = list(access_journalist, access_maint_tunnels)
minimal_access = list(access_journalist, access_maint_tunnels)
alt_titles = list("Freelance Journalist")
title_accesses = list("Corporate Reporter" = list(access_medical, access_security, access_research, access_engine))

/datum/job/journalist/equip(var/mob/living/carbon/human/H, var/alt_title)
if(!H)
Expand Down
10 changes: 7 additions & 3 deletions code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
var/selection_color = "#ffffff" // Selection screen color
var/idtype = /obj/item/weapon/card/id // The type of the ID the player will have
var/list/alt_titles // List of alternate titles, if any
var/list/title_accesses // A map of title -> list of accesses to add if the person has this title.
var/req_admin_notify // If this is set to 1, a text is printed to the player when jobs are assigned, telling him that he should let admins know that he has to disconnect.
var/minimal_player_age = 0 // If you have use_age_restriction_for_jobs config option enabled and the database set up, this option will add a requirement for players to be at least minimal_player_age days old. (meaning they first signed in at least that many days before.)
var/department = null // Does this position have a department tag?
Expand Down Expand Up @@ -105,11 +106,14 @@
/datum/job/proc/equip_preview(mob/living/carbon/human/H, var/alt_title)
. = equip(H, alt_title)

/datum/job/proc/get_access()
/datum/job/proc/get_access(selected_title)
if(!config || config.jobs_have_minimal_access)
return src.minimal_access.Copy()
. = minimal_access.Copy()
else
return src.access.Copy()
. = access.Copy()

if (LAZYLEN(title_accesses) && title_accesses[selected_title])
. += title_accesses[selected_title]

/datum/job/proc/apply_fingerprints(var/mob/living/carbon/human/target)
if(!istype(target))
Expand Down
18 changes: 9 additions & 9 deletions code/game/machinery/newscaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -459,11 +459,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
else if(href_list["set_attachment"])
AttachPhoto(usr)
src.updateUsrDialog()

else if(href_list["set_paper"])
AttachPaper(usr)
src.updateUsrDialog()

else if(href_list["submit_new_message"])
if(src.msg =="" || src.msg=="\[REDACTED\]" || src.scanned_user == "Unknown" || src.channel_name == "" )
src.screen=6
Expand All @@ -477,7 +477,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.screen=4

src.updateUsrDialog()

else if(href_list["add_comment"])
var/com_msg = sanitize(input(usr, "Write your Comment", "Network Comment Handler", "") as message, encode = 0, trim = 0, extra = 0)
if(com_msg =="" || com_msg=="\[REDACTED\]" || src.scanned_user == "Unknown" )
Expand All @@ -493,39 +493,39 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
to_chat(usr, "Comment successfully added!")
src.screen = 22
src.updateUsrDialog()

else if(href_list["view_comments"])
var/datum/feed_message/viewing_story = locate(href_list["story"])
if(!istype(viewing_story))
return
src.screen = href_list["privileged"] ? 23 : 22
src.viewing_message = viewing_story
src.updateUsrDialog()

else if(href_list["censor_comment"])
var/datum/feed_comment/comment = locate(href_list["comment"])
if(!istype(comment))
return
comment.message = "\[REDACTED\]"
src.screen = 22
src.updateUsrDialog()

else if(href_list["like"])
var/datum/feed_message/viewing_story = locate(href_list["story"])
if(src.scanned_user == "Unknown" || (src.scanned_user in viewing_story.interacted) || !istype(viewing_story))
return
viewing_story.interacted += src.scanned_user
viewing_story.likes += 1
src.updateUsrDialog()

else if(href_list["dislike"])
var/datum/feed_message/viewing_story = locate(href_list["story"])
if(src.scanned_user == "Unknown" || (src.scanned_user in viewing_story.interacted) || !istype(viewing_story))
return
viewing_story.interacted += src.scanned_user
viewing_story.dislikes += 1
src.updateUsrDialog()

else if(href_list["create_channel"])
src.screen=2
src.updateUsrDialog()
Expand Down Expand Up @@ -774,7 +774,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if(paper_data || paper_name)
paper_name = ""
paper_data = ""

if(istype(user.get_active_hand(), /obj/item/weapon/paper))
var/obj/item/weapon/paper/attached = user.get_active_hand()
paper_name = attached.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
usr << "<span class='warning'>No log exists for this job: [t1]</span>"
return

access = jobdatum.get_access()
access = jobdatum.get_access(t1)

remove_nt_access(id_card)
apply_access(id_card, access)
Expand Down
5 changes: 5 additions & 0 deletions html/changelogs/skull132-journalism.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
author: Skull132
delete-after: true

changes:
- rscadd: "Corporate Reports now gain rudimentary department access, so they could better report on corporate affairs."

0 comments on commit 39a6aac

Please sign in to comment.