Adds 'mode addons' to bellies to replace several modes

This commit is contained in:
Arokha Sieyes
2018-04-11 19:22:20 -04:00
parent b427bca859
commit 4c604fb8da
13 changed files with 442 additions and 416 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
var/datum/belly/transferlocation = null // Location that the prey is released if they struggle and get dropped off.
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_ITEMWEAK,DM_STRIPDIGEST,DM_HEAL,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_SHRINK,DM_GROW,DM_SIZE_STEAL,DM_DIGEST_NUMB) // Possible digest modes
var/tmp/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_HEAL,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_SHRINK,DM_GROW,DM_SIZE_STEAL) // Possible digest modes
var/tmp/list/transform_modes = list(DM_TRANSFORM_MALE,DM_TRANSFORM_FEMALE,DM_TRANSFORM_KEEP_GENDER,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG,DM_TRANSFORM_REPLICA,DM_TRANSFORM_REPLICA_EGG,DM_TRANSFORM_KEEP_GENDER_EGG,DM_TRANSFORM_MALE_EGG,DM_TRANSFORM_FEMALE_EGG, DM_EGG)
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!
+20 -12
View File
@@ -32,14 +32,22 @@
var/shrink_grow_size = 1 // This horribly named variable determines the minimum/maximum size it will shrink/grow prey to.
var/transferlocation // Location that the prey is released if they struggle and get dropped off.
var/release_sound = TRUE // Boolean for now, maybe replace with something else later
var/mode_flags = 0 // Stripping, numbing, etc.
//I don't think we've ever altered these lists. making them static until someone actually overrides them somewhere.
var/tmp/static/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_ITEMWEAK,DM_STRIPDIGEST,DM_HEAL,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_SHRINK,DM_GROW,DM_SIZE_STEAL,DM_DIGEST_NUMB) // Possible digest modes
//Actual full digest modes
var/tmp/static/list/digest_modes = list(DM_HOLD,DM_DIGEST,DM_ABSORB,DM_DRAIN,DM_UNABSORB,DM_HEAL,DM_SHRINK,DM_GROW,DM_SIZE_STEAL)
//Digest mode addon flags
var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Itemweak" = DM_FLAG_ITEMWEAK, "Stripping" = DM_FLAG_STRIPPING)
//Transformation modes
var/tmp/static/list/transform_modes = list(DM_TRANSFORM_MALE,DM_TRANSFORM_FEMALE,DM_TRANSFORM_KEEP_GENDER,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR,DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG,DM_TRANSFORM_REPLICA,DM_TRANSFORM_REPLICA_EGG,DM_TRANSFORM_KEEP_GENDER_EGG,DM_TRANSFORM_MALE_EGG,DM_TRANSFORM_FEMALE_EGG, DM_EGG)
//List of slots that stripping handles strips
var/tmp/static/list/slots = list(slot_back,slot_handcuffed,slot_l_store,slot_r_store,slot_wear_mask,slot_l_hand,slot_r_hand,slot_wear_id,slot_glasses,slot_gloves,slot_head,slot_shoes,slot_belt,slot_wear_suit,slot_w_uniform,slot_s_store,slot_l_ear,slot_r_ear)
var/tmp/mob/living/owner // The mob whose belly this is.
var/tmp/digest_mode = DM_HOLD // Current mode the belly is set to from digest_modes (+transform_modes if human)
var/tmp/tf_mode = DM_TRANSFORM_REPLICA // Current transformation mode.
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 #
@@ -127,7 +135,8 @@
"digest_messages_owner",
"digest_messages_prey",
"examine_messages",
"emote_lists"
"emote_lists",
"mode_flags"
)
/obj/belly/New(var/newloc)
@@ -359,9 +368,12 @@
brain.forceMove(src)
items_preserved += brain
for(var/slot in slots)
var/obj/item/thingy = M.get_equipped_item(slot = slot)
if(thingy)
M.unEquip(thingy,force = TRUE)
var/obj/item/I = M.get_equipped_item(slot = slot)
if(I)
M.unEquip(I,force = TRUE)
I.gurgle_contaminate(contents, owner) //We do an initial contamination pass to get stuff like IDs wet.
if(mode_flags & DM_FLAG_ITEMWEAK)
items_preserved |= I
//Reagent transfer
if(ishuman(owner))
@@ -535,17 +547,12 @@
digest_mode = DM_ABSORB
return
else if(prob(digestchance) && digest_mode != DM_ITEMWEAK && digest_mode != DM_DIGEST) //Finally, let's see if it should run the digest chance.
else if(prob(digestchance) && digest_mode != DM_DIGEST) //Finally, let's see if it should run the digest chance.
to_chat(R,"<span class='warning'>In response to your struggling, \the [lowertext(name)] begins to get more active...</span>")
to_chat(owner,"<span class='warning'>You feel your [lowertext(name)] beginning to become active!</span>")
digest_mode = DM_ITEMWEAK
return
else if(prob(digestchance) && digest_mode == DM_ITEMWEAK) //Oh god it gets even worse if you fail twice!
to_chat(R,"<span class='warning'>In response to your struggling, \the [lowertext(name)] begins to get even more active!</span>")
to_chat(owner,"<span class='warning'>You feel your [lowertext(name)] beginning to become even more active!</span>")
digest_mode = DM_DIGEST
return
else //Nothing interesting happened.
to_chat(R,"<span class='warning'>You make no progress in escaping [owner]'s [lowertext(name)].</span>")
to_chat(owner,"<span class='warning'>Your prey appears to be unable to make any progress in escaping your [lowertext(name)].</span>")
@@ -603,6 +610,7 @@
dupe.transferlocation = transferlocation
dupe.bulge_size = bulge_size
dupe.shrink_grow_size = shrink_grow_size
dupe.mode_flags = mode_flags
//// Object-holding variables
//struggle_messages_outside - strings
@@ -0,0 +1,237 @@
/obj/belly/proc/process_tf(var/mode,var/list/touchable_mobs) //We pass mode so it's mega-ultra local.
/* May not be necessary... Transform only shows up in the panel for humans.
if(!ishuman(owner))
return //Need DNA and junk for this.
*/
//Cast here for reduced duplication
var/mob/living/carbon/human/O = owner
///////////////////////////// DM_TRANSFORM_HAIR_AND_EYES /////////////////////////////
if(mode == DM_TRANSFORM_HAIR_AND_EYES)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P) || check_hair(P))
change_eyes(P)
change_hair(P,1)
///////////////////////////// DM_TRANSFORM_MALE /////////////////////////////
else if(mode == DM_TRANSFORM_MALE)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,MALE))
change_gender(P,MALE,1)
///////////////////////////// DM_TRANSFORM_FEMALE /////////////////////////////
else if(mode == DM_TRANSFORM_FEMALE)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,FEMALE))
change_gender(P,FEMALE,1)
///////////////////////////// DM_TRANSFORM_KEEP_GENDER /////////////////////////////
else if(mode == DM_TRANSFORM_KEEP_GENDER)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
///////////////////////////// DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR /////////////////////////////
else if(mode == DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_ears(P) || check_tail_nocolor(P) || check_wing_nocolor(P) || check_species(P))
change_ears(P)
change_tail_nocolor(P)
change_wing_nocolor(P)
change_species(P,1)
///////////////////////////// DM_TRANSFORM_REPLICA /////////////////////////////
else if(mode == DM_TRANSFORM_REPLICA)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_ears(P) || check_tail(P) || check_wing(P) || check_species(P))
change_ears(P)
change_tail(P)
change_wing(P)
change_species(P,1)
///////////////////////////// DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG /////////////////////////////
else if(mode == DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(check_ears(P) || check_tail_nocolor(P) || check_wing_nocolor(P)|| check_species(P))
change_ears(P)
change_tail_nocolor(P)
change_wing_nocolor(P)
change_species(P,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_KEEP_GENDER_EGG /////////////////////////////
else if(mode == DM_TRANSFORM_KEEP_GENDER_EGG)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_REPLICA_EGG /////////////////////////////
else if(mode == DM_TRANSFORM_REPLICA_EGG)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_ears(P) || check_tail(P) || check_wing(P) || check_species(P))
change_ears(P)
change_tail(P)
change_wing(P)
change_species(P,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_MALE_EGG /////////////////////////////
else if(mode == DM_TRANSFORM_MALE_EGG)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,MALE))
change_gender(P,MALE,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_FEMALE_EGG /////////////////////////////
else if(mode == DM_TRANSFORM_FEMALE_EGG)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,MALE))
change_gender(P,MALE,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_EGG /////////////////////////////
else if(mode == DM_EGG)
for (var/mob/living/carbon/human/P in touchable_mobs)
if(P.absorbed || P.stat == DEAD)
continue
put_in_egg(P,1)
+92 -311
View File
@@ -20,30 +20,74 @@
var/list/EL = emote_lists[digest_mode]
if(LAZYLEN(EL))
for(var/mob/living/M in contents)
if(M.digestable || !(digest_mode == DM_DIGEST || digest_mode == DM_DIGEST_NUMB || digest_mode == DM_ITEMWEAK)) // don't give digesty messages to indigestible people
if(M.digestable || digest_mode != DM_DIGEST) // don't give digesty messages to indigestible people
to_chat(M,"<span class='notice'>[pick(EL)]</span>")
/////////////////////////// Exit Early ////////////////////////////
var/list/touchable_items = contents - items_preserved
if(!length(touchable_items))
var/list/touchable_atoms = contents - items_preserved
if(!length(touchable_atoms))
return SSBELLIES_PROCESSED
//////////////////////// Absorbed Handling ////////////////////////
for(var/mob/living/M in contents)
if(M.absorbed)
M.Weaken(5)
var/list/touchable_mobs = list()
///////////////////// Early Non-Mode Handling /////////////////////
var/did_an_item = FALSE
for(var/A in touchable_atoms)
//Handle stray items
if(isitem(A) && !did_an_item)
var/obj/item/I = A
if(mode_flags & DM_FLAG_ITEMWEAK)
I.gurgle_contaminate(contents, owner)
items_preserved |= I
else
digest_item(I)
owner.updateVRPanel()
did_an_item = TRUE
//Handle eaten mobs
else if(isliving(A))
var/mob/living/L = A
touchable_mobs += L
if(L.absorbed)
L.Weaken(5)
//Handle 'human'
if(ishuman(L))
var/mob/living/carbon/human/H = L
//Numbing flag
if(mode_flags & DM_FLAG_NUMBING)
if(H.bloodstr.get_reagent_amount("numbenzyme") < 2)
H.bloodstr.add_reagent("numbenzyme",4)
//Stripping flag
if(mode_flags & DM_FLAG_STRIPPING)
for(var/slot in slots)
var/obj/item/I = H.get_equipped_item(slot = slot)
if(I)
H.unEquip(I,force = TRUE)
if(mode_flags & DM_FLAG_ITEMWEAK)
I.gurgle_contaminate(contents, owner)
items_preserved |= I
else
digest_item(I)
owner.updateVRPanel()
H.updateVRPanel()
break
///////////////////////////// DM_HOLD /////////////////////////////
if(digest_mode == DM_HOLD)
return SSBELLIES_PROCESSED //Pretty boring, huh
//////////////////////////// DM_DIGEST ////////////////////////////
else if(digest_mode == DM_DIGEST || digest_mode == DM_DIGEST_NUMB || digest_mode == DM_ITEMWEAK)
else if(digest_mode == DM_DIGEST)
if(prob(50)) //Was SO OFTEN. AAAA.
play_sound = pick(digestion_sounds)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
//Pref protection!
if (!M.digestable || M.absorbed)
continue
@@ -71,11 +115,6 @@
owner.update_icons()
continue
if(digest_mode == DM_DIGEST_NUMB && ishuman(M))
var/mob/living/carbon/human/H = M
if(H.bloodstr.get_reagent_amount("numbenzyme") < 5)
H.bloodstr.add_reagent("numbenzyme",10)
// Deal digestion damage (and feed the pred)
M.adjustBruteLoss(digest_brute)
M.adjustFireLoss(digest_burn)
@@ -91,49 +130,13 @@
owner.nutrition += 2*(digest_brute+digest_burn)/difference
M.updateVRPanel()
//Contaminate or gurgle items
var/obj/item/T = pick(touchable_items)
if(istype(T))
if(digest_mode == DM_ITEMWEAK)
if(istype(T,/obj/item/weapon/reagent_containers/food) || istype(T,/obj/item/weapon/holder) || istype(T,/obj/item/organ))
digest_item(T)
else
T.gurgle_contaminate(contents, owner)
items_preserved |= T
else
digest_item(T)
owner.updateVRPanel()
//////////////////////////// DM_STRIPDIGEST ////////////////////////////
else if(digest_mode == DM_STRIPDIGEST) // Only gurgle the gear off your prey.
if(prob(50))
play_sound = pick(digestion_sounds)
// Handle loose items first.
var/obj/item/T = pick(touchable_items)
if(istype(T))
digest_item(T)
for(var/mob/living/carbon/human/M in contents)
if (M.absorbed)
continue
for(var/slot in slots)
var/obj/item/thingy = M.get_equipped_item(slot = slot)
if(thingy)
M.unEquip(thingy,force = TRUE)
digest_item(thingy)
break
M.updateVRPanel()
owner.updateVRPanel()
//////////////////////////// DM_ABSORB ////////////////////////////
else if(digest_mode == DM_ABSORB)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
if(prob(10)) //Less often than gurgles. People might leave this on forever.
play_sound = pick(digestion_sounds)
@@ -150,7 +153,9 @@
//////////////////////////// DM_UNABSORB ////////////////////////////
else if(digest_mode == DM_UNABSORB)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
if(M.absorbed && owner.nutrition >= 100)
M.absorbed = 0
to_chat(M,"<span class='notice'>You suddenly feel solid again </span>")
@@ -160,8 +165,9 @@
//////////////////////////// DM_DRAIN ////////////////////////////
else if(digest_mode == DM_DRAIN)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
if(prob(10)) //Less often than gurgles. People might leave this on forever.
play_sound = pick(digestion_sounds)
@@ -173,13 +179,15 @@
//////////////////////////// DM_SHRINK ////////////////////////////
else if(digest_mode == DM_SHRINK)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
if(prob(10)) //Infinite gurgles!
play_sound = pick(digestion_sounds)
if(M.size_multiplier > shrink_grow_size) //Shrink until smol.
M.resize(M.size_multiplier-0.01) //Shrink by 1% per tick.
if(M.nutrition >= 100) //Absorbing bodymass results in nutrition if possible.
var/oldnutrition = (M.nutrition * 0.05)
M.nutrition = (M.nutrition * 0.95)
@@ -188,8 +196,9 @@
//////////////////////////// DM_GROW ////////////////////////////
else if(digest_mode == DM_GROW)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
if(prob(10))
play_sound = pick(digestion_sounds)
@@ -201,14 +210,16 @@
//////////////////////////// DM_SIZE_STEAL ////////////////////////////
else if(digest_mode == DM_SIZE_STEAL)
for (var/mob/living/M in contents)
for (var/target in touchable_mobs)
var/mob/living/M = target
if(prob(10))
play_sound = pick(digestion_sounds)
if(M.size_multiplier > shrink_grow_size && owner.size_multiplier < 2) //Grow until either pred is large or prey is small.
owner.resize(owner.size_multiplier+0.01) //Grow by 1% per tick.
M.resize(M.size_multiplier-0.01) //Shrink by 1% per tick
if(M.nutrition >= 100)
var/oldnutrition = (M.nutrition * 0.05)
M.nutrition = (M.nutrition * 0.95)
@@ -216,261 +227,31 @@
///////////////////////////// DM_HEAL /////////////////////////////
else if(digest_mode == DM_HEAL)
if(prob(50)) //Wet heals!
if(prob(50)) //Wet heals! The secret is you can leave this on for gurgle noises for fun.
play_sound = pick(digestion_sounds)
for (var/mob/living/M in contents)
if(M.stat != DEAD)
if(owner.nutrition > 90 && (M.health < M.maxHealth))
M.adjustBruteLoss(-5)
M.adjustFireLoss(-5)
owner.nutrition -= 2
if(M.nutrition <= 400)
M.nutrition += 1
else if(owner.nutrition > 90 && (M.nutrition <= 400))
owner.nutrition -= 1
for (var/target in touchable_mobs)
var/mob/living/M = target
if(M.stat == DEAD)
continue
if(owner.nutrition > 90 && (M.health < M.maxHealth))
M.adjustBruteLoss(-5)
M.adjustFireLoss(-5)
owner.nutrition -= 2
if(M.nutrition <= 400)
M.nutrition += 1
else if(owner.nutrition > 90 && (M.nutrition <= 400))
owner.nutrition -= 1
M.nutrition += 1
///////////////////////////// DM_TRANSFORM_HAIR_AND_EYES /////////////////////////////
else if(digest_mode == DM_TRANSFORM_HAIR_AND_EYES && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
var/mob/living/carbon/human/O = owner
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P) || check_hair(P))
change_eyes(P)
change_hair(P,1)
///////////////////////////// DM_TRANSFORM_MALE /////////////////////////////
else if(digest_mode == DM_TRANSFORM_MALE && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
var/mob/living/carbon/human/O = owner
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,MALE))
change_gender(P,MALE,1)
///////////////////////////// DM_TRANSFORM_FEMALE /////////////////////////////
else if(digest_mode == DM_TRANSFORM_FEMALE && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
var/mob/living/carbon/human/O = owner
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,FEMALE))
change_gender(P,FEMALE,1)
///////////////////////////// DM_TRANSFORM_KEEP_GENDER /////////////////////////////
else if(digest_mode == DM_TRANSFORM_KEEP_GENDER && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
var/mob/living/carbon/human/O = owner
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
///////////////////////////// DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR /////////////////////////////
else if(digest_mode == DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
var/mob/living/carbon/human/O = owner
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_ears(P) || check_tail_nocolor(P) || check_wing_nocolor(P) || check_species(P))
change_ears(P)
change_tail_nocolor(P)
change_wing_nocolor(P)
change_species(P,1)
///////////////////////////// DM_TRANSFORM_REPLICA /////////////////////////////
else if(digest_mode == DM_TRANSFORM_REPLICA && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
var/mob/living/carbon/human/O = owner
if(O.nutrition > 400 && P.nutrition < 400)
O.nutrition -= 2
P.nutrition += 1.5
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_ears(P) || check_tail(P) || check_wing(P) || check_species(P))
change_ears(P)
change_tail(P)
change_wing(P)
change_species(P,1)
///////////////////////////// DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG /////////////////////////////
else if(digest_mode == DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
if(check_ears(P) || check_tail_nocolor(P) || check_wing_nocolor(P)|| check_species(P))
change_ears(P)
change_tail_nocolor(P)
change_wing_nocolor(P)
change_species(P,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_KEEP_GENDER_EGG /////////////////////////////
else if(digest_mode == DM_TRANSFORM_KEEP_GENDER_EGG && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_REPLICA_EGG /////////////////////////////
else if(digest_mode == DM_TRANSFORM_REPLICA_EGG && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_ears(P) || check_tail(P) || check_wing(P) || check_species(P))
change_ears(P)
change_tail(P)
change_wing(P)
change_species(P,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_MALE_EGG /////////////////////////////
else if(digest_mode == DM_TRANSFORM_MALE_EGG && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,MALE))
change_gender(P,MALE,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_TRANSFORM_FEMALE_EGG /////////////////////////////
else if(digest_mode == DM_TRANSFORM_FEMALE_EGG && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.stat == DEAD)
continue
if(check_eyes(P))
change_eyes(P,1)
continue
if(check_hair(P) || check_skin(P))
change_hair(P)
change_skin(P,1)
continue
if(check_gender(P,MALE))
change_gender(P,MALE,1)
continue
if(!P.absorbed)
put_in_egg(P,1)
///////////////////////////// DM_EGG /////////////////////////////
else if(digest_mode == DM_EGG && ishuman(owner))
for (var/mob/living/carbon/human/P in contents)
if(P.absorbed || P.stat == DEAD)
continue
put_in_egg(P,1)
/////////////////////////// DM_TRANSFORM ///////////////////////////
else if(digest_mode == DM_TRANSFORM)
process_tf(tf_mode, touchable_mobs)
/////////////////////////// Make any noise ///////////////////////////
if(play_sound)
playsound(src, play_sound, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF, ignore_walls = TRUE, preference = /datum/client_preference/digestion_noises)
return SSBELLIES_PROCESSED
+60 -34
View File
@@ -18,7 +18,7 @@
var/dat = picker_holder.gen_ui(src)
picker_holder.popup = new(src, "insidePanel","Inside!", 400, 600, picker_holder)
picker_holder.popup = new(src, "insidePanel","Inside!", 450, 700, picker_holder)
picker_holder.popup.set_content(dat)
picker_holder.popup.open()
src.openpanel = 1
@@ -31,7 +31,7 @@
var/dat = picker_holder.gen_ui(src)
picker_holder.popup = new(src, "insidePanel","Inside!", 400, 600, picker_holder)
picker_holder.popup = new(src, "insidePanel","Inside!", 450, 700, picker_holder)
picker_holder.popup.set_content(dat)
picker_holder.popup.open()
@@ -110,46 +110,44 @@
spanstyle = ""
if(DM_DIGEST)
spanstyle = "color:red;"
if(DM_ITEMWEAK)
spanstyle = "color:red;"
if(DM_STRIPDIGEST)
spanstyle = "color:red;"
if(DM_HEAL)
spanstyle = "color:green;"
if(DM_ABSORB)
spanstyle = "color:purple;"
if(DM_DRAIN)
spanstyle = "color:purple;"
if(DM_HEAL)
spanstyle = "color:green;"
if(DM_SHRINK)
spanstyle = "color:purple;"
if(DM_GROW)
spanstyle = "color:purple;"
if(DM_SIZE_STEAL)
spanstyle = "color:purple;"
if(DM_TRANSFORM_MALE)
spanstyle = "color:purple;"
if(DM_TRANSFORM_HAIR_AND_EYES)
spanstyle = "color:purple;"
if(DM_TRANSFORM_FEMALE)
spanstyle = "color:purple;"
if(DM_TRANSFORM_KEEP_GENDER)
spanstyle = "color:purple;"
if(DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR)
spanstyle = "color:purple;"
if(DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_REPLICA)
spanstyle = "color:purple;"
if(DM_TRANSFORM_REPLICA_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_KEEP_GENDER_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_MALE_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_FEMALE_EGG)
spanstyle = "color:purple;"
if(DM_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM)
switch(B.tf_mode)
if(DM_TRANSFORM_MALE)
spanstyle = "color:purple;"
if(DM_TRANSFORM_HAIR_AND_EYES)
spanstyle = "color:purple;"
if(DM_TRANSFORM_FEMALE)
spanstyle = "color:purple;"
if(DM_TRANSFORM_KEEP_GENDER)
spanstyle = "color:purple;"
if(DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR)
spanstyle = "color:purple;"
if(DM_TRANSFORM_CHANGE_SPECIES_AND_TAUR_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_REPLICA)
spanstyle = "color:purple;"
if(DM_TRANSFORM_REPLICA_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_KEEP_GENDER_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_MALE_EGG)
spanstyle = "color:purple;"
if(DM_TRANSFORM_FEMALE_EGG)
spanstyle = "color:purple;"
if(DM_EGG)
spanstyle = "color:purple;"
dat += "<span style='[spanstyle]'> ([B.contents.len])</span></a></li>"
@@ -193,7 +191,19 @@
//Digest Mode Button
dat += "<br><a href='?src=\ref[src];b_mode=\ref[selected]'>Belly Mode:</a>"
dat += " [selected.digest_mode]"
var/mode = selected.digest_mode
dat += " [mode == DM_TRANSFORM ? selected.tf_mode : mode]"
//Mode addons button
dat += "<br><a href='?src=\ref[src];b_addons=\ref[selected]'>Mode Addons:</a>"
var/list/flag_list = list()
for(var/flag_name in selected.mode_flag_list)
if(selected.mode_flags & selected.mode_flag_list[flag_name])
flag_list += flag_name
if(flag_list.len)
dat += " [english_list(flag_list)]"
else
dat += " None"
//Belly verb
dat += "<br><a href='?src=\ref[src];b_verb=\ref[selected]'>Vore Verb:</a>"
@@ -499,14 +509,30 @@
if(href_list["b_mode"])
var/list/menu_list = selected.digest_modes
if(istype(usr,/mob/living/carbon/human))
menu_list += selected.transform_modes
menu_list += DM_TRANSFORM
var/new_mode = input("Choose Mode (currently [selected.digest_mode])") as null|anything in menu_list
if(!new_mode)
return 0
if(new_mode == DM_TRANSFORM) //Snowflek submenu
var/list/tf_list = selected.transform_modes
var/new_tf_mode = input("Choose TF Mode (currently [selected.tf_mode])") as null|anything in tf_list
if(!new_tf_mode)
return 0
selected.tf_mode = new_tf_mode
selected.digest_mode = new_mode
selected.items_preserved.Cut() //Re-evaltuate all items in belly on belly-mode change
if(href_list["b_addons"])
var/list/menu_list = selected.mode_flag_list
var/toggle_addon = input("Toggle Addon") as null|anything in menu_list
if(!toggle_addon)
return 0
selected.mode_flags ^= selected.mode_flag_list[toggle_addon]
selected.items_preserved.Cut() //Re-evaltuate all items in belly on addon toggle
if(href_list["b_desc"])
var/new_desc = html_encode(input(usr,"Belly Description ([BELLIES_DESC_MAX] char limit):","New Description",selected.desc) as message|null)