mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #5861 from Seris02/belleh
fixes a few belly bugs and improves belly color selection
This commit is contained in:
@@ -373,7 +373,7 @@
|
|||||||
var/taste
|
var/taste
|
||||||
if(can_taste && (taste = M.get_taste_message(FALSE)))
|
if(can_taste && (taste = M.get_taste_message(FALSE)))
|
||||||
to_chat(owner, "<span class='notice'>[M] tastes of [taste].</span>")
|
to_chat(owner, "<span class='notice'>[M] tastes of [taste].</span>")
|
||||||
vore_fx(M)
|
vore_fx(M, TRUE) //CHOMPEdit: update belleh
|
||||||
owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed.
|
owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed.
|
||||||
//Stop AI processing in bellies
|
//Stop AI processing in bellies
|
||||||
if(M.ai_holder)
|
if(M.ai_holder)
|
||||||
|
|||||||
@@ -619,11 +619,13 @@
|
|||||||
host.show_vore_fx = !host.show_vore_fx
|
host.show_vore_fx = !host.show_vore_fx
|
||||||
if(host.client.prefs_vr)
|
if(host.client.prefs_vr)
|
||||||
host.client.prefs_vr.show_vore_fx = host.show_vore_fx
|
host.client.prefs_vr.show_vore_fx = host.show_vore_fx
|
||||||
if(!host.show_vore_fx)
|
if (isbelly(host.loc)) //CHOMPEdit
|
||||||
|
var/obj/belly/B = host.loc
|
||||||
|
B.vore_fx(host, TRUE)
|
||||||
|
else
|
||||||
host.clear_fullscreen("belly")
|
host.clear_fullscreen("belly")
|
||||||
//host.clear_fullscreen("belly2") //For multilayered stomachs. Not currently implemented.
|
if(!host.hud_used.hud_shown)
|
||||||
if(!host.hud_used.hud_shown)
|
host.toggle_hud_vis()
|
||||||
host.toggle_hud_vis()
|
|
||||||
unsaved_changes = TRUE
|
unsaved_changes = TRUE
|
||||||
return TRUE
|
return TRUE
|
||||||
if("toggle_noisy")
|
if("toggle_noisy")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { capitalize } from 'common/string';
|
import { capitalize } from 'common/string';
|
||||||
import { Fragment } from 'inferno';
|
import { Fragment } from 'inferno';
|
||||||
import { useBackend, useLocalState } from '../backend';
|
import { useBackend, useLocalState } from '../backend';
|
||||||
import { Box, Button, Flex, Collapsible, Icon, LabeledList, NoticeBox, Section, Tabs, Divider } from '../components';
|
import { Box, Button, Flex, Collapsible, Icon, LabeledList, NoticeBox, Section, Tabs, Divider, Stack } from '../components';
|
||||||
import { Window } from '../layouts';
|
import { Window } from '../layouts';
|
||||||
import { classes } from 'common/react';
|
import { classes } from 'common/react';
|
||||||
|
|
||||||
@@ -939,35 +939,31 @@ const VoreSelectedBellyVisuals = (props, context) => {
|
|||||||
</Section>
|
</Section>
|
||||||
<Section title="Belly Fullscreens Preview and Coloring">
|
<Section title="Belly Fullscreens Preview and Coloring">
|
||||||
<Flex direction="row">
|
<Flex direction="row">
|
||||||
<Box backgroundColor={belly_fullscreen_color} width="20px" height="20px" />
|
<FeatureColorInput
|
||||||
<Button
|
action_name="b_fullscreen_color"
|
||||||
icon="eye-dropper"
|
value_of={null}
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_fullscreen_color', val: null })}>
|
back_color={belly_fullscreen_color}
|
||||||
Select Color 1
|
name_of="1"
|
||||||
</Button>
|
/>
|
||||||
<Box backgroundColor={belly_fullscreen_color2} width="20px" height="20px" />
|
<FeatureColorInput
|
||||||
<Button
|
action_name="b_fullscreen_color2"
|
||||||
icon="eye-dropper"
|
value_of={null}
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_fullscreen_color2', val: null })}>
|
back_color={belly_fullscreen_color2}
|
||||||
Select Color 2
|
name_of="2"
|
||||||
</Button>
|
/>
|
||||||
<Box backgroundColor={belly_fullscreen_color3} width="20px" height="20px" />
|
<FeatureColorInput
|
||||||
<Button
|
action_name="b_fullscreen_color3"
|
||||||
icon="eye-dropper"
|
value_of={null}
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_fullscreen_color3', val: null })}>
|
back_color={belly_fullscreen_color3}
|
||||||
Select Color 3
|
name_of="3"
|
||||||
</Button>
|
/>
|
||||||
<Box backgroundColor={belly_fullscreen_color4} width="20px" height="20px" />
|
<FeatureColorInput
|
||||||
<Button
|
action_name="b_fullscreen_color4"
|
||||||
icon="eye-dropper"
|
value_of={null}
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_fullscreen_color4', val: null })}>
|
back_color={belly_fullscreen_color4}
|
||||||
Select Color 4
|
name_of="4"
|
||||||
</Button>
|
/>
|
||||||
<Button
|
<FeatureColorInput action_name="b_fullscreen_alpha" value_of={null} back_color="#FFFFFF" name_of="Alpha" />
|
||||||
icon="eye-dropper"
|
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_fullscreen_alpha', val: null })}>
|
|
||||||
Set Alpha
|
|
||||||
</Button>
|
|
||||||
<LabeledList.Item label="Enable Coloration">
|
<LabeledList.Item label="Enable Coloration">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => act('set_attribute', { attribute: 'b_colorization_enabled' })}
|
onClick={() => act('set_attribute', { attribute: 'b_colorization_enabled' })}
|
||||||
@@ -2019,3 +2015,29 @@ const VoreUserPreferenceItem = (props, context) => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const FeatureColorInput = (props, context) => {
|
||||||
|
const { act } = useBackend(context);
|
||||||
|
const { action_name, value_of, back_color, name_of } = props;
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
act('set_attribute', { attribute: action_name, val: value_of });
|
||||||
|
}}>
|
||||||
|
<Stack align="center" fill>
|
||||||
|
<Stack.Item>
|
||||||
|
<Box
|
||||||
|
style={{
|
||||||
|
background: back_color.startsWith('#') ? back_color : `#${back_color}`,
|
||||||
|
border: '2px solid white',
|
||||||
|
'box-sizing': 'content-box',
|
||||||
|
height: '11px',
|
||||||
|
width: '11px',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Stack.Item>
|
||||||
|
<Stack.Item>Change {name_of}</Stack.Item>
|
||||||
|
</Stack>
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user