Skip to content

Commit

Permalink
Crafting light switches, request consoles, telescreens, and ticket ma…
Browse files Browse the repository at this point in the history
…chines (tgstation#72859)

## About The Pull Request
Breaking down tgstation#72371 because it's... unreasonably large.
So this PR adds recipes for light switches, request consoles,
telescreens, and ticket machines. Ticket machine frame by Kryson.

You can't print all of the telescreens, like the head of staff ones, but
the general department ones can be printed in their respective
departments.

## Why It's Good For The Game
Wallening compliance, and more of me on my shit breaking down long
files.

## Changelog
:cl: Tattle, Kryson
qol: light switches, request consoles, telescreens, and ticket machines
can now all be printed from lathes
/:cl:

Co-authored-by: tattle <article.disaster@gmail.com>
  • Loading branch information
dragomagol and tattle committed Jan 23, 2023
1 parent 4c1b8a5 commit d74ae43
Show file tree
Hide file tree
Showing 12 changed files with 490 additions and 186 deletions.
10 changes: 5 additions & 5 deletions code/__HELPERS/global_lists.dm
Expand Up @@ -215,7 +215,6 @@ GLOBAL_LIST_INIT(WALLITEMS_INTERIOR, typecacheof(list(
/obj/item/storage/secure/safe,
/obj/machinery/airalarm,
/obj/machinery/bluespace_vendor,
/obj/machinery/newscaster,
/obj/machinery/button,
/obj/machinery/computer/security/telescreen,
/obj/machinery/computer/security/telescreen/entertainment,
Expand All @@ -237,16 +236,17 @@ GLOBAL_LIST_INIT(WALLITEMS_INTERIOR, typecacheof(list(
/obj/structure/reagent_dispensers/wall,
/obj/structure/sign,
/obj/structure/sign/picture_frame,
/obj/structure/sign/poster/random,
/obj/structure/sign/poster/contraband/random,
/obj/structure/sign/poster/official/random,
)))
/obj/structure/sign/poster/random,
/obj/structure/urinal,
)))

// Wall mounted machinery which are visually coming out of the wall.
// These do not conflict with machinery which are visually placed on the wall.
GLOBAL_LIST_INIT(WALLITEMS_EXTERIOR, typecacheof(list(
/obj/machinery/camera,
/obj/machinery/light,
/obj/structure/camera_assembly,
/obj/structure/light_construct
)))
/obj/structure/light_construct,
)))
180 changes: 0 additions & 180 deletions code/game/machinery/computer/camera.dm
Expand Up @@ -241,184 +241,4 @@
network = list("mine", "auxbase", "vault")
circuit = null

// TELESCREENS

/obj/machinery/computer/security/telescreen
name = "\improper Telescreen"
desc = "Used for watching an empty arena."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "telescreen"
icon_keyboard = null
layer = SIGN_LAYER
network = list("thunder")
density = FALSE
circuit = null
light_power = 0

/obj/machinery/computer/security/telescreen/update_icon_state()
icon_state = initial(icon_state)
if(machine_stat & BROKEN)
icon_state += "b"
return ..()

/obj/machinery/computer/security/telescreen/entertainment
name = "entertainment monitor"
desc = "Damn, they better have the /tg/ channel on these things."
icon = 'icons/obj/status_display.dmi'
icon_state = "entertainment_blank"
network = list()
density = FALSE
circuit = null
interaction_flags_atom = INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_NO_FINGERPRINT_INTERACT | INTERACT_ATOM_NO_FINGERPRINT_ATTACK_HAND | INTERACT_MACHINE_REQUIRES_SIGHT
var/icon_state_off = "entertainment_blank"
var/icon_state_on = "entertainment"

MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/computer/security/telescreen/entertainment, 32)

/obj/machinery/computer/security/telescreen/entertainment/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_CLICK, PROC_REF(BigClick))

// Bypass clickchain to allow humans to use the telescreen from a distance
/obj/machinery/computer/security/telescreen/entertainment/proc/BigClick()
SIGNAL_HANDLER

if(!network.len)
balloon_alert(usr, "there's nothing on TV!")
return

INVOKE_ASYNC(src, TYPE_PROC_REF(/atom, interact), usr)

///Sets the monitor's icon to the selected state, and says an announcement
/obj/machinery/computer/security/telescreen/entertainment/proc/notify(on, announcement)
if(on && icon_state == icon_state_off)
icon_state = icon_state_on
else
icon_state = icon_state_off
if(announcement)
say(announcement)

/// Adds a camera network ID to the entertainment monitor, and turns off the monitor if network list is empty
/obj/machinery/computer/security/telescreen/entertainment/proc/update_shows(is_show_active, tv_show_id, announcement)
if(!network)
return

if(is_show_active)
network |= tv_show_id
else
network -= tv_show_id

notify(network.len, announcement)

/// A button that adds a camera network to the entertainment monitors
/obj/machinery/button/showtime
name = "thunderdome showtime button"
desc = "Use this button to allow entertainment monitors to broadcast the big game."
device_type = /obj/item/assembly/control/showtime
req_access = list()
id = "showtime_1"

/obj/machinery/button/showtime/Initialize(mapload)
. = ..()
if(device)
var/obj/item/assembly/control/showtime/ours = device
ours.id = id

/obj/item/assembly/control/showtime
name = "showtime controller"
desc = "A remote controller for entertainment monitors."
/// Stores if the show associated with this controller is active or not
var/is_show_active = FALSE
/// The camera network id this controller toggles
var/tv_network_id = "thunder"
/// The display TV show name
var/tv_show_name = "Thunderdome"
/// List of phrases the entertainment console may say when the show begins
var/list/tv_starters = list("Feats of bravery live now at the thunderdome!",
"Two enter, one leaves! Tune in now!",
"Violence like you've never seen it before!",
"Spears! Camera! Action! LIVE NOW!")
/// List of phrases the entertainment console may say when the show ends
var/list/tv_enders = list("Thank you for tuning in to the slaughter!",
"What a show! And we guarantee next one will be bigger!",
"Celebrate the results with Thundermerch!",
"This show was brought to you by Nanotrasen.")

/obj/item/assembly/control/showtime/activate()
is_show_active = !is_show_active
say("The [tv_show_name] show has [is_show_active ? "begun" : "ended"]")
var/announcement = is_show_active ? pick(tv_starters) : pick(tv_enders)
for(var/obj/machinery/computer/security/telescreen/entertainment/tv in GLOB.machines)
tv.update_shows(is_show_active, tv_network_id, announcement)

/obj/machinery/computer/security/telescreen/rd
name = "\improper Research Director's telescreen"
desc = "Used for watching the AI and the RD's goons from the safety of his office."
network = list("rd", "aicore", "aiupload", "minisat", "xeno", "test", "toxins")

/obj/machinery/computer/security/telescreen/research
name = "research telescreen"
desc = "A telescreen with access to the research division's camera network."
network = list("rd")

/obj/machinery/computer/security/telescreen/ce
name = "\improper Chief Engineer's telescreen"
desc = "Used for watching the engine, telecommunications and the minisat."
network = list("engine", "singularity", "tcomms", "minisat")

/obj/machinery/computer/security/telescreen/cmo
name = "\improper Chief Medical Officer's telescreen"
desc = "A telescreen with access to the medbay's camera network."
network = list("medbay")

/obj/machinery/computer/security/telescreen/vault
name = "vault monitor"
desc = "A telescreen that connects to the vault's camera network."
network = list("vault")

/obj/machinery/computer/security/telescreen/ordnance
name = "bomb test site monitor"
desc = "A telescreen that connects to the bomb test site's camera."
network = list("ordnance")

/obj/machinery/computer/security/telescreen/engine
name = "engine monitor"
desc = "A telescreen that connects to the engine's camera network."
network = list("engine")

/obj/machinery/computer/security/telescreen/turbine
name = "turbine monitor"
desc = "A telescreen that connects to the turbine's camera."
network = list("turbine")

/obj/machinery/computer/security/telescreen/interrogation
name = "interrogation room monitor"
desc = "A telescreen that connects to the interrogation room's camera."
network = list("interrogation")

/obj/machinery/computer/security/telescreen/prison
name = "prison monitor"
desc = "A telescreen that connects to the permabrig's camera network."
network = list("prison")

/obj/machinery/computer/security/telescreen/auxbase
name = "auxiliary base monitor"
desc = "A telescreen that connects to the auxiliary base's camera."
network = list("auxbase")

/obj/machinery/computer/security/telescreen/minisat
name = "minisat monitor"
desc = "A telescreen that connects to the minisat's camera network."
network = list("minisat")

/obj/machinery/computer/security/telescreen/aiupload
name = "\improper AI upload monitor"
desc = "A telescreen that connects to the AI upload's camera network."
network = list("aiupload")

/obj/machinery/computer/security/telescreen/bar
name = "bar monitor"
desc = "A telescreen that connects to the bar's camera network. Perfect for checking on customers."
network = list("bar")

#undef DEFAULT_MAP_SIZE

0 comments on commit d74ae43

Please sign in to comment.