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

Paperwork Prefabs #5265

Draft
wants to merge 68 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
1ae9e9f
x
realforest2001 Dec 13, 2023
7cee84a
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 18, 2023
0851378
It works!
realforest2001 Dec 19, 2023
55870bd
pens and some MP forms
realforest2001 Dec 20, 2023
328dae8
WY liaison docs
realforest2001 Dec 20, 2023
6f6c5e9
state
realforest2001 Dec 20, 2023
7015f84
x
realforest2001 Dec 20, 2023
b4f9ac9
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 20, 2023
f0b98a5
cl mapping
realforest2001 Dec 20, 2023
2db8a2e
x
realforest2001 Dec 23, 2023
0aaccae
Merge branch 'master' into forest/paperwork
realforest2001 Apr 26, 2024
cf8ddc5
works with the CDN.
realforest2001 Apr 26, 2024
df10b99
Apply suggestions from code review
realforest2001 Apr 26, 2024
7eff867
reset almayer to master
realforest2001 Apr 26, 2024
391c619
cl and brig
realforest2001 Apr 26, 2024
96d6d46
chinook pens
realforest2001 Apr 26, 2024
8682416
icons
realforest2001 Apr 26, 2024
bca88a5
wrong cabinet!
realforest2001 Apr 26, 2024
7b4fc48
wy_bw
realforest2001 Apr 26, 2024
14ad4e5
crayon blanks
realforest2001 Apr 26, 2024
5538d00
I fixed fields!
realforest2001 Apr 27, 2024
e4ce751
reshuffle
realforest2001 Apr 28, 2024
831b821
Update code/modules/paperwork/prefab_papers/wey_yu/liaison/nda_long.dm
realforest2001 May 1, 2024
16db60d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Jul 30, 2024
991981d
floor fix
realforest2001 Jul 30, 2024
61f0ab2
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 10, 2024
3991b2f
scale
realforest2001 Sep 10, 2024
2dd3bc0
map reset
realforest2001 Sep 10, 2024
849386d
dead mao
realforest2001 Sep 10, 2024
b56e5e1
attempt 2
realforest2001 Sep 10, 2024
0bed0c7
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 13, 2024
37e6446
hc paper
realforest2001 Sep 14, 2024
9b4cf0c
colour scheme
realforest2001 Sep 14, 2024
0a29a5d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 14, 2024
45792f7
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Sep 29, 2024
745b5fe
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Nov 20, 2024
313e8cf
gr
realforest2001 Nov 20, 2024
45245a7
grrrr
realforest2001 Nov 20, 2024
9aed14d
f
realforest2001 Nov 20, 2024
4c21f7a
implement
realforest2001 Nov 20, 2024
584c2b0
i hate maps
realforest2001 Nov 20, 2024
9aa6c0d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Nov 23, 2024
fb9cf44
pen fix
realforest2001 Nov 23, 2024
ba487f9
adds cabinets for all fax responders
realforest2001 Nov 23, 2024
7ecdd64
fax machine priority
realforest2001 Nov 25, 2024
fb69a8c
times
realforest2001 Nov 26, 2024
86630a4
Arrest / Custody forms
realforest2001 Nov 26, 2024
c3beb5d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Nov 26, 2024
8434638
Apply suggestions from code review
realforest2001 Nov 26, 2024
bf6a238
Fixup maps in TGM format
realforest2001 Nov 27, 2024
c72e95d
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Nov 28, 2024
bb4d787
outbound prefabs
realforest2001 Nov 28, 2024
2afd033
uscm
realforest2001 Nov 28, 2024
5be75f0
dme fix
realforest2001 Dec 1, 2024
81ff45f
Merge branch 'project/fax_responders/faxmachine_overhaul' into forest…
realforest2001 Dec 1, 2024
587fbd0
Fixup maps in TGM format
realforest2001 Dec 1, 2024
97f508d
bug
realforest2001 Dec 1, 2024
7f4e08b
titling
realforest2001 Dec 2, 2024
9556f96
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 5, 2024
04ce801
uscm_mp cabinet
realforest2001 Dec 5, 2024
99d6e6e
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 9, 2024
03547f8
Fixup maps in TGM format
realforest2001 Dec 9, 2024
6abcecc
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 11, 2024
32d7390
.
realforest2001 Dec 11, 2024
c4b90ff
Fixup maps in TGM format
realforest2001 Dec 11, 2024
9edf958
changes
realforest2001 Dec 13, 2024
3ae0c3b
Merge remote-tracking branch 'cmss13-devs/master' into forest/paperwork
realforest2001 Dec 13, 2024
49c2b56
s
realforest2001 Dec 13, 2024
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
18 changes: 18 additions & 0 deletions code/__DEFINES/paperwork.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#define PAPER_CATEGORY_USCM "USCM"
#define PAPER_CATEGORY_USCM_HC "USCM HC"

