Vore preference fix + Sounds respect wall barriers (#5623)
* various vore QoLs * removed unused button, added the verb
This commit is contained in:
@@ -1675,14 +1675,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if("load")
|
||||
load_preferences()
|
||||
load_character()
|
||||
attempt_vr(parent.prefs_vr,"load_vore","")
|
||||
if(parent && parent.prefs_vr)
|
||||
attempt_vr(parent.prefs_vr,"load_vore","")
|
||||
|
||||
if("changeslot")
|
||||
if(!load_character(text2num(href_list["num"])))
|
||||
random_character()
|
||||
real_name = random_unique_name(gender)
|
||||
save_character()
|
||||
attempt_vr(parent.prefs_vr,"load_vore","")
|
||||
if(parent && parent.prefs_vr)
|
||||
attempt_vr(parent.prefs_vr,"load_vore","")
|
||||
|
||||
if("tab")
|
||||
if (href_list["tab"])
|
||||
|
||||
@@ -117,7 +117,8 @@
|
||||
return 0
|
||||
for (var/atom/movable/M in internal_contents)
|
||||
M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner.
|
||||
M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP)
|
||||
for(var/mob/living/W in M)
|
||||
W.stop_sound_channel(CHANNEL_PREYLOOP)
|
||||
internal_contents.Remove(M) // Remove from the belly contents
|
||||
|
||||
var/datum/belly/B = check_belly(owner) // This makes sure that the mob behaves properly if released into another mob
|
||||
@@ -135,7 +136,8 @@
|
||||
return FALSE // They weren't in this belly anyway
|
||||
|
||||
M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner.
|
||||
M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP)
|
||||
for(var/mob/living/W in M)
|
||||
W.stop_sound_channel(CHANNEL_PREYLOOP)
|
||||
src.internal_contents.Remove(M) // Remove from the belly contents
|
||||
|
||||
var/datum/belly/B = check_belly(owner)
|
||||
@@ -150,15 +152,11 @@
|
||||
// The purpose of this method is to avoid duplicate code, and ensure that all necessary
|
||||
// steps are taken.
|
||||
/datum/belly/proc/nom_mob(var/mob/prey, var/mob/user)
|
||||
// if (prey.buckled)
|
||||
// prey.buckled.unbuckle_mob()
|
||||
var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE)
|
||||
|
||||
prey.forceMove(owner)
|
||||
internal_contents.Add(prey)
|
||||
|
||||
// var/datum/belly/B = check_belly(owner)
|
||||
// if(B.silenced == FALSE) //this needs more testing later
|
||||
prey << sound('sound/vore/prey/loop.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_PREYLOOP)
|
||||
prey.playsound_local(get_turf(prey),preyloop,40,0, channel = CHANNEL_PREYLOOP)
|
||||
|
||||
// Handle prey messages
|
||||
if(inside_flavor)
|
||||
@@ -274,7 +272,7 @@
|
||||
/datum/belly/proc/digestion_death(var/mob/living/M)
|
||||
is_full = TRUE
|
||||
internal_contents.Remove(M)
|
||||
M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP)
|
||||
M.stop_sound_channel(CHANNEL_PREYLOOP)
|
||||
// If digested prey is also a pred... anyone inside their bellies gets moved up.
|
||||
if(is_vore_predator(M))
|
||||
for(var/bellytype in M.vore_organs)
|
||||
@@ -336,12 +334,10 @@
|
||||
struggle_outer_message = "<span class='alert'>" + struggle_outer_message + "</span>"
|
||||
struggle_user_message = "<span class='alert'>" + struggle_user_message + "</span>"
|
||||
|
||||
// for(var/mob/M in hearers(4, owner))
|
||||
// M.visible_message(struggle_outer_message) // hearable
|
||||
R.visible_message( "<span class='alert'>[struggle_outer_message]</span>", "<span class='alert'>[struggle_user_message]</span>")
|
||||
playsound(get_turf(owner),"struggle_sound",35,0,-6,1,channel=151)
|
||||
playsound(get_turf(owner),"struggle_sound",35,0,-6,1,channel=151,ignore_walls = FALSE)
|
||||
R.stop_sound_channel(151)
|
||||
R.playsound_local(get_turf(R), null, 45, S = prey_struggle)
|
||||
R.playsound_local(get_turf(R),prey_struggle,45,0)
|
||||
|
||||
if(escapable && R.a_intent != "help") //If the stomach has escapable enabled and the person is actually trying to kick out
|
||||
to_chat(R, "<span class='warning'>You attempt to climb out of \the [name].</span>")
|
||||
@@ -393,8 +389,7 @@
|
||||
// Re-use nom_mob
|
||||
target.nom_mob(content, target.owner)
|
||||
if(!silent)
|
||||
for(var/mob/hearer in range(1,owner))
|
||||
hearer << sound(target.vore_sound,volume=80)
|
||||
playsound(get_turf(owner),"[target].vore_sound",35,0,-6,1,ignore_walls = FALSE)
|
||||
/*
|
||||
//Handles creation of temporary 'vore chest' upon digestion
|
||||
/datum/belly/proc/slimy_mass(var/obj/item/content, var/mob/living/M)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
for (var/mob/living/M in internal_contents)
|
||||
if(prob(25))
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED,ignore_walls = FALSE)
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
M.playsound_local(get_turf(M), null, 45, S = prey_gurgle)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
owner.nutrition += 400 // so eating dead mobs gives you *something*.
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"death_pred",45,0,-6,0,channel=CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"death_pred",45,0,-6,0,channel=CHANNEL_PRED,ignore_walls = FALSE)
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
M.playsound_local(get_turf(M), null, 45, S = prey_digest)
|
||||
digestion_death(M)
|
||||
@@ -71,7 +71,7 @@
|
||||
for (var/mob/living/M in internal_contents)
|
||||
if(prob(25))
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED,ignore_walls = FALSE)
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
M.playsound_local(get_turf(M), null, 45, S = prey_gurgle)
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
for (var/mob/living/M in internal_contents)
|
||||
if(prob(35))
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED,ignore_walls = FALSE)
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
M.playsound_local(get_turf(M), null, 45, S = prey_gurgle)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
for (var/mob/living/M in internal_contents)
|
||||
if(prob(25))
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED)
|
||||
playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED,ignore_walls = FALSE)
|
||||
M.stop_sound_channel(CHANNEL_PRED)
|
||||
M.playsound_local(get_turf(M), null, 45, S = prey_gurgle)
|
||||
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
// Hook for generic creation of stuff on new creatures
|
||||
//
|
||||
/hook/living_new/proc/vore_setup(mob/living/M)
|
||||
M.verbs += /mob/living/proc/escapeOOC
|
||||
M.verbs += /mob/living/proc/lick
|
||||
M.verbs += /mob/living/proc/preyloop_refresh
|
||||
if(M.no_vore) //If the mob isn's supposed to have a stomach, let's not give it an insidepanel so it can make one for itself, or a stomach.
|
||||
M << "<span class='warning'>The creature that you are can not eat others.</span>"
|
||||
return TRUE
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
// If we got this far, nom successful! Announce it!
|
||||
user.visible_message(success_msg)
|
||||
playsound(get_turf(user), belly_target.vore_sound,75,0,-6,0)
|
||||
playsound(get_turf(user), belly_target.vore_sound,75,0,-6,0,ignore_walls = FALSE)
|
||||
|
||||
// Actually shove prey into the belly.
|
||||
belly_target.nom_mob(prey, user)
|
||||
@@ -286,6 +286,16 @@
|
||||
if(M.loc != src)
|
||||
B.internal_contents.Remove(M)
|
||||
|
||||
// internal slimy button in case the loop stops playing but the player wants to hear it
|
||||
/mob/living/proc/preyloop_refresh()
|
||||
set name = "Internal loop refresh"
|
||||
set category = "Vore"
|
||||
if(ismob(src.loc))
|
||||
src.stop_sound_channel(CHANNEL_PREYLOOP) // sanity just in case
|
||||
var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE)
|
||||
src.playsound_local(get_turf(src),preyloop,40,0, channel = CHANNEL_PREYLOOP)
|
||||
else
|
||||
to_chat(src, "<span class='alert'>You aren't inside anything, you clod.</span>")
|
||||
|
||||
// OOC Escape code for pref-breaking or AFK preds
|
||||
//
|
||||
@@ -398,7 +408,7 @@
|
||||
taste_message += "[vore_taste]"
|
||||
else
|
||||
if(ishuman(src))
|
||||
taste_message += "normal, like a critter should"
|
||||
taste_message += "they haven't bothered to set their flavor text"
|
||||
else
|
||||
taste_message += "a plain old normal [src]"
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
return
|
||||
|
||||
selected.release_all_contents()
|
||||
playsound(user, 'sound/vore/pred/escape.ogg', vol=80)
|
||||
playsound(get_turf(user),'sound/vore/pred/escape.ogg',50,0,-5,0,ignore_walls = FALSE)
|
||||
to_chat(user.loc,"<span class='danger'>Everything is released from [user]!</span>")
|
||||
|
||||
if("Move all")
|
||||
@@ -318,9 +318,7 @@
|
||||
for(var/atom/movable/tgt in selected.internal_contents)
|
||||
to_chat(tgt, "<span class='warning'>You're squished from [user]'s [selected] to their [B]!</span>")
|
||||
selected.transfer_contents(tgt, B, 1)
|
||||
|
||||
for(var/mob/hearer in range(1,user))
|
||||
hearer << sound('sound/vore/pred/stomachmove.ogg',volume=80)
|
||||
playsound(get_turf(user),'sound/vore/pred/stomachmove.ogg',50,0,-5,0,ignore_walls = FALSE)
|
||||
|
||||
var/atom/movable/tgt = locate(href_list["insidepick"])
|
||||
if(!(tgt in selected.internal_contents)) //Old menu, needs updating because they aren't really there.
|
||||
@@ -337,7 +335,7 @@
|
||||
return FALSE
|
||||
|
||||
selected.release_specific_contents(tgt)
|
||||
playsound(user, 'sound/effects/splat.ogg', 50, 1)
|
||||
playsound(get_turf(user),'sound/effects/splat.ogg',50,0,-5,0,ignore_walls = FALSE)
|
||||
user.loc << "<span class='danger'>[tgt] is released from [user]!</span>"
|
||||
|
||||
if("Move")
|
||||
@@ -354,8 +352,7 @@
|
||||
if (!(tgt in selected.internal_contents))
|
||||
return FALSE
|
||||
to_chat(tgt, "<span class='warning'>You're moved from [user]'s [lowertext(selected.name)] to their [lowertext(B.name)]!</span>")
|
||||
for(var/mob/hearer in range(1,user))
|
||||
hearer << sound('sound/vore/pred/stomachmove.ogg',volume=80)
|
||||
playsound(get_turf(user),'sound/vore/pred/stomachmove.ogg',50,0,-5,0,ignore_walls = FALSE)
|
||||
selected.transfer_contents(tgt, B)
|
||||
|
||||
if(href_list["newbelly"])
|
||||
|
||||
Reference in New Issue
Block a user