Skip to content

Commit

Permalink
[MIRROR] Add envelopes crafting and sealing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbotkin authored and SierraHelper committed Nov 1, 2024
1 parent 15848fe commit b079273
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 49 deletions.
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
26 changes: 21 additions & 5 deletions code/modules/paperwork/folders.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,15 @@

/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"

/obj/item/folder/envelope/on_update_icon()
if(sealed)
Expand All @@ -126,15 +132,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 +156,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 ..()
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

0 comments on commit b079273

Please sign in to comment.