#define PAPER_CATEGORY_MP "Military Police"
#define PAPER_CATEGORY_PROVOST "Provost"

#define PAPER_CATEGORY_LIAISON "WY Liaison"
#define PAPER_CATEGORY_WEYYU_HC "Weyland Yutani"

#define PAPER_CATEGORY_UPP_HC "UPP HC"

#define PAPER_CATEGORY_CMB_HC "CMB HC"

#define PAPER_CATEGORY_CLF_HC "CLF HC"

#define PAPER_CATEGORY_TWE_HC "TWE HC"

#define PAPER_CATEGORY_PRESS_HC "PRESS HC"
2 changes: 1 addition & 1 deletion code/game/machinery/computer/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@
var/datum/asset/asset = get_asset_datum(/datum/asset/simple/paper)
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.name = text("Scan: [], []",record.fields["name"],worldtime2text())
P.info += text("<center><img src = [asset.get_url_mappings()["wylogo.png"]]><HR><I><B>Official Weyland-Yutani Document</B><BR>Scan Record</I><HR><H2>[]</H2>\n</center>",record.fields["name"])
P.info += text("<center><img src = [asset.get_url_mappings()["logo_wy.png"]]><HR><I><B>Official Weyland-Yutani Document</B><BR>Scan Record</I><HR><H2>[]</H2>\n</center>",record.fields["name"])
for(var/datum/data/record/R as anything in GLOB.data_core.medical)
if (R.fields["name"] == record.fields["name"])
if(R.fields["last_scan_time"] && R.fields["last_scan_result"])
Expand Down
81 changes: 54 additions & 27 deletions code/game/machinery/fax_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
var/machine_id_tag
/// Whether or not the ID tag can be changed by proc.
var/fixed_id_tag = FALSE
/// Whether or not the next fax to be sent is a priority one.
var/is_priority_fax = FALSE
/// If this machine can send priority faxes.
var/can_send_priority = FALSE

/obj/structure/machinery/faxmachine/Initialize(mapload, ...)
. = ..()
Expand Down Expand Up @@ -274,75 +278,86 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
data["nextfaxtime"] = send_cooldown
data["faxcooldown"] = fax_cooldown

data["can_send_priority"] = can_send_priority
data["is_priority_fax"] = is_priority_fax


return data

/obj/structure/machinery/faxmachine/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
. = ..()
if(.)
return
var/mob/user = ui.user

switch(action)
if("toggle_priority")
is_priority_fax = !is_priority_fax
to_chat(user, SPAN_NOTICE("Priority Alert is now [is_priority_fax ? "Enabled" : "Disabled"]."))
. = TRUE
Comment on lines +295 to +297
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to ensure priority even can be toggled. Otherwise you can just force it.


if("send")
if(!original_fax)
to_chat(ui.user, SPAN_NOTICE("No paper loaded."))
to_chat(user, SPAN_NOTICE("No paper loaded."))
return

if(istype(original_fax, /obj/item/paper_bundle))
var/obj/item/paper_bundle/bundle = original_fax
if(bundle.amount > 5)
to_chat(ui.user, SPAN_NOTICE("\The [src] is jammed!"))
to_chat(user, SPAN_NOTICE("\The [src] is jammed!"))
return

copy_fax_paper()

outgoing_fax_message(ui.user)
outgoing_fax_message(user, is_priority_fax)
is_priority_fax = FALSE

COOLDOWN_START(src, send_cooldown, fax_cooldown)
to_chat(ui.user, "Message transmitted successfully.")
to_chat(user, "Message transmitted successfully.")
. = TRUE

if("ejectpaper")
if(!original_fax)
to_chat(ui.user, SPAN_NOTICE("No paper loaded."))
if(!ishuman(ui.user))
to_chat(ui.user, SPAN_NOTICE("You can't do that."))
to_chat(user, SPAN_NOTICE("No paper loaded."))
if(!ishuman(user))
to_chat(user, SPAN_NOTICE("You can't do that."))
return

original_fax.forceMove(ui.user.loc)
ui.user.put_in_hands(original_fax)
to_chat(ui.user, SPAN_NOTICE("You take \the [original_fax.name] out of \the [src]."))
original_fax.forceMove(user.loc)
user.put_in_hands(original_fax)
to_chat(user, SPAN_NOTICE("You take the [original_fax.name] out of [src]."))
original_fax = null
fax_paper_copy = null
photo_list = null
. = TRUE

if("insertpaper")
var/jammed = FALSE
var/obj/item/I = ui.user.get_active_hand()
var/obj/item/I = user.get_active_hand()
if(istype(I, /obj/item/paper_bundle))
var/obj/item/paper_bundle/bundle = I
if(bundle.amount > 5)
jammed = TRUE
// Repeating code? This is not ideal. Why not put this functionality inside of a proc?
if(istype(I, /obj/item/paper) || istype(I, /obj/item/paper_bundle) || istype(I, /obj/item/photo))
ui.user.drop_inv_item_to_loc(I, src)
user.drop_inv_item_to_loc(I, src)
original_fax = I
if(!jammed)
to_chat(ui.user, SPAN_NOTICE("You put \the [original_fax.name] into \the [src]."))
to_chat(user, SPAN_NOTICE("You put the [original_fax.name] into [src]."))
else
to_chat(ui.user, SPAN_NOTICE("\The [src] jammed! It can only accept up to five papers at once."))
to_chat(user, SPAN_NOTICE("[src] jammed! It can only accept up to five papers at once."))
playsound(src, "sound/machines/terminal_insert_disc.ogg", 50, TRUE)
flick("[initial(icon_state)]send", src)
. = TRUE

if("ejectid")
if(!scan || !ishuman(ui.user))
to_chat(ui.user, SPAN_WARNING("You can't do that."))
if(!scan || !ishuman(user))
to_chat(user, SPAN_WARNING("You can't do that."))
return
to_chat(ui.user, SPAN_NOTICE("You take \the [scan] out of \the [src]."))
scan.forceMove(ui.user.loc)
if(!ui.user.get_active_hand())
ui.user.put_in_hands(scan)
to_chat(user, SPAN_NOTICE("You take [scan] out of [src]."))
scan.forceMove(user.loc)
if(!user.get_active_hand())
user.put_in_hands(scan)
scan = null
else
scan.forceMove(src.loc)
Expand All @@ -353,11 +368,11 @@ GLOBAL_LIST_EMPTY(all_faxcodes)

if("select")
var/last_target_department = target_department
target_department = tgui_input_list(ui.user, "Which department?", "Choose a department", GLOB.all_fax_departments)
target_department = tgui_input_list(user, "Which department?", "Choose a department", GLOB.all_fax_departments)
if(!target_department)
target_department = last_target_department
if(target_department == DEPARTMENT_TARGET)
var/new_target_machine_id = tgui_input_list(ui.user, "Which machine?", "Choose a machine code", GLOB.all_faxcodes)
var/new_target_machine_id = tgui_input_list(user, "Which machine?", "Choose a machine code", GLOB.all_faxcodes)
if(!new_target_machine_id)
target_department = last_target_department
else
Expand All @@ -375,7 +390,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
authenticated = FALSE
. = TRUE

add_fingerprint(ui.user)
add_fingerprint(user)

/obj/structure/machinery/faxmachine/vv_get_dropdown()
. = ..()
Expand Down Expand Up @@ -422,7 +437,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
photo_list += list("tmp_photo[content].png" = (faxed_photo.img))
fax_paper_copy.info += "<img src='tmp_photo[content].png' width='192'/>"

/obj/structure/machinery/faxmachine/proc/outgoing_fax_message(mob/user)
/obj/structure/machinery/faxmachine/proc/outgoing_fax_message(mob/user, sending_priority)

var/datum/fax/faxcontents = new(fax_paper_copy.info, photo_list, fax_paper_copy.name, target_department, machine_id_tag)

Expand Down Expand Up @@ -472,7 +487,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
var/msg_ghost = SPAN_NOTICE("<b><font color='#006100'>[the_target_department]: </font></b>")
msg_ghost += "Receiving fax via secure connection ... <a href='?FaxView=\ref[faxcontents]'>view message</a>"

send_fax(faxcontents)
send_fax(faxcontents, sending_priority)

announce_fax(msg_admin, msg_ghost)

Expand Down Expand Up @@ -500,7 +515,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
C << 'sound/effects/incoming-fax.ogg'


/obj/structure/machinery/faxmachine/proc/send_fax(datum/fax/faxcontents)
/obj/structure/machinery/faxmachine/proc/send_fax(datum/fax/faxcontents, sending_priority)
var/list/target_machines = list()
for(var/obj/structure/machinery/faxmachine/pos_target in GLOB.all_faxmachines)
if(target_department == DEPARTMENT_TARGET)
Expand All @@ -517,6 +532,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)

flick("[initial(icon_state)]receive", target)

playsound(target.loc, "sound/machines/fax.ogg", 15)
// give the sprite some time to flick
spawn(30)
var/obj/item/paper/P = new(target.loc,faxcontents.photo_list)
Expand Down Expand Up @@ -564,7 +580,10 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
else
P.stamps += "<HR><i>This paper has been sent by [machine_id_tag].</i>"
P.overlays += stampoverlay
playsound(target.loc, "sound/items/polaroid1.ogg", 15, 1)
if(sending_priority)
playsound(target.loc, "sound/machines/twobeep.ogg", 45)
target.langchat_speech("beeps with a priority message", get_mobs_in_view(GLOB.world_view_size, target), GLOB.all_languages, skip_language_check = TRUE, animation_style = LANGCHAT_FAST_POP, additional_styles = list("langchat_small", "emote"))
target.visible_message("[SPAN_BOLD(target)] beeps with a priority message.")
qdel(faxcontents)

/obj/structure/machinery/faxmachine/cmb
Expand All @@ -584,6 +603,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
department = DEPARTMENT_WY
target_department = "W-Y Liaison"
network = FAX_NET_WY_HC
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/uscm
name = "\improper USCM Military Fax Machine"
Expand All @@ -596,11 +616,13 @@ GLOBAL_LIST_EMPTY(all_faxcodes)

/obj/structure/machinery/faxmachine/uscm/command/capt
department = "Commanding Officer"
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/uscm/command/highcom
department = DEPARTMENT_HC
target_department = "Commanding Officer"
network = FAX_NET_USCM_HC
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/uscm/brig
name = "\improper USCM Provost Fax Machine"
Expand All @@ -614,6 +636,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
department = DEPARTMENT_PROVOST
target_department = "Brig"
network = FAX_NET_USCM_HC
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/upp
name = "\improper UPP Military Fax Machine"
Expand All @@ -625,6 +648,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
department = DEPARTMENT_UPP
network = FAX_NET_UPP_HC
target_department = "UPP Local Operations"
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/clf
name = "\improper Hacked General Purpose Fax Machine"
Expand All @@ -636,6 +660,7 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
department = DEPARTMENT_CLF
network = FAX_NET_CLF_HC
target_department = "CLF Local Operations"
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/twe
name = "\improper TWE Military Fax Machine"
Expand All @@ -647,11 +672,13 @@ GLOBAL_LIST_EMPTY(all_faxcodes)
department = DEPARTMENT_TWE
network = FAX_NET_TWE_HC
target_department = "TWE Local Operations"
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/press/highcom
department = DEPARTMENT_PRESS
network = FAX_NET_PRESS_HC
target_department = "General Public"
can_send_priority = TRUE

/obj/structure/machinery/faxmachine/Initialize(mapload, ...)
. = ..()
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/vending/vending_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@
/obj/item/tool/pen = 10,
/obj/item/tool/pen/blue = 10,
/obj/item/tool/pen/red = 10,
/obj/item/tool/pen/fountain = 3,
/obj/item/tool/pen/multicolor/fountain = 3,
/obj/item/storage/fancy/cigarettes/trading_card = 20,
/obj/item/storage/fancy/trading_card = 20,
/obj/item/toy/trading_card = 50,
Expand Down Expand Up @@ -473,7 +473,7 @@
/obj/item/tool/pen = 2,
/obj/item/tool/pen/blue = 2,
/obj/item/tool/pen/red = 2,
/obj/item/tool/pen/fountain = 30,
/obj/item/tool/pen/multicolor/fountain = 30,
/obj/item/storage/fancy/cigarettes/trading_card = 30,
/obj/item/storage/fancy/trading_card = 20,
/obj/item/toy/trading_card = 5,
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/effects/spawners/random.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
/obj/item/storage/belt/champion,\
/obj/item/tool/soap/deluxe,\
/obj/item/tool/pickaxe/silver,\
/obj/item/tool/pen/invisible,\
/obj/item/tool/pen/white,\
/obj/item/explosive/grenade/smokebomb,\
/obj/item/corncob,\
/obj/item/poster,\
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/gift_wrappaper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/obj/item/storage/belt/champion,
/obj/item/tool/soap/deluxe,
/obj/item/tool/pickaxe/silver,
/obj/item/tool/pen/invisible,
/obj/item/tool/pen/white,
/obj/item/explosive/grenade/smokebomb,
/obj/item/corncob,
/obj/item/poster,
Expand Down
Loading
Loading