mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-28 23:26:43 +01:00
axe the code
This commit is contained in:
@@ -101,6 +101,7 @@
|
||||
sent_interactions += list(interaction)
|
||||
.["interactions"] = sent_interactions
|
||||
|
||||
/*
|
||||
//Get their genitals
|
||||
var/list/genitals = list()
|
||||
var/mob/living/carbon/get_genitals = self
|
||||
@@ -184,6 +185,7 @@
|
||||
genital_entry["equipments"] = equipment_names
|
||||
genital_interactibles += list(genital_entry)
|
||||
.["genital_interactibles"] = genital_interactibles
|
||||
*/
|
||||
|
||||
var/datum/preferences/prefs = self?.client.prefs
|
||||
if(prefs)
|
||||
@@ -237,6 +239,7 @@
|
||||
o.do_action(usr, target)
|
||||
return TRUE
|
||||
return FALSE
|
||||
/*
|
||||
if("genital")
|
||||
var/mob/living/carbon/self = usr
|
||||
if("visibility" in params)
|
||||
@@ -300,6 +303,7 @@
|
||||
user.transferItemToLoc(get_turf(user))
|
||||
return TRUE
|
||||
return FALSE
|
||||
*/
|
||||
if("char_pref")
|
||||
var/datum/preferences/prefs = usr.client.prefs
|
||||
var/value = num_to_pref(params["value"])
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set name = "Genitals Menu"
|
||||
set desc = "Manage your genital, or someone else's."
|
||||
set category = "IC"
|
||||
set src in oview(1)
|
||||
set src in view(usr.client)
|
||||
|
||||
if(!iscarbon(usr))
|
||||
return
|
||||
@@ -37,9 +37,9 @@
|
||||
|
||||
/datum/genitals_menu/ui_data(mob/user)
|
||||
. = ..()
|
||||
var/mob/living/carbon/genital_holder = target
|
||||
var/user_is_target = target == self
|
||||
.["isTargetSelf"] = user_is_target
|
||||
var/mob/living/carbon/genital_holder = target || user
|
||||
var/user_is_target = genital_holder == user
|
||||
.["istargetself"] = user_is_target
|
||||
var/list/genitals = list()
|
||||
for(var/obj/item/organ/genital/genital in genital_holder.internal_organs) //Only get the genitals
|
||||
if(CHECK_BITFIELD(genital.genital_flags, GENITAL_INTERNAL)) //Not those though
|
||||
@@ -122,6 +122,8 @@
|
||||
switch(action)
|
||||
if("genital")
|
||||
var/mob/living/carbon/self = usr
|
||||
if(self != target)
|
||||
return FALSE
|
||||
if("visibility" in params)
|
||||
if(params["genital"] == "anus")
|
||||
self.anus_toggle_visibility(params["visibility"])
|
||||
@@ -164,15 +166,19 @@
|
||||
else
|
||||
return FALSE
|
||||
if("equipment")
|
||||
var/mob/living/carbon/actual_target = target || usr
|
||||
var/mob/living/carbon/self = usr
|
||||
var/obj/item/organ/genital/genital = locate(params["genital"], self.internal_organs)
|
||||
if(!(genital && (genital in self.internal_organs)))
|
||||
if(get_dist(actual_target, self) > 1)
|
||||
to_chat(self, span_warning("You're too far away!"))
|
||||
return FALSE
|
||||
var/obj/item/organ/genital/genital = locate(params["genital"], actual_target.internal_organs)
|
||||
if(!(genital && (genital in actual_target.internal_organs)))
|
||||
return FALSE
|
||||
switch(params["equipment_action"])
|
||||
if("remove")
|
||||
var/obj/item/selected_item = locate(params["equipment"], genital.contents)
|
||||
if(selected_item)
|
||||
if(!do_mob(self, self, 5 SECONDS))
|
||||
if(!do_mob(self, actual_target, 5 SECONDS))
|
||||
return FALSE
|
||||
if(!self.put_in_hands(selected_item))
|
||||
self.transferItemToLoc(get_turf(self))
|
||||
|
||||
@@ -84,16 +84,18 @@ export const GenitalConfig = (props, context) => {
|
||||
/>
|
||||
</Section>
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Stack grow>
|
||||
<Stack.Item>
|
||||
<SizeButtons />
|
||||
</Stack.Item>
|
||||
<Stack.Item grow>
|
||||
<ToggleSettings />
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
{data.istargetself ?
|
||||
<Stack.Item>
|
||||
<Stack grow>
|
||||
<Stack.Item>
|
||||
<SizeButtons />
|
||||
</Stack.Item>
|
||||
<Stack.Item grow>
|
||||
<ToggleSettings />
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Stack.Item> : null
|
||||
}
|
||||
</Stack>
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
|
||||
@@ -23,41 +23,6 @@ type InteractionData = {
|
||||
type: number;
|
||||
}
|
||||
|
||||
type GenitalInfo = {
|
||||
genitals: GenitalData[];
|
||||
}
|
||||
|
||||
type GenitalData = {
|
||||
name: string,
|
||||
key: string,
|
||||
visibility: string,
|
||||
extras: string,
|
||||
extra_choices: string[],
|
||||
possible_choices: string[],
|
||||
can_arouse: boolean,
|
||||
arousal_state: boolean,
|
||||
always_accessible: boolean,
|
||||
}
|
||||
|
||||
type GenitalManagerInfo = {
|
||||
isTargetSelf: boolean;
|
||||
genital_fluids: GenitalFluid[];
|
||||
genital_interactibles: GenitalInteractionInfos[];
|
||||
}
|
||||
|
||||
type GenitalInteractionInfos = {
|
||||
name: string,
|
||||
key: string,
|
||||
possible_choices: string[],
|
||||
equipments: string[],
|
||||
}
|
||||
|
||||
type GenitalFluid = {
|
||||
name: string,
|
||||
key: string,
|
||||
fluids: number,
|
||||
}
|
||||
|
||||
type CharacterPrefsInfo = {
|
||||
erp_pref: number,
|
||||
noncon_pref: number,
|
||||
@@ -138,29 +103,19 @@ export const MobInteraction = (props, context) => {
|
||||
<Tabs.Tab selected={tabIndex === 0} onClick={() => setTabIndex(0)}>
|
||||
Interactions
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab selected={tabIndex === 1} onClick={() => setTabIndex(1)}>
|
||||
Genital Options
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab selected={tabIndex === 2} onClick={() => setTabIndex(2)}>
|
||||
<Tabs.Tab selected={tabIndex === 1} onClick={() => setTabIndex(2)}>
|
||||
Character Prefs
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab selected={tabIndex === 3} onClick={() => setTabIndex(3)}>
|
||||
<Tabs.Tab selected={tabIndex === 2} onClick={() => setTabIndex(3)}>
|
||||
Preferences
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab selected={tabIndex === 4} onClick={() => setTabIndex(4)}>
|
||||
Genital Manager
|
||||
</Tabs.Tab>
|
||||
</Tabs>
|
||||
{tabIndex === 0 && (
|
||||
<InteractionsTab />
|
||||
) || tabIndex === 1 && (
|
||||
<GenitalTab />
|
||||
) || tabIndex === 2 && (
|
||||
<CharacterPrefsTab />
|
||||
) || tabIndex === 3 && (
|
||||
) || tabIndex === 2 && (
|
||||
<ContentPreferencesTab />
|
||||
) || tabIndex === 4 && (
|
||||
<GenitalManagerTab />
|
||||
) || ("Somehow, you've got into an invalid page, please report this.")}
|
||||
</Section>
|
||||
</Window.Content>
|
||||
@@ -237,168 +192,6 @@ export const sortInteractions = (interactions, searchText = '') => {
|
||||
])(interactions);
|
||||
};
|
||||
|
||||
// Self explanatory
|
||||
const ModeToIcon = {
|
||||
"Always visible": "eye",
|
||||
"Hidden by clothes": "tshirt",
|
||||
"Hidden by underwear": "low-vision",
|
||||
"Always hidden": "eye-slash",
|
||||
"Allows egg stuffing": "egg",
|
||||
};
|
||||
|
||||
/*
|
||||
Greetings you, yes you, adding more stuff to actions,
|
||||
To not have as much headache as i did,
|
||||
do not attempt to make a sum of 100% with the buttons
|
||||
as it will mess up math somewhere and overflow.
|
||||
|
||||
Also this is adjusted only for the current size,
|
||||
if anyone feels like shrinking,
|
||||
their window it will overflow anyways.
|
||||
Single items is fine.
|
||||
*/
|
||||
const GenitalTab = (props, context) => {
|
||||
const { act, data } = useBackend<GenitalInfo>(context);
|
||||
const genitals = data.genitals || [];
|
||||
return (
|
||||
genitals.length ? (
|
||||
<Flex direction="column">
|
||||
{genitals.map(genital => (
|
||||
<Section key={genital.key} title={genital.name} textAlign="center">
|
||||
<Table>
|
||||
<TableCell width="50%" textAlign="center">
|
||||
Visibility<br />
|
||||
{genital.possible_choices.map(choice => (
|
||||
<Button
|
||||
width={((1 / genital.possible_choices.length) * 97) + "%"}
|
||||
key={choice}
|
||||
tooltip={choice}
|
||||
icon={ModeToIcon[choice]}
|
||||
color={genital.visibility === choice ? "green" : "default"}
|
||||
onClick={() => act('genital', {
|
||||
genital: genital.key,
|
||||
visibility: choice,
|
||||
})} />
|
||||
))}
|
||||
</TableCell>
|
||||
<TableCell textAlign="center">
|
||||
Actions<br />
|
||||
<Button
|
||||
width="49%"
|
||||
key={genital.arousal_state}
|
||||
tooltip={genital.can_arouse
|
||||
? ((genital.arousal_state ? "Unarouse" : "Arouse") + " your " + genital.name.toLowerCase())
|
||||
: "You cannot modify arousal on your " + genital.name.toLowerCase()}
|
||||
icon={genital.arousal_state ? "heart" : "heart-broken"}
|
||||
color={genital.can_arouse ? (genital.arousal_state ? "green" : "default") : "grey"}
|
||||
onClick={() => act('genital', {
|
||||
genital: genital.key,
|
||||
set_arousal: !genital.arousal_state,
|
||||
})} />
|
||||
{genital.extra_choices instanceof Array
|
||||
? genital.extra_choices.map(choice => (
|
||||
<Button
|
||||
width="50%"
|
||||
key={choice}
|
||||
tooltip={choice}
|
||||
icon={ModeToIcon[choice]}
|
||||
color={genital.extras === choice ? "green" : "default"}
|
||||
onClick={() => act('genital', {
|
||||
genital: genital.key,
|
||||
visibility: choice,
|
||||
})} />
|
||||
)) : null}
|
||||
<Button
|
||||
width="49%"
|
||||
key={genital.always_accessible}
|
||||
tooltip={genital.always_accessible
|
||||
? "Forbid others from manipulating this genital at any moment"
|
||||
: "Allow others to manipulate this genital at any moment"}
|
||||
icon={genital.always_accessible ? "hand-paper" : 'hand-rock'}
|
||||
color={genital.always_accessible ? "green" : "default"}
|
||||
onClick={() => act('genital', {
|
||||
genital: genital.key,
|
||||
set_accessibility: true,
|
||||
})} />
|
||||
</TableCell>
|
||||
</Table>
|
||||
</Section>
|
||||
))}
|
||||
</Flex>
|
||||
) : (
|
||||
<Section align="center">
|
||||
You don't seem to have any genitals...
|
||||
Or any that you could modify.
|
||||
</Section>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const GenitalManagerTab = (props, context) => {
|
||||
const { act, data } = useBackend<GenitalManagerInfo>(context);
|
||||
const isTargetSelf = data.isTargetSelf;
|
||||
const genital_fluids = data.genital_fluids || [];
|
||||
const genital_interactibles = data.genital_interactibles || [];
|
||||
return (
|
||||
genital_fluids.length || genital_interactibles.length ? (
|
||||
<>
|
||||
<Section title="Genital Fluids">
|
||||
<LabeledList>
|
||||
{genital_fluids.map(genital => (
|
||||
<LabeledList.Item key={genital['key']} label={genital['name']}>
|
||||
<ProgressBar
|
||||
key={genital['key']}
|
||||
value={genital['fluid'] ? genital['fluid'] : 0.0}
|
||||
color="white" />
|
||||
</LabeledList.Item>
|
||||
))}
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Actions">
|
||||
{genital_interactibles.map(genital => (
|
||||
<Section key={genital.key} title={genital.name}>
|
||||
{
|
||||
genital.equipments.length ? (
|
||||
<>
|
||||
<b>Equipments:</b>
|
||||
<Table direction="column">
|
||||
{genital.equipments.map(equipment => (
|
||||
<TableRow key={equipment}>
|
||||
{equipment}
|
||||
</TableRow>
|
||||
))}
|
||||
</Table>
|
||||
<Divider />
|
||||
</>
|
||||
) : null
|
||||
}
|
||||
|
||||
{genital.possible_choices.map(choice => (
|
||||
<Button
|
||||
key={choice}
|
||||
content={choice}
|
||||
tooltip={choice}
|
||||
onClick={() => act('genital_interaction', {
|
||||
genital: genital.key,
|
||||
action: choice,
|
||||
})} />
|
||||
))}
|
||||
</Section>
|
||||
))}
|
||||
</Section>
|
||||
</>
|
||||
) : (
|
||||
<Section align="center">
|
||||
{
|
||||
isTargetSelf
|
||||
? "You don't seem to have any genitals... Or any that you could do anything with"
|
||||
: "They don't seem to have any genitals... Or any that you could do anything with"
|
||||
}
|
||||
</Section>
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
const CharacterPrefsTab = (props, context) => {
|
||||
const { act, data } = useBackend<CharacterPrefsInfo>(context);
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user