Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 0779be7

Browse files
committed
piss
1 parent f88444e commit 0779be7

File tree

2 files changed

+63
-12
lines changed

2 files changed

+63
-12
lines changed

code/modules/psionics/mob/mob_assay.dm

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,42 @@
8484
/datum/psi_complexus/ui_interact(mob/user, datum/tgui/ui)
8585
ui = SStgui.try_update_ui(user, src, ui)
8686
if(!ui)
87-
ui = new(user, src, "PsionicComplexus", "oppa gangnam style")
87+
ui = new(user, src, "PsionicComplexus", "Psi Complexus")
8888
ui.open()
8989

9090
/datum/psi_complexus/ui_data(mob/user)
9191
var/list/data = list()
92+
data["faculties"] = list()
93+
for(var/faculty_id in ranks)
94+
var/list/check_powers = get_powers_by_faculty(faculty_id)
95+
if(LAZYLEN(check_powers))
96+
var/list/details = list()
97+
var/datum/psionic_faculty/faculty = SSpsi.get_faculty(faculty_id)
98+
details["name"] += faculty.name
99+
details["rank"] += ranks[faculty_id]
100+
for(var/datum/psionic_power/power in check_powers)
101+
var/list/power_data = list()
102+
power_data["name"] = power.name
103+
power_data["description"] = power.use_description
104+
details["powers"] += list(power_data)
105+
data["faculties"] += list(details)
92106
return data
93107

108+
/datum/psi_complexus/ui_assets(mob/user)
109+
return list(
110+
get_asset_datum(/datum/asset/spritesheet/sheetmaterials)
111+
)
112+
94113
/datum/psi_complexus/ui_act(action, params)
95114
. = ..()
96115
if(.)
97116
return
98117

99118
/datum/psi_complexus/ui_state()
100119
return GLOB.always_state
120+
121+
/datum/asset/spritesheet/psi_icons
122+
name = "psi_icons"
123+
124+
/datum/asset/spritesheet/psi_icons/create_spritesheets()
125+
InsertAll("", 'icons/obj/psychic_powers.dmi')

tgui/packages/tgui/interfaces/PsionicComplexus.tsx

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,70 @@ import { Window } from '../layouts';
55
type Data = {
66
antag_name: string;
77
loud: boolean;
8+
faculties: Psi_Faculty[];
89
};
910

1011
type User = {
11-
psi_stamina : number;
12-
supressing : boolean;
13-
known_powers : Psi_Power;
14-
psi_faculties : Psi_Faculty[];
12+
psi_stamina: number;
13+
supressing: boolean;
14+
known_powers: Psi_Power;
15+
psi_faculties: Psi_Faculty[];
1516

1617
};
1718

1819
type Psi_Power = {
19-
name : string;
20-
description : string;
20+
name: string;
21+
description: string;
2122

2223
};
2324

2425
type Psi_Faculty = {
25-
rank : number;
26+
name: string;
27+
rank: number;
28+
powers: Psi_Power[];
2629

2730
}
2831

2932
export const PsionicComplexus = (props, context) => {
3033
const { data } = useBackend<Data>(context);
34+
const { faculties = [] } = data;
3135
return (
32-
<Window width={620} height={250}>
36+
<Window width={620} height={500}>
3337
<Window.Content>
3438
<Section scrollable fill>
3539
<Stack vertical>
3640
<Stack.Item textColor="red" fontSize="20px">
3741
Summary
3842
</Stack.Item>
3943
<Stack.Item>
40-
Power Usage
44+
<Stack vertical>
45+
{faculties.map(faculty => (
46+
<Stack.Item
47+
key={faculty.name}>
48+
<Section title={faculty.name}>
49+
50+
51+
<Stack vertical>
52+
53+
{faculty.powers.map(power => (
54+
<Stack.Item
55+
key={power.name}>
56+
{power.name + ": " + power.description}
57+
58+
</Stack.Item>
59+
60+
))}
61+
62+
</Stack>
63+
</Section>
64+
</Stack.Item>
65+
))}
66+
</Stack>
4167
</Stack.Item>
4268
</Stack>
4369
</Section>
44-
</Window.Content>
45-
</Window>
70+
</Window.Content >
71+
</Window >
4672
);
4773
};
4874

0 commit comments

Comments
 (0)