mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
Merge lazyset fixes and fix conflict
This commit is contained in:
@@ -57,8 +57,7 @@
|
||||
// Release belly contents before being gc'd!
|
||||
/mob/living/simple_mob/Destroy()
|
||||
release_vore_contents()
|
||||
if(prey_excludes)
|
||||
prey_excludes.Cut()
|
||||
LAZYCLEARLIST(prey_excludes)
|
||||
return ..()
|
||||
|
||||
//For all those ID-having mobs
|
||||
@@ -113,7 +112,7 @@
|
||||
if(!M.allowmobvore || !M.devourable) // Don't eat people who don't want to be ate by mobs
|
||||
//ai_log("vr/wont eat [M] because they don't allow mob vore", 3) //VORESTATION AI TEMPORARY REMOVAL
|
||||
return 0
|
||||
if(M in prey_excludes) // They're excluded
|
||||
if(LAZYFIND(prey_excludes, M)) // They're excluded
|
||||
//ai_log("vr/wont eat [M] because they are excluded", 3) //VORESTATION AI TEMPORARY REMOVAL
|
||||
return 0
|
||||
if(M.size_multiplier < vore_min_size || M.size_multiplier > vore_max_size)
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
continue
|
||||
if(istype(holder, /mob/living/simple_mob))
|
||||
var/mob/living/simple_mob/SM = holder
|
||||
our_targets -= SM.prey_excludes
|
||||
our_targets -= SM.prey_excludes // Lazylist, but subtracting a null from the list seems fine.
|
||||
return our_targets
|
||||
|
||||
/datum/ai_holder/simple_mob/ranged/pakkun/can_attack(atom/movable/the_target, var/vision_required = TRUE)
|
||||
@@ -120,14 +120,14 @@
|
||||
return FALSE
|
||||
if(istype(holder, /mob/living/simple_mob))
|
||||
var/mob/living/simple_mob/SM = holder
|
||||
if(L in SM.prey_excludes)
|
||||
if(LAZYFIND(SM.prey_excludes, L))
|
||||
return FALSE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_mob/vore/pakkun/on_throw_vore_special(var/pred, var/mob/living/target)
|
||||
if(pred && !extra_posessive && !(target in prey_excludes))
|
||||
prey_excludes += target
|
||||
if(pred && !extra_posessive && !LAZYFIND(SM.prey_excludes, L))
|
||||
LAZYSET(prey_excludes, target, world.time)
|
||||
addtimer(CALLBACK(src, .proc/removeMobFromPreyExcludes, weakref(target)), 5 MINUTES)
|
||||
if(ai_holder)
|
||||
ai_holder.remove_target()
|
||||
@@ -151,8 +151,8 @@
|
||||
user.visible_message("<span class='info'>[user] swats [src] with [O]!</span>")
|
||||
release_vore_contents()
|
||||
for(var/mob/living/L in living_mobs(0))
|
||||
if(!(L in prey_excludes))
|
||||
prey_excludes += L
|
||||
if(!(LAZYFIND(prey_excludes, L)))
|
||||
LAZYSET(prey_excludes, L, world.time)
|
||||
addtimer(CALLBACK(src, .proc/removeMobFromPreyExcludes, weakref(L)), 5 MINUTES)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -188,10 +188,10 @@
|
||||
/* //VOREStation AI Temporary Removal
|
||||
/mob/living/simple_mob/animal/passive/cat/fluff/EatTarget()
|
||||
var/mob/living/TM = target_mob
|
||||
prey_excludes += TM //so they won't immediately re-eat someone who struggles out (or gets newspapered out) as soon as they're ate
|
||||
LAZYSET(prey_excludes, TM, world.time) //so they won't immediately re-eat someone who struggles out (or gets newspapered out) as soon as they're ate
|
||||
spawn(3600) // but if they hang around and get comfortable, they might get ate again
|
||||
if(src && TM)
|
||||
prey_excludes -= TM
|
||||
LAZYREMOVE(prey_excludes, TM)
|
||||
..() // will_eat check is carried out before EatTarget is called, so prey on the prey_excludes list isn't a problem.
|
||||
*/
|
||||
|
||||
@@ -246,4 +246,4 @@
|
||||
B.digest_mode = safe ? DM_HOLD : vore_default_mode
|
||||
|
||||
/mob/living/simple_mob/animal/passive/mouse
|
||||
faction = "mouse" //Giving mice a faction so certain mobs can get along with them.
|
||||
faction = "mouse" //Giving mice a faction so certain mobs can get along with them.
|
||||
|
||||
Reference in New Issue
Block a user