Slow digestion for food items, Swoopie succ overhaul, and a couple other fixes. (#7029)

This commit is contained in:
Verkister
2023-09-26 16:48:01 +03:00
committed by GitHub
parent a915547ac0
commit ccb4aad376
8 changed files with 77 additions and 38 deletions

View File

@@ -121,7 +121,7 @@
var/turf/location = src.loc
if(istype(location, /mob/))
var/mob/living/carbon/human/M = location
if(M.item_is_in_hands(src) || M.head == src)
if(istype(M) && M.item_is_in_hands(src) || M.head == src) //CHOMPEdit
location = M.loc
if (istype(location, /turf))

View File

@@ -438,13 +438,13 @@
/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)
if(B.item_digest_mode == IM_HOLD)
return
var/obj/item/I = O
var/spent_amt = I.digest_act(I.loc, 1, amount / (meltdose / 3))
remove_self(spent_amt) //10u stomacid per w_class, less if stronger acid.
if(B.owner)
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

View File

@@ -183,18 +183,20 @@
gen_interval = 0
else
gen_interval++
/obj/belly/proc/HandleBellyReagentEffects(var/list/touchable_atoms)
if(reagents.total_volume >= 5 && LAZYLEN(contents))
SEND_SIGNAL(src, COMSIG_BELLY_UPDATE_VORE_FX, FALSE, reagents.total_volume) // Signals vore_fx() reagents updates.
var/affecting_amt = reagents.total_volume / max(LAZYLEN(contents), 1)
var/affecting_amt = reagents.total_volume / max(LAZYLEN(touchable_atoms), 1)
if(affecting_amt > 5)
affecting_amt = 5
if(affecting_amt >= 1)
for(var/mob/living/L in contents)
for(var/mob/living/L in touchable_atoms)
if(L.digestable && digest_mode == DM_DIGEST)
if(reagents.total_volume)
reagents.trans_to(L, affecting_amt, 1, FALSE)
vore_fx(L, FALSE, reagents.total_volume)
for(var/obj/item/I in contents)
for(var/obj/item/I in touchable_atoms)
if(reagents.total_volume)
reagents.trans_to(I, affecting_amt, 1, FALSE)

View File

@@ -406,7 +406,7 @@
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
recent_sound = TRUE
if(reagents.total_volume >= 5 && !isliving(thing)) //CHOMPAdd
if(reagents.total_volume >= 5 && !isliving(thing) && (item_digest_mode == IM_DIGEST || item_digest_mode == IM_DIGEST_PARALLEL)) //CHOMPAdd
reagents.trans_to(thing, reagents.total_volume * 0.1, 1 / max(LAZYLEN(contents), 1), FALSE) //CHOMPAdd
//Messages if it's a mob
if(isliving(thing))

View File

@@ -84,6 +84,9 @@
if(!digestion_noise_chance)
digestion_noise_chance = DM.noise_chance
touchable_atoms -= items_preserved //CHOMPAdd
HandleBellyReagentEffects(touchable_atoms) //CHOMPAdd
/////////////////////////// Make any noise ///////////////////////////
if(digestion_noise_chance && prob(digestion_noise_chance))
for(var/mob/M in contents)

View File

@@ -116,6 +116,12 @@
S.use(1)
digest_stage = w_class
else
if(istype(src, /obj/item/weapon/reagent_containers/food))
if(ishuman(B.owner) && reagents)
var/mob/living/carbon/human/H = B.owner
reagents.trans_to_holder(H.ingested, (reagents.total_volume), 1, 0)
else if(isliving(B.owner))
B.owner.nutrition += 15 * w_class
qdel(src)//CHOMPEdit End
if(g_damage > w_class)
return w_class
@@ -158,7 +164,7 @@
update_icon()
return FALSE
/obj/item/weapon/reagent_containers/food/digest_act(atom/movable/item_storage = null)
/*obj/item/weapon/reagent_containers/food/digest_act(atom/movable/item_storage = null) //CHOMPEdit: Included in main proc above.
if(isbelly(item_storage))
var/obj/belly/B = item_storage
if(ishuman(B.owner) && reagents) //CHOMPEdit Start
@@ -168,7 +174,7 @@
B.owner.nutrition += 15 * w_class //CHOMPEdit End
qdel(src)
return w_class
. = ..()
. = ..()*/
/obj/item/weapon/holder/digest_act(atom/movable/item_storage = null)
for(var/mob/living/M in contents)

View File

@@ -2512,6 +2512,9 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
releasetest = classic_release_sounds[host.vore_selected.release_sound]
if(releasetest)
releasetest = sound(releasetest) //CHOMPAdd
releasetest.volume = host.vore_selected.sound_volume //CHOMPAdd
releasetest.frequency = host.vore_selected.noise_freq //CHOMPAdd
SEND_SOUND(user, releasetest)
. = TRUE
if("b_sound")
@@ -2533,6 +2536,9 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
else
voretest = classic_vore_sounds[host.vore_selected.vore_sound]
if(voretest)
voretest = sound(voretest) //CHOMPAdd
voretest.volume = host.vore_selected.sound_volume //CHOMPAdd
voretest.frequency = host.vore_selected.noise_freq //CHOMPAdd
SEND_SOUND(user, voretest)
. = TRUE
if("b_sound_volume") //CHOMPAdd Start

