mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
Adds the bare minimum admin components and allows admins to define list literals. (#60240)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com> Co-authored-by: carshalash <carshalash@gmail.com> Co-authored-by: tgstation-server <tgstation-server@tgstation13.org>
This commit is contained in:
co-authored by
Watermelon914
carshalash
tgstation-server
parent
cb4166c18c
commit
96f1c2abae
@@ -27,13 +27,17 @@
|
||||
|
||||
/// Called when attack_hand is called on the shell.
|
||||
var/datum/port/output/signal
|
||||
/// The user who used the bot
|
||||
var/datum/port/output/entity
|
||||
|
||||
/obj/item/circuit_component/bot/Initialize()
|
||||
. = ..()
|
||||
entity = add_output_port("User", PORT_TYPE_ATOM)
|
||||
signal = add_output_port("Signal", PORT_TYPE_SIGNAL)
|
||||
|
||||
/obj/item/circuit_component/bot/Destroy()
|
||||
signal = null
|
||||
entity = null
|
||||
return ..()
|
||||
|
||||
/obj/item/circuit_component/bot/register_shell(atom/movable/shell)
|
||||
@@ -46,4 +50,6 @@
|
||||
SIGNAL_HANDLER
|
||||
source.balloon_alert(user, "pushed button")
|
||||
playsound(source, get_sfx("terminal_type"), 25, FALSE)
|
||||
entity.set_output(user)
|
||||
signal.set_output(COMPONENT_SIGNAL)
|
||||
|
||||
|
||||
@@ -26,9 +26,12 @@
|
||||
|
||||
/// Called when attack_self is called on the shell.
|
||||
var/datum/port/output/signal
|
||||
/// The user who used the bot
|
||||
var/datum/port/output/entity
|
||||
|
||||
/obj/item/circuit_component/compact_remote/Initialize()
|
||||
. = ..()
|
||||
entity = add_output_port("User", PORT_TYPE_ATOM)
|
||||
signal = add_output_port("Signal", PORT_TYPE_SIGNAL)
|
||||
|
||||
/obj/item/circuit_component/compact_remote/register_shell(atom/movable/shell)
|
||||
@@ -44,4 +47,5 @@
|
||||
SIGNAL_HANDLER
|
||||
source.balloon_alert(user, "clicked primary button")
|
||||
playsound(source, get_sfx("terminal_type"), 25, FALSE)
|
||||
entity.set_output(user)
|
||||
signal.set_output(COMPONENT_SIGNAL)
|
||||
|
||||
@@ -30,8 +30,12 @@
|
||||
var/datum/port/output/alt
|
||||
var/datum/port/output/right
|
||||
|
||||
/// The entity output
|
||||
var/datum/port/output/entity
|
||||
|
||||
/obj/item/circuit_component/controller/Initialize()
|
||||
. = ..()
|
||||
entity = add_output_port("User", PORT_TYPE_ATOM)
|
||||
signal = add_output_port("Signal", PORT_TYPE_SIGNAL)
|
||||
alt = add_output_port("Alternate Signal", PORT_TYPE_SIGNAL)
|
||||
right = add_output_port("Extra Signal", PORT_TYPE_SIGNAL)
|
||||
@@ -57,6 +61,7 @@
|
||||
return
|
||||
source.balloon_alert(user, "clicked primary button")
|
||||
playsound(source, get_sfx("terminal_type"), 25, FALSE)
|
||||
entity.set_output(user)
|
||||
signal.set_output(COMPONENT_SIGNAL)
|
||||
|
||||
/**
|
||||
@@ -68,6 +73,7 @@
|
||||
return
|
||||
source.balloon_alert(user, "clicked alternate button")
|
||||
playsound(source, get_sfx("terminal_type"), 25, FALSE)
|
||||
entity.set_output(user)
|
||||
alt.set_output(COMPONENT_SIGNAL)
|
||||
|
||||
/obj/item/circuit_component/controller/proc/send_right_signal(atom/source, mob/user)
|
||||
@@ -76,4 +82,5 @@
|
||||
return
|
||||
source.balloon_alert(user, "clicked extra button")
|
||||
playsound(source, get_sfx("terminal_type"), 25, FALSE)
|
||||
entity.set_output(user)
|
||||
right.set_output(COMPONENT_SIGNAL)
|
||||
|
||||
@@ -90,11 +90,14 @@
|
||||
var/datum/port/output/money_input
|
||||
/// Trigger for when money is inputted into the shell
|
||||
var/datum/port/output/money_trigger
|
||||
/// The person who input the money
|
||||
var/datum/port/output/entity
|
||||
|
||||
/obj/item/circuit_component/money_bot/Initialize()
|
||||
. = ..()
|
||||
total_money = add_output_port("Total Money", PORT_TYPE_NUMBER)
|
||||
money_input = add_output_port("Last Input Money", PORT_TYPE_NUMBER)
|
||||
entity = add_output_port("User", PORT_TYPE_ATOM)
|
||||
money_trigger = add_output_port("Money Input", PORT_TYPE_SIGNAL)
|
||||
|
||||
/obj/item/circuit_component/money_bot/register_shell(atom/movable/shell)
|
||||
@@ -127,6 +130,7 @@
|
||||
attached_bot.add_money(amount_to_insert)
|
||||
balloon_alert(attacker, "inserted [amount_to_insert] credits.")
|
||||
money_input.set_output(amount_to_insert)
|
||||
entity.set_output(attacker)
|
||||
money_trigger.set_output(COMPONENT_SIGNAL)
|
||||
qdel(item)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user