diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index 1d10a32f9959..11080aaad1b7 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -191,6 +191,10 @@ "These rules are at admin discretion and will be heavily enforced. If you have questions about these rules AHELP it.\n"+\ "\n"+\ "Prefix your message with :b to speak in Drone Chat.\n" + var/static/list/actions_to_add = list( + /datum/action/drone/bar/information, + ) + /mob/living/basic/drone/snowflake/bardrone/Initialize(mapload) . = ..() diff --git a/monkestation/code/modules/mob/living/basic/drone/bardrone.dm b/monkestation/code/modules/mob/living/basic/drone/bardrone.dm index ec5f3f1a37a8..65cb60407b9f 100644 --- a/monkestation/code/modules/mob/living/basic/drone/bardrone.dm +++ b/monkestation/code/modules/mob/living/basic/drone/bardrone.dm @@ -45,3 +45,38 @@ to_chat(user, span_danger("You need to play [playtime_left] more as [required_role] to spawn as a Bardrone!")) return FALSE return ..() + +/datum/action/drone/bar/information //sets up action button datum for the button itself + name = "Bar Drone Information" + desc = "Shows information and laws for the Bar Drone." + button_icon = 'icons/obj/art/musician.dmi' + button_icon_state = "synth" + +/datum/action/drone/bar/information/Trigger(trigger_flags) //what happens when the button is pressed + var/datum/drone/bar/information/tgui = new(usr) + tgui.ui_interact(usr) + +/datum/drone/bar/information //datum required for the tgui component + +/datum/drone/bar/information/ui_close() + qdel(src) + +/datum/drone/bar/information/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "BarDrone") + ui.open() + +/datum/drone/bar/information/ui_state(mob/user) //should always be accessible, only inherited by bardrone anyway + return GLOB.always_state + +/mob/living/basic/drone/snowflake/bardrone/Initialize(mapload) //initialization of the action button onto the linked mob (only bardrones) + . = ..() + for (var/action_type in actions_to_add) + var/datum/action/new_action = new action_type(src) + new_action.Grant(src) + +/mob/living/basic/drone/snowflake/bardrone/Login() //force open the tgui window with laws on login to the bardrone mob. + ..() + var/datum/drone/bar/information/tgui = new(usr) + tgui.ui_interact(usr) diff --git a/tgui/packages/tgui/interfaces/BarDrone.tsx b/tgui/packages/tgui/interfaces/BarDrone.tsx new file mode 100644 index 000000000000..6e01200ed2ea --- /dev/null +++ b/tgui/packages/tgui/interfaces/BarDrone.tsx @@ -0,0 +1,68 @@ +import { Section, Box, LabeledList } from '../components'; +import { Window } from '../layouts'; + +export const BarDrone = () => { + return ( + +
+ + + DO NOT INTERFERE WITH THE ROUND AS A DRONE OR YOU WILL BE DRONE + BANNED + + + + Drones are a ghost role that are allowed to fix the station and build + things. Interfering with the round as a drone is against the rules. + + + Actions that constitute interference include, but are not limited to: + + + + + - Interacting with round-critical objects (IDs, weapons, + contraband, powersinks, bombs, etc.) + + + + + - Interacting with living beings (communication, attacking, + healing, etc.) + + + + + - Interacting with non-living beings (dragging bodies, looting + bodies, etc.) + + + + + These rules are at admin discretion and will be heavily enforced. + + + + If you do not have the regular drone laws, follow your laws to the + best of your ability. + + + + Prefix your message with :b to speak in Drone Chat. + + + Drone Rules and more info can be found at our wiki{' '} + + HERE + + . + +
+
+ ); +};