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

PATCH 0 - Code #2

Merged
merged 18 commits into from
Feb 29, 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: 6 additions & 0 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -555,3 +555,9 @@ block( \
#define PERF_TOGGLE_SHUTTLES (1<<3)
/// Disables loading Techwebs and additional Z-Levels
#define PERF_TOGGLE_TECHWEBS (1<<4)

// Searchable items search times

#define SEARCH_TIME_SHORT 50
#define SEARCH_TIME_NORMAL 150
#define SEARCH_TIME_LONG 250
79 changes: 79 additions & 0 deletions code/game/objects/items/sectorpatrol/cargo_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,69 @@
WEAR_R_HAND = 'icons/mob/humans/onmob/sp_cargo_rhand.dmi'
)

/obj/item/cargo/efolder/folder
name = "electronic folder"
desc = "A black plastic device that resembles a paper folder but cannot be opened or used to store any paper. Has a slot on the label part."
desc_lore = "Electronic folders are UAAC-TIS devices that are considered safe to carry by non-agency personnel and are used to store and transport operation related information between TIS mainframes and UACM ships. These devices saw initial adoption during USCMC times but were pushed as a standard when the UACM was established. Once recorded, a folder contains both a spoken debriefing and written information dumped from the ships AI to corroborate the report. These devices come paired with unique PID keys that need to be slotted into the device before it can be accessed by whatever method is used to read from it. Some TIS devices can read from these folders without making direct contact, but most require it to be directly plugged in and decoded."
icon = 'icons/obj/items/sp_cargo.dmi'
icon_state = "efolder"
flags_item = NOBLUDGEON
var/efolder_folder_id = "default"

/obj/item/cargo/efolder/folder/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/cargo/efolder/pid))
var/obj/item/cargo/efolder/pid/pid = W
if(pid.efolder_pid_id == efolder_folder_id)
to_chat(usr, narrate_body("You slot the pid into the folder. The diodes flash once."))
var/obj/item/cargo/efolder/folder_pid/folder = new(get_turf(usr))
folder.efolder_folder_id = efolder_folder_id
if(item_serial) folder.item_serial = item_serial
qdel(pid)
usr.put_in_hands(folder)
qdel(src)
return
if(pid.efolder_pid_id != efolder_folder_id)
to_chat(usr, narrate_body("You slot the pid into the folder. The diodes flash three times and the pid is ejected."))
return
to_chat(user, narrate_body("There does not seem to be a way of combining those at the moment."))
return


/obj/item/cargo/efolder/pid
name = "pid device"
desc = "A small, thin, black device resembling a pen, with a slot on one end and several inactive diodes along one side."
desc_lore = "This device, technically called an electronic folder PID, carries an encoded unique encryption and decryption signature paired with its unique electronic folder. Upon recording, the device is detached from the folder and typically transported via separate means than the folder itself, to be decoded at whatever destination the folder and PID is intended for. When matched with its folder, the PID first matches its encryption signature with that of the folder, and if it matches, uses its encoded decryption key to pass the decoded contents to whatever means are used to access it."
icon = 'icons/obj/items/sp_cargo.dmi'
icon_state = "pid"
flags_item = NOBLUDGEON
var/efolder_pid_id = "default"

/obj/item/cargo/efolder/folder_pid
name = "unlocked electronic folder"
desc = "A black plastic device that resembles a paper folder but cannot be opened or used to store any paper. A small device is plugged into a slot on the laber label part."
desc_lore = "Electronic folders are UAAC-TIS devices that are considered safe to carry by non-agency personnel and are used to store and transport operation related information between TIS mainframes and UACM ships. These devices saw initial adoption during USCMC times but were pushed as a standard when the UACM was established. Once recorded, a folder contains both a spoken debriefing and written information dumped from the ships AI to corroborate the report. These devices come paired with unique PID keys that need to be slotted into the device before it can be accessed by whatever method is used to read from it. Some TIS devices can read from these folders without making direct contact, but most require it to be directly plugged in and decoded."
icon = 'icons/obj/items/sp_cargo.dmi'
icon_state = "efolder_pid"
flags_item = NOBLUDGEON
var/efolder_folder_id = "default"

