Skip to content

Commit

Permalink
Fixes compile issues with vore code (#362)
Browse files Browse the repository at this point in the history
* Fixes compile issues with vore code

* Update voreconstants.dm

* Update resize_vr.dm

* Update tgstation.dme

* Update parrot.dm

* Update pet.dm

* Update fox.dm

* Update mouse.dm

* Update farm_animals.dm

* Update dog.dm

* Update cat.dm

* Update monkey.dm

* Update alien.dm

* Update vore_vr.dm

* Update vorepanel_vr.dm

* Update bellymodes_vr.dm

* Update belly_vr.dm

* Update living_vr.dm

* Update voreconstants.dm

* Update fox.dm
  • Loading branch information
Poojawa authored Apr 15, 2017
1 parent 412b8da commit 884fb45
Show file tree
Hide file tree
Showing 18 changed files with 188 additions and 172 deletions.
25 changes: 13 additions & 12 deletions code/__DEFINES/voreconstants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
#define DM_HOLD "Hold"
#define DM_DIGEST "Digest"
#define DM_HEAL "Heal"
#define DM_DIGESTF "Fast Digest"

#define VORE_STRUGGLE_EMOTE_CHANCE 40

// Stance for hostile mobs to be in while devouring someone.
#define HOSTILE_STANCE_EATING 99

/* // 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))
// moved to sound.dm // Edited to make the new travis check go away
var/global/list/player_sizes_list = list("Macro" = SIZESCALE_HUGE, "Big" = SIZESCALE_BIG, "Normal" = SIZESCALE_NORMAL, "Small" = SIZESCALE_SMALL, "Tiny" = SIZESCALE_TINY)
/* // moved to sound.dm
var/global/list/digestion_sounds = list(
GLOBAL_LIST_INIT(digestion_sounds = list(
'sound/vore/digest1.ogg',
'sound/vore/digest2.ogg',
'sound/vore/digest3.ogg',
Expand All @@ -27,7 +26,7 @@ var/global/list/digestion_sounds = list(
'sound/vore/digest11.ogg',
'sound/vore/digest12.ogg')
var/global/list/death_sounds = list(
GLOBAL_LIST_INIT(death_sounds = list(
'sound/vore/death1.ogg',
'sound/vore/death2.ogg',
'sound/vore/death3.ogg',
Expand All @@ -39,7 +38,7 @@ var/global/list/death_sounds = list(
'sound/vore/death9.ogg',
'sound/vore/death10.ogg') */

var/global/list/vore_sounds = list(
GLOBAL_LIST_INIT(vore_sounds, list(
"Gulp" = 'sound/vore/gulp.ogg',
"Insert" = 'sound/vore/insert.ogg',
"Insertion1" = 'sound/vore/insertion1.ogg',
Expand All @@ -49,18 +48,20 @@ var/global/list/vore_sounds = list(
"Squish1" = 'sound/vore/squish1.ogg',
"Squish2" = 'sound/vore/squish2.ogg',
"Squish3" = 'sound/vore/squish3.ogg',
"Squish4" = 'sound/vore/squish4.ogg')
/* also moved to sound.dmi
var/global/list/struggle_sounds = list(
"Squish4" = 'sound/vore/squish4.ogg'))
GLOBAL_LIST_INIT(struggle_sounds, list(
"Squish1" = 'sound/vore/squish1.ogg',
"Squish2" = 'sound/vore/squish2.ogg',
"Squish3" = 'sound/vore/squish3.ogg',
"Squish4" = 'sound/vore/squish4.ogg')
"Squish4" = 'sound/vore/squish4.ogg'))

/* also moved to sound.dmi
/proc/log_debug(text)
if (config.log_debug)
diary << "\[[time_stamp()]]DEBUG: [text][log_end]"
for(var/client/C in admins)
if(C.prefs.toggles & CHAT_DEBUGLOGS)
C << "DEBUG: [text]" */
C << "DEBUG: [text]" */
12 changes: 12 additions & 0 deletions code/game/sound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@
soundin = pick('sound/machines/terminal_button01.ogg', 'sound/machines/terminal_button02.ogg', 'sound/machines/terminal_button03.ogg', \
'sound/machines/terminal_button04.ogg', 'sound/machines/terminal_button05.ogg', 'sound/machines/terminal_button06.ogg', \
'sound/machines/terminal_button07.ogg', 'sound/machines/terminal_button08.ogg')
//Vore sounds
if ("digestion_sounds")
soundin = pick('sound/vore/digest1.ogg', 'sound/vore/digest2.ogg', 'sound/vore/digest3.ogg', \
'sound/vore/digest4.ogg', 'sound/vore/digest5.ogg', 'sound/vore/digest6.ogg', \
'sound/vore/digest7.ogg', 'sound/vore/digest8.ogg', 'sound/vore/digest9.ogg', \
'sound/vore/digest10.ogg','sound/vore/digest11.ogg', 'sound/vore/digest12.ogg')
if ("death_gurgles")
soundin = pick('sound/vore/death1.ogg', 'sound/vore/death2.ogg', 'sound/vore/death3.ogg', \
'sound/vore/death4.ogg', 'sound/vore/death5.ogg', 'sound/vore/death6.ogg', \
'sound/vore/death7.ogg', 'sound/vore/death8.ogg', 'sound/vore/death9.ogg', 'sound/vore/death10.ogg')
if ("struggle_sounds")
soundin = pick('sound/vore/squish1.ogg', 'sound/vore/squish2.ogg', 'sound/vore/squish3.ogg', 'sound/vore/squish4.ogg')
return soundin

/proc/playsound_global(file, repeat=0, wait, channel, volume)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/alien/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
var/leaping = 0
gib_type = /obj/effect/decal/cleanable/xenoblood/xgibs
unique_name = 1
devourable = TRUE

var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?")

Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/monkey/monkey.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
unique_name = 1
bodyparts = list(/obj/item/bodypart/chest/monkey, /obj/item/bodypart/head/monkey, /obj/item/bodypart/l_arm/monkey,
/obj/item/bodypart/r_arm/monkey, /obj/item/bodypart/r_leg/monkey, /obj/item/bodypart/l_leg/monkey)
devourable = TRUE



Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/friendly/cat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
gold_core_spawnable = 2
devourable = TRUE

/mob/living/simple_animal/pet/cat/Initialize()
..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/friendly/dog.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
see_in_dark = 5
speak_chance = 1
turns_per_move = 10
devourable = TRUE

//Corgis and pugs are now under one dog subtype

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
stop_automated_movement_when_pulled = 1
blood_volume = BLOOD_VOLUME_NORMAL
var/obj/item/udder/udder = null
devourable = TRUE

/mob/living/simple_animal/hostile/retaliate/goat/Initialize()
udder = new()
Expand Down Expand Up @@ -105,6 +106,7 @@
var/obj/item/udder/udder = null
gold_core_spawnable = 2
blood_volume = BLOOD_VOLUME_NORMAL
devourable = TRUE

/mob/living/simple_animal/cow/Initialize()
udder = new()
Expand Down Expand Up @@ -180,6 +182,7 @@
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
mob_size = MOB_SIZE_TINY
gold_core_spawnable = 2
devourable = TRUE

/mob/living/simple_animal/chick/Initialize()
..()
Expand Down Expand Up @@ -235,6 +238,7 @@
var/list/validColors = list("brown","black","white")
gold_core_spawnable = 2
var/static/chicken_count = 0
devourable = TRUE

/mob/living/simple_animal/chicken/Initialize()
..()
Expand Down
40 changes: 40 additions & 0 deletions code/modules/mob/living/simple_animal/friendly/fox.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,46 @@
response_disarm = "gently pushes aside"
response_harm = "kicks"
gold_core_spawnable = 2
devourable = TRUE
var/mob/living/simple_animal/mouse/movement_target
var/turns_since_scan = 0

/mob/living/simple_animal/pet/fox/Life()
//MICE!
if((src.loc) && isturf(src.loc))
if(!stat && !resting && !buckled)
for(var/mob/living/simple_animal/mouse/M in view(1,src))
if(!M.stat && Adjacent(M))
emote("me", 1, "splats \the [M]!")
M.splat()
movement_target = null
stop_automated_movement = 0
break
for(var/obj/item/toy/cattoy/T in view(1,src))
if (T.cooldown < (world.time - 400))
emote("me", 1, "bats \the [T] around with its paw!")
T.cooldown = world.time

..()

if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
walk_to(src,0)
turns_since_scan = 0
if((movement_target) && !(isturf(movement_target.loc) || ishuman(movement_target.loc) ))
movement_target = null
stop_automated_movement = 0
if( !movement_target || !(movement_target.loc in oview(src, 3)) )
movement_target = null
stop_automated_movement = 0
for(var/mob/living/simple_animal/mouse/snack in oview(src,3))
if(isturf(snack.loc) && !snack.stat)
movement_target = snack
break
if(movement_target)
stop_automated_movement = 1
walk_to(src,movement_target,0,3)

//Captain fox
/mob/living/simple_animal/pet/fox/Renault
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/friendly/mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
var/body_color //brown, gray and white, leave blank for random
gold_core_spawnable = 2
var/chew_probability = 1
devourable = TRUE

/mob/living/simple_animal/mouse/Initialize()
..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/friendly/pet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
var/image/collar = null
var/image/pettag = null
blood_volume = BLOOD_VOLUME_NORMAL
devourable = TRUE

/mob/living/simple_animal/pet/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/clothing/neck/petcollar) && !pcollar)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/simple_animal/parrot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
mob_size = MOB_SIZE_SMALL
movement_type = FLYING
gold_core_spawnable = 2
devourable = TRUE

var/parrot_damage_upper = 10
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
Expand Down
34 changes: 17 additions & 17 deletions code/modules/vore/eating/belly_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
var/human_prey_swallow_time = 100 // Time in deciseconds to swallow /mob/living/carbon/human
var/nonhuman_prey_swallow_time = 60 // Time in deciseconds to swallow anything else
var/emoteTime = 300 // How long between stomach emotes at prey
var/digest_brute = 1 // Brute damage per tick in digestion mode
var/digest_burn = 3 // Burn damage per tick in digestion mode
var/digest_brute = 0 // Brute damage per tick in digestion mode
var/digest_burn = 1 // Burn damage per tick in digestion mode
var/digest_tickrate = 9 // Modulus this of air controller tick number to iterate gurgles on
var/immutable = FALSE // Prevents this belly from being deleted
var/escapable = TRUE // Belly can be resisted out of at any time
var/escapetime = 200 // Deciseconds, how long to escape this belly
var/escapechance = 45 // % Chance of prey beginning to escape if prey struggles.
var/tmp/digest_mode = DM_HOLD // Whether or not to digest. Default to not digest.
var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL,DM_DIGESTF) // Possible digest modes
var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL) // Possible digest modes
var/tmp/mob/living/owner // The mob whose belly this is.
var/tmp/list/internal_contents = list() // People/Things you've eaten into this belly!
var/tmp/is_full // Flag for if digested remeans are present. (for disposal messages)
Expand Down Expand Up @@ -232,7 +232,7 @@
for (var/mob/subprey in belly.internal_contents)
subprey.loc = owner
internal_contents.Add(subprey)
subprey << "As [M] melts away around you, you find yourself in [owner]'s [name]"
to_chat(subprey, "As [M] melts away around you, you find yourself in [owner]'s [name]")

