mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Slow digestion for food items, Swoopie succ overhaul, and a couple other fixes. (#7029)
This commit is contained in:
@@ -121,7 +121,7 @@
|
|||||||
var/turf/location = src.loc
|
var/turf/location = src.loc
|
||||||
if(istype(location, /mob/))
|
if(istype(location, /mob/))
|
||||||
var/mob/living/carbon/human/M = location
|
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
|
location = M.loc
|
||||||
|
|
||||||
if (istype(location, /turf))
|
if (istype(location, /turf))
|
||||||
|
|||||||
@@ -438,13 +438,13 @@
|
|||||||
/datum/reagent/acid/touch_obj(var/obj/O, var/amount) //CHOMPEdit Start
|
/datum/reagent/acid/touch_obj(var/obj/O, var/amount) //CHOMPEdit Start
|
||||||
if(isbelly(O.loc))
|
if(isbelly(O.loc))
|
||||||
var/obj/belly/B = 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
|
return
|
||||||
var/obj/item/I = O
|
var/obj/item/I = O
|
||||||
var/spent_amt = I.digest_act(I.loc, 1, amount / (meltdose / 3))
|
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)
|
if(B.owner)
|
||||||
B.owner.adjust_nutrition((B.nutrition_percent / 100) * 5 * spent_amt)
|
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
|
return
|
||||||
..()
|
..()
|
||||||
if(O.unacidable || is_type_in_list(O,item_digestion_blacklist)) //CHOMPEdit End
|
if(O.unacidable || is_type_in_list(O,item_digestion_blacklist)) //CHOMPEdit End
|
||||||
|
|||||||
@@ -183,18 +183,20 @@
|
|||||||
gen_interval = 0
|
gen_interval = 0
|
||||||
else
|
else
|
||||||
gen_interval++
|
gen_interval++
|
||||||
|
|
||||||
|
/obj/belly/proc/HandleBellyReagentEffects(var/list/touchable_atoms)
|
||||||
if(reagents.total_volume >= 5 && LAZYLEN(contents))
|
if(reagents.total_volume >= 5 && LAZYLEN(contents))
|
||||||
SEND_SIGNAL(src, COMSIG_BELLY_UPDATE_VORE_FX, FALSE, reagents.total_volume) // Signals vore_fx() reagents updates.
|
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)
|
if(affecting_amt > 5)
|
||||||
affecting_amt = 5
|
affecting_amt = 5
|
||||||
if(affecting_amt >= 1)
|
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(L.digestable && digest_mode == DM_DIGEST)
|
||||||
if(reagents.total_volume)
|
if(reagents.total_volume)
|
||||||
reagents.trans_to(L, affecting_amt, 1, FALSE)
|
reagents.trans_to(L, affecting_amt, 1, FALSE)
|
||||||
vore_fx(L, FALSE, reagents.total_volume)
|
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)
|
if(reagents.total_volume)
|
||||||
reagents.trans_to(I, affecting_amt, 1, FALSE)
|
reagents.trans_to(I, affecting_amt, 1, FALSE)
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
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
|
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
|
reagents.trans_to(thing, reagents.total_volume * 0.1, 1 / max(LAZYLEN(contents), 1), FALSE) //CHOMPAdd
|
||||||
//Messages if it's a mob
|
//Messages if it's a mob
|
||||||
if(isliving(thing))
|
if(isliving(thing))
|
||||||
|
|||||||
@@ -84,6 +84,9 @@
|
|||||||
if(!digestion_noise_chance)
|
if(!digestion_noise_chance)
|
||||||
digestion_noise_chance = DM.noise_chance
|
digestion_noise_chance = DM.noise_chance
|
||||||
|
|
||||||
|
touchable_atoms -= items_preserved //CHOMPAdd
|
||||||
|
HandleBellyReagentEffects(touchable_atoms) //CHOMPAdd
|
||||||
|
|
||||||
/////////////////////////// Make any noise ///////////////////////////
|
/////////////////////////// Make any noise ///////////////////////////
|
||||||
if(digestion_noise_chance && prob(digestion_noise_chance))
|
if(digestion_noise_chance && prob(digestion_noise_chance))
|
||||||
for(var/mob/M in contents)
|
for(var/mob/M in contents)
|
||||||
|
|||||||
@@ -116,6 +116,12 @@
|
|||||||
S.use(1)
|
S.use(1)
|
||||||
digest_stage = w_class
|
digest_stage = w_class
|
||||||
else
|
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
|
qdel(src)//CHOMPEdit End
|
||||||
if(g_damage > w_class)
|
if(g_damage > w_class)
|
||||||
return w_class
|
return w_class
|
||||||
@@ -158,7 +164,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return FALSE
|
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))
|
if(isbelly(item_storage))
|
||||||
var/obj/belly/B = item_storage
|
var/obj/belly/B = item_storage
|
||||||
if(ishuman(B.owner) && reagents) //CHOMPEdit Start
|
if(ishuman(B.owner) && reagents) //CHOMPEdit Start
|
||||||
@@ -168,7 +174,7 @@
|
|||||||
B.owner.nutrition += 15 * w_class //CHOMPEdit End
|
B.owner.nutrition += 15 * w_class //CHOMPEdit End
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return w_class
|
return w_class
|
||||||
. = ..()
|
. = ..()*/
|
||||||
|
|
||||||
/obj/item/weapon/holder/digest_act(atom/movable/item_storage = null)
|
/obj/item/weapon/holder/digest_act(atom/movable/item_storage = null)
|
||||||
for(var/mob/living/M in contents)
|
for(var/mob/living/M in contents)
|
||||||
|
|||||||
@@ -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]
|
releasetest = classic_release_sounds[host.vore_selected.release_sound]
|
||||||
|
|
||||||
if(releasetest)
|
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)
|
SEND_SOUND(user, releasetest)
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("b_sound")
|
if("b_sound")
|
||||||
@@ -2533,6 +2536,9 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
|
|||||||
else
|
else
|
||||||
voretest = classic_vore_sounds[host.vore_selected.vore_sound]
|
voretest = classic_vore_sounds[host.vore_selected.vore_sound]
|
||||||
if(voretest)
|
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)
|
SEND_SOUND(user, voretest)
|
||||||
. = TRUE
|
. = TRUE
|
||||||
if("b_sound_volume") //CHOMPAdd Start
|
if("b_sound_volume") //CHOMPAdd Start
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie
|
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie
|
||||||
name = "SWOOPIE XL"
|
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_state = "swoopie"
|
||||||
icon_living = "swoopie"
|
icon_living = "swoopie"
|
||||||
icon_dead = "swoopie_dead"
|
icon_dead = "swoopie_dead"
|
||||||
@@ -21,8 +21,20 @@
|
|||||||
faction = "neutral"
|
faction = "neutral"
|
||||||
say_list_type = /datum/say_list/swoopie
|
say_list_type = /datum/say_list/swoopie
|
||||||
ai_holder_type = /datum/ai_holder/simple_mob/retaliate
|
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,
|
var/static/list/crew_creatures = list( /mob/living/simple_mob/protean_blob,
|
||||||
/mob/living/simple_mob/slime/promethean)
|
/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)
|
/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()
|
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/init_vore()
|
||||||
if(!voremob_loaded)
|
if(!voremob_loaded)
|
||||||
return
|
return
|
||||||
|
if(LAZYLEN(vore_organs))
|
||||||
|
return TRUE
|
||||||
verbs |= /mob/living/proc/eat_trash
|
verbs |= /mob/living/proc/eat_trash
|
||||||
verbs |= /mob/living/proc/toggle_trash_catching
|
verbs |= /mob/living/proc/toggle_trash_catching
|
||||||
verbs |= /mob/living/proc/restrict_trasheater
|
verbs |= /mob/living/proc/restrict_trasheater
|
||||||
@@ -51,7 +65,7 @@
|
|||||||
B.sound_volume = 25
|
B.sound_volume = 25
|
||||||
B.count_items_for_sprite = TRUE
|
B.count_items_for_sprite = TRUE
|
||||||
|
|
||||||
B = new /obj/belly/longneck/(src)
|
B = new /obj/belly/longneck(src)
|
||||||
B.affects_vore_sprites = TRUE
|
B.affects_vore_sprites = TRUE
|
||||||
B.belly_sprite_to_affect = "neck4"
|
B.belly_sprite_to_affect = "neck4"
|
||||||
B.name = "vacuum hose 4"
|
B.name = "vacuum hose 4"
|
||||||
@@ -61,7 +75,7 @@
|
|||||||
B.vore_sound = "Stomach Move"
|
B.vore_sound = "Stomach Move"
|
||||||
B.sound_volume = 20
|
B.sound_volume = 20
|
||||||
|
|
||||||
B = new /obj/belly/longneck/(src)
|
B = new /obj/belly/longneck(src)
|
||||||
B.affects_vore_sprites = TRUE
|
B.affects_vore_sprites = TRUE
|
||||||
B.belly_sprite_to_affect = "neck3"
|
B.belly_sprite_to_affect = "neck3"
|
||||||
B.name = "vacuum hose 3"
|
B.name = "vacuum hose 3"
|
||||||
@@ -71,7 +85,7 @@
|
|||||||
B.vore_sound = "Stomach Move"
|
B.vore_sound = "Stomach Move"
|
||||||
B.sound_volume = 40
|
B.sound_volume = 40
|
||||||
|
|
||||||
B = new /obj/belly/longneck/(src)
|
B = new /obj/belly/longneck(src)
|
||||||
B.affects_vore_sprites = TRUE
|
B.affects_vore_sprites = TRUE
|
||||||
B.belly_sprite_to_affect = "neck2"
|
B.belly_sprite_to_affect = "neck2"
|
||||||
B.name = "vacuum hose 2"
|
B.name = "vacuum hose 2"
|
||||||
@@ -81,7 +95,7 @@
|
|||||||
B.vore_sound = "Stomach Move"
|
B.vore_sound = "Stomach Move"
|
||||||
B.sound_volume = 80
|
B.sound_volume = 80
|
||||||
|
|
||||||
B = new /obj/belly/longneck/(src)
|
B = new /obj/belly/longneck(src)
|
||||||
B.affects_vore_sprites = TRUE
|
B.affects_vore_sprites = TRUE
|
||||||
B.belly_sprite_to_affect = "neck1"
|
B.belly_sprite_to_affect = "neck1"
|
||||||
B.name = "vacuum hose"
|
B.name = "vacuum hose"
|
||||||
@@ -121,36 +135,25 @@
|
|||||||
item_multiplier = 10
|
item_multiplier = 10
|
||||||
health_impacts_size = FALSE
|
health_impacts_size = FALSE
|
||||||
speedy_mob_processing = TRUE
|
speedy_mob_processing = TRUE
|
||||||
|
size_factor_for_sprite = 5
|
||||||
|
|
||||||
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/Life()
|
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/Life()
|
||||||
. =..()
|
. =..()
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
if(istype(T))
|
if(istype(T) && istype(Vac) && has_AI())
|
||||||
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, /turf/simulated))
|
if(istype(T, /turf/simulated))
|
||||||
var/turf/simulated/S = T
|
var/turf/simulated/S = T
|
||||||
if(T.clean_blood())
|
if(S.dirt > 10)
|
||||||
adjust_nutrition(1)
|
Vac.afterattack(S, src, 1)
|
||||||
if(S.dirt > 50)
|
return
|
||||||
S.dirt = 0
|
for(var/obj/O in T)
|
||||||
adjust_nutrition(1)
|
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
|
/datum/say_list/swoopie
|
||||||
speak = list("Scanning for debris...", "Scanning for dirt...", "Scanning for pests...", "Squawk!")
|
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.")
|
emote_see = list("twitches.", "sways.", "stretches its neck.", "stomps idly.")
|
||||||
say_maybe_target = list("Pest detected?")
|
say_maybe_target = list("Pest detected?")
|
||||||
say_got_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
|
||||||
|
. = ..()
|
||||||
|
|||||||
Reference in New Issue
Block a user