Merge pull request #8164 from Poojawa/vore-mechanic-fixes

[Ready] Vore interactions, feeding, UI cleanup!
This commit is contained in:
deathride58
2019-03-31 21:19:20 -04:00
committed by GitHub
30 changed files with 333 additions and 293 deletions
+3
View File
@@ -12,6 +12,7 @@
#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
#define ui_boxarea "EAST-4:6,SOUTH+1:6"
#define ui_boxlang "EAST-5:22,SOUTH+1:6"
#define ui_boxvore "EAST-4:22,SOUTH+1:6"
//Filters
#define CIT_FILTER_STAMINACRIT filter(type="drop_shadow", x=0, y=0, size=-3, border=0, color="#04080F")
@@ -130,5 +131,7 @@
//component stuff
#define COMSIG_COMBAT_TOGGLED "combatmode_toggled" //called by combat mode toggle on all equipped items. args: (mob/user, combatmode)
#define COMSIG_VORE_TOGGLED "voremode_toggled" // totally not copypasta
//belly sound pref things
#define NORMIE_HEARCHECK 4
+16 -107
View File
@@ -18,39 +18,6 @@
/* // removing sizeplay again
GLOBAL_LIST_INIT(player_sizes_list, list("Macro" = SIZESCALE_HUGE, "Big" = SIZESCALE_BIG, "Normal" = SIZESCALE_NORMAL, "Small" = SIZESCALE_SMALL, "Tiny" = SIZESCALE_TINY))
// Edited to make the new travis check go away
GLOBAL_LIST_INIT(digest_pred, list(
'sound/vore/pred/digest_01.ogg',
'sound/vore/pred/digest_02.ogg',
'sound/vore/pred/digest_03.ogg',
'sound/vore/pred/digest_04.ogg',
'sound/vore/pred/digest_05.ogg',
'sound/vore/pred/digest_06.ogg',
'sound/vore/pred/digest_07.ogg',
'sound/vore/pred/digest_08.ogg',
'sound/vore/pred/digest_09.ogg',
'sound/vore/pred/digest_10.ogg',
'sound/vore/pred/digest_11.ogg',
'sound/vore/pred/digest_12.ogg',
'sound/vore/pred/digest_13.ogg',
'sound/vore/pred/digest_14.ogg',
'sound/vore/pred/digest_15.ogg',
'sound/vore/pred/digest_16.ogg',
'sound/vore/pred/digest_17.ogg',
'sound/vore/pred/digest_18.ogg'))
GLOBAL_LIST_INIT(death_pred, list(
'sound/vore/pred/death_01.ogg',
'sound/vore/pred/death_02.ogg',
'sound/vore/pred/death_03.ogg',
'sound/vore/pred/death_04.ogg',
'sound/vore/pred/death_05.ogg',
'sound/vore/pred/death_06.ogg',
'sound/vore/pred/death_07.ogg',
'sound/vore/pred/death_08.ogg',
'sound/vore/pred/death_09.ogg',
'sound/vore/pred/death_10.ogg'))
*/
GLOBAL_LIST_INIT(vore_sounds, list(
@@ -66,79 +33,21 @@ GLOBAL_LIST_INIT(vore_sounds, list(
"Squish3" = 'sound/vore/pred/squish_03.ogg',
"Squish4" = 'sound/vore/pred/squish_04.ogg',
"Rustle (cloth)" = 'sound/effects/rustle5.ogg',
"rustle2(cloth)" = 'sound/effects/rustle2.ogg',
"rustle3(cloth)" = 'sound/effects/rustle3.ogg',
"rustle4(cloth)" = 'sound/effects/rustle4.ogg',
"rustle5(cloth)" = 'sound/effects/rustle5.ogg',
"None" = null))
/*
GLOBAL_LIST_INIT(pred_struggle_sounds, list(
"Struggle1" = 'sound/vore/pred/struggle_01.ogg',
"Struggle2" = 'sound/vore/pred/struggle_02.ogg',
"Struggle3" = 'sound/vore/pred/struggle_03.ogg',
"Struggle4" = 'sound/vore/pred/struggle_04.ogg',
"Struggle5" = 'sound/vore/pred/struggle_05.ogg'))
GLOBAL_LIST_INIT(prey_vore_sounds, list(
"Gulp" = 'sound/vore/prey/swallow_01.ogg',
"Swallow" = 'sound/vore/prey/swallow_02.ogg',
"Insertion1" = 'sound/vore/prey/insertion_01.ogg',
"Insertion2" = 'sound/vore/prey/insertion_02.ogg',
"Tauric Swallow" = 'sound/vore/prey/taurswallow.ogg',
"Schlorp" = 'sound/vore/prey/schlorp.ogg',
"Squish1" = 'sound/vore/prey/squish_01.ogg',
"Squish2" = 'sound/vore/prey/squish_02.ogg',
"Squish3" = 'sound/vore/prey/squish_03.ogg',
"Squish4" = 'sound/vore/prey/squish_04.ogg'))
GLOBAL_LIST_INIT(prey_struggle_sounds, list(
"Struggle1" = 'sound/vore/prey/struggle_01.ogg',
"Struggle2" = 'sound/vore/prey/struggle_02.ogg',
"Struggle3" = 'sound/vore/prey/struggle_03.ogg',
"Struggle4" = 'sound/vore/prey/struggle_04.ogg',
"Struggle5" = 'sound/vore/prey/struggle_05.ogg'))
GLOBAL_LIST_INIT(digest_prey, list(
"digest1" = 'sound/vore/prey/digest_01.ogg',
"digest2" = 'sound/vore/prey/digest_02.ogg',
"digest3" = 'sound/vore/prey/digest_03.ogg',
"digest4" = 'sound/vore/prey/digest_04.ogg',
"digest5" = 'sound/vore/prey/digest_05.ogg',
"digest6" = 'sound/vore/prey/digest_06.ogg',
"digest7" = 'sound/vore/prey/digest_07.ogg',
"digest8" = 'sound/vore/prey/digest_08.ogg',
"digest9" = 'sound/vore/prey/digest_09.ogg',
"digest10" = 'sound/vore/prey/digest_10.ogg',
"digest11" = 'sound/vore/prey/digest_11.ogg',
"digest12" = 'sound/vore/prey/digest_12.ogg',
"digest13" = 'sound/vore/prey/digest_13.ogg',
"digest14" = 'sound/vore/prey/digest_14.ogg',
"digest15" = 'sound/vore/prey/digest_15.ogg',
"digest16" = 'sound/vore/prey/digest_16.ogg',
"digest17" = 'sound/vore/prey/digest_17.ogg',
"digest18" = 'sound/vore/prey/digest_18.ogg'))
GLOBAL_LIST_INIT(death_prey, list(
"death1" = 'sound/vore/prey/death_01.ogg',
"death2" = 'sound/vore/prey/death_02.ogg',
"death3" = 'sound/vore/prey/death_03.ogg',
"death4" = 'sound/vore/prey/death_04.ogg',
"death5" = 'sound/vore/prey/death_05.ogg',
"death6" = 'sound/vore/prey/death_06.ogg',
"death7" = 'sound/vore/prey/death_07.ogg',
"death8" = 'sound/vore/prey/death_08.ogg',
"death9" = 'sound/vore/prey/death_09.ogg',
"death10" = 'sound/vore/prey/death_10.ogg'))
*/
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"None" = null
))
GLOBAL_LIST_INIT(release_sounds, list(
"rustle (cloth)" = 'sound/effects/rustle1.ogg',
"rustle2 (cloth)" = 'sound/effects/rustle2.ogg',
"rustle3 (cloth)" = 'sound/effects/rustle3.ogg',
"rustle4 (cloth)" = 'sound/effects/rustle4.ogg',
"rustle5 (cloth)" = 'sound/effects/rustle5.ogg',
"Stomach Move" = 'sound/vore/pred/stomachmove.ogg',
"Pred Escape" = 'sound/vore/pred/escape.ogg',
"Splatter" = 'sound/effects/splat.ogg',
"None" = null))
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"Stomach Move" = 'sound/vore/pred/stomachmove.ogg',
"Pred Escape" = 'sound/vore/pred/escape.ogg',
"Splatter" = 'sound/effects/splat.ogg',
"None" = null
))
+1
View File
@@ -85,6 +85,7 @@
#define ui_crafting "EAST-5:20,SOUTH:5"//CIT CHANGE - moves this over one tile to accommodate for combat mode toggle
#define ui_building "EAST-5:20,SOUTH:21"//CIT CHANGE - ditto
#define ui_language_menu "EAST-5:4,SOUTH:21"//CIT CHANGE - ditto
#define ui_voremode "EAST-5:20,SOUTH:5"
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
+7
View File
@@ -109,6 +109,13 @@
using.screen_loc = ui_boxarea // CIT CHANGE
static_inventory += using
using = new /obj/screen/voretoggle() //We fancy Vore now
using.icon = tg_ui_icon_to_cit_ui(ui_style)
using.screen_loc = ui_voremode
if(!widescreenlayout)
using.screen_loc = ui_boxvore
static_inventory += using
action_intent = new /obj/screen/act_intent/segmented
action_intent.icon_state = mymob.a_intent
static_inventory += action_intent
+3
View File
@@ -213,6 +213,9 @@
'sound/vore/prey/death_04.ogg','sound/vore/prey/death_05.ogg','sound/vore/prey/death_06.ogg',
'sound/vore/prey/death_07.ogg','sound/vore/prey/death_08.ogg','sound/vore/prey/death_09.ogg',
'sound/vore/prey/death_10.ogg')
if("hunger_sounds")
soundin = pick( 'sound/vore/growl1.ogg','sound/vore/growl2.ogg','sound/vore/growl3.ogg','sound/vore/growl4.ogg',
'sound/vore/growl5.ogg')
if("clang")
soundin = pick('sound/effects/clang1.ogg', 'sound/effects/clang2.ogg')
if("clangsmall")
@@ -1143,7 +1143,15 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.add_trait(TRAIT_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
if(H.noisy && H.nutrition <= NUTRITION_LEVEL_STARVING)
if(prob(10))
playsound(get_turf(H),"hunger_sounds",35,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED)
else if(H.noisy && H.nutrition <= NUTRITION_LEVEL_HUNGRY)
if(prob(10))
playsound(get_turf(H),"hunger_sounds",15,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED)
// nutrition decrease and satiety
if (H.nutrition > 0 && H.stat != DEAD && !H.has_trait(TRAIT_NOHUNGER))
// THEY HUNGER
+3
View File
@@ -8,6 +8,8 @@
spill_organs(no_brain, no_organs, no_bodyparts)
release_vore_contents(silent = TRUE) // return of the bomb safe internals.
if(!no_bodyparts)
spread_bodyparts(no_brain, no_organs)
@@ -36,6 +38,7 @@
buckled.unbuckle_mob(src, force = TRUE)
dust_animation()
release_vore_contents(silent = TRUE) //technically grief protection, I guess? if they're SM'd it doesn't matter seconds after anyway.
spawn_dust(just_ash)
QDEL_IN(src,5) // since this is sometimes called in the middle of movement, allow half a second for movement to finish, ghosting to happen and animation to play. Looks much nicer and doesn't cause multiple runtimes.
+13 -1
View File
@@ -127,8 +127,18 @@
IgniteMob()
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src || anchored || !isturf(user.loc))
if(user == anchored || !isturf(user.loc))
return FALSE
if(user.pulling && user.grab_state == GRAB_AGGRESSIVE && user.voremode)
if(ismob(user.pulling))
var/mob/P = user.pulling
user.vore_attack(user, P, src) // User, Pulled, Predator target (which can be user, pulling, or src)
return
if(user == src) //we want to be able to self click if we're voracious
return FALSE
if(!user.pulling || user.pulling != src)
user.start_pulling(src, supress_message)
return
@@ -163,6 +173,8 @@
return 0
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != INTENT_GRAB)
return 0
if(user.voremode && user.grab_state == GRAB_AGGRESSIVE)
return 0
user.grab_state++
switch(user.grab_state)
if(GRAB_AGGRESSIVE)
@@ -63,6 +63,9 @@
..()
/mob/living/simple_animal/mouse/handle_automated_action()
if(isbelly(loc))
return
if(prob(chew_probability))
var/turf/open/floor/F = get_turf(src)
if(istype(F) && !F.intact)
@@ -100,7 +100,7 @@
if(!target || !isturf(target.loc) || !isturf(loc) || stat == DEAD)
return
var/target_dir = get_dir(src,target)
var/static/list/cardinal_sidestep_directions = list(-90,-45,0,45,90)
var/static/list/diagonal_sidestep_directions = list(-45,0,45)
var/chosen_dir = 0
@@ -202,6 +202,8 @@
if(see_invisible < the_target.invisibility)//Target's invisible to us, forget it
return FALSE
if(isbelly(the_target.loc)) //Target's inside a gut, forget about it too
return FALSE
if(search_objects < 2)
if(isliving(the_target))
var/mob/living/L = the_target
@@ -301,7 +303,7 @@
if(target)
if(targets_from && isturf(targets_from.loc) && target.Adjacent(targets_from)) //If they're next to us, attack
MeleeAction()
else
else
if(rapid_melee > 1 && target_distance <= melee_queue_distance)
MeleeAction(FALSE)
in_melee = FALSE //If we're just preparing to strike do not enter sidestep mode
@@ -83,18 +83,12 @@
if(L.stat != DEAD)
if(!client && ranged && ranged_cooldown <= world.time)
OpenFire()
else if(L.stat >= SOFT_CRIT)
if(vore_active == TRUE && L.devourable == TRUE)
if(isliving(target) && !target.Adjacent(targets_from))
return
else
if(L.Adjacent(src) && (L.stat != CONSCIOUS))
if(vore_active && L.devourable == TRUE)
dragon_feeding(src,L)
if(L.loc == src.contents)
LoseTarget()
return 0
else
devour(L)
LoseTarget()
else
devour(L)
/mob/living/simple_animal/hostile/megafauna/proc/devour(mob/living/L)
if(!L)