//Drop all items into the belly.
for(var/obj/item/W in M)
Expand All @@ -254,8 +254,8 @@
R.setClickCooldown(50)

if(owner.stat) //If owner is stat (dead, KO) we can actually escape
R << "<span class='warning'>You attempt to climb out of \the [name]. (This will take around [escapetime/10] seconds.)</span>"
owner << "<span class='warning'>Someone is attempting to climb out of your [name]!</span>"
to_chat(R, "<span class='warning'>You attempt to climb out of \the [name]. (This will take around [escapetime/10] seconds.)</span>")
to_chat(owner, "<span class='warning'>Someone is attempting to climb out of your [name]!</span>")

if(do_after(R, escapetime, owner))
if((owner.stat || escapable) && (R in internal_contents)) //Can still escape?
Expand All @@ -264,8 +264,8 @@
else if(!(R in internal_contents)) //Aren't even in the belly. Quietly fail.
return
else //Belly became inescapable or mob revived
R << "<span class='warning'>Your attempt to escape [name] has failed!</span>"
owner << "<span class='notice'>The attempt to escape from your [name] has failed!</span>"
to_chat(R, "<span class='warning'>Your attempt to escape [name] has failed!</span>")
to_chat(owner, "<span class='notice'>The attempt to escape from your [name] has failed!</span>")
return
return
var/struggle_outer_message = pick(struggle_messages_outside)
Expand All @@ -288,27 +288,27 @@
playsound(R.loc, "struggle_sounds", 50, 0, -5)

