mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 19:15:11 +01:00
optimizes transfer (#18943)
* limits belly contetns to 200 items * there too * this too * don't strip blacklisted things * . * sometime later * no remains if belly is full * this * just warn for now * . * . * . * . * . * - * . * . * linter * faster * . * . * optimize * fix that * 20 should be ok * nom atom * . --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
@@ -114,7 +114,7 @@
|
||||
do_nom = TRUE
|
||||
|
||||
if(do_nom)
|
||||
micro.forceMove(eater.vore_selected)
|
||||
eater.vore_selected.nom_atom(micro)
|
||||
food_inserted_micros -= micro
|
||||
|
||||
if(!reagents.total_volume && changed)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
do_nom = TRUE
|
||||
|
||||
if(do_nom)
|
||||
micro.forceMove(eater.vore_selected)
|
||||
eater.vore_selected.nom_atom(micro)
|
||||
food_inserted_micros -= micro
|
||||
|
||||
if(!reagents.total_volume)
|
||||
@@ -2013,7 +2013,7 @@
|
||||
|
||||
var/mob/living/Pred = M
|
||||
if(Pred.can_be_drop_pred && Pred.food_vore && Pred.vore_selected)
|
||||
Prey.forceMove(Pred.vore_selected)
|
||||
Pred.vore_selected.nom_atom(Prey)
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/on_reagent_change()
|
||||
if(reagents.has_reagent(REAGENT_ID_WATER))
|
||||
|
||||
@@ -360,10 +360,10 @@ emp_act
|
||||
// PERSON BEING HIT: CAN BE DROP PRED, ALLOWS THROW VORE.
|
||||
// PERSON BEING THROWN: DEVOURABLE, ALLOWS THROW VORE, CAN BE DROP PREY.
|
||||
if(can_throw_vore(src, thrown_mob))
|
||||
vore_selected.nom_mob(thrown_mob) //Eat them!!!
|
||||
vore_selected.nom_atom(thrown_mob) //Eat them!!!
|
||||
visible_message(span_vwarning("[thrown_mob] is thrown right into [src]'s [lowertext(vore_selected.name)]!"))
|
||||
if(thrown_mob.loc != vore_selected)
|
||||
thrown_mob.forceMove(vore_selected) //Double check. Should never happen but...Weirder things have happened!
|
||||
vore_selected.nom_atom(thrown_mob) //Double check. Should never happen but...Weirder things have happened!
|
||||
add_attack_logs(thrown_mob.thrower,src,"Devoured [thrown_mob.name] via throw vore.")
|
||||
return //We can stop here. We don't need to calculate damage or anything else. They're eaten.
|
||||
|
||||
@@ -371,9 +371,9 @@ emp_act
|
||||
// PERSON BEING THROWN: CAN BE DROP PRED, ALLOWS THROW VORE.
|
||||
else if(can_throw_vore(thrown_mob, src)) //Pred thrown into prey.
|
||||
visible_message(span_vwarning("[src] suddenly slips inside of [thrown_mob]'s [lowertext(thrown_mob.vore_selected.name)] as [thrown_mob] flies into them!"))
|
||||
thrown_mob.vore_selected.nom_mob(src) //Eat them!!!
|
||||
thrown_mob.vore_selected.nom_atom(src) //Eat them!!!
|
||||
if(src.loc != thrown_mob.vore_selected)
|
||||
src.forceMove(thrown_mob.vore_selected) //Double check. Should never happen but...Weirder things have happened!
|
||||
thrown_mob.vore_selected.nom_atom(src) //Double check. Should never happen but...Weirder things have happened!
|
||||
add_attack_logs(thrown_mob.LAssailant,src,"Was Devoured by [thrown_mob.name] via throw vore.")
|
||||
return
|
||||
//VORESTATION EDIT END - Allows for thrown vore!
|
||||
@@ -384,7 +384,7 @@ emp_act
|
||||
if(adminbus_trash || is_type_in_list(O, GLOB.edible_trash) && O.trash_eatable && !is_type_in_list(O, GLOB.item_vore_blacklist))
|
||||
visible_message(span_vwarning("[O] is thrown directly into [src]'s [lowertext(vore_selected.name)]!"))
|
||||
O.throwing = 0
|
||||
O.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(O)
|
||||
return
|
||||
if(in_throw_mode && speed <= THROWFORCE_SPEED_DIVISOR) //empty active hand and we're in throw mode
|
||||
if(canmove && !restrained() && !src.is_incorporeal())
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
if(target_list.len)
|
||||
for(var/mob/living/M in target_list)
|
||||
if(M.devourable && M.can_be_drop_prey)
|
||||
M.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(M)
|
||||
to_chat(M,span_vwarning("In a bright flash of white light, you suddenly find yourself trapped in \the [src]'s [vore_selected.get_belly_name()]!"))
|
||||
species.update_lleill_hud(src)
|
||||
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
if(can_spontaneous_vore(src, target))
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target, force = TRUE)
|
||||
target.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(target)
|
||||
to_chat(target,span_warning("\The [src] quickly engulfs you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
update_canmove()
|
||||
|
||||
|
||||
@@ -736,7 +736,7 @@
|
||||
target.visible_message(span_vwarning("\The [target] suddenly disappears, being dragged into the water!"),\
|
||||
span_vdanger("You are dragged below the water and feel yourself slipping directly into \the [src]'s [vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vnotice("You successfully drag \the [target] into the water, slipping them into your [vore_selected.get_belly_name()]."))
|
||||
target.forceMove(src.vore_selected)
|
||||
vore_selected.nom_atom(target)
|
||||
|
||||
/mob/living/carbon/human/proc/toggle_pain_module()
|
||||
set name = "Toggle pain simulation."
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
/obj/item/dogborg/sleeper/proc/ingest_living(var/mob/living/victim, var/obj/belly/belly)
|
||||
if (victim.devourable && is_vore_predator(hound))
|
||||
belly.nom_mob(victim, hound)
|
||||
belly.nom_atom(victim, hound)
|
||||
add_attack_logs(hound, victim, "Eaten via [belly.name]")
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
B.owner.visible_message(span_boldwarning("Something grows inside [B.owner]'s [lowertext(B.name)]!"))
|
||||
to_chat(B.owner, span_warning("\The [src] suddenly evolves inside your [lowertext(B.name)]!"))
|
||||
B.release_specific_contents(src, TRUE)
|
||||
B.nom_mob(bigger, null)
|
||||
B.nom_atom(bigger, null)
|
||||
qdel(src)
|
||||
else
|
||||
visible_message(span_warning("\The [src] suddenly evolves!"))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
B.owner.visible_message(span_boldwarning("Something grows inside [B.owner]'s [lowertext(B.name)]!"))
|
||||
to_chat(B.owner, span_warning("\The [src] suddenly evolves inside your [lowertext(B.name)]!"))
|
||||
B.release_specific_contents(src, TRUE)
|
||||
B.nom_mob(bigger, null)
|
||||
B.nom_atom(bigger, null)
|
||||
qdel(src)
|
||||
else
|
||||
visible_message(span_warning("\The [src] suddenly evolves!"))
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
if(potentials.len)
|
||||
var/mob/living/target = pick(potentials)
|
||||
if(can_phase_vore(src, target))
|
||||
target.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(target)
|
||||
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
|
||||
// Do this after the potential vore, so we get the belly
|
||||
@@ -204,7 +204,7 @@
|
||||
if(potentials.len)
|
||||
var/mob/living/target = pick(potentials)
|
||||
if(can_phase_vore(src, target))
|
||||
target.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(target)
|
||||
to_chat(target,span_vwarning("\The [src] phases in around you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
|
||||
// Do this after the potential vore, so we get the belly
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
if(will_eat(L))
|
||||
var/obj/belly/B = vore_organs[1]
|
||||
automatic_custom_emote(message = "snatches and devours [L]!")
|
||||
B.nom_mob(L)
|
||||
B.nom_atom(L)
|
||||
ai_holder.find_target()
|
||||
return
|
||||
else if(L.size_multiplier <= 0.5 && L.step_mechanics_pref)
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
if(can_spontaneous_vore(src, target))
|
||||
if(target.buckled)
|
||||
target.buckled.unbuckle_mob(target, force = TRUE)
|
||||
target.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(target)
|
||||
to_chat(target,span_vwarning("\The [src] quickly engulfs you, [vore_selected.vore_verb]ing you into their [vore_selected.get_belly_name()]!"))
|
||||
else
|
||||
..()
|
||||
@@ -367,7 +367,7 @@
|
||||
parent_morph.forceMove(get_turf(prey_body))
|
||||
parent_morph.ckey = parent_morph.original_ckey
|
||||
prey_body.ckey = prey_ckey
|
||||
prey_body.forceMove(parent_morph.vore_selected)
|
||||
parent_morph.vore_selected.nom_atom(prey_body)
|
||||
log_and_message_admins("and [key_name_admin(parent_morph)] have been returned to their original bodies. [get_area(src)] - [COORD(src)].", prey_body)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
pred.init_vore(TRUE)
|
||||
TEST_ASSERT(pred.vore_selected, "[pred] has no vore_selected")
|
||||
|
||||
pred.vore_selected.nom_mob(prey)
|
||||
pred.vore_selected.nom_atom(prey)
|
||||
|
||||
TEST_ASSERT(prey.loc == pred.vore_selected, "Prey not inside predator belly")
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
pred.init_vore(TRUE)
|
||||
TEST_ASSERT(pred.vore_selected, "[pred] has no vore_selected")
|
||||
|
||||
pred.vore_selected.nom_mob(prey)
|
||||
pred.vore_selected.nom_atom(prey)
|
||||
|
||||
TEST_ASSERT(prey.loc == pred.vore_selected, "Prey not inside predator belly")
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
pred.init_vore(TRUE)
|
||||
TEST_ASSERT(pred.vore_selected, "[pred] has no vore_selected")
|
||||
|
||||
pred.vore_selected.nom_mob(prey)
|
||||
pred.vore_selected.nom_atom(prey)
|
||||
|
||||
TEST_ASSERT(prey.loc == pred.vore_selected, "Prey not inside predator belly")
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define MAX_ENTRY_MESSAAGES 20
|
||||
#define ENTRY_MESSAGE_INTERVAL 1 SECOND
|
||||
|
||||
//
|
||||
// Belly system 2.0, now using objects instead of datums because EH at datums.
|
||||
// How many times have I rewritten bellies and vore now? -Aro
|
||||
@@ -64,9 +67,9 @@
|
||||
var/eating_privacy_local = "default" //Overrides eating_privacy_global if not "default". Determines if attempt/success messages are subtle/loud
|
||||
var/is_feedable = TRUE // If this belly shows up in belly selections for others.
|
||||
var/silicon_belly_overlay_preference = "Sleeper" //Selects between placing belly overlay in sleeper or normal vore mode. Exclusive
|
||||
var/belly_mob_mult = 1 //Multiplier for how filling mob types are in borg bellies
|
||||
var/belly_item_mult = 1 //Multiplier for how filling items are in borg borg bellies. Items are also weighted on item size
|
||||
var/belly_overall_mult = 1 //Multiplier applied ontop of any other specific multipliers
|
||||
var/belly_mob_mult = 1 //Multiplier for how filling mob types are in borg bellies
|
||||
var/belly_item_mult = 1 //Multiplier for how filling items are in borg borg bellies. Items are also weighted on item size
|
||||
var/belly_overall_mult = 1 //Multiplier applied ontop of any other specific multipliers
|
||||
var/private_struggle = FALSE // If struggles are made public or not
|
||||
var/prevent_saving = FALSE // Can this belly be saved? For special bellies that mobs and adminbus might have.
|
||||
var/absorbedrename_enabled = FALSE // If absorbed prey are renamed.
|
||||
@@ -103,14 +106,14 @@
|
||||
var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location
|
||||
var/autotransferwait = 10 // Time between trying to transfer.
|
||||
var/autotransferlocation // Place to send them
|
||||
var/autotransferextralocation = list() // List of extra places this could go
|
||||
var/list/autotransferextralocation = list() // List of extra places this could go
|
||||
var/autotransfer_whitelist = 0 // Flags for what can be transferred to the primary location
|
||||
var/autotransfer_blacklist = 2 // Flags for what can not be transferred to the primary location, defaults to Absorbed
|
||||
var/autotransfer_whitelist_items = 0 // Flags for what can be transferred to the primary location
|
||||
var/autotransfer_blacklist_items = 0 // Flags for what can not be transferred to the primary location
|
||||
var/autotransferchance_secondary = 0 // % Chance of prey being autotransferred to secondary transfer location
|
||||
var/autotransferlocation_secondary // Second place to send them
|
||||
var/autotransferextralocation_secondary = list() // List of extra places the secondary transfer could go
|
||||
var/list/autotransferextralocation_secondary = list() // List of extra places the secondary transfer could go
|
||||
var/autotransfer_secondary_whitelist = 0// Flags for what can be transferred to the secondary location
|
||||
var/autotransfer_secondary_blacklist = 2// Flags for what can not be transferred to the secondary location, defaults to Absorbed
|
||||
var/autotransfer_secondary_whitelist_items = 0// Flags for what can be transferred to the secondary location
|
||||
@@ -267,6 +270,9 @@
|
||||
var/list/belly_surrounding = list() // A list of living mobs surrounded by this belly, including inside containers, food, on mobs, etc. Exclusing inside other bellies.
|
||||
var/bellytemperature = T20C // Temperature applied to humans in the belly.
|
||||
var/temperature_damage = FALSE // Does temperature damage prey?
|
||||
var/last_transfer_log = 0 // Prevent server message spam!
|
||||
var/next_transfer_log = 0 // Prevent server message spam!
|
||||
var/entrance_log_count = 0 // Entrance count before spawm
|
||||
flags = NOREACT // We dont want bellies to start bubling nonstop due to people mixing when transfering and making different reagents
|
||||
|
||||
//For serialization, keep this updated, required for bellies to save correctly.
|
||||
@@ -516,7 +522,6 @@
|
||||
log_admin("[key_name(owner)]'s belly `[src]` moved from [old_loc] ([old_loc?.x],[old_loc?.y],[old_loc?.z]) to [loc] ([loc?.x],[loc?.y],[loc?.z]) while containing [key_name(L)].")
|
||||
break
|
||||
|
||||
|
||||
// Called whenever an atom enters this belly
|
||||
/obj/belly/Entered(atom/movable/thing, atom/OldLoc)
|
||||
. = ..()
|
||||
@@ -543,7 +548,15 @@
|
||||
//Generic entered message
|
||||
if(!owner.mute_entry && entrance_logs)
|
||||
if(!istype(thing, /mob/observer)) //Don't have ghosts announce they're reentering the belly on death
|
||||
to_chat(owner,span_vnotice("[thing] slides into your [lowertext(name)]."))
|
||||
if(world.time - last_transfer_log > ENTRY_MESSAGE_INTERVAL)
|
||||
last_transfer_log = world.time
|
||||
entrance_log_count = 0
|
||||
if(world.time >= next_transfer_log)
|
||||
to_chat(owner,span_vnotice("[thing] slides into your [lowertext(name)]."))
|
||||
entrance_log_count++
|
||||
if(entrance_log_count >= MAX_ENTRY_MESSAAGES)
|
||||
next_transfer_log = world.time + ENTRY_MESSAGE_INTERVAL
|
||||
last_transfer_log = world.time
|
||||
|
||||
//Sound w/ antispam flag setting
|
||||
if(vore_sound && !recent_sound && !istype(thing, /mob/observer))
|
||||
@@ -970,11 +983,17 @@
|
||||
// Actually perform the mechanics of devouring the tasty prey.
|
||||
// The purpose of this method is to avoid duplicate code, and ensure that all necessary
|
||||
// steps are taken.
|
||||
/obj/belly/proc/nom_mob(mob/prey, mob/user)
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
if(prey.buckled)
|
||||
prey.buckled.unbuckle_mob()
|
||||
/obj/belly/proc/nom_atom(atom/movable/prey, mob/user)
|
||||
if(ismob(prey))
|
||||
var/mob/mob_prey = prey
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
if(mob_prey.buckled)
|
||||
mob_prey.buckled.unbuckle_mob()
|
||||
if(mob_prey.ckey)
|
||||
GLOB.prey_eaten_roundstat++
|
||||
if(owner.mind)
|
||||
owner.mind.vore_prey_eaten++
|
||||
|
||||
prey.forceMove(src)
|
||||
owner.updateVRPanel()
|
||||
@@ -982,11 +1001,6 @@
|
||||
for(var/mob/living/M in contents)
|
||||
M.updateVRPanel()
|
||||
|
||||
if(prey.ckey)
|
||||
GLOB.prey_eaten_roundstat++
|
||||
if(owner.mind)
|
||||
owner.mind.vore_prey_eaten++
|
||||
|
||||
// new procs for handling digestion damage as a total rather than per-type
|
||||
// Returns the current total digestion damage per tick of a belly.
|
||||
/obj/belly/proc/get_total_digestion_damage()
|
||||
@@ -1506,11 +1520,15 @@
|
||||
return see
|
||||
|
||||
//Transfers contents from one belly to another
|
||||
/obj/belly/proc/transfer_contents(atom/movable/content, obj/belly/target, silent = 0)
|
||||
/obj/belly/proc/transfer_contents(atom/movable/content, obj/belly/target, silent = FALSE)
|
||||
if(!(content in src) || !istype(target))
|
||||
return
|
||||
content.belly_cycles = 0
|
||||
var/old_entrance_logs = target.entrance_logs
|
||||
if(silent)
|
||||
target.entrance_logs = FALSE
|
||||
content.forceMove(target)
|
||||
target.entrance_logs = old_entrance_logs
|
||||
if(isitem(content))
|
||||
var/obj/item/I = content
|
||||
if(istype(I,/obj/item/card/id))
|
||||
@@ -1519,38 +1537,55 @@
|
||||
I.wash(CLEAN_WASH)
|
||||
I.gurgle_contaminate(target.contents, target.contamination_flavor, target.contamination_color)
|
||||
items_preserved -= content
|
||||
if(!silent)
|
||||
handle_visual_update()
|
||||
|
||||
/obj/belly/proc/handle_visual_update()
|
||||
owner.updateVRPanel()
|
||||
for(var/mob/living/M in contents)
|
||||
M.updateVRPanel()
|
||||
owner.handle_belly_update()
|
||||
|
||||
//Autotransfer belly lookup
|
||||
/obj/belly/proc/compile_autotransfer_bellies()
|
||||
var/list/primary_bellies = list()
|
||||
var/list/secondary_bellies = list()
|
||||
|
||||
var/list/primary_locations = autotransferextralocation.Copy()
|
||||
primary_locations += autotransferlocation
|
||||
var/list/secondary_locations = autotransferextralocation_secondary.Copy()
|
||||
secondary_locations += autotransferlocation_secondary
|
||||
for(var/obj/belly/B in owner.vore_organs)
|
||||
if(B.name in primary_locations)
|
||||
primary_bellies += B
|
||||
if(B.name in secondary_locations)
|
||||
secondary_bellies += B
|
||||
|
||||
return list("primary" = primary_bellies, "secondary" = secondary_bellies)
|
||||
|
||||
//Autotransfer callback
|
||||
/obj/belly/proc/check_autotransfer(var/atom/movable/prey)
|
||||
if(!(prey in contents) || !prey.autotransferable) return
|
||||
var/dest_belly_name
|
||||
/obj/belly/proc/check_autotransfer(var/atom/movable/prey, var/list/transfer_locations)
|
||||
if(!(prey in contents) || !prey.autotransferable)
|
||||
return FALSE
|
||||
var/obj/belly/dest_belly
|
||||
if(autotransferlocation_secondary && prob(autotransferchance_secondary))
|
||||
if(ismob(prey) && autotransfer_filter(prey, autotransfer_secondary_whitelist, autotransfer_secondary_blacklist))
|
||||
dest_belly_name = pick(autotransferextralocation_secondary + autotransferlocation_secondary)
|
||||
dest_belly = pick(transfer_locations["secondary"])
|
||||
if(isitem(prey) && autotransfer_filter(prey, autotransfer_secondary_whitelist_items, autotransfer_secondary_blacklist_items))
|
||||
dest_belly_name = pick(autotransferextralocation_secondary + autotransferlocation_secondary)
|
||||
dest_belly = pick(transfer_locations["secondary"])
|
||||
if(autotransferlocation && prob(autotransferchance))
|
||||
if(ismob(prey) && autotransfer_filter(prey, autotransfer_whitelist, autotransfer_blacklist))
|
||||
dest_belly_name = pick(autotransferextralocation + autotransferlocation)
|
||||
dest_belly = pick(transfer_locations["primary"])
|
||||
if(isitem(prey) && autotransfer_filter(prey, autotransfer_whitelist_items, autotransfer_blacklist_items))
|
||||
dest_belly_name = pick(autotransferextralocation + autotransferlocation)
|
||||
if(!dest_belly_name) // Didn't transfer, so wait before retrying
|
||||
dest_belly = pick(transfer_locations["primary"])
|
||||
if(!dest_belly) // Didn't transfer, so wait before retrying
|
||||
prey.belly_cycles = 0
|
||||
return
|
||||
var/obj/belly/dest_belly
|
||||
for(var/obj/belly/B in owner.vore_organs)
|
||||
if(B.name == dest_belly_name)
|
||||
dest_belly = B
|
||||
break
|
||||
if(!dest_belly) return
|
||||
return FALSE
|
||||
if(ismob(prey))
|
||||
var/autotransfer_owner_message
|
||||
var/autotransfer_prey_message
|
||||
if(dest_belly_name == autotransferlocation)
|
||||
var/dest_belly_name = dest_belly.name
|
||||
if(dest_belly.name == autotransferlocation)
|
||||
autotransfer_owner_message = span_vwarning(belly_format_string(primary_autotransfer_messages_owner, prey, dest = dest_belly_name))
|
||||
autotransfer_prey_message = span_vwarning(belly_format_string(primary_autotransfer_messages_prey, prey, dest = dest_belly_name))
|
||||
else
|
||||
@@ -1561,7 +1596,7 @@
|
||||
if(entrance_logs)
|
||||
to_chat(owner, autotransfer_owner_message)
|
||||
|
||||
transfer_contents(prey, dest_belly)
|
||||
transfer_contents(prey, dest_belly, TRUE)
|
||||
return TRUE
|
||||
|
||||
//Autotransfer filter
|
||||
@@ -2206,3 +2241,6 @@
|
||||
|
||||
/obj/belly/proc/toggle_displayed_message_flags(flags_to_set)
|
||||
displayed_message_flags ^= flags_to_set
|
||||
|
||||
#undef MAX_ENTRY_MESSAAGES
|
||||
#undef ENTRY_MESSAGE_INTERVAL
|
||||
|
||||
@@ -27,20 +27,26 @@
|
||||
// Autotransfer count moved here.
|
||||
if(autotransfer_enabled)
|
||||
var/list/autotransferables = list()
|
||||
var/list/transfer_bellies = compile_autotransfer_bellies()
|
||||
for(var/atom/movable/M in contents)
|
||||
if(!M || !M.autotransferable) continue
|
||||
if(!M || !M.autotransferable)
|
||||
continue
|
||||
// If the prey can't pass the filter of at least one transfer location, skip it
|
||||
if(ismob(M) && !(autotransfer_filter(M, autotransfer_secondary_whitelist, autotransfer_secondary_blacklist) || autotransfer_filter(M, autotransfer_whitelist, autotransfer_blacklist))) continue
|
||||
if(isitem(M) && !(autotransfer_filter(M, autotransfer_secondary_whitelist_items, autotransfer_secondary_blacklist_items) || autotransfer_filter(M, autotransfer_whitelist_items, autotransfer_blacklist_items))) continue
|
||||
M.belly_cycles++
|
||||
if(M.belly_cycles < autotransferwait / 60) continue
|
||||
if(M.belly_cycles < autotransferwait / 60)
|
||||
continue
|
||||
autotransferables += M
|
||||
if(LAZYLEN(autotransferables) >= autotransfer_min_amount)
|
||||
var/tally = 0
|
||||
for(var/atom/movable/M in autotransferables)
|
||||
if(check_autotransfer(M))
|
||||
if(check_autotransfer(M, transfer_bellies))
|
||||
tally++
|
||||
if(autotransfer_max_amount > 0 && tally >= autotransfer_max_amount) break
|
||||
if(autotransfer_max_amount > 0 && tally >= autotransfer_max_amount)
|
||||
break
|
||||
for(var/obj/belly/transfer_belly in (transfer_bellies["primary"] + transfer_bellies["secondary"]))
|
||||
transfer_belly.handle_visual_update()
|
||||
|
||||
var/play_sound //Potential sound to play at the end to avoid code duplication.
|
||||
var/to_update = FALSE //Did anything update worthy happen?
|
||||
|
||||
@@ -829,7 +829,7 @@
|
||||
if(!I.on_trash_eaten(src)) // shows object's rejection message itself
|
||||
return
|
||||
drop_item()
|
||||
I.forceMove(vore_selected)
|
||||
vore_selected.nom_atom(I)
|
||||
updateVRPanel()
|
||||
log_admin("VORE: [src] used Eat Trash to swallow [I].")
|
||||
I.after_trash_eaten(src)
|
||||
|
||||
@@ -44,4 +44,4 @@
|
||||
target.visible_message(span_vwarning("\The [target] suddenly disappears somewhere above!"),\
|
||||
span_vdanger("You are dragged above and feel yourself slipping directly into \the [src]'s [vore_selected.get_belly_name()]!"))
|
||||
to_chat(src, span_vnotice("You successfully snatch \the [target], slipping them into your [vore_selected.get_belly_name()]."))
|
||||
target.forceMove(src.vore_selected)
|
||||
vore_selected.nom_atom(target)
|
||||
|
||||
@@ -72,13 +72,13 @@
|
||||
if(istype(prey.loc, /obj/item/holder))
|
||||
var/obj/item/holder/H = prey.loc
|
||||
for(var/mob/living/M in H.contents)
|
||||
belly.nom_mob(M, user)
|
||||
if(M.loc == H) // In case nom_mob failed somehow.
|
||||
belly.nom_atom(M, user)
|
||||
if(M.loc == H) // In case nom_atom failed somehow.
|
||||
M.forceMove(get_turf(user))
|
||||
H.held_mob = null
|
||||
qdel(H)
|
||||
else
|
||||
belly.nom_mob(prey, user)
|
||||
belly.nom_atom(prey, user)
|
||||
|
||||
user.update_icon()
|
||||
|
||||
|
||||
@@ -974,7 +974,7 @@
|
||||
if(M.absorbed)
|
||||
M.absorbed = FALSE
|
||||
OB.handle_absorb_langs(M, OB.owner)
|
||||
TB.nom_mob(M)
|
||||
TB.nom_atom(M)
|
||||
|
||||
/datum/vore_look/proc/pick_from_outside(mob/user, params)
|
||||
var/intent
|
||||
@@ -1004,7 +1004,8 @@
|
||||
to_chat(target,span_vwarning("You're squished from [host]'s [lowertext(host.vore_selected)] to their [lowertext(choice.name)]!"))
|
||||
// Send the transfer message to indirect targets as well. Slightly different message because why not.
|
||||
to_chat(host.vore_selected.get_belly_surrounding(target.contents),span_warning("You're squished along with [target] from [host]'s [lowertext(host.vore_selected)] to their [lowertext(choice.name)]!"))
|
||||
host.vore_selected.transfer_contents(target, choice, 1)
|
||||
host.vore_selected.transfer_contents(target, choice, TRUE)
|
||||
host.vore_selected.handle_visual_update()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -1071,7 +1072,6 @@
|
||||
to_chat(host.vore_selected.get_belly_surrounding(target.contents),span_warning("You're squished along with [target] from [host]'s [lowertext(host.vore_selected)] to their [lowertext(choice.name)]!"))
|
||||
host.vore_selected.transfer_contents(target, choice)
|
||||
|
||||
|
||||
if("Transfer")
|
||||
if(host.stat)
|
||||
to_chat(user,span_warning("You can't do that in your state!"))
|
||||
@@ -1380,6 +1380,8 @@
|
||||
|
||||
switch(ability)
|
||||
if("devour_as_absorbed")
|
||||
if(!(OB.mode_flags & DM_FLAG_ABSORBEDVORE))
|
||||
return FALSE
|
||||
user.absorb_devour()
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
spk.attach(winner)
|
||||
playsound(T, "sparks", 50, 1)
|
||||
anim(T,winner,'icons/mob/mob.dmi',,"phaseout",,winner.dir)
|
||||
winner.forceMove(loser.vore_selected)
|
||||
loser.vore_selected.nom_atom(winner)
|
||||
if(WEALTHY_CRACKER)
|
||||
new /obj/random/cash/huge(spawnloc)
|
||||
new /obj/random/cash/huge(spawnloc)
|
||||
|
||||
Reference in New Issue
Block a user