Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Jul 18, 2024
1 parent a54792c commit 0727d25
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions code/modules/admin/game_master/game_master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
data["game_master_objectives"] = length(GLOB.game_master_objectives) ? GLOB.game_master_objectives : ""

// Communication stuff
data["communication_clarity"] = GLOB.radio_communication_clarity
data["radio_clarity"] = GLOB.radio_communication_clarity
data["radio_clarity_example"] = stars("The quick brown fox jumped over the lazy dog.", GLOB.radio_communication_clarity)

return data

Expand Down Expand Up @@ -294,7 +295,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
if("use_game_master_phone")
game_master_phone.attack_hand(ui.user)

if("set_communication_clarity")
if("set_radio_clarity")
var/new_clarity = text2num(params["clarity"])
if(!isnum(new_clarity))
return
Expand Down
12 changes: 8 additions & 4 deletions tgui/packages/tgui/interfaces/GameMaster.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useBackend } from '../backend';
import { Dropdown, Button, Section, Slider, Collapsible, Stack, Divider } from '../components';
import { Dropdown, Box, Button, Section, Slider, Collapsible, Stack, Divider } from '../components';
import { Window } from '../layouts';

export const GameMaster = (props, context) => {
Expand Down Expand Up @@ -216,18 +216,22 @@ export const GameMasterCommunicationPanel = (props, context) => {
}}
/>
</Stack.Item>
<Stack.Item mt={1}>Communication Clarity</Stack.Item>
<Stack.Item mt={1}>Radio Clarity</Stack.Item>
<Stack.Item>
<Slider
maxValue={100}
minValue={0}
value={data.communication_clarity}
value={data.radio_clarity}
stepPixelSize={3}
suppressFlicker={2500}
onChange={(e, clarity) => {
act('set_communication_clarity', { clarity });
act('set_radio_clarity', { clarity });
}}
/>
</Stack.Item>
<Stack.Item>
<Box fontFamily="monospace">{`"${data.radio_clarity_example}"`}</Box>
</Stack.Item>
</Stack>
</Section>
);
Expand Down

0 comments on commit 0727d25

Please sign in to comment.