if(escapable && R.a_intent != "help") //If the stomach has escapable enabled and the person is actually trying to kick out
R << "<span class='warning'>You attempt to climb out of \the [name].</span>"
owner << "<span class='warning'>Someone is attempting to climb out of your [name]!</span>"
to_chat(R, "<span class='warning'>You attempt to climb out of \the [name].</span>")
to_chat(owner, "<span class='warning'>Someone is attempting to climb out of your [name]!</span>")
if(prob(escapechance)) //Let's have it check to see if the prey escapes first.
if(do_after(R, escapetime))
if((escapable) && (R in internal_contents)) //Does the owner still have escapable enabled?
release_specific_contents(R)
R << "<span class='warning'>You climb out of \the [name].</span>"
owner << "<span class='warning'>[R] climbs out of your [name]!</span>"
to_chat(R, "<span class='warning'>You climb out of \the [name].</span>")
to_chat(owner, "<span class='warning'>[R] climbs out of your [name]!</span>")
for(var/mob/M in hearers(4, owner))
M.visible_message("<span class='warning'>[R] climbs out of [owner]'s [name]!</span>", 2)
return
else if(!(R in internal_contents)) //Aren't even in the belly. Quietly fail.
return
else //Belly became inescapable.
R << "<span class='warning'>Your attempt to escape [name] has failed!</span>"
owner << "<span class='notice'>The attempt to escape from your [name] has failed!</span>"
to_chat(R, "<span class='warning'>Your attempt to escape [name] has failed!</span>")
to_chat(owner, "<span class='notice'>The attempt to escape from your [name] has failed!/span>")
return