View File

@@ -1,6 +1,6 @@
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie
name = "SWOOPIE XL"
desc = "A large birdlike robot with thick assets, plump belly, and a long elastic vacuum hose of a neck. Somehow still a cleanbot, even if just for its duties."
desc = "A large birdlike robot with thick assets, plump belly, and a long elastic vacuum hose of a neck. Somehow still a cleanbot, even if just for its duties. Use DISARM intent to access Vac-Pack settings."
icon_state = "swoopie"
icon_living = "swoopie"
icon_dead = "swoopie_dead"
@@ -21,8 +21,20 @@
faction = "neutral"
say_list_type = /datum/say_list/swoopie
ai_holder_type = /datum/ai_holder/simple_mob/retaliate
mob_bump_flag = 0
var/static/list/crew_creatures = list( /mob/living/simple_mob/protean_blob,
/mob/living/simple_mob/slime/promethean)
var/obj/item/device/vac_attachment/Vac
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/Initialize()
. = ..()
if(!voremob_loaded)
voremob_loaded = TRUE
init_vore()
Vac = new /obj/item/device/vac_attachment(src)
if(istype(Vac))
Vac.output_dest = vore_selected
Vac.vac_power = 3
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/IIsAlly(mob/living/L)
. = ..()
@@ -32,6 +44,8 @@
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/init_vore()
if(!voremob_loaded)
return
if(LAZYLEN(vore_organs))
return TRUE
verbs |= /mob/living/proc/eat_trash
verbs |= /mob/living/proc/toggle_trash_catching
verbs |= /mob/living/proc/restrict_trasheater
@@ -51,7 +65,7 @@
B.sound_volume = 25
B.count_items_for_sprite = TRUE
B = new /obj/belly/longneck/(src)
B = new /obj/belly/longneck(src)
B.affects_vore_sprites = TRUE
B.belly_sprite_to_affect = "neck4"
B.name = "vacuum hose 4"
@@ -61,7 +75,7 @@
B.vore_sound = "Stomach Move"
B.sound_volume = 20
B = new /obj/belly/longneck/(src)
B = new /obj/belly/longneck(src)
B.affects_vore_sprites = TRUE
B.belly_sprite_to_affect = "neck3"
B.name = "vacuum hose 3"
@@ -71,7 +85,7 @@
B.vore_sound = "Stomach Move"
B.sound_volume = 40
B = new /obj/belly/longneck/(src)
B = new /obj/belly/longneck(src)
B.affects_vore_sprites = TRUE
B.belly_sprite_to_affect = "neck2"
B.name = "vacuum hose 2"
@@ -81,7 +95,7 @@
B.vore_sound = "Stomach Move"
B.sound_volume = 80
B = new /obj/belly/longneck/(src)
B = new /obj/belly/longneck(src)
B.affects_vore_sprites = TRUE
B.belly_sprite_to_affect = "neck1"
B.name = "vacuum hose"
@@ -121,36 +135,25 @@
item_multiplier = 10
health_impacts_size = FALSE
speedy_mob_processing = TRUE
size_factor_for_sprite = 5
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/Life()
. =..()
var/turf/T = get_turf(src)
if(istype(T))
for(var/obj/O in T)
if(O.clean_blood())
adjust_nutrition(1)
if(has_AI())
if(is_type_in_list(O, edible_trash) && !O.anchored)
put_in_active_hand(O)
break
if(has_AI())
var/obj/item/I = get_active_hand()
if(istype(I))
if(!voremob_loaded)
voremob_loaded = TRUE
init_vore()
eat_trash()
drop_item()
for(var/mob/living/simple_mob/animal/passive/mouse/M in T)
perform_the_nom(src,M,src,src.vore_selected,1)
break
if(istype(T) && istype(Vac) && has_AI())
if(istype(T, /turf/simulated))
var/turf/simulated/S = T
if(T.clean_blood())
adjust_nutrition(1)
if(S.dirt > 50)
S.dirt = 0
adjust_nutrition(1)
if(S.dirt > 10)
Vac.afterattack(S, src, 1)
return
for(var/obj/O in T)
if(is_type_in_list(O, edible_trash) && !O.anchored)
Vac.afterattack(T, src, 1)
return
for(var/mob/living/L in T)
if(!L.anchored || L.devourable || !L == src || !L.buckled || L.can_be_drop_prey)
Vac.afterattack(L, src, 1)
return
/datum/say_list/swoopie
speak = list("Scanning for debris...", "Scanning for dirt...", "Scanning for pests...", "Squawk!")
@@ -158,3 +161,22 @@
emote_see = list("twitches.", "sways.", "stretches its neck.", "stomps idly.")
say_maybe_target = list("Pest detected?")
say_got_target = list("PEST DETECTED!")
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/ClickOn(var/atom/A, var/params)
if(istype(Vac) && A.Adjacent(src))
face_atom(A)
if(A == src)
Vac.attack_self(src)
return
if(Vac.vac_power != 0)
var/resolved = Vac.resolve_attackby(A, src, click_parameters = params)
if(!resolved && A && Vac)
Vac.afterattack(A, src, 1, params)
return
. = ..()
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/attack_hand(mob/living/L)
if(L.a_intent == I_DISARM && Vac)
Vac.attack_self(L)
return
. = ..()