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

Fixes Newscaster Treatment of Wallets #27121

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions code/defines/procs/announcer_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,6 @@ GLOBAL_DATUM_INIT(major_announcement, /datum/announcer, new(config_type = /datum
log_game("[key_name(usr)] has made \a [config.log_name]: [message_title] - [message] - [author]")
message_admins("[key_name_admin(usr)] has made \a [config.log_name].", 1)

/proc/GetNameAndAssignmentFromId(obj/item/card/id/I)
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name

/datum/announcement_configuration/event
default_title = ANNOUNCE_KIND_EVENT
sound = sound('sound/misc/notice2.ogg')
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/items/weapons/cards_ids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1191,3 +1191,7 @@
return "Thunderdome Green"
else
return capitalize(skin)

/proc/GetNameAndAssignmentFromId(obj/item/card/id/I)
// Format currently matches that of newscaster feeds: Registered Name (Assigned Rank)
return I.assignment ? "[I.registered_name] ([I.assignment])" : I.registered_name
14 changes: 3 additions & 11 deletions code/modules/newscaster/obj/newscaster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -645,18 +645,10 @@ GLOBAL_LIST_EMPTY(allNewscasters)
/obj/machinery/newscaster/proc/get_scanned_user(mob/user)
. = list(name = "Unknown", security = user.can_admin_interact())
if(ishuman(user))
var/mob/living/carbon/human/M = user
var/mob/living/carbon/human/human_user = user
// No ID, no luck
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// No ID, no luck

Related to the if(!M.wear_id) that is no longer here

if(!M.wear_id)
return
// Try to get the ID
var/obj/item/card/id/ID
if(istype(M.wear_id, /obj/item/pda))
var/obj/item/pda/P = M.wear_id
ID = P.id
else if(istype(M.wear_id, /obj/item/card/id))
ID = M.wear_id
if(istype(ID))
var/obj/item/card/id/ID = human_user.get_id_card()
if(ID)
return list(name = "[ID.registered_name] ([ID.assignment])", security = has_access(list(), list(ACCESS_SECURITY), ID.access))
else if(issilicon(user))
var/mob/living/silicon/ai_user = user
Expand Down