/obj/item/cargo/efolder/folder_pid/attack_self(mob/user)
..()
if(usr.a_intent == INTENT_GRAB)
to_chat(usr, narrate_body("You slide the pid key out of the folder."))
var/obj/item/cargo/efolder/folder/folder = new(get_turf(usr))
var/obj/item/cargo/efolder/pid/pid = new(get_turf(usr))
pid.efolder_pid_id = efolder_folder_id
folder.efolder_folder_id = efolder_folder_id
if(item_serial)
pid.item_serial = item_serial
folder.item_serial = item_serial
usr.drop_held_item(src)
usr.put_in_hands(folder)
usr.put_in_hands(pid)
qdel(src)
return

/obj/structure/cargo/crate/
name = "generic cargo crate"
var/cargo_manifest
Expand Down Expand Up @@ -49,3 +112,19 @@
if(!isxeno(user) && (get_dist(user, src) < item_serial_distance || isobserver(user)))
to_chat(user, narrate_body("The serial number is:"))
to_chat(user, narrate_serial_block(narrate_serial("[item_serial]")))

/obj/item/cargo/book
name = "book"
desc = "Sheets of paper with text and images bound together with a soft cover material."
desc_lore = "The printed word industry was quite literally saved by the sudden explosion of intergalactic travel. For the longest time, the written word remained the most trusted way to transfer information, news, and entertainment among the colonies. The ascent of the Civ, Mil and Corp Nets following the Colony Wars meant that most colonists with a permanent home got all these directly from Earth via electronic devices. Physical books, however, are still collected, used, and cherished by Spacers, who often find themselves out of the range of Liquid Data uplinks and can't sync with any of the general networks. Most colonies maintain a small 'printing' facility for visiting spacers, often offering access to a shared galaxy spanning repository from which any book can be accessed and printed on-site for a fee. Most books found on spaceships are likely to have been created this way. Using the book while its in your active hand will let you scan it for information, if there is any to gain."
icon_state = "book"
flags_item = NOBLUDGEON
var/book_searched = 0

/obj/item/cargo/book_handwritten
name = "bound notebook"
desc = "Handwritten notes printed on sheets of paper, bound together with a soft cover, much like a book."
desc_lore = "Notebook scanning is a relatively new service offered in the Neroid Sector for the past decade or so and pioneered by a small group of colonists calling themselves 'Bookworms'. The Bookworms formed a formal Corporation under the Corporate Standard and are the exclusive patent holders and distributors of scanner technology that seemingly seamlessly and without error scans even the most illegible of handwriting, parses and edits them into a standardized colony print format, uploads them to a shared, global, Liquid Data based repository and prints it out in the same way colony books are created, preserving the knowledge, musings, vulgar poetry and whatever else bored spacers write and doodle into their personal notebooks. Using the notebook while its in your active hand will let you scan it for information, if there is any to gain."
icon_state = "book_rough"
flags_item = NOBLUDGEON
var/book_searched = 0
8 changes: 4 additions & 4 deletions code/game/objects/serial_numbers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

//Going to take this chance to sneak in emoting and speaking procs :P

/obj/item/proc/speakas(str, delay)
/obj/item/proc/speakas(str, delay) //Talk as item. Delay in BYOND ticks (about 1/10 of a second per tick) If not provided, delay calculated automatically depending in message length.
if (!str) return
var/list/heard = get_mobs_in_view(GLOB.world_view_size, src)
src.langchat_speech(str, heard, GLOB.all_languages, skip_language_check = TRUE)
Expand All @@ -28,7 +28,7 @@
return


/obj/item/proc/emoteas(str, delay)
/obj/item/proc/emoteas(str, delay) //Emote as item. Delay in BYOND ticks (about 1/10 of a second per tick) If not provided, delay calculated automatically depending in message length.
if (!str) return
var/list/heard = get_mobs_in_view(GLOB.world_view_size, src)
src.langchat_speech(str, heard, GLOB.all_languages, skip_language_check = TRUE, animation_style = LANGCHAT_FAST_POP, additional_styles = list("langchat_small", "emote"))
Expand Down Expand Up @@ -57,7 +57,7 @@

//As above