else //Nothing interesting happened.
R << "<span class='warning'>But make no progress in escaping [owner]'s [name].</span>"
owner << "<span class='warning'>But appears to be unable to make any progress in escaping your [name].</span>"
to_chat(R, "<span class='warning'>But make no progress in escaping [owner]'s [name].</span>")
to_chat(owner, "<span class='warning'>But appears to be unable to make any progress in escaping your [name].</span>")
return
else
return
Expand Down Expand Up @@ -366,4 +366,4 @@
for(var/I in emote_lists[K])
dupe.emote_lists[K] += I

return dupe
return dupe
49 changes: 3 additions & 46 deletions code/modules/vore/eating/bellymodes_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
digest_alert_prey = replacetext(digest_alert_prey,"%belly",lowertext(name))

//Send messages
owner << "<span class='warning'>" + digest_alert_owner + "</span>"
M << "<span class='userdanger'>" + digest_alert_prey + "</span>"
to_chat(owner, "<span class='warning'>[digest_alert_owner]</span>")
M.visible_message("<span class='notice'>You watch as [owner]'s form loses its additions.</span>", "<span class='warning'>[digest_alert_prey]</span>")

owner.nutrition += 400 // so eating dead mobs gives you *something*.
playsound(owner.loc, "death_gurgles", 50, 0, -5)
Expand All @@ -58,49 +58,6 @@
owner.nutrition += 1
return

//////////////////////////// DM_DIGESTF ////////////////////////////
if(digest_mode == DM_DIGESTF)

if(prob(50))
playsound(owner.loc, "digestion_sounds", 55, 0, -3) //slightly louder 'cuz heavier gurgles

for (var/mob/living/M in internal_contents)
//Pref protection!
if (!M.digestable)
continue

//Person just died in guts!
if(M.stat == DEAD)
var/digest_alert_owner = pick(digest_messages_owner)
var/digest_alert_prey = pick(digest_messages_prey)

//Replace placeholder vars
digest_alert_owner = replacetext(digest_alert_owner,"%pred",owner)
digest_alert_owner = replacetext(digest_alert_owner,"%prey",M)
digest_alert_owner = replacetext(digest_alert_owner,"%belly",lowertext(name))

digest_alert_prey = replacetext(digest_alert_prey,"%pred",owner)
digest_alert_prey = replacetext(digest_alert_prey,"%prey",M)
digest_alert_prey = replacetext(digest_alert_prey,"%belly",lowertext(name))

//Send messages
owner << "<span class='warning'>" + digest_alert_owner + "</span>"
M << "<span class='userdanger'>" + digest_alert_prey + "</span>"
M.visible_message("<span class='userdanger'>[digest_alert_owner]</span>", "<span class='warning'>[digest_alert_prey]</span>",
"<span class='notice'>You watch as [owner]'s form lose its additions.</span>")
owner.nutrition += 400 // so eating dead mobs gives you *something*.
playsound(owner.loc, "death_gurgles", 50, 0, -5)
digestion_death(M)
owner.update_icons()
continue

// Deal digestion damage (and feed the pred)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(2)
M.adjustFireLoss(3)
owner.nutrition += 1
return

///////////////////////////// DM_HEAL /////////////////////////////
if(digest_mode == DM_HEAL)
if(prob(50))
Expand All @@ -112,4 +69,4 @@
M.adjustBruteLoss(-1)
M.adjustFireLoss(-1)
owner.nutrition -= 10
return
return
Loading

0 comments on commit 884fb45

Please sign in to comment.