mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
Makes integrated circuit nodes more colorful (#89360)
## About The Pull Request Makes it so nodes in an integrated circuit are colored depending on their category in the component menu. Before:  After:  All categories (BCI has been changed to solid black since this for contrast purposes)  If I was some sort of tgui magician I'd try to implement a way to add comment fields, but since I'm nowhere near that, I figured this was the least I could do. ## Why It's Good For The Game This makes it far easier to read integrated circuits and remember what they do. While there's still inherently some amount of confusion due to the nature of how node-based programming visually works, hopefully having it so nodes aren't all the same color helps a bit. ## Changelog 🆑 Wallem qol: Integrated Circuit nodes are now colored depending on their type. /🆑
This commit is contained in:
@@ -33,11 +33,19 @@
|
||||
|
||||
var/list/options_map
|
||||
|
||||
/obj/item/circuit_component/soundemitter/Initialize(mapload)
|
||||
if(CONFIG_GET(flag/disallow_circuit_sounds))
|
||||
update_ui_alerts(new_flag=CIRCUIT_FLAG_DISABLED)
|
||||
. = ..()
|
||||
|
||||
/obj/item/circuit_component/soundemitter/get_ui_notices()
|
||||
. = ..()
|
||||
. += create_ui_notice("Sound Cooldown: [DisplayTimeText(sound_cooldown)]", "orange", "stopwatch")
|
||||
if(CONFIG_GET(flag/disallow_circuit_sounds))
|
||||
. += create_ui_notice("Non-functional", "red", "exclamation")
|
||||
update_ui_alerts(new_flag=CIRCUIT_FLAG_DISABLED)
|
||||
else
|
||||
update_ui_alerts(remove_flag=CIRCUIT_FLAG_DISABLED)
|
||||
|
||||
|
||||
/obj/item/circuit_component/soundemitter/populate_ports()
|
||||
@@ -79,10 +87,11 @@
|
||||
|
||||
/obj/item/circuit_component/soundemitter/input_received(datum/port/input/port)
|
||||
if(CONFIG_GET(flag/disallow_circuit_sounds))
|
||||
ui_color = "red"
|
||||
// Without constantly checking the config 24/7 or sending a signal to every circuit, best we can do to update existing emitters is this.
|
||||
update_ui_alerts(new_flag=CIRCUIT_FLAG_DISABLED)
|
||||
return
|
||||
else
|
||||
ui_color = initial(ui_color)
|
||||
update_ui_alerts(remove_flag=CIRCUIT_FLAG_DISABLED)
|
||||
|
||||
if(!parent.shell)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user