mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
[MIRROR] allow vorebelly display names (#11541)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
afdd68dfb6
commit
8724a009b4
@@ -95,6 +95,8 @@
|
||||
type == BELLY_MODE_STEAL || type == BELLY_MODE_EGG || type == BELLY_MODE_SHRINK || type == BELLY_MODE_GROW || type == BELLY_MODE_UNABSORB || type == BELLY_TRASH_EATER_IN || type==BELLY_TRASH_EATER_OUT ||\
|
||||
type == BELLY_LIQUID_MESSAGE1 || type == BELLY_LIQUID_MESSAGE2 || type == BELLY_LIQUID_MESSAGE3 || type == BELLY_LIQUID_MESSAGE4 || type == BELLY_LIQUID_MESSAGE5)
|
||||
|
||||
#define OPTIONAL_BELLY_MESSSAGES list(EXAMINES, EXAMINES_ABSORBED, BELLY_MODE_DIGEST, BELLY_MODE_HOLD, BELLY_MODE_HOLD_ABSORB, BELLY_MODE_ABSORB, BELLY_MODE_HEAL, BELLY_MODE_DRAIN, BELLY_MODE_STEAL, BELLY_MODE_EGG, BELLY_MODE_SHRINK, BELLY_MODE_GROW, BELLY_MODE_UNABSORB)
|
||||
|
||||
// Soulcatcher Message Options
|
||||
#define SC_INTERIOR_MESSAGE "sc_int"
|
||||
#define SC_CAPTURE_MEESAGE "sc_cap"
|
||||
|
||||
@@ -90,3 +90,7 @@
|
||||
//Vorespawn flags
|
||||
#define VS_FLAG_ABSORB_YES 0x1
|
||||
#define VS_FLAG_ABSORB_PREY 0x2
|
||||
|
||||
//Message display flags
|
||||
#define MS_FLAG_STRUGGLE_OUTSIDE 0x1
|
||||
#define MS_FLAG_STRUGGLE_ABSORBED_OUTSIDE 0x2
|
||||
|
||||
@@ -162,14 +162,14 @@
|
||||
var/mob/living/target = pick(potentials)
|
||||
if(can_be_drop_pred && istype(target) && target.devourable && target.can_be_drop_prey && target.phase_vore && vore_selected && phase_vore)
|
||||
target.forceMove(vore_selected)
|
||||
to_chat(target, span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
|
||||
to_chat(src, span_vwarning("You phase around [target], [vore_selected.vore_verb]ing them into your [vore_selected.name]!"))
|
||||
to_chat(target, span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vwarning("You phase around [target], [vore_selected.vore_verb]ing them into your [vore_selected.get_belly_name()]!"))
|
||||
our_prey = target
|
||||
else if(can_be_drop_prey && istype(target) && devourable && target.can_be_drop_pred && target.phase_vore && target.vore_selected && phase_vore)
|
||||
our_prey = src
|
||||
forceMove(target.vore_selected)
|
||||
to_chat(target, span_vwarning("\The [src] phases into you, [target.vore_selected.vore_verb]ing them into your [target.vore_selected.name]!"))
|
||||
to_chat(src, span_vwarning("You phase into [target], having them [target.vore_selected.vore_verb] you into their [target.vore_selected.name]!"))
|
||||
to_chat(target, span_vwarning("\The [src] phases into you, [target.vore_selected.vore_verb]ing them into your [target.vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vwarning("You phase into [target], having them [target.vore_selected.vore_verb] you into their [target.vore_selected.get_belly_name()]!"))
|
||||
if(our_prey)
|
||||
for(var/obj/item/flashlight/held_lights in our_prey.contents)
|
||||
if(istype(held_lights,/obj/item/flashlight/glowstick) ||istype(held_lights,/obj/item/flashlight/flare) ) //No affecting glowsticks or flares...As funny as that is
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(B.absorbedrename_enabled)
|
||||
var/formatted_name = B.absorbedrename_name
|
||||
formatted_name = replacetext(formatted_name,"%pred", B.owner)
|
||||
formatted_name = replacetext(formatted_name,"%belly",B.name)
|
||||
formatted_name = replacetext(formatted_name,"%belly", B.get_belly_name())
|
||||
formatted_name = replacetext(formatted_name,"%prey", name)
|
||||
message = span_emote(span_bold("[formatted_name]") + " [input]")
|
||||
else
|
||||
|
||||
@@ -206,9 +206,9 @@ Book Cart End
|
||||
|
||||
/// Proc that handles sending the book information to the user, as well as some housekeeping stuff.
|
||||
/obj/item/book/proc/display_content(mob/living/user)
|
||||
var/datum/browser/popup = new(user, "book", "<TT><I>Penned by [author].</I></TT>")
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
if(!findtext(dat, regex("^<html")))
|
||||
dat = "<html>[dat]</html>"
|
||||
user << browse(replacetext(dat, "<html>", "<html><TT><I>Penned by [author].</I></TT> <BR>"), "window=book")
|
||||
|
||||
/obj/item/book/attackby(obj/item/W, mob/user)
|
||||
if(carved)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if(B.absorbedrename_enabled)
|
||||
var/formatted_name = B.absorbedrename_name
|
||||
formatted_name = replacetext(formatted_name,"%pred", B.owner)
|
||||
formatted_name = replacetext(formatted_name,"%belly",B.name)
|
||||
formatted_name = replacetext(formatted_name,"%belly", B.get_belly_name())
|
||||
formatted_name = replacetext(formatted_name,"%prey", name)
|
||||
return formatted_name
|
||||
return real_name
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
for(var/mob/living/M in target_list)
|
||||
if(M.devourable && M.can_be_drop_prey)
|
||||
M.forceMove(vore_selected)
|
||||
to_chat(M,span_vwarning("In a bright flash of white light, you suddenly find yourself trapped in \the [src]'s [vore_selected.name]!"))
|
||||
to_chat(M,span_vwarning("In a bright flash of white light, you suddenly find yourself trapped in \the [src]'s [vore_selected.get_belly_name()]!"))
|
||||
species.update_lleill_hud(src)
|
||||
|
||||
/datum/power/lleill/contact
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target, force = TRUE)
|
||||
target.forceMove(vore_selected)
|
||||
to_chat(target,span_warning("\The [src] quickly engulfs you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
|
||||
to_chat(target,span_warning("\The [src] quickly engulfs you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
update_canmove()
|
||||
|
||||
/mob/living/simple_mob/protean_blob/update_canmove()
|
||||
|
||||
@@ -734,8 +734,8 @@
|
||||
if(target.buckled) //how are you buckled in the water?!
|
||||
target.buckled.unbuckle_mob()
|
||||
target.visible_message(span_vwarning("\The [target] suddenly disappears, being dragged into the water!"),\
|
||||
span_vdanger("You are dragged below the water and feel yourself slipping directly into \the [src]'s [lowertext(vore_selected)]!"))
|
||||
to_chat(src, span_vnotice("You successfully drag \the [target] into the water, slipping them into your [lowertext(vore_selected)]."))
|
||||
span_vdanger("You are dragged below the water and feel yourself slipping directly into \the [src]'s [vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vnotice("You successfully drag \the [target] into the water, slipping them into your [vore_selected.get_belly_name()]."))
|
||||
target.forceMove(src.vore_selected)
|
||||
|
||||
/mob/living/carbon/human/proc/toggle_pain_module()
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
var/mob/living/target = pick(potentials)
|
||||
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
|
||||
target.forceMove(vore_selected)
|
||||
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
|
||||
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
|
||||
// Do this after the potential vore, so we get the belly
|
||||
update_icon()
|
||||
@@ -205,7 +205,7 @@
|
||||
var/mob/living/target = pick(potentials)
|
||||
if(istype(target) && target.devourable && target.can_be_drop_prey && vore_selected)
|
||||
target.forceMove(vore_selected)
|
||||
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
|
||||
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
|
||||
// Do this after the potential vore, so we get the belly
|
||||
update_icon()
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target, force = TRUE)
|
||||
target.forceMove(vore_selected)
|
||||
to_chat(target,span_vwarning("\The [src] quickly engulfs you, [vore_selected.vore_verb]ing you into their [vore_selected.name]!"))
|
||||
to_chat(target,span_vwarning("\The [src] quickly engulfs you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(B.absorbedrename_enabled)
|
||||
var/formatted_name = B.absorbedrename_name
|
||||
formatted_name = replacetext(formatted_name,"%pred", B.owner)
|
||||
formatted_name = replacetext(formatted_name,"%belly",B.name)
|
||||
formatted_name = replacetext(formatted_name,"%belly", B.get_belly_name())
|
||||
formatted_name = replacetext(formatted_name,"%prey", name)
|
||||
message = span_emote_subtle(span_bold("[formatted_name]") + " " + span_italics("[input]"))
|
||||
if(!(subtle_mode == "Adjacent Turfs (Default)"))
|
||||
@@ -301,7 +301,7 @@
|
||||
if(B.absorbedrename_enabled)
|
||||
formatted_name = B.absorbedrename_name
|
||||
formatted_name = replacetext(formatted_name,"%pred", B.owner)
|
||||
formatted_name = replacetext(formatted_name,"%belly",B.name)
|
||||
formatted_name = replacetext(formatted_name,"%belly", B.get_belly_name())
|
||||
formatted_name = replacetext(formatted_name,"%prey", "\The [M]")
|
||||
to_chat(pb, span_psay("[formatted_name] thinks, \"[message]\""))
|
||||
else
|
||||
@@ -415,7 +415,7 @@
|
||||
if(B.absorbedrename_enabled)
|
||||
formatted_name = B.absorbedrename_name
|
||||
formatted_name = replacetext(formatted_name,"%pred", B.owner)
|
||||
formatted_name = replacetext(formatted_name,"%belly",B.name)
|
||||
formatted_name = replacetext(formatted_name,"%belly", B.get_belly_name())
|
||||
formatted_name = replacetext(formatted_name,"%prey", "\The [M]")
|
||||
to_chat(pb, span_pemote("[formatted_name] [message]"))
|
||||
else
|
||||
|
||||
@@ -105,9 +105,12 @@
|
||||
break
|
||||
if(!new_belly && length(host.vore_organs) < BELLIES_MAX)
|
||||
new_belly = new(host)
|
||||
new_belly.name = belly_data["name"]
|
||||
new_belly.name = html_encode(belly_data["name"])
|
||||
if(!new_belly) continue
|
||||
|
||||
if(istext(belly_data["display_name"]))
|
||||
new_belly.display_name = html_encode(belly_data["display_name"])
|
||||
|
||||
// Controls
|
||||
if(istext(belly_data["mode"]))
|
||||
var/new_mode = html_encode(belly_data["mode"])
|
||||
@@ -442,6 +445,10 @@
|
||||
if(new_emotes_unabsorb)
|
||||
new_belly.set_messages(new_emotes_unabsorb,BELLY_MODE_UNABSORB, limit = BELLIES_IDLE_MAX)
|
||||
|
||||
if(isnum(belly_data["displayed_message_flags"]))
|
||||
new_belly.displayed_message_flags = NONE
|
||||
new_belly.toggle_displayed_message_flags(belly_data["displayed_message_flags"])
|
||||
|
||||
// Options
|
||||
if(isnum(belly_data["can_taste"]))
|
||||
var/new_can_taste = belly_data["can_taste"]
|
||||
|
||||
@@ -196,7 +196,7 @@ GLOBAL_LIST_INIT(vore_words_snake, list("snake","serpent","reptilian","noodle","
|
||||
else
|
||||
. = "[message]"
|
||||
|
||||
. = replacetext(., "%belly", lowertext(name))
|
||||
. = replacetext(., "%belly", get_belly_name())
|
||||
. = replacetext(., "%pred", owner)
|
||||
. = replacetext(., "%prey", prey)
|
||||
|
||||
@@ -435,17 +435,18 @@ GLOBAL_LIST_INIT(vore_words_snake, list("snake","serpent","reptilian","noodle","
|
||||
else
|
||||
raw_list = list(raw_text)
|
||||
|
||||
for(var/i = 1, i <= raw_list.len, i++)
|
||||
for(var/i = 1, i <= LAZYLEN(raw_list), i++)
|
||||
raw_list[i] = html_encode(raw_list[i])
|
||||
if(!length(raw_list[i]))
|
||||
raw_list.Cut(i, i + 1)
|
||||
i--
|
||||
if(raw_list.len > 10)
|
||||
|
||||
if(LAZYLEN(raw_list) > 10)
|
||||
raw_list.Cut(11)
|
||||
log_debug("[owner] tried to set [lowertext(name)] with 11+ messages")
|
||||
|
||||
var/realIndex = 0
|
||||
for(var/i = 1, i <= raw_list.len, i++)
|
||||
for(var/i = 1, i <= LAZYLEN(raw_list), i++)
|
||||
realIndex++
|
||||
raw_list[i] = readd_quotes(raw_list[i])
|
||||
//Also fix % sign for var replacement
|
||||
@@ -458,7 +459,12 @@ GLOBAL_LIST_INIT(vore_words_snake, list("snake","serpent","reptilian","noodle","
|
||||
raw_list.Cut(i, i + 1)
|
||||
i--
|
||||
|
||||
ASSERT(raw_list.len <= 10) //Sanity
|
||||
var/final_length = LAZYLEN(raw_list)
|
||||
if(!final_length && !(type in OPTIONAL_BELLY_MESSSAGES))
|
||||
to_chat(owner, span_warning("At least one message needs to be set for: [type]"))
|
||||
return
|
||||
|
||||
ASSERT(final_length <= 10) //Sanity
|
||||
|
||||
switch(type)
|
||||
if(STRUGGLE_OUTSIDE)
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
var/formatted_message
|
||||
var/raw_message = pick(fullness1_messages)
|
||||
|
||||
formatted_message = replacetext(raw_message,"%belly",lowertext(name))
|
||||
formatted_message = replacetext(raw_message,"%belly", get_belly_name())
|
||||
formatted_message = replacetext(formatted_message, "%pred", owner)
|
||||
|
||||
return(span_red("[formatted_message]<BR>"))
|
||||
@@ -238,7 +238,7 @@
|
||||
var/formatted_message
|
||||
var/raw_message = pick(fullness2_messages)
|
||||
|
||||
formatted_message = replacetext(raw_message,"%belly",lowertext(name))
|
||||
formatted_message = replacetext(raw_message,"%belly", get_belly_name())
|
||||
formatted_message = replacetext(formatted_message, "%pred", owner)
|
||||
|
||||
return(span_red("[formatted_message]<BR>"))
|
||||
@@ -249,7 +249,7 @@
|
||||
var/formatted_message
|
||||
var/raw_message = pick(fullness3_messages)
|
||||
|
||||
formatted_message = replacetext(raw_message,"%belly",lowertext(name))
|
||||
formatted_message = replacetext(raw_message,"%belly", get_belly_name())
|
||||
formatted_message = replacetext(formatted_message, "%pred", owner)
|
||||
|
||||
return(span_red("[formatted_message]<BR>"))
|
||||
@@ -260,7 +260,7 @@
|
||||
var/formatted_message
|
||||
var/raw_message = pick(fullness4_messages)
|
||||
|
||||
formatted_message = replacetext(raw_message,"%belly",lowertext(name))
|
||||
formatted_message = replacetext(raw_message,"%belly", get_belly_name())
|
||||
formatted_message = replacetext(formatted_message, "%pred", owner)
|
||||
|
||||
return(span_red("[formatted_message]<BR>"))
|
||||
@@ -271,7 +271,7 @@
|
||||
var/formatted_message
|
||||
var/raw_message = pick(fullness5_messages)
|
||||
|
||||
formatted_message = replacetext(raw_message,"%belly",lowertext(name))
|
||||
formatted_message = replacetext(raw_message,"%belly", get_belly_name())
|
||||
formatted_message = replacetext(formatted_message, "%pred", owner)
|
||||
|
||||
return(span_red("[formatted_message]<BR>"))
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/obj/belly
|
||||
name = "belly" // Name of this location
|
||||
desc = "It's a belly! You're in it!" // Flavor text description of inside sight/sound/smells/feels.
|
||||
var/display_name = "" // Optional display name
|
||||
var/message_mode = FALSE // If all options for messages are shown
|
||||
var/vore_sound = "Gulp" // Sound when ingesting someone
|
||||
var/vore_verb = "ingest" // Verb for eating with this in messages
|
||||
@@ -210,6 +211,7 @@
|
||||
var/liquid_fullness3_messages = FALSE
|
||||
var/liquid_fullness4_messages = FALSE
|
||||
var/liquid_fullness5_messages = FALSE
|
||||
var/displayed_message_flags = ALL
|
||||
var/vorespawn_blacklist = FALSE
|
||||
var/vorespawn_whitelist = list()
|
||||
var/vorespawn_absorbed = 0
|
||||
@@ -271,6 +273,7 @@
|
||||
var/list/saving = list(
|
||||
"name",
|
||||
"desc",
|
||||
"display_name",
|
||||
"absorbed_desc",
|
||||
"message_mode",
|
||||
"vore_sound",
|
||||
@@ -405,6 +408,7 @@
|
||||
"fullness3_messages",
|
||||
"fullness4_messages",
|
||||
"fullness5_messages",
|
||||
"displayed_message_flags",
|
||||
"vorespawn_blacklist",
|
||||
"vorespawn_whitelist",
|
||||
"vorespawn_absorbed",
|
||||
@@ -1297,9 +1301,10 @@
|
||||
return
|
||||
return
|
||||
|
||||
var/struggle_outer_message = span_valert(belly_format_string(struggle_messages_outside, R))
|
||||
var/struggle_user_message = span_valert(belly_format_string(struggle_messages_inside, R))
|
||||
|
||||
if(displayed_message_flags & MS_FLAG_STRUGGLE_OUTSIDE)
|
||||
var/struggle_outer_message = span_valert(belly_format_string(struggle_messages_outside, R))
|
||||
if(private_struggle)
|
||||
to_chat(owner, struggle_outer_message)
|
||||
else
|
||||
@@ -1443,9 +1448,10 @@
|
||||
|
||||
R.setClickCooldown(50)
|
||||
|
||||
var/struggle_outer_message = span_valert(belly_format_string(absorbed_struggle_messages_outside, R, use_absorbed_count = TRUE))
|
||||
var/struggle_user_message = span_valert(belly_format_string(absorbed_struggle_messages_inside, R, use_absorbed_count = TRUE))
|
||||
|
||||
if(displayed_message_flags & MS_FLAG_STRUGGLE_ABSORBED_OUTSIDE)
|
||||
var/struggle_outer_message = span_valert(belly_format_string(absorbed_struggle_messages_outside, R, use_absorbed_count = TRUE))
|
||||
if(private_struggle)
|
||||
to_chat(owner, struggle_outer_message)
|
||||
else
|
||||
@@ -1693,6 +1699,7 @@
|
||||
//// Non-object variables
|
||||
dupe.name = name
|
||||
dupe.desc = desc
|
||||
dupe.display_name = display_name
|
||||
dupe.message_mode = message_mode
|
||||
dupe.absorbed_desc = absorbed_desc
|
||||
dupe.vore_sound = vore_sound
|
||||
@@ -1745,6 +1752,7 @@
|
||||
dupe.liquid_fullness3_messages = liquid_fullness3_messages
|
||||
dupe.liquid_fullness4_messages = liquid_fullness4_messages
|
||||
dupe.liquid_fullness5_messages = liquid_fullness5_messages
|
||||
dupe.displayed_message_flags = displayed_message_flags
|
||||
dupe.reagent_name = reagent_name
|
||||
dupe.reagent_chosen = reagent_chosen
|
||||
dupe.reagentid = reagentid
|
||||
@@ -2203,3 +2211,12 @@
|
||||
for(var/atom/movable/AM as anything in contents)
|
||||
//if(AM.atom_flags & ATOM_HEAR)
|
||||
. += AM
|
||||
|
||||
/obj/belly/proc/get_belly_name(original)
|
||||
var/display_name = ""
|
||||
if(original)
|
||||
return display_name ? display_name : name
|
||||
return display_name ? lowertext(display_name) : lowertext(name)
|
||||
|
||||
/obj/belly/proc/toggle_displayed_message_flags(flags_to_set)
|
||||
displayed_message_flags ^= flags_to_set
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
// General Information
|
||||
belly_data["name"] = B.name
|
||||
belly_data["desc"] = B.desc
|
||||
belly_data["display_name"] = B.display_name
|
||||
belly_data["absorbed_desc"] = B.absorbed_desc
|
||||
belly_data["vore_verb"] = B.vore_verb
|
||||
belly_data["release_verb"] = B.release_verb
|
||||
@@ -279,6 +280,8 @@
|
||||
for(var/msg in B.emote_lists[DM_UNABSORB])
|
||||
belly_data["emotes_unabsorb"] += msg
|
||||
|
||||
belly_data["displayed_message_flags"] = B.displayed_message_flags
|
||||
|
||||
// Options
|
||||
belly_data["digest_brute"] = B.digest_brute
|
||||
belly_data["digest_burn"] = B.digest_burn
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
var/obj/belly/B = tgui_input_list(user, "Which belly?", "Select A Belly", vore_organs)
|
||||
if(!istype(B))
|
||||
return TRUE
|
||||
visible_message(span_warning("[user] is trying to stuff a beacon into [src]'s [lowertext(B.name)]!"),
|
||||
visible_message(span_warning("[user] is trying to stuff a beacon into [src]'s [B.get_belly_name()]!"),
|
||||
span_warning("[user] is trying to stuff a beacon into you!"))
|
||||
if(do_after(user,30,src))
|
||||
user.drop_item()
|
||||
@@ -1071,8 +1071,8 @@
|
||||
if(latejoin_prey)
|
||||
dat += span_bold("Late join prey auto accept:") + " [no_latejoin_prey_warning ? span_green("Enabled") : span_red("Disabled")]<br>"
|
||||
dat += span_bold("Global Vore Privacy is:") + " [eating_privacy_global ? span_green("Subtle") : span_red("Loud")]<br>"
|
||||
dat += span_bold("Current active belly:") + " [vore_selected ? vore_selected.name : "None"]<br>"
|
||||
dat += span_bold("Belly rub target:") + " [belly_rub_target ? belly_rub_target : (vore_selected ? vore_selected.name : "None")]<br>"
|
||||
dat += span_bold("Current active belly:") + " [vore_selected ? vore_selected.get_belly_name(TRUE) : "None"]<br>"
|
||||
dat += span_bold("Belly rub target:") + " [belly_rub_target ? belly_rub_target : (vore_selected ? vore_selected.get_belly_name(TRUE) : "None")]<br>"
|
||||
var/datum/browser/popup = new(user, "[name]mvp", "Vore Prefs: [src]", 300, 700, src)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
@@ -1401,9 +1401,9 @@
|
||||
return FALSE
|
||||
|
||||
if(TG == user)
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [lowertext(RTB.name)] into their [lowertext(TB.name)]."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [RTB.get_belly_name()] into their [TB.get_belly_name()]."))
|
||||
else
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] into their [lowertext(TB.name)]."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [RTB.get_belly_name()] into their [TB.get_belly_name()]."))
|
||||
add_attack_logs(user,TR,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to [TR]'s [TB]") //Bonus for staff so they can see if people have abused transfer and done pref breaks
|
||||
RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_VORE, 1, 0, TB)
|
||||
if(RTB.count_liquid_for_sprite || TB.count_liquid_for_sprite)
|
||||
@@ -1420,13 +1420,13 @@
|
||||
if(!Adjacent(TR) || !Adjacent(TG))
|
||||
return //No long distance transfer
|
||||
if(!TB.reagents?.get_free_space())
|
||||
to_chat(user, span_vnotice("[TR]'s [lowertext(TB.name)] is full!"))
|
||||
to_chat(user, span_vnotice("[TR]'s [TB.get_belly_name()] is full!"))
|
||||
return FALSE
|
||||
|
||||
if(TG == user)
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [lowertext(RTB.name)] into [TR]'s [lowertext(TB.name)]."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [RTB.get_belly_name()] into [TR]'s [TB.get_belly_name()]."))
|
||||
else
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]s [lowertext(RTB.name)] into [TR]'s [lowertext(TB.name)]."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]s [RTB.get_belly_name()] into [TR]'s [TB.get_belly_name()]."))
|
||||
|
||||
RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_VORE, 1, 0, TB)
|
||||
add_attack_logs(user,TR,"Transfered reagents from [TG]'s [RTB] to [TR]'s [TB]") //Bonus for staff so they can see if people have abused transfer and done pref breaks
|
||||
@@ -1448,9 +1448,9 @@
|
||||
|
||||
if(TR == user) //Proceed, we dont need to have prefs enabled for transfer within user
|
||||
if(TG == user)
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [lowertext(RTB.name)] into their stomach."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [RTB.get_belly_name()] into their stomach."))
|
||||
else
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] into their stomach."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [RTB.get_belly_name()] into their stomach."))
|
||||
RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_INGEST, 1, 0, null)
|
||||
add_attack_logs(user,TR,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to [TR]'s Stomach")
|
||||
if(RTB.count_liquid_for_sprite)
|
||||
@@ -1462,9 +1462,9 @@
|
||||
|
||||
else
|
||||
if(TG == user)
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [lowertext(RTB.name)] into [TR]'s stomach."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [RTB.get_belly_name()] into [TR]'s stomach."))
|
||||
else
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] into [TR]'s stomach."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [RTB.get_belly_name()] into [TR]'s stomach."))
|
||||
|
||||
RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_INGEST, 1, 0, null)
|
||||
add_attack_logs(user,TR,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to [TR]'s Stomach") //Bonus for staff so they can see if people have abused transfer and done pref breaks
|
||||
@@ -1491,9 +1491,9 @@
|
||||
return //No long distance transfer
|
||||
|
||||
if(TG == user)
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [lowertext(RTB.name)] into [T]."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from their [RTB.get_belly_name()] into [T]."))
|
||||
else
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] into [T]."))
|
||||
user.custom_emote_vr(1, span_vnotice("[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [RTB.get_belly_name()] into [T]."))
|
||||
|
||||
RTB.reagents.vore_trans_to_con(T, transfer_amount, 1, 0)
|
||||
add_attack_logs(user, T,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to a [T]") //Bonus for staff so they can see if people have abused transfer and done pref breaks
|
||||
@@ -1508,13 +1508,13 @@
|
||||
var/puddle_amount = round(amount_removed/5)
|
||||
|
||||
if(puddle_amount == 0)
|
||||
to_chat(user,span_vnotice("[RTB.reagent_name] dripples from the [lowertext(RTB.name)], not enough to form a puddle."))
|
||||
to_chat(user,span_vnotice("[RTB.reagent_name] dripples from the [RTB.get_belly_name()], not enough to form a puddle."))
|
||||
return
|
||||
|
||||
if(TG == user)
|
||||
user.custom_emote_vr(1, span_vnotice("spills [RTB.reagent_name] from their [lowertext(RTB.name)] onto the floor!"))
|
||||
user.custom_emote_vr(1, span_vnotice("spills [RTB.reagent_name] from their [RTB.get_belly_name()] onto the floor!"))
|
||||
else
|
||||
user.custom_emote_vr(1, span_vnotice("spills [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] onto the floor!"))
|
||||
user.custom_emote_vr(1, span_vnotice("spills [RTB.reagent_name] from [TG]'s [RTB.get_belly_name()] onto the floor!"))
|
||||
|
||||
if (RTB.custom_reagentcolor)
|
||||
new /obj/effect/decal/cleanable/blood/reagent(TG.loc, RTB.reagent_name, RTB.custom_reagentcolor, RTB.reagentid, puddle_amount, user.ckey, TG.ckey)
|
||||
@@ -1540,9 +1540,9 @@
|
||||
var/obj/belly/B = T.vore_selected
|
||||
if(istype(B))
|
||||
if(T == src)
|
||||
custom_emote_vr(1, "rubs their [belly_rub_target ? belly_rub_target : lowertext(B.name)].")
|
||||
custom_emote_vr(1, "rubs their [belly_rub_target ? belly_rub_target : B.get_belly_name()].")
|
||||
else
|
||||
custom_emote_vr(1, "gives some rubs over [T]'s [T.belly_rub_target ? T.belly_rub_target : lowertext(B.name)].")
|
||||
custom_emote_vr(1, "gives some rubs over [T]'s [T.belly_rub_target ? T.belly_rub_target : B.get_belly_name()].")
|
||||
B.quick_cycle()
|
||||
return TRUE
|
||||
to_chat(src, span_vwarning("There is no suitable belly for rubs."))
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
|
||||
host.vore_selected.name = new_name
|
||||
. = TRUE
|
||||
if("b_display_name")
|
||||
var/new_name = html_encode(params["val"])
|
||||
if(length(new_name) > BELLIES_NAME_MAX)
|
||||
return FALSE
|
||||
host.vore_selected.display_name = new_name
|
||||
. = TRUE
|
||||
if("b_message_mode")
|
||||
host.vore_selected.message_mode = !host.vore_selected.message_mode
|
||||
. = TRUE
|
||||
@@ -523,6 +529,12 @@
|
||||
if("b_display_absorbed_examine")
|
||||
host.vore_selected.display_absorbed_examine = !host.vore_selected.display_absorbed_examine
|
||||
. = TRUE
|
||||
if("b_display_outside_struggle")
|
||||
host.vore_selected.toggle_displayed_message_flags(MS_FLAG_STRUGGLE_OUTSIDE)
|
||||
. = TRUE
|
||||
if("b_display_absorbed_outside_struggle")
|
||||
host.vore_selected.toggle_displayed_message_flags(MS_FLAG_STRUGGLE_ABSORBED_OUTSIDE)
|
||||
. = TRUE
|
||||
if("b_grow_shrink")
|
||||
var/new_grow = text2num(params["val"])
|
||||
if (!isnum(new_grow))
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/list/belly_data = list()
|
||||
belly_data += list(
|
||||
"name" = B.name,
|
||||
"display_name" = B.display_name,
|
||||
"ref" = "\ref[B]"
|
||||
)
|
||||
if(full_data)
|
||||
@@ -97,7 +98,10 @@
|
||||
var/list/selected_list = null
|
||||
if(owner.vore_selected)
|
||||
var/obj/belly/selected = owner.vore_selected
|
||||
selected_list = list("belly_name" = selected.name)
|
||||
selected_list = list(
|
||||
"belly_name" = selected.name,
|
||||
"display_name" = selected.display_name
|
||||
)
|
||||
if(active_vore_tab == CONTROL_TAB)
|
||||
var/list/addons = list()
|
||||
for(var/flag_name in selected.mode_flag_list)
|
||||
@@ -108,8 +112,8 @@
|
||||
"addons" = addons,
|
||||
"name_length" = BELLIES_NAME_MAX,
|
||||
"name_min" = BELLIES_NAME_MIN,
|
||||
"mode_options" = host.vore_selected.digest_modes,
|
||||
"item_mode_options" = host.vore_selected.item_digest_modes,
|
||||
"mode_options" = selected.digest_modes,
|
||||
"item_mode_options" = selected.item_digest_modes,
|
||||
|
||||
)
|
||||
selected_list["belly_mode_data"] = belly_mode_data
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
tab_data["max_length"] = BELLIES_EXAMINE_MAX
|
||||
tab_data["active_message"] = selected.examine_messages
|
||||
tab_data["set_action"] = EXAMINES
|
||||
tab_data["tooltip"] = "Displayed to nearby players during examination when the vorgan is full."
|
||||
tab_data["tooltip"] = "Displayed to nearby players during examination when the vorgan is full. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == WITH_ABSORBED_PREY)
|
||||
tab_data["max_length"] = BELLIES_EXAMINE_MAX
|
||||
tab_data["active_message"] = selected.examine_messages_absorbed
|
||||
tab_data["set_action"] = EXAMINES_ABSORBED
|
||||
tab_data["tooltip"] = "Displayed to nearby players during examination when the vorgan contains absorbed prey."
|
||||
tab_data["tooltip"] = "Displayed to nearby players during examination when the vorgan contains absorbed prey. (All fields can be empty)"
|
||||
tab_data["button_label"] = "Display Absorbed Examine"
|
||||
tab_data["button_action"] = "b_display_absorbed_examine"
|
||||
tab_data["button_data"] = selected.display_absorbed_examine
|
||||
@@ -110,6 +110,10 @@
|
||||
tab_data["active_message"] = selected.struggle_messages_outside
|
||||
tab_data["set_action"] = STRUGGLE_OUTSIDE
|
||||
tab_data["tooltip"] = "Displayed to nearby players when your prey resists."
|
||||
tab_data["button_label"] = "Display Outside Struggle"
|
||||
tab_data["button_action"] = "b_display_outside_struggle"
|
||||
tab_data["button_data"] = selected.displayed_message_flags & MS_FLAG_STRUGGLE_OUTSIDE
|
||||
tab_data["button_tooltip"] = "the struggle messages to the outside." // those will automatically be preceeded by Enables / Disables!
|
||||
return tab_data
|
||||
if(selected_message == INSIDE_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_MESSAGE_MAX
|
||||
@@ -125,7 +129,11 @@
|
||||
tab_data["max_length"] = BELLIES_MESSAGE_MAX
|
||||
tab_data["active_message"] = selected.absorbed_struggle_messages_outside
|
||||
tab_data["set_action"] = ABSORBED_STRUGGLE_OUSIDE
|
||||
tab_data["tooltip"] = "Displayed to nearby players when your absorb prey resists."
|
||||
tab_data["tooltip"] = "Displayed to nearby players when your absorbed prey resists."
|
||||
tab_data["button_label"] = "Display Absorbed Outside Struggle"
|
||||
tab_data["button_action"] = "b_display_absorbed_outside_struggle"
|
||||
tab_data["button_data"] = selected.displayed_message_flags & MS_FLAG_STRUGGLE_ABSORBED_OUTSIDE
|
||||
tab_data["button_tooltip"] = "the absrobed struggle messages to the outside." // those will automatically be preceeded by Enables / Disables!
|
||||
return tab_data
|
||||
if(selected_message == INSIDE_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_MESSAGE_MAX
|
||||
@@ -495,67 +503,67 @@
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_DIGEST])
|
||||
tab_data["set_action"] = BELLY_MODE_DIGEST
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting digested."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting digested. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == HOLD_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_HOLD])
|
||||
tab_data["set_action"] = BELLY_MODE_HOLD
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is being held."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is being held. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == HOLDABSORBED_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_HOLD_ABSORBED])
|
||||
tab_data["set_action"] = BELLY_MODE_HOLD_ABSORB
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your absorbed prey is being held."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your absorbed prey is being held. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == ABSORB_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_ABSORB])
|
||||
tab_data["set_action"] = BELLY_MODE_ABSORB
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting absorbed."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting absorbed. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == HEAL_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_HEAL])
|
||||
tab_data["set_action"] = BELLY_MODE_HEAL
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting healed."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting healed. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == DRAIN_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_DRAIN])
|
||||
tab_data["set_action"] = BELLY_MODE_DRAIN
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting drained."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting drained. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == STEAL_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_SIZE_STEAL])
|
||||
tab_data["set_action"] = BELLY_MODE_STEAL
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey's size is stolen."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey's size is stolen. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == EGG_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_EGG])
|
||||
tab_data["set_action"] = BELLY_MODE_EGG
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting getting encased in an egg."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting getting encased in an egg. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == SHRINK_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_SHRINK])
|
||||
tab_data["set_action"] = BELLY_MODE_SHRINK
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting shrunk."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting shrunk. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == GROW_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_GROW])
|
||||
tab_data["set_action"] = BELLY_MODE_GROW
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting grown."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting grown. (All fields can be empty)"
|
||||
return tab_data
|
||||
if(selected_message == UNABSORB_MESSAGE)
|
||||
tab_data["max_length"] = BELLIES_IDLE_MAX
|
||||
tab_data["active_message"] = SANITIZE_LIST(selected.emote_lists[DM_UNABSORB])
|
||||
tab_data["set_action"] = BELLY_MODE_UNABSORB
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting unabsorbed."
|
||||
tab_data["tooltip"] = "Cyclic idle messages while your prey is getting unabsorbed. (All fields can be empty)"
|
||||
return tab_data
|
||||
|
||||
if(message_option == VPANEL_LIQUIDS_TAB)
|
||||
|
||||
@@ -42,6 +42,6 @@
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob()
|
||||
target.visible_message(span_vwarning("\The [target] suddenly disappears somewhere above!"),\
|
||||
span_vdanger("You are dragged above and feel yourself slipping directly into \the [src]'s [vore_selected]!"))
|
||||
to_chat(src, span_vnotice("You successfully snatch \the [target], slipping them into your [vore_selected]."))
|
||||
span_vdanger("You are dragged above and feel yourself slipping directly into \the [src]'s [vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vnotice("You successfully snatch \the [target], slipping them into your [vore_selected.get_belly_name()]."))
|
||||
target.forceMove(src.vore_selected)
|
||||
|
||||
@@ -636,7 +636,7 @@
|
||||
return TRUE
|
||||
//vore sprites color
|
||||
if("set_belly_rub")
|
||||
var/rub_target = params["val"]
|
||||
var/rub_target = html_encode(params["val"])
|
||||
if(rub_target == "Current Selected")
|
||||
host.belly_rub_target = null
|
||||
else
|
||||
|
||||
@@ -28,7 +28,7 @@ type Data = {
|
||||
};
|
||||
|
||||
const sortTypes = {
|
||||
Alphabetical: (a: sortable, b: sortable) => a.name > b.name,
|
||||
Alphabetical: (a: sortable, b: sortable) => a.name.localeCompare(b.name),
|
||||
'By availability': (a: sortable, b: sortable) =>
|
||||
-(a.affordable - b.affordable),
|
||||
'By price': (a: sortable, b: sortable) => a.price - b.price,
|
||||
|
||||
@@ -24,7 +24,7 @@ type sortable = {
|
||||
};
|
||||
|
||||
const sortTypes = {
|
||||
Alphabetical: (a: sortable, b: sortable) => a.name > b.name,
|
||||
Alphabetical: (a: sortable, b: sortable) => a.name.localeCompare(b.name),
|
||||
'By price': (a: sortable, b: sortable) => a.price - b.price,
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ type Data = {
|
||||
type sortable = { name: string; affordable: number; price: number };
|
||||
|
||||
const sortTypes = {
|
||||
Alphabetical: (a: sortable, b: sortable) => a.name > b.name,
|
||||
Alphabetical: (a: sortable, b: sortable) => a.name.localeCompare(b.name),
|
||||
'By availability': (a: sortable, b: sortable) =>
|
||||
-(a.affordable - b.affordable),
|
||||
'By price': (a: sortable, b: sortable) => a.price - b.price,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type ReactNode, useEffect, useRef, useState } from 'react';
|
||||
import { type ReactNode, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { useBackend } from 'tgui/backend';
|
||||
import {
|
||||
Box,
|
||||
@@ -96,11 +96,11 @@ const AreaMapper = (props: {
|
||||
maxEntries: number;
|
||||
}) => {
|
||||
const { entry, limit, action, exactLength, maxEntries } = props;
|
||||
const version = useRef(0); // No state needed, we call a backend update
|
||||
|
||||
const filledArray = [
|
||||
...entry,
|
||||
...new Array(maxEntries - entry.length).fill(''),
|
||||
];
|
||||
const filledArray = useMemo(() => {
|
||||
return [...entry, ...new Array(maxEntries - entry.length).fill('')];
|
||||
}, [entry, maxEntries]);
|
||||
|
||||
function performAction(value: string, index: number) {
|
||||
const newEntry = [...filledArray];
|
||||
@@ -111,11 +111,14 @@ const AreaMapper = (props: {
|
||||
}
|
||||
const filtered = newEntry.filter(Boolean);
|
||||
action(filtered);
|
||||
if (!filtered.length) {
|
||||
version.current += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return filledArray.map((singleEntry, index) => (
|
||||
<CountedTextElement
|
||||
key={index}
|
||||
key={`${index}-${entry.length}-${version.current}`}
|
||||
limit={limit}
|
||||
entry={singleEntry}
|
||||
action={performAction}
|
||||
@@ -217,6 +220,7 @@ export const VorePanelEditTextArea = (props: {
|
||||
<Stack.Item>
|
||||
{Array.isArray(entry) ? (
|
||||
<AreaMapper
|
||||
key={`${action}-${subAction}`}
|
||||
limit={limit}
|
||||
entry={entry}
|
||||
exactLength={exactLength}
|
||||
|
||||
@@ -39,6 +39,7 @@ export const VoreSelectedBelly = (props: {
|
||||
} = props;
|
||||
const {
|
||||
belly_name,
|
||||
display_name,
|
||||
belly_mode_data,
|
||||
belly_description_data,
|
||||
belly_option_data,
|
||||
@@ -59,6 +60,7 @@ export const VoreSelectedBelly = (props: {
|
||||
editMode={editMode}
|
||||
bellyDropdownNames={bellyDropdownNames}
|
||||
belly_name={belly_name}
|
||||
display_name={display_name}
|
||||
bellyModeData={belly_mode_data}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -164,7 +164,7 @@ export const BellyOptionsLeft = (props: {
|
||||
content={private_struggle ? 'Private' : 'Loud'}
|
||||
tooltip={
|
||||
(private_struggle ? 'Dis' : 'En') +
|
||||
'ables subtle struggle messages.'
|
||||
'ables private struggle messages.'
|
||||
}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
|
||||
@@ -11,11 +11,18 @@ export const VoreSelectedBellyControls = (props: {
|
||||
bellyDropdownNames: DropdownEntry[];
|
||||
editMode: boolean;
|
||||
belly_name: string;
|
||||
display_name: string;
|
||||
bellyModeData: bellyModeData;
|
||||
}) => {
|
||||
const { act } = useBackend();
|
||||
|
||||
const { bellyDropdownNames, belly_name, bellyModeData, editMode } = props;
|
||||
const {
|
||||
bellyDropdownNames,
|
||||
belly_name,
|
||||
display_name,
|
||||
bellyModeData,
|
||||
editMode,
|
||||
} = props;
|
||||
const {
|
||||
mode,
|
||||
item_mode,
|
||||
@@ -83,6 +90,22 @@ export const VoreSelectedBellyControls = (props: {
|
||||
}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Display Name">
|
||||
<VorePanelEditText
|
||||
editMode={editMode}
|
||||
limit={name_length}
|
||||
entry={display_name}
|
||||
action={'set_attribute'}
|
||||
subAction={'b_display_name'}
|
||||
tooltip={
|
||||
'Adjust the optional display name of your belly. This will be shown in chat if set instead of the original name [' +
|
||||
name_min +
|
||||
'-' +
|
||||
name_length +
|
||||
' characters].'
|
||||
}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Mode">
|
||||
<VorePanelEditDropdown
|
||||
editMode={editMode}
|
||||
|
||||
@@ -39,7 +39,7 @@ export const VoreUserPreferencesAesthetic = (props: {
|
||||
const sanitizeCorruption = fixCorruptedData(aestethicMessages.active_message);
|
||||
|
||||
const getBellies = our_bellies.map((belly) => {
|
||||
return belly.name;
|
||||
return belly.display_name ? belly.display_name : belly.name;
|
||||
});
|
||||
|
||||
const locationNames = [...getBellies, 'Current Selected'];
|
||||
|
||||
@@ -52,6 +52,7 @@ export type insideData = {
|
||||
|
||||
export type bellyData = {
|
||||
name: string;
|
||||
display_name: string;
|
||||
ref: string;
|
||||
selected?: BooleanLike;
|
||||
digest_mode?: string;
|
||||
@@ -218,6 +219,7 @@ export type siliconeBellyControls = {
|
||||
|
||||
export type selectedData = {
|
||||
belly_name: string;
|
||||
display_name: string;
|
||||
belly_mode_data?: bellyModeData;
|
||||
belly_description_data?: bellyDescriptionData;
|
||||
belly_option_data?: bellyOptionData;
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import { ItemModeSpan, ModeSpan } from './constants';
|
||||
import {
|
||||
ItemModeSpan,
|
||||
ModeSpan,
|
||||
STRUGGLE_OUTSIDE_ABSORBED_MESSAGE,
|
||||
STRUGGLE_OUTSIDE_MESSAGE,
|
||||
} from './constants';
|
||||
import type { Belly } from './types';
|
||||
import {
|
||||
GetAddons,
|
||||
@@ -12,6 +17,7 @@ export const generateBellyString = (belly: Belly, index: number) => {
|
||||
// General Information
|
||||
name,
|
||||
desc,
|
||||
display_name,
|
||||
message_mode,
|
||||
absorbed_desc,
|
||||
vore_verb,
|
||||
@@ -98,6 +104,7 @@ export const generateBellyString = (belly: Belly, index: number) => {
|
||||
examine_messages_absorbed,
|
||||
trash_eater_in,
|
||||
trash_eater_out,
|
||||
displayed_message_flags,
|
||||
// emote_list,
|
||||
emotes_digest,
|
||||
emotes_hold,
|
||||
@@ -270,9 +277,17 @@ export const generateBellyString = (belly: Belly, index: number) => {
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#digestChanceMessagesPrey${index}" role="tab">Digest Chance Messages (Prey)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#absorbChanceMessagesOwner${index}" role="tab">Absorb Chance Messages (Owner)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#absorbChanceMessagesPrey${index}" role="tab">Absorb Chance Messages (Prey)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#struggleMessagesOutside${index}" role="tab">Struggle Messages (Outside)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#struggleMessagesOutside${index}" role="tab">Struggle Messages (Outside) (${
|
||||
displayed_message_flags & STRUGGLE_OUTSIDE_MESSAGE
|
||||
? '<span style="color: green;">On'
|
||||
: '<span style="color: red;">Off'
|
||||
}</span>)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#struggleMessagesInside${index}" role="tab">Struggle Messages (Inside)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#absorbedStruggleOutside${index}" role="tab">Absorbed Struggle Messages (Outside)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#absorbedStruggleOutside${index}" role="tab">Absorbed Struggle Messages (Outside) (${
|
||||
displayed_message_flags & STRUGGLE_OUTSIDE_ABSORBED_MESSAGE
|
||||
? '<span style="color: green;">On'
|
||||
: '<span style="color: red;">Off'
|
||||
}</span>)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#absorbedStruggleInside${index}" role="tab">Absorbed Struggle Messages (Inside)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#digestMessagesOwner${index}" role="tab">Digest Messages (Owner)</a>`;
|
||||
result += `<a class="list-group-item list-group-item-action" data-bs-toggle="list" href="#digestMessagesPrey${index}" role="tab">Digest Messages (Prey)</a>`;
|
||||
@@ -479,7 +494,6 @@ export const generateBellyString = (belly: Belly, index: number) => {
|
||||
absorbed_struggle_messages_outside?.forEach((msg) => {
|
||||
result += `${msg}<br>`;
|
||||
});
|
||||
result += '</div>';
|
||||
|
||||
result += `<div class="tab-pane fade" id="absorbedStruggleInside${index}" role="messagesTabpanel">`;
|
||||
absorbed_struggle_messages_inside?.forEach((msg) => {
|
||||
|
||||
@@ -74,3 +74,6 @@ export const SoulcatcherSettingsFlag = {
|
||||
'512': 'Catch Drain',
|
||||
'1024': 'SR Vision',
|
||||
};
|
||||
|
||||
export const STRUGGLE_OUTSIDE_MESSAGE = 0x1;
|
||||
export const STRUGGLE_OUTSIDE_ABSORBED_MESSAGE = 0x2;
|
||||
|
||||
@@ -12,6 +12,7 @@ export type Belly = {
|
||||
// General Information
|
||||
name: string;
|
||||
desc: string;
|
||||
display_name: string;
|
||||
message_mode: BooleanLike;
|
||||
absorbed_desc: string;
|
||||
vore_verb: string;
|
||||
@@ -99,6 +100,7 @@ export type Belly = {
|
||||
examine_messages_absorbed: string[];
|
||||
trash_eater_in: string[];
|
||||
trash_eater_out: string[];
|
||||
displayed_message_flags: number;
|
||||
|
||||
// emote_list: string[];
|
||||
emotes_digest: string[];
|
||||
|
||||
Reference in New Issue
Block a user