diff --git a/modular_event/tournament/mapping_helpers.dm b/modular_event/tournament/mapping_helpers.dm new file mode 100644 index 00000000000..5bc51cfc24a --- /dev/null +++ b/modular_event/tournament/mapping_helpers.dm @@ -0,0 +1,15 @@ +// Buckles a mob to a bed on its turf +// No unique icon. really should not be in this repo at all but it's better then anchoring or manually setting buckled var +/obj/effect/mapping_helpers/buckle_bed + late = TRUE + +/obj/effect/mapping_helpers/buckle_bed/LateInitialize() + . = ..() + var/turf/home = get_turf(src) + var/mob/living/buckle_down = locate(/mob/living) in home + var/obj/structure/bed/home_base = locate(/obj/structure/bed) in home + if(!buckle_down || !home_base) + qdel(src) + return + home_base.buckle_mob(buckle_down) + qdel(src) diff --git a/tgui/packages/tgui/interfaces/TournamentController.tsx b/tgui/packages/tgui/interfaces/TournamentController.tsx new file mode 100644 index 00000000000..4dd68a71dcd --- /dev/null +++ b/tgui/packages/tgui/interfaces/TournamentController.tsx @@ -0,0 +1,243 @@ +import { useBackend, useLocalState } from '../backend'; +import { Button, Dropdown, Section, Stack } from '../components'; +import { Window } from '../layouts'; + +type TournamentControllerData = { + old_mobs: number; + arena_id: string; + arena_templates: string[]; + team_names: string[]; +}; + +const ArenaInfo = (props, context) => { + const { act, data } = useBackend(context); + + const [selectedArena, setSelectedArea] = useLocalState( + context, + 'selectedArena', + null + ); + + return ( +
+ + {'Arena - ' + data.arena_id} + + + + + +
+ ); +}; + +const RoundInfo = (props, context) => { + const { act, data } = useBackend(context); + + const [selectedTeamA, setSelectedTeamA] = useLocalState( + context, + 'selectedTeamA', + data.team_names[0] + ); + + const [selectedTeamB, setSelectedTeamB] = useLocalState( + context, + 'selectedTeamB', + data.team_names[1] + ); + + const [respawnRemove, setRespawnRemove] = useLocalState( + context, + 'respawnRemove', + true + ); + + return ( + <> +
+ + + + + + + VS. + + + + + + + + + + + + + + + + + + + + + act('disband_teams')} + tooltip="This will delete and put team members back into their spectator mobs (if they had one)." + />{' '} + {data.old_mobs} spectator mobs stored + + + + act('clear_arena')} + tooltip="You don't have to do this if you're already loading a new map, by the way." + /> +
+ Clear automaticly happens on map load, and does not delete teams in + prep rooms. +
+ + +
+
+ {selectedTeamA} VS. {selectedTeamB} +
+
+ {selectedTeamA} +
+ VS. +
+ {selectedTeamB} +
+ + ); +}; + +export const TournamentController = () => { + return ( + + + + + + + ); +};