diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm index b8076d2041..81b12c46e3 100644 --- a/code/__DEFINES/citadel_defines.dm +++ b/code/__DEFINES/citadel_defines.dm @@ -115,21 +115,22 @@ //xenobio console upgrade stuff #define XENOBIO_UPGRADE_MONKEYS 1 -#define XENOBIO_UPGRADE_SLIMEBASIC 2 +#define XENOBIO_UPGRADE_SLIMEBASIC 2 #define XENOBIO_UPGRADE_SLIMEADV 4 //stamina stuff -#define STAMINA_SOFTCRIT 100 //softcrit for stamina damage. prevents standing up, prevents performing actions that cost stamina, etc, but doesn't force a rest or stop movement -#define STAMINA_CRIT 140 //crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit -#define STAMINA_SOFTCRIT_TRADITIONAL 0 //same as STAMINA_SOFTCRIT except for the more traditional health calculations +#define STAMINA_SOFTCRIT 100 //softcrit for stamina damage. prevents standing up, prevents performing actions that cost stamina, etc, but doesn't force a rest or stop movement +#define STAMINA_CRIT 140 //crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit +#define STAMINA_SOFTCRIT_TRADITIONAL 0 //same as STAMINA_SOFTCRIT except for the more traditional health calculations #define STAMINA_CRIT_TRADITIONAL -40 //ditto, but for STAMINA_CRIT -#define MIN_MELEE_STAMCOST 1.25 //Minimum cost for swinging items around. Will be extra useful when stats and skills are introduced. +#define MIN_MELEE_STAMCOST 1.25 //Minimum cost for swinging items around. Will be extra useful when stats and skills are introduced. #define CRAWLUNDER_DELAY 30 //Delay for crawling under a standing mob //Citadel toggles because bitflag memes -#define EATING_NOISES 1 -#define DIGESTION_NOISES 2 +#define MEDIHOUND_SLEEPER (1<<0) +#define EATING_NOISES (1<<1) +#define DIGESTION_NOISES (1<<2) #define TOGGLES_CITADEL (EATING_NOISES|DIGESTION_NOISES) diff --git a/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm b/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm index 22085d520c..c4b2fbf5b1 100644 --- a/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm +++ b/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm @@ -47,7 +47,7 @@ var/tmp/next_process = 0 // Waiting for this SSbellies times_fired to process again. var/tmp/list/items_preserved = list() // Stuff that wont digest so we shouldn't process it again. var/tmp/next_emote = 0 // When we're supposed to print our next emote, as a belly controller tick # - var/tmp/recent_sound = FALSE // Prevent audio spam + var/tmp/recent_sound // Prevent audio spam var/tmp/last_hearcheck = 0 var/tmp/list/hearing_mobs @@ -167,12 +167,13 @@ to_chat(owner,"[thing] slides into your [lowertext(name)].") //Sound w/ antispam flag setting - if(is_wet && !recent_sound) - for(var/mob/M in get_hearers_in_view(2, get_turf(owner))) - if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) - var/sound/devourments = GLOB.vore_sounds[vore_sound] - playsound(get_turf(owner),devourments,50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED) - recent_sound = TRUE + if(is_wet && (world.time > recent_sound)) + var/turf/source = get_turf(owner) + var/sound/eating = GLOB.vore_sounds[vore_sound] + for(var/mob/living/M in get_hearers_in_view(3, source)) + if(M.client && M.client.prefs.cit_toggles & EATING_NOISES) + SEND_SOUND(M, eating) + recent_sound = (world.time + 20 SECONDS) //Messages if it's a mob if(isliving(thing)) @@ -187,7 +188,7 @@ var/atom/destination = drop_location() //Don't bother if we don't have contents if(!contents.len) - return 0 + return FALSE var/count = 0 for(var/thing in contents) @@ -206,10 +207,10 @@ SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "emptyprey", /datum/mood_event/emptyprey) AM.forceMove(destination) // Move the belly contents into the same location as belly's owner. count++ - for(var/mob/M in get_hearers_in_view(2, get_turf(owner))) + for(var/mob/living/M in get_hearers_in_view(2, get_turf(owner))) if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) var/sound/releasement = GLOB.release_sounds[release_sound] - playsound(get_turf(owner),releasement,50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED) + SEND_SOUND(M, releasement) //Clean up our own business items_preserved.Cut() @@ -233,10 +234,10 @@ M.forceMove(drop_location()) // Move the belly contents into the same location as belly's owner. items_preserved -= M if(!silent) - for(var/mob/H in get_hearers_in_view(2, get_turf(owner))) + for(var/mob/living/H in get_hearers_in_view(2, get_turf(owner))) if(H.client && (H.client.prefs.cit_toggles & EATING_NOISES)) var/sound/releasement = GLOB.release_sounds[release_sound] - playsound(get_turf(owner),releasement,50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED) + SEND_SOUND(H, releasement) if(istype(M,/mob/living)) var/mob/living/ML = M @@ -285,10 +286,6 @@ SEND_SIGNAL(prey, COMSIG_CLEAR_MOOD_EVENT, "emptyprey", /datum/mood_event/emptyprey) prey.forceMove(src) - var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE) - - if(is_wet) - prey.playsound_local(loc,preyloop,70,0, channel = CHANNEL_PREYLOOP) owner.updateVRPanel() @@ -317,10 +314,12 @@ M.cure_blind("belly_[REF(src)]") target.nom_mob(content, target.owner) if(!silent) - for(var/mob/M in get_hearers_in_view(5, get_turf(owner))) - if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) - var/sound/devourments = GLOB.vore_sounds[vore_sound] - playsound(get_turf(owner),devourments,50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED) + var/turf/source = get_turf(owner) + var/sound/eating = GLOB.vore_sounds[vore_sound] + for(var/mob/living/M in get_hearers_in_view(3, source)) + if(M.client && M.client.prefs.cit_toggles & EATING_NOISES) + SEND_SOUND(M, eating) + owner.updateVRPanel() for(var/mob/living/M in contents) M.updateVRPanel() @@ -524,22 +523,25 @@ struggle_outer_message = "" + struggle_outer_message + "" struggle_user_message = "" + struggle_user_message + "" + var/turf/source = get_turf(owner) + var/sound/struggle_snuggle = sound(get_sfx("struggle_sound")) + var/sound/struggle_rustle = sound(get_sfx("rustle")) + if(is_wet) - for(var/mob/M in get_hearers_in_view(2, get_turf(owner))) - if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) - playsound(get_turf(owner),"struggle_sound",35,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED) - R.stop_sound_channel(CHANNEL_PRED) - var/sound/prey_struggle = sound(get_sfx("prey_struggle")) - R.playsound_local(get_turf(R),prey_struggle,45,0) + for(var/mob/living/M in get_hearers_in_view(3, source)) + if(M.client && M.client.prefs.cit_toggles & EATING_NOISES) + SEND_SOUND(M, struggle_snuggle) else - for(var/mob/M in get_hearers_in_view(2, get_turf(owner))) - if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) - playsound(get_turf(owner),"rustle",35,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED) + for(var/mob/living/M in get_hearers_in_view(3, source)) + if(M.client && M.client.prefs.cit_toggles & EATING_NOISES) + SEND_SOUND(M, struggle_rustle) - for(var/mob/M in get_hearers_in_view(3, get_turf(owner))) + var/list/watching = hearers(3, owner) + for(var/mob/living/M in watching) if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) //Might as well censor the normies here too. M.show_message(struggle_outer_message, 1) // visible + to_chat(R,struggle_user_message) if(escapable) //If the stomach has escapable enabled. diff --git a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm index 6b6a3d30cc..9356c25f57 100644 --- a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm +++ b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm @@ -26,10 +26,13 @@ if(isbelly(M.loc)) if(world.time > M.next_preyloop) if(is_wet) + if(!M.client) + continue M.stop_sound_channel(CHANNEL_PREYLOOP) // sanity just in case - var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE) - M.playsound_local(get_turf(src),preyloop,80,0, channel = CHANNEL_PREYLOOP) - M.next_preyloop = world.time + 52 SECONDS + if(M.client.prefs.cit_toggles & DIGESTION_NOISES) + var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE) + M.playsound_local(get_turf(src),preyloop, 80,0, channel = CHANNEL_PREYLOOP) + M.next_preyloop = (world.time + 52 SECONDS) /////////////////////////// Exit Early //////////////////////////// @@ -63,12 +66,12 @@ if(prob(25)) if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_digest) else if(H in contents) @@ -100,12 +103,12 @@ owner.nutrition += 400 // so eating dead mobs gives you *something*. if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_death) else if(H in contents) @@ -135,12 +138,12 @@ if(prob(25)) if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_digest) else if(H in contents) @@ -159,12 +162,12 @@ if(prob(35)) if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_digest) else if(H in contents) @@ -179,12 +182,12 @@ if(prob(10))//Less often than gurgles. People might leave this on forever. if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_digest) else if(H in contents) @@ -221,12 +224,12 @@ if(prob(55)) //if you're hearing this, you're a vore ho anyway. if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_digest) else if(H in contents) @@ -254,12 +257,12 @@ M.visible_message("You watch as [owner]'s guts loudly rumble as it finishes off a meal.") if((world.time - NORMIE_HEARCHECK) > last_hearcheck) LAZYCLEARLIST(hearing_mobs) - for(var/mob/H in get_hearers_in_view(3, source)) + for(var/mob/living/H in get_hearers_in_view(3, source)) if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES)) continue LAZYADD(hearing_mobs, H) last_hearcheck = world.time - for(var/mob/H in hearing_mobs) + for(var/mob/living/H in hearing_mobs) if(!isbelly(H.loc)) H.playsound_local(source, null, 45, falloff = 0, S = pred_death) else if(H in contents) diff --git a/modular_citadel/code/modules/vore/eating/living_vr.dm b/modular_citadel/code/modules/vore/eating/living_vr.dm index a8a77895c8..d9adde04d1 100644 --- a/modular_citadel/code/modules/vore/eating/living_vr.dm +++ b/modular_citadel/code/modules/vore/eating/living_vr.dm @@ -60,18 +60,6 @@ B.can_taste = 1 return TRUE -/* -// Hide vore organs in contents -// -/datum/proc/view_variables_filter_contents(list/L) - return 0 - -/mob/living/view_variables_filter_contents(list/L) - . = ..() - var/len_before = L.len - L -= vore_organs - . += len_before - L.len*/ - // Handle being clicked, perhaps with something to devour // @@ -121,21 +109,12 @@ /mob/living/proc/feed_grabbed_to_self(var/mob/living/user, var/mob/living/prey) var/belly = user.vore_selected return perform_the_nom(user, prey, user, belly) -/* -/mob/living/proc/eat_held_mob(var/mob/living/user, var/mob/living/prey, var/mob/living/pred) - var/belly - if(user != pred) - belly = input("Choose Belly") in pred.vore_organs - else - belly = pred.vore_selected - return perform_the_nom(user, prey, pred, belly)*/ /mob/living/proc/feed_self_to_grabbed(var/mob/living/user, var/mob/living/pred) var/belly = input("Choose Belly") in pred.vore_organs return perform_the_nom(user, user, pred, belly) /mob/living/proc/feed_grabbed_to_other(var/mob/living/user, var/mob/living/prey, var/mob/living/pred) -// return//disabled until I can make that toggle work var/belly = input("Choose Belly") in pred.vore_organs return perform_the_nom(user, prey, pred, belly) @@ -182,9 +161,13 @@ // If we got this far, nom successful! Announce it! user.visible_message(success_msg) - for(var/mob/M in get_hearers_in_view(5, get_turf(user))) + + // incredibly contentious eating noises time + var/turf/source = get_turf(user) + var/sound/eating = GLOB.vore_sounds[belly.vore_sound] + for(var/mob/living/M in get_hearers_in_view(3, source)) if(M.client && M.client.prefs.cit_toggles & EATING_NOISES) - playsound(get_turf(user),"[belly.vore_sound]",50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED) + SEND_SOUND(M, eating) // Actually shove prey into the belly. belly.nom_mob(prey, user) @@ -214,41 +197,7 @@ // //End vore code. -/* - //Handle case: /obj/item/holder - if(/obj/item/holder/micro) - var/obj/item/holder/H = I - if(!isliving(user)) return 0 // Return 0 to continue upper procs - var/mob/living/attacker = user // Typecast to living - - if (is_vore_predator(src)) - for (var/mob/living/M in H.contents) - attacker.eat_held_mob(attacker, M, src) - return 1 //Return 1 to exit upper procs - else - log_attack("[attacker] attempted to feed [H.contents] to [src] ([src.type]) but it failed.") - - // I just can't imagine this not being complained about - //Handle case: /obj/item/radio/beacon - if(/obj/item/radio/beacon) - var/confirm = alert(user, "[src == user ? "Eat the beacon?" : "Feed the beacon to [src]?"]", "Confirmation", "Yes!", "Cancel") - if(confirm == "Yes!") - var/bellychoice = input("Which belly?","Select A Belly") in src.vore_organs - var/datum/belly/B = src.vore_organs[bellychoice] - src.visible_message("[user] is trying to stuff a beacon into [src]'s [bellychoice]!","[user] is trying to stuff a beacon into you!") - if(do_after(user,30,src)) - user.drop_item() - I.loc = src - B.internal_contents += I - src.visible_message("[src] is fed the beacon!","You're fed the beacon!") - playsound(get_turf(src), B.vore_sound,50,0,-6,0) - return 1 - else - return 1 //You don't get to hit someone 'later' - - return 0 -*/ // // Our custom resist catches for /mob/living @@ -272,7 +221,7 @@ if(isbelly(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,80,0, channel = CHANNEL_PREYLOOP) + SEND_SOUND(src, preyloop) else to_chat(src, "You aren't inside anything, you clod.") diff --git a/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm b/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm index 6f484e7a51..ae7da895a6 100644 --- a/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm +++ b/modular_citadel/code/modules/vore/eating/vorepanel_vr.dm @@ -57,7 +57,7 @@ /datum/vore_look/proc/gen_vui(var/mob/living/user) var/dat dat += "Remember to toggle the vore mode, it's to the left of your combat toggle. Open mouth means you're voracious!
" - dat += "Remember that your prey is blind, use audible mode subtle messages to communicate to them with posts!
" + dat += "Remember that the prey is blind, use audible mode subtle messages to communicate to them with posts!
" dat += "
" var/atom/userloc = user.loc if (isbelly(userloc)) @@ -554,7 +554,7 @@ if(href_list["b_releasesoundtest"]) var/sound/releasetest = GLOB.release_sounds[selected.release_sound] if(releasetest) - user << releasetest + SEND_SOUND(user, releasetest) if(href_list["b_sound"]) var/choice = input(user,"Currently set to [selected.vore_sound]","Select Sound") as null|anything in GLOB.vore_sounds @@ -567,7 +567,7 @@ if(href_list["b_soundtest"]) var/sound/voretest = GLOB.vore_sounds[selected.vore_sound] if(voretest) - user << voretest + SEND_SOUND(user, voretest) if(href_list["b_tastes"]) selected.can_taste = !selected.can_taste