/obj/structure/proc/talkas(str, delay)
/obj/structure/proc/talkas(str, delay) //Talk as structure. Delay in BYOND ticks (about 1/10 of a second per tick) If not provided, delay calculated automatically depending in message length.
if (!str) return
var/list/heard = get_mobs_in_view(GLOB.world_view_size, src)
src.langchat_speech(str, heard, GLOB.all_languages, skip_language_check = TRUE)
Expand All @@ -71,7 +71,7 @@
sleep(talkdelay)
return

/obj/structure/proc/emoteas(str, delay)
/obj/structure/proc/emoteas(str, delay) //Emote as structure. Delay in BYOND ticks (about 1/10 of a second per tick) If not provided, delay calculated automatically depending in message length.
if (!str) return
var/list/heard = get_mobs_in_view(GLOB.world_view_size, src)
src.langchat_speech(str, heard, GLOB.all_languages, skip_language_check = TRUE, animation_style = LANGCHAT_FAST_POP, additional_styles = list("langchat_small", "emote"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,28 @@
open_doors()
else
to_chat(user, narrate_body("Puzzlebox state below 5."))
if(puzzlebox_id == "crypt_airlock")
if(puzzlebox_global_status != 8)
to_chat(usr, narrate_body("Error: Global status not 8. It's not time."))
return
var/puzzlebox_admin_option = tgui_input_list(usr, "Select a function", "Admin Terminal", list("Annouce Crypt Security Scan", "Adjust Crypt Secuirty Scan", "Begin final stage"), 0)
if (!puzzlebox_admin_option) return
if (puzzlebox_admin_option == "Annouce Crypt Security Scan")
var/puzzlebox_admin_option_number = tgui_input_number(usr, "How many PCs?", "PC Input", timeout = 0)
if(!puzzlebox_admin_option_number) return
to_chat(world, narrate_head("The loudspeaker system on the dorm level and inside the crypt comes alive and announces with a male, robotic voice:"))
to_chat(world, narrate_body("Attention. Class S Security Scan Triggered. Location: Crypt Entrance Chamber."))
to_chat(world, narrate_body("To resolve: [puzzlebox_admin_option_number] RFID confirmed personnel matching condition 'ARBITER' must report for stationary scan in scan location."))
to_chat(world, narrate_body("Awaiting appropriate personnel quota."))
return
if (puzzlebox_admin_option == "Adjust Crypt Secuirty Scan")
var/puzzlebox_admin_option_number = tgui_input_number(usr, "How many PCs?", "PC Input", timeout = 0)
to_chat(world, narrate_head("The loudspeaker system on the dorm level and inside the crypt comes alive and announces with a male, robotic voice:"))
to_chat(world, narrate_body("Attention: Crypt Security Scan Adjustment Detected. Current quota: [puzzlebox_admin_option_number]"))
to_chat(world, narrate_body("Awaiting appropriate personnel quota."))
return
if (puzzlebox_admin_option == "Begin final stage")
puzzlebox_global_status = 9
for (var/obj/structure/eventterminal/puzzle04/final_log/T in world)
INVOKE_ASYNC(T, TYPE_PROC_REF(/obj/structure/eventterminal/puzzle04/final_log, play_final_log))
return
16 changes: 8 additions & 8 deletions code/game/objects/structures/sectorpatrol/endpoint/001.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@
to_chat(usr, narrate_body("The display on the terminal flickers for a moment, then starts printing:"))
terminal_speak("Maintenance mode instructions received:")
terminal_speak("SHUTTLE L-533 FRONT THRUSTER VECTOR PATTERNS")
terminal_speak("20594F55-20415245")
terminal_speak("46494E41-4C4C5920")
terminal_speak("48455245-20202020")
terminal_speak("A88629FA-CC6743A9")
terminal_speak("1A0310FF-00F813FB")
terminal_speak("C4BF53D4-B5A8A6C1")
terminal_speak("55577C4C-595524AA")
terminal_speak("4C68B88F-BA4A4DA2")
terminal_speak("851D1C5F-C06FEFD5")
terminal_speak("6EA133F1-54455253")
terminal_speak("FFC6D480-FEA21B58")
terminal_speak("496E2061-7A757265")
terminal_speak("50797468-69612073")
terminal_speak("6C656570-7320616E")
terminal_speak("64206472-65616D73")
terminal_speak("B5AC9EB0-F47A4ABE")
return
Loading
Loading