mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +01:00
Feedable belly preference
Adds a new belly specific option to disable it from appearing for others during feeding prompts.
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
var/emote_active = TRUE // Are we even giving emotes out at all or not?
|
||||
var/next_emote = 0 // When we're supposed to print our next emote, as a world.time
|
||||
var/selective_preference = DM_DIGEST // Which type of selective bellymode do we default to?
|
||||
var/is_feedable = TRUE // If this belly shows up in belly selections for others. //CHOMPAdd
|
||||
|
||||
// Generally just used by AI
|
||||
var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location
|
||||
@@ -285,7 +286,8 @@
|
||||
"slow_brutal",
|
||||
"sound_volume",
|
||||
"speedy_mob_processing",
|
||||
"egg_name", //CHOMP end of variables from CHOMP
|
||||
"egg_name",
|
||||
"is_feedable", //CHOMP end of variables from CHOMP
|
||||
"egg_type",
|
||||
"save_digest_mode"
|
||||
)
|
||||
@@ -1454,7 +1456,8 @@
|
||||
dupe.slow_digestion = slow_digestion
|
||||
dupe.slow_brutal = slow_brutal
|
||||
dupe.sound_volume = sound_volume
|
||||
dupe.egg_name = egg_name //CHOMP end of variables from CHOMP
|
||||
dupe.egg_name = egg_name
|
||||
dupe.is_feedable = is_feedable //CHOMP end of variables from CHOMP
|
||||
|
||||
dupe.belly_fullscreen = belly_fullscreen
|
||||
dupe.disable_hud = disable_hud
|
||||
|
||||
@@ -578,6 +578,16 @@
|
||||
//
|
||||
// Eating procs depending on who clicked what
|
||||
//
|
||||
|
||||
//CHOMPAdd Start
|
||||
/mob/living/proc/feedable_bellies()
|
||||
var/list/bellies = list()
|
||||
for(var/obj/belly/Y in src.vore_organs)
|
||||
if(Y.is_feedable)
|
||||
bellies += Y
|
||||
return bellies
|
||||
//CHOMPAdd End
|
||||
|
||||
/mob/living/proc/feed_grabbed_to_self(mob/living/user, mob/living/prey)
|
||||
var/belly = user.vore_selected
|
||||
return perform_the_nom(user, prey, user, belly)
|
||||
@@ -585,17 +595,17 @@
|
||||
/mob/living/proc/eat_held_mob(mob/living/user, mob/living/prey, mob/living/pred)
|
||||
var/belly
|
||||
if(user != pred)
|
||||
belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs)
|
||||
belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit
|
||||
else
|
||||
belly = pred.vore_selected
|
||||
return perform_the_nom(user, prey, pred, belly)
|
||||
|
||||
/mob/living/proc/feed_self_to_grabbed(mob/living/user, mob/living/pred)
|
||||
var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs)
|
||||
var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit
|
||||
return perform_the_nom(user, user, pred, belly)
|
||||
|
||||
/mob/living/proc/feed_grabbed_to_other(mob/living/user, mob/living/prey, mob/living/pred)
|
||||
var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.vore_organs)
|
||||
var/belly = tgui_input_list(usr, "Choose Belly", "Belly Choice", pred.feedable_bellies()) //CHOMPEdit
|
||||
return perform_the_nom(user, prey, pred, belly)
|
||||
|
||||
//
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
"release_sound" = selected.release_sound,
|
||||
// "messages" // TODO
|
||||
"can_taste" = selected.can_taste,
|
||||
"is_feedable" = selected.is_feedable, //CHOMPAdd
|
||||
"egg_type" = selected.egg_type,
|
||||
"egg_name" = selected.egg_name, //CHOMPAdd
|
||||
"nutrition_percent" = selected.nutrition_percent,
|
||||
@@ -1476,6 +1477,9 @@
|
||||
if("b_tastes")
|
||||
host.vore_selected.can_taste = !host.vore_selected.can_taste
|
||||
. = TRUE
|
||||
if("b_feedable") //CHOMPAdd
|
||||
host.vore_selected.is_feedable = !host.vore_selected.is_feedable
|
||||
. = TRUE
|
||||
if("b_bulge_size")
|
||||
var/new_bulge = tgui_input_number(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.", max_value = 200, min_value = 0)
|
||||
if(new_bulge == null)
|
||||
|
||||
@@ -159,6 +159,7 @@
|
||||
belly_data["digest_oxy"] = B.digest_oxy
|
||||
|
||||
belly_data["can_taste"] = B.can_taste
|
||||
belly_data["is_feedable"] = B.is_feedable
|
||||
belly_data["contaminates"] = B.contaminates
|
||||
belly_data["contamination_flavor"] = B.contamination_flavor
|
||||
belly_data["contamination_color"] = B.contamination_color
|
||||
|
||||
@@ -571,6 +571,7 @@ const VoreSelectedBellyOptions = (props, context) => {
|
||||
const { belly } = props;
|
||||
const {
|
||||
can_taste,
|
||||
is_feedable,
|
||||
nutrition_percent,
|
||||
digest_brute,
|
||||
digest_burn,
|
||||
@@ -604,6 +605,14 @@ const VoreSelectedBellyOptions = (props, context) => {
|
||||
content={can_taste ? 'Yes' : 'No'}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Feedable">
|
||||
<Button
|
||||
onClick={() => act('set_attribute', { attribute: 'b_feedable' })}
|
||||
icon={is_feedable ? 'toggle-on' : 'toggle-off'}
|
||||
selected={is_feedable}
|
||||
content={is_feedable ? 'Yes' : 'No'}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Contaminates">
|
||||
<Button
|
||||
onClick={() => act('set_attribute', { attribute: 'b_contaminates' })}
|
||||
|
||||
@@ -97,6 +97,7 @@ type Belly = {
|
||||
digest_oxy: number;
|
||||
|
||||
can_taste: BooleanLike;
|
||||
is_feedable: BooleanLike;
|
||||
contaminates: BooleanLike;
|
||||
contamination_flavor: string;
|
||||
contamination_color: string;
|
||||
@@ -233,6 +234,7 @@ const generateBellyString = (belly: Belly, index: number) => {
|
||||
digest_oxy,
|
||||
|
||||
can_taste,
|
||||
is_feedable,
|
||||
contaminates,
|
||||
contamination_flavor,
|
||||
contamination_color,
|
||||
@@ -554,6 +556,7 @@ const generateBellyString = (belly: Belly, index: number) => {
|
||||
result += '<div class="accordion-body">';
|
||||
result += '<ul class="list-group">';
|
||||
result += '<li class="list-group-item">Can Taste: ' + (can_taste ? '<span style="color: green;">Yes' : '<span style="color: red;">No') + '</li>';
|
||||
result += '<li class="list-group-item">Feedable: ' + (is_feedable ? '<span style="color: green;">Yes' : '<span style="color: red;">No') + '</li>';
|
||||
result += '<li class="list-group-item">Contaminates: ' + (contaminates ? '<span style="color: green;">Yes' : '<span style="color: red;">No') + '</li>';
|
||||
result += '<li class="list-group-item">Contamination Flavor: ' + contamination_flavor + '</li>';
|
||||
result += '<li class="list-group-item">Contamination Color: ' + contamination_color + '</li>';
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user