Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Journalism, vol 2. Freedom Unbecoming. #4999

Merged
merged 6 commits into from
Jul 22, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternately: if (LAZYACCESS(title_accesses, selected_title))

. += title_accesses[selected_title]

/datum/job/proc/apply_fingerprints(var/mob/living/carbon/human/target)
if(!istype(target))
Expand Down
21 changes: 11 additions & 10 deletions code/game/machinery/newscaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,9 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.screen=7
else
var/choice = alert("Please confirm Feed channel creation","Network Channel Handler","Confirm","Cancel")
var/can_be_censored = (ishuman(src) && GetAssignment(usr) == "Freelance Journalist")
if(choice=="Confirm")
SSnews.CreateFeedChannel(src.channel_name, src.scanned_user, c_locked)
SSnews.CreateFeedChannel(src.channel_name, src.scanned_user, c_locked, adminChannel = can_be_censored)
src.screen=5
src.updateUsrDialog()
//src.update_icon()
Expand All @@ -459,11 +460,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 +478,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 +494,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 +775,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
6 changes: 6 additions & 0 deletions html/changelogs/skull132-journalism.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: Skull132
delete-after: true

changes:
- rscadd: "Corporate Reports now gain rudiemntary department access, so they coudl better report corporate affairs."
- tweak: "The news feeds of Freelance Journalists cannot be censored nor D-noticed without Central Command involvement."