mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +00:00
A couple vacpack and vorgan juice fixes
Vacpack now checks for spont prey pref. Fixed vacpack direct targeted sucks missing their after-click doublechecks. (the cancel stuff for fleeing distance and things leaving/yoinked from the tile) Fixed liquidbelly acid item interaction order (now does digest_act stuff first if in belly) Fixed open containers eating up all liquids.
This commit is contained in:
@@ -273,7 +273,7 @@
|
||||
touch(target, amount * multiplier) //First, handle mere touch effects
|
||||
if(isturf(target))
|
||||
return trans_to_turf(target, amount, multiplier, copy)
|
||||
if(isobj(target) && target.is_open_container())
|
||||
if(isobj(target) && target.is_open_container() && !isbelly(target.loc)) //CHOMPEdit
|
||||
return trans_to_obj(target, amount, multiplier, copy)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -444,7 +444,6 @@
|
||||
M.take_organ_damage(0, removed * power * 0.1) // Balance. The damage is instant, so it's weaker. 10 units -> 5 damage, double for pacid. 120 units beaker could deal 60, but a) it's burn, which is not as dangerous, b) it's a one-use weapon, c) missing with it will splash it over the ground and d) clothes give some protection, so not everything will hit
|
||||
|
||||
/datum/reagent/acid/touch_obj(var/obj/O, var/amount) //CHOMPEdit Start
|
||||
..()
|
||||
if(isbelly(O.loc))
|
||||
var/obj/belly/B = O.loc
|
||||
if(B.item_digest_mode == IM_HOLD || B.item_digest_mode == IM_DIGEST_FOOD)
|
||||
@@ -455,6 +454,7 @@
|
||||
B.owner.adjust_nutrition((B.nutrition_percent / 100) * 5 * spent_amt)
|
||||
remove_self(spent_amt) //10u stomacid per w_class, less if stronger acid.
|
||||
return
|
||||
..()
|
||||
if(O.unacidable || is_type_in_list(O,item_digestion_blacklist)) //CHOMPEdit End
|
||||
return
|
||||
if((istype(O, /obj/item) || istype(O, /obj/effect/plant)) && (volume > meltdose))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
else
|
||||
suckables |= I
|
||||
for(var/mob/living/L in target)
|
||||
if(L.anchored || !L.devourable || L == user || L.buckled)
|
||||
if(L.anchored || !L.devourable || L == user || L.buckled || !L.can_be_drop_prey)
|
||||
continue
|
||||
if(L.size_multiplier < 0.5)
|
||||
suckables |= L
|
||||
@@ -130,7 +130,7 @@
|
||||
suckables |= I
|
||||
if(vac_power >= 6)
|
||||
for(var/mob/living/L in target)
|
||||
if(L.anchored || !L.devourable || L == user || L.buckled)
|
||||
if(L.anchored || !L.devourable || L == user || L.buckled || !L.can_be_drop_prey)
|
||||
continue
|
||||
suckables |= L
|
||||
if(LAZYLEN(suckables))
|
||||
@@ -172,6 +172,8 @@
|
||||
user.visible_message("<span class='filter_notice'>[user] vacuums up \the [target.name].</span>", "<span class='notice'>You vacuum up \the [target.name]...</span>")
|
||||
I.SpinAnimation(5,1)
|
||||
spawn(5)
|
||||
if(!I.Adjacent(user) || src.loc != user || vac_power < 2) //Cancel if moved/unpowered/dropped
|
||||
return
|
||||
if(I.drop_sound)
|
||||
playsound(src, I.drop_sound, vac_power * 5, 1, -1)
|
||||
playsound(src, 'sound/rakshasa/corrosion3.ogg', vac_power * 15, 1, -1)
|
||||
@@ -183,7 +185,7 @@
|
||||
else if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
var/valid_to_suck = FALSE
|
||||
if(L.anchored || !L.devourable || L == user || L.buckled)
|
||||
if(L.anchored || !L.devourable || L == user || L.buckled || !L.can_be_drop_prey)
|
||||
return
|
||||
if(vac_power >= 3)
|
||||
if(L.size_multiplier > 0.5 || istype(L,/mob/living/simple_mob/animal/passive/mouse) || istype(L,/mob/living/simple_mob/animal/passive/lizard))
|
||||
@@ -195,6 +197,8 @@
|
||||
user.visible_message("<span class='filter_notice'>[user] vacuums up \the [target.name].</span>", "<span class='notice'>You vacuum up \the [target.name]...</span>")
|
||||
L.SpinAnimation(5,1)
|
||||
spawn(5)
|
||||
if(!L.Adjacent(user) || src.loc != user || vac_power < 2) //Cancel if moved/unpowered/dropped
|
||||
return
|
||||
playsound(src, 'sound/rakshasa/corrosion3.ogg', vac_power * 15, 1, -1)
|
||||
L.forceMove(output_dest)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user