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

[MIRROR] Add envelopes crafting and sealing #2784

Merged
merged 4 commits into from
Nov 24, 2024
Merged
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
6 changes: 3 additions & 3 deletions code/game/machinery/nuclear_bomb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -423,19 +423,19 @@ var/global/bomb_set
startswith = list(
/obj/item/disk/nuclear,
/obj/item/pinpointer,
/obj/item/folder/envelope/nuke_instructions,
/obj/item/folder/envelope/preset/nuke_instructions,
/obj/item/modular_computer/laptop/preset/custom_loadout/cheap
)

/obj/item/storage/secure/briefcase/nukedisk/examine(mob/user)
. = ..()
to_chat(user,"On closer inspection, you see \a [GLOB.using_map.company_name] emblem is etched into the front of it.")

/obj/item/folder/envelope/nuke_instructions
/obj/item/folder/envelope/preset/nuke_instructions
name = "instructions envelope"
desc = "A small envelope. The label reads 'open only in event of high emergency'."

/obj/item/folder/envelope/nuke_instructions/Initialize()
/obj/item/folder/envelope/preset/nuke_instructions/Initialize()
. = ..()
var/obj/item/paper/R = new(src)
R.set_content("<center><img src=sollogo.png><br><br>\
Expand Down
1 change: 1 addition & 0 deletions code/modules/materials/material_recipes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
. += create_recipe_list(/datum/stack_recipe/box)
. += new/datum/stack_recipe/cardborg_suit(src)
. += new/datum/stack_recipe/cardborg_helmet(src)
. += new/datum/stack_recipe/envelope(src)
. += new/datum/stack_recipe_list("folders", create_recipe_list(/datum/stack_recipe/folder))

/material/aluminium/generate_recipes(reinforce_material)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/materials/recipes_storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
req_amount = 3
on_floor = 1

/datum/stack_recipe/envelope
title = "envelope"
result_type = /obj/item/folder/envelope

/datum/stack_recipe/folder
title = "folder"
result_type = /obj/item/folder
Expand Down
27 changes: 22 additions & 5 deletions code/modules/paperwork/folders.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,16 @@

/obj/item/folder/envelope
name = "envelope"
desc = "A thick envelope. You can't see what's inside."
desc = "A thick envelope."
icon_state = "envelope0"
var/sealed = FALSE
var/seal_stamp = ""

/obj/item/folder/envelope/preset
icon_state = "envelope_sealed"
var/sealed = 1
sealed = TRUE
//seal_stamp = "\improper SCG Expeditionary Command rubber stamp"
seal_stamp = "\improper NanoTrasen Central Command rubber stamp"

/obj/item/folder/envelope/on_update_icon()
if(sealed)
Expand All @@ -126,15 +133,18 @@

/obj/item/folder/envelope/examine(mob/user)
. = ..()
to_chat(user, "The seal is [sealed ? "intact" : "broken"].")
if (sealed || seal_stamp)
to_chat(user, "It [sealed ? "is" : "was"] sealed with \the [seal_stamp]. The seal is [sealed ? "intact" : "broken"].")
else
to_chat(user, "It is not sealed.")

/obj/item/folder/envelope/proc/sealcheck(user)
var/ripperoni = alert("Are you sure you want to break the seal on \the [src]?", "Confirmation","Yes", "No")
if(ripperoni == "Yes")
visible_message("[user] breaks the seal on \the [src], and opens it.")
sealed = 0
sealed = FALSE
update_icon()
return 1
return TRUE

/obj/item/folder/envelope/attack_self(mob/user as mob)
if(sealed)
Expand All @@ -147,5 +157,12 @@
if(sealed)
sealcheck(user)
return TRUE
else if (istype(item, /obj/item/stamp) && !sealed)
seal_stamp = item.name
visible_message("[user] seals \the [src] with [item].")
sealed = TRUE
playsound(src, 'sound/effects/stamp.ogg', 50, 1)
update_icon()
return TRUE
else
return ..()
18 changes: 9 additions & 9 deletions maps/sierra/items/manuals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@

/obj/item/folder/nt/rd

/obj/item/folder/envelope/blanks
/obj/item/folder/envelope/preset/blanks
desc = "A thick envelope. The NT logo is stamped in the corner, along with \"TOP SECRET - FOR RESEARCH DIRECTOR'S EYES ONLY\"."

/obj/item/folder/envelope/blanks/Initialize()
/obj/item/folder/envelope/preset/blanks/Initialize()
. = ..()
new/obj/item/paper/sierra/blanks(src)
new/obj/item/paper/sierra/nuke(src)
Expand All @@ -142,10 +142,10 @@
<i>This paper has been stamped with the stamp of Central Command.</i>
"}

/obj/item/folder/envelope/captain
/obj/item/folder/envelope/preset/captain
desc = "A thick envelope. The NT logo is stamped in the corner, along with \"TOP SECRET - FOR CAPTAIN'S EYES ONLY\"."

/obj/item/folder/envelope/captain/Initialize()
/obj/item/folder/envelope/preset/captain/Initialize()
. = ..()
var/memo = {"
<tt><center><b><font color='red'>СЕКРЕТНО<br>КОДОВОЕ СЛОВО: АЛЬФА</font></b>
Expand Down Expand Up @@ -185,10 +185,10 @@
new/obj/item/paper/sierra/blanks(src)
new/obj/item/paper/sierra/umbra(src)

/obj/item/folder/envelope/rep
/obj/item/folder/envelope/preset/rep
desc = "A thick envelope. The NT logo is stamped in the corner, along with \"TOP SECRET - FOR INTERNAL AFFAIRS PERSONNEL ONLY\"."

/obj/item/folder/envelope/rep/Initialize()
/obj/item/folder/envelope/preset/rep/Initialize()
. = ..()
new/obj/item/paper/sierra/nuke(src)
new/obj/item/paper/sierra/blanks(src)
Expand Down Expand Up @@ -228,14 +228,14 @@
startswith = list(
/obj/item/disk/nuclear,
/obj/item/pinpointer,
/obj/item/folder/envelope/nuke,
/obj/item/folder/envelope/preset/nuke,
/obj/item/modular_computer/laptop/preset/custom_loadout/cheap
)

/obj/item/folder/envelope/nuke
/obj/item/folder/envelope/preset/nuke
desc = "A thick envelope. The NT logo is stamped in the corner, along with \"TOP SECRET - DELTA PROTOCOLS\"."

/obj/item/folder/envelope/nuke/Initialize()
/obj/item/folder/envelope/preset/nuke/Initialize()
. = ..()
new/obj/item/paper/sierra/nuke(src)

Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/structures/closets/command.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
/obj/item/device/flash,
/obj/item/device/megaphone,
/obj/item/material/clipboard,
/obj/item/folder/envelope/nuke,
/obj/item/folder/envelope/preset/nuke,
/obj/item/storage/box/PDAs,
/obj/item/storage/box/ids,
/obj/item/storage/belt/holster/general,
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/structures/closets/engineering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/obj/item/clothing/glasses/meson,
/obj/item/clothing/glasses/welding/superior,
/obj/item/material/clipboard,
/obj/item/folder/envelope/nuke,
/obj/item/folder/envelope/preset/nuke,
/obj/item/device/flashlight/upgraded,
/obj/item/storage/box/armband/engine,
/obj/item/device/multitool/multimeter,
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/structures/closets/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/obj/item/device/megaphone,
/obj/item/reagent_containers/hypospray/vial,
/obj/item/device/flashlight/pen,
/obj/item/folder/envelope/nuke,
/obj/item/folder/envelope/preset/nuke,
/obj/item/storage/belt/medical,
/obj/item/device/remote_device/chief_medical_officer,
/obj/item/device/taperecorder,
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/structures/closets/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/obj/item/gun/energy/gun/small/secure,
/obj/item/storage/secure/briefcase,
/obj/item/clothing/shoes/laceup,
/obj/item/folder/envelope/rep,
/obj/item/folder/envelope/preset/rep,
/obj/item/storage/belt/holster/general,
/obj/item/clothing/under/rank/internalaffairs,
/obj/item/clothing/suit/storage/toggle/suit/black,
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/structures/closets/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/obj/item/storage/belt/general,
/obj/item/device/remote_device/research_director,
/obj/item/folder,
/obj/item/folder/envelope/blanks,
/obj/item/folder/envelope/preset/blanks,
/obj/item/clothing/suit/armor/pcarrier/light,
/obj/item/device/taperecorder,
/obj/item/device/tape/random = 3,
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/structures/closets/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/obj/item/ammo_magazine/pistol/hos/extend,
/obj/item/melee/telebaton,
/obj/item/device/taperecorder,
/obj/item/folder/envelope/nuke,
/obj/item/folder/envelope/preset/nuke,
/obj/item/reagent_containers/spray/pepper,
/obj/item/clothing/accessory/storage/black_vest,
/obj/item/device/remote_device/head_of_security,
Expand Down
2 changes: 1 addition & 1 deletion maps/sierra/z1-z5_sierra.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -138836,7 +138836,7 @@
/area/exploration_shuttle/airlock)
"uwr" = (
/obj/structure/table/woodentable_reinforced/walnut,
/obj/item/folder/envelope/captain,
/obj/item/folder/envelope/preset/captain,
/obj/floor_decal/spline/fancy/wood,
/obj/machinery/light{
dir = 4
Expand Down
11 changes: 6 additions & 5 deletions maps/torch/items/manuals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@

/obj/item/folder/nt/rd

/obj/item/folder/envelope/captain
/obj/item/folder/envelope/preset/captain
desc = "A thick envelope. The SCG crest is stamped in the corner, along with 'TOP SECRET - TORCH UMBRA'."

/obj/item/folder/envelope/captain/Initialize()
/obj/item/folder/envelope/preset/captain/Initialize()
..()
return INITIALIZE_HINT_LATELOAD

/obj/item/folder/envelope/captain/LateInitialize(mapload)
/obj/item/folder/envelope/preset/captain/LateInitialize(mapload)
var/obj/overmap/visitable/torch = map_sectors["[z]"]
var/memo = {"
<tt><center><b>[SPAN_COLOR("red", "SECRET - CODE WORDS: TORCH")]</b>
Expand Down Expand Up @@ -110,10 +110,11 @@
new/obj/item/paper(src, memo, "Standing Orders")
new/obj/item/paper/umbra(src)

/obj/item/folder/envelope/rep
/obj/item/folder/envelope/preset/rep
desc = "A thick envelope. The SCG crest is stamped in the corner, along with 'TOP SECRET - TORCH UMBRA'."
seal_stamp = "General Secretary rubber stamp"

/obj/item/folder/envelope/rep/Initialize()
/obj/item/folder/envelope/preset/rep/Initialize()
. = ..()
new/obj/item/paper/umbra(src)

Expand Down
4 changes: 2 additions & 2 deletions maps/torch/torch2_deck4.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -12683,7 +12683,7 @@
/area/crew_quarters/lounge)
"Qu" = (
/obj/structure/table/standard,
/obj/item/folder/envelope/dcorder,
/obj/item/folder/envelope/preset/dcorder,
/turf/simulated/floor/tiled,
/area/quartermaster/deckchief)
"Qy" = (
Expand Down Expand Up @@ -12744,7 +12744,7 @@
/obj/random_multi/single_item/memo_research,
/obj/random_multi/single_item/memo_exploration,
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
/obj/item/folder/envelope/exploorder,
/obj/item/folder/envelope/preset/exploorder,
/turf/simulated/floor/tiled,
/area/command/pathfinder)
"QI" = (
Expand Down
2 changes: 1 addition & 1 deletion maps/torch/torch3_deck3.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -3912,7 +3912,7 @@
pixel_x = 2;
pixel_y = 6
},
/obj/item/folder/envelope/csorder,
/obj/item/folder/envelope/preset/csorder,
/turf/simulated/floor/carpet/green,
/area/crew_quarters/chief_steward)
"iO" = (
Expand Down
26 changes: 13 additions & 13 deletions maps/torch/torch6_bridge.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1758,8 +1758,8 @@
/obj/structure/table/woodentable_reinforced/walnut,
/obj/random_multi/single_item/memo_command,
/obj/random_multi/single_item/memo_supply,
/obj/item/folder/envelope/dcorder,
/obj/item/folder/envelope/csorder,
/obj/item/folder/envelope/preset/dcorder,
/obj/item/folder/envelope/preset/csorder,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/office/xo)
"de" = (
Expand Down Expand Up @@ -4197,7 +4197,7 @@
dir = 6
},
/obj/random_multi/single_item/memo_engineering,
/obj/item/folder/envelope/ceorder,
/obj/item/folder/envelope/preset/ceorder,
/turf/simulated/floor/tiled,
/area/crew_quarters/heads/office/ce)
"iU" = (
Expand Down Expand Up @@ -4899,7 +4899,7 @@
/obj/random_multi/single_item/memo_command,
/obj/random_multi/single_item/memo_supply,
/obj/random_multi/single_item/memo_medical,
/obj/item/folder/envelope/ndaorder,
/obj/item/folder/envelope/preset/ndaorder,
/obj/item/paper/immediateorder,
/turf/simulated/floor/tiled/dark,
/area/bridge)
Expand Down Expand Up @@ -5392,7 +5392,7 @@
/area/hallway/primary/bridge/aft)
"mT" = (
/obj/structure/table/woodentable/walnut,
/obj/item/folder/envelope/cmdorder,
/obj/item/folder/envelope/preset/cmdorder,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/cobed)
"mV" = (
Expand Down Expand Up @@ -7711,7 +7711,7 @@
/obj/structure/noticeboard{
pixel_x = 32
},
/obj/item/folder/envelope/cmdorder,
/obj/item/folder/envelope/preset/cmdorder,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/office/sgr)
"tC" = (
Expand Down Expand Up @@ -7970,7 +7970,7 @@
/obj/item/storage/secure/safe{
pixel_x = 36
},
/obj/item/folder/envelope/rep,
/obj/item/folder/envelope/preset/rep,
/obj/item/documents/scgr,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/office/sgr)
Expand Down Expand Up @@ -8928,7 +8928,7 @@
},
/obj/item/stamp/cos,
/obj/random_multi/single_item/memo_security,
/obj/item/folder/envelope/cosorder,
/obj/item/folder/envelope/preset/cosorder,
/turf/simulated/floor/tiled/dark/monotile,
/area/crew_quarters/heads/office/cos)
"wD" = (
Expand Down Expand Up @@ -11116,7 +11116,7 @@
d2 = 4;
icon_state = "1-4"
},
/obj/item/folder/envelope/lauletter1,
/obj/item/folder/envelope/preset/lauletter1,
/turf/simulated/floor/carpet/blue,
/area/crew_quarters/heads/office/co)
"Fn" = (
Expand Down Expand Up @@ -12328,7 +12328,7 @@
/obj/floor_decal/corner/paleblue/diagonal,
/obj/structure/table/glass,
/obj/random_multi/single_item/memo_medical,
/obj/item/folder/envelope/cmoorder,
/obj/item/folder/envelope/preset/cmoorder,
/turf/simulated/floor/tiled/white,
/area/crew_quarters/heads/office/cmo)
"Kh" = (
Expand Down Expand Up @@ -12634,7 +12634,7 @@
/obj/floor_decal/corner/research{
dir = 5
},
/obj/item/folder/envelope/exploorder,
/obj/item/folder/envelope/preset/exploorder,
/turf/simulated/floor/tiled,
/area/crew_quarters/heads/office/rd)
"Lw" = (
Expand Down Expand Up @@ -12764,7 +12764,7 @@
/area/aquila/airlock)
"Mf" = (
/obj/structure/table/woodentable_reinforced/walnut/maple,
/obj/item/folder/envelope/captain,
/obj/item/folder/envelope/preset/captain,
/obj/random_multi/single_item/runtime,
/turf/simulated/floor/wood/walnut,
/area/crew_quarters/heads/office/co)
Expand Down Expand Up @@ -13289,7 +13289,7 @@
pixel_y = -4
},
/obj/item/hand_labeler,
/obj/item/folder/envelope/clorder,
/obj/item/folder/envelope/preset/clorder,
/turf/simulated/floor/carpet/green,
/area/crew_quarters/heads/office/cl/backroom)
"Ox" = (
Expand Down
4 changes: 2 additions & 2 deletions packs/event_2022jul30/documents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"}


/obj/item/folder/envelope/lauletter1
/obj/item/folder/envelope/preset/lauletter1
desc = "A thick envelope. The Expeditionary Corps crest is stamped in the corner, along with 'DO NOT DISSEMINATE.'"


/obj/item/folder/envelope/lauletter1/Initialize()
/obj/item/folder/envelope/preset/lauletter1/Initialize()
. = ..()
new /obj/item/paper/lauletter1 (src)

Expand Down
Loading