diff --git a/code/__defines/belly_modes_ch.dm b/code/__defines/belly_modes_ch.dm index 37a7f3a4cb..cda69b0e46 100644 --- a/code/__defines/belly_modes_ch.dm +++ b/code/__defines/belly_modes_ch.dm @@ -17,7 +17,7 @@ //For belly fullscreen shennanigans outside of bellies, due to Life() clearing belly fullscreens outside of bellies. #define ATOM_BELLY_FULLSCREEN "belly_atom_vfx" -//Auto-transfer flags +//Auto-transfer mob flags #define AT_FLAG_CREATURES 0x1 #define AT_FLAG_ABSORBED 0x2 #define AT_FLAG_CARBON 0x4 @@ -28,8 +28,15 @@ #define AT_FLAG_DEAD 0x80 #define AT_FLAG_CANDIGEST 0x100 #define AT_FLAG_CANABSORB 0x200 -#define AT_FLAG_ITEMS 0x400 -#define AT_FLAG_TRASH 0x800 -#define AT_FLAG_EGGS 0x1000 -#define AT_FLAG_REMAINS 0x2000 -#define AT_FLAG_INDIGESTIBLE 0x4000 +#define AT_FLAG_HEALTHY 0x400 + +//Auto-transfer item flags +#define AT_FLAG_ITEMS 0x1 +#define AT_FLAG_TRASH 0x2 +#define AT_FLAG_EGGS 0x4 +#define AT_FLAG_REMAINS 0x8 +#define AT_FLAG_INDIGESTIBLE 0x10 +#define AT_FLAG_RECYCLABLE 0x20 +#define AT_FLAG_ORES 0x40 +#define AT_FLAG_CLOTHES 0x80 +#define AT_FLAG_FOOD 0x100 diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 3ceab8f7f9..0fa9f4ae2d 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -174,10 +174,10 @@ /obj/item/ore_chunk name = "ore chunk" desc = "A conglomerate of ore." - icon = 'icons/obj/mining_ore_vr.dmi' + icon = 'icons/obj/xenoarchaeology.dmi' //CHOMPEdit icon_state = "strange" randpixel = 8 - w_class = ITEMSIZE_SMALL + w_class = ITEMSIZE_LARGE //CHOMPEdit var/list/stored_ore = list( "sand" = 0, "hematite" = 0, diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a74a88b457..da73ee5dc4 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -70,7 +70,7 @@ if(stat == UNCONSCIOUS || sleeping > 0) to_chat(src, "... You can almost hear someone talking ...") else - if(client.prefs.chat_timestamp) + if(client && client.prefs.chat_timestamp) //CHOMPEdit msg = replacetext(msg, new/regex("^(]*)?>)(.*)", ""), "$1[time] $2") to_chat(src,msg) else if(teleop) diff --git a/code/modules/vore/eating/belly_obj_ch.dm b/code/modules/vore/eating/belly_obj_ch.dm index 5cda39d22d..bf91a1ae02 100644 --- a/code/modules/vore/eating/belly_obj_ch.dm +++ b/code/modules/vore/eating/belly_obj_ch.dm @@ -531,23 +531,33 @@ w_class = ITEMSIZE_SMALL /obj/belly/proc/recycle(var/obj/item/O) - if(!recycling || !LAZYLEN(O.matter)) + if(!recycling || (!LAZYLEN(O.matter) && !istype(O, /obj/item/weapon/ore))) return FALSE - var/list/modified_mats = list() - var/trash = 1 - if(istype(O,/obj/item/trash)) - trash = 5 - if(istype(O,/obj/item/stack)) - var/obj/item/stack/S = O - trash = S.amount - for(var/mat in O.matter) - modified_mats[mat] = O.matter[mat] * trash - for(var/obj/item/debris_pack/digested/D in contents) - if(istype(D)) - for(var/mat in modified_mats) - D.matter[mat] += modified_mats[mat] - if(O.w_class > D.w_class) - D.w_class = O.w_class - return TRUE - new /obj/item/debris_pack/digested(src, modified_mats) + if(istype(O, /obj/item/weapon/ore)) + var/obj/item/weapon/ore/ore = O + for(var/obj/item/ore_chunk/C in contents) + if(istype(C)) + C.stored_ore[ore.material]++ + return TRUE + var/obj/item/ore_chunk/newchunk = new /obj/item/ore_chunk(src) + newchunk.stored_ore[ore.material]++ + return TRUE + else + var/list/modified_mats = list() + var/trash = 1 + if(istype(O,/obj/item/trash)) + trash = 5 + if(istype(O,/obj/item/stack)) + var/obj/item/stack/S = O + trash = S.amount + for(var/mat in O.matter) + modified_mats[mat] = O.matter[mat] * trash + for(var/obj/item/debris_pack/digested/D in contents) + if(istype(D)) + for(var/mat in modified_mats) + D.matter[mat] += modified_mats[mat] + if(O.w_class > D.w_class) + D.w_class = O.w_class + return TRUE + new /obj/item/debris_pack/digested(src, modified_mats) return TRUE diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 00abf09f93..81d2f3af0e 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -69,16 +69,21 @@ var/autotransferlocation // Place to send them var/autotransfer_whitelist = 0 // Flags for what can be transferred to the primary location //CHOMPAdd var/autotransfer_blacklist = 2 // Flags for what can not be transferred to the primary location, defaults to Absorbed //CHOMPAdd + var/autotransfer_whitelist_items = 0 // Flags for what can be transferred to the primary location //CHOMPAdd + var/autotransfer_blacklist_items = 0 // Flags for what can not be transferred to the primary location //CHOMPAdd var/autotransferchance_secondary = 0 // % Chance of prey being autotransferred to secondary transfer location //CHOMPAdd var/autotransferlocation_secondary // Second place to send them //CHOMPAdd var/autotransfer_secondary_whitelist = 0// Flags for what can be transferred to the secondary location //CHOMPAdd var/autotransfer_secondary_blacklist = 2// Flags for what can not be transferred to the secondary location, defaults to Absorbed //CHOMPAdd + var/autotransfer_secondary_whitelist_items = 0// Flags for what can be transferred to the secondary location //CHOMPAdd + var/autotransfer_secondary_blacklist_items = 0// Flags for what can not be transferred to the secondary location //CHOMPAdd var/autotransfer_enabled = FALSE // Player toggle var/autotransfer_min_amount = 0 // Minimum amount of things to pass at once. //CHOMPAdd var/autotransfer_max_amount = 0 // Maximum amount of things to pass at once. //CHOMPAdd var/tmp/list/autotransfer_queue = list()// Reserve for above things. //CHOMPAdd //Auto-transfer flags for whitelist //CHOMPAdd - var/tmp/static/list/autotransfer_flags_list = list("Creatures" = AT_FLAG_CREATURES, "Absorbed" = AT_FLAG_ABSORBED, "Carbon" = AT_FLAG_CARBON, "Silicon" = AT_FLAG_SILICON, "Mobs" = AT_FLAG_MOBS, "Animals" = AT_FLAG_ANIMALS, "Mice" = AT_FLAG_MICE, "Dead" = AT_FLAG_DEAD, "Digestable Creatures" = AT_FLAG_CANDIGEST, "Absorbable Creatures" = AT_FLAG_CANABSORB, "Items" = AT_FLAG_ITEMS, "Trash" = AT_FLAG_TRASH, "Eggs" = AT_FLAG_EGGS, "Remains" = AT_FLAG_REMAINS, "Indigestible Items" = AT_FLAG_INDIGESTIBLE) + var/tmp/static/list/autotransfer_flags_list = list("Creatures" = AT_FLAG_CREATURES, "Absorbed" = AT_FLAG_ABSORBED, "Carbon" = AT_FLAG_CARBON, "Silicon" = AT_FLAG_SILICON, "Mobs" = AT_FLAG_MOBS, "Animals" = AT_FLAG_ANIMALS, "Mice" = AT_FLAG_MICE, "Dead" = AT_FLAG_DEAD, "Digestable Creatures" = AT_FLAG_CANDIGEST, "Absorbable Creatures" = AT_FLAG_CANABSORB, "Full Health" = AT_FLAG_HEALTHY) + var/tmp/static/list/autotransfer_flags_list_items = list("Items" = AT_FLAG_ITEMS, "Trash" = AT_FLAG_TRASH, "Eggs" = AT_FLAG_EGGS, "Remains" = AT_FLAG_REMAINS, "Indigestible Items" = AT_FLAG_INDIGESTIBLE, "Recyclable Items" = AT_FLAG_RECYCLABLE, "Ores" = AT_FLAG_ORES, "Clothes and Bags" = AT_FLAG_CLOTHES, "Food" = AT_FLAG_FOOD) //I don't think we've ever altered these lists. making them static until someone actually overrides them somewhere. //Actual full digest modes @@ -321,6 +326,10 @@ "autotransfer_secondary_blacklist", "autotransfer_whitelist", "autotransfer_blacklist", + "autotransfer_secondary_whitelist_items", + "autotransfer_secondary_blacklist_items", + "autotransfer_whitelist_items", + "autotransfer_blacklist_items", "autotransfer_min_amount", "autotransfer_max_amount", "slow_digestion", @@ -1724,10 +1733,16 @@ /obj/belly/proc/check_autotransfer(var/atom/movable/prey) if(!(prey in contents) || !prey.autotransferable) return var/dest_belly_name - if(autotransferlocation_secondary && prob(autotransferchance_secondary) && autotransfer_filter(prey, autotransfer_secondary_whitelist, autotransfer_secondary_blacklist)) - dest_belly_name = autotransferlocation_secondary - if(autotransferlocation && prob(autotransferchance) && autotransfer_filter(prey, autotransfer_whitelist, autotransfer_blacklist)) - dest_belly_name = autotransferlocation + if(autotransferlocation_secondary && prob(autotransferchance_secondary)) + if(ismob(prey) && autotransfer_filter(prey, autotransfer_secondary_whitelist, autotransfer_secondary_blacklist)) + dest_belly_name = autotransferlocation_secondary + if(isitem(prey) && autotransfer_filter(prey, autotransfer_secondary_whitelist_items, autotransfer_secondary_blacklist_items)) + dest_belly_name = autotransferlocation_secondary + if(autotransferlocation && prob(autotransferchance)) + if(ismob(prey) && autotransfer_filter(prey, autotransfer_whitelist, autotransfer_blacklist)) + dest_belly_name = autotransferlocation + if(isitem(prey) && autotransfer_filter(prey, autotransfer_whitelist_items, autotransfer_blacklist_items)) + dest_belly_name = autotransferlocation if(!dest_belly_name) // Didn't transfer, so wait before retrying prey.belly_cycles = 0 return @@ -1742,85 +1757,115 @@ //Autotransfer filter CHOMPEdit Start /obj/belly/proc/autotransfer_filter(var/atom/movable/prey, var/whitelist, var/blacklist) - if(blacklist & autotransfer_flags_list["Absorbed"]) - if(isliving(prey)) - var/mob/living/L = prey - if(L.absorbed) return FALSE - if(blacklist != 2) // Default is 2 for Absorbed, if it's not 2, check everything else - if(blacklist & autotransfer_flags_list["Creatures"]) - if(isliving(prey)) return FALSE - if(blacklist & autotransfer_flags_list["Carbon"]) - if(iscarbon(prey)) return FALSE - if(blacklist & autotransfer_flags_list["Silicon"]) - if(issilicon(prey)) return FALSE - if(blacklist & autotransfer_flags_list["Mobs"]) - if(istype(prey, /mob/living/simple_mob)) return FALSE - if(blacklist & autotransfer_flags_list["Animals"]) - if(istype(prey, /mob/living/simple_mob/animal)) return FALSE - if(blacklist & autotransfer_flags_list["Mice"]) - if(ismouse(prey)) return FALSE - if(blacklist & autotransfer_flags_list["Dead"]) + if(ismob(prey)) + if(blacklist & autotransfer_flags_list["Absorbed"]) if(isliving(prey)) var/mob/living/L = prey - if(L.stat == DEAD) return FALSE - if(blacklist & autotransfer_flags_list["Digestable Creatures"]) + if(L.absorbed) return FALSE + if(blacklist != 2) // Default is 2 for Absorbed, if it's not 2, check everything else + if(blacklist & autotransfer_flags_list["Creatures"]) + if(isliving(prey)) return FALSE + if(blacklist & autotransfer_flags_list["Carbon"]) + if(iscarbon(prey)) return FALSE + if(blacklist & autotransfer_flags_list["Silicon"]) + if(issilicon(prey)) return FALSE + if(blacklist & autotransfer_flags_list["Mobs"]) + if(istype(prey, /mob/living/simple_mob)) return FALSE + if(blacklist & autotransfer_flags_list["Animals"]) + if(istype(prey, /mob/living/simple_mob/animal)) return FALSE + if(blacklist & autotransfer_flags_list["Mice"]) + if(ismouse(prey)) return FALSE + if(blacklist & autotransfer_flags_list["Dead"]) + if(isliving(prey)) + var/mob/living/L = prey + if(L.stat == DEAD) return FALSE + if(blacklist & autotransfer_flags_list["Digestable Creatures"]) + if(isliving(prey)) + var/mob/living/L = prey + if(L.digestable) return FALSE + if(blacklist & autotransfer_flags_list["Absorbable Creatures"]) + if(isliving(prey)) + var/mob/living/L = prey + if(L.absorbable) return FALSE + if(blacklist & autotransfer_flags_list["Full Health"]) + if(isliving(prey)) + var/mob/living/L = prey + if((L.getOxyLoss() + L.getToxLoss() + L.getFireLoss() + L.getBruteLoss() + L.getCloneLoss()) == 0) return FALSE + if(whitelist == 0) return TRUE + if(whitelist & autotransfer_flags_list["Creatures"]) + if(isliving(prey)) return TRUE + if(whitelist & autotransfer_flags_list["Absorbed"]) if(isliving(prey)) var/mob/living/L = prey - if(L.digestable) return FALSE - if(blacklist & autotransfer_flags_list["Absorbable Creatures"]) + if(L.absorbed) return TRUE + if(whitelist & autotransfer_flags_list["Carbon"]) + if(iscarbon(prey)) return TRUE + if(whitelist & autotransfer_flags_list["Silicon"]) + if(issilicon(prey)) return TRUE + if(whitelist & autotransfer_flags_list["Mobs"]) + if(istype(prey, /mob/living/simple_mob)) return TRUE + if(whitelist & autotransfer_flags_list["Animals"]) + if(istype(prey, /mob/living/simple_mob/animal)) return TRUE + if(whitelist & autotransfer_flags_list["Mice"]) + if(ismouse(prey)) return TRUE + if(whitelist & autotransfer_flags_list["Dead"]) if(isliving(prey)) var/mob/living/L = prey - if(L.absorbable) return FALSE - if(blacklist & autotransfer_flags_list["Items"]) + if(L.stat == DEAD) return TRUE + if(whitelist & autotransfer_flags_list["Digestable Creatures"]) + if(isliving(prey)) + var/mob/living/L = prey + if(L.digestable) return TRUE + if(whitelist & autotransfer_flags_list["Absorbable Creatures"]) + if(isliving(prey)) + var/mob/living/L = prey + if(L.absorbable) return TRUE + if(whitelist & autotransfer_flags_list["Full Health"]) + if(isliving(prey)) + var/mob/living/L = prey + if((L.getOxyLoss() + L.getToxLoss() + L.getFireLoss() + L.getBruteLoss() + L.getCloneLoss()) == 0) return TRUE + else + if(blacklist & autotransfer_flags_list_items["Items"]) if(isitem(prey)) return FALSE - if(blacklist & autotransfer_flags_list["Trash"]) + if(blacklist & autotransfer_flags_list_items["Trash"]) if(istype(prey, /obj/item/trash)) return FALSE - if(blacklist & autotransfer_flags_list["Eggs"]) + if(blacklist & autotransfer_flags_list_items["Eggs"]) if(istype(prey, /obj/item/weapon/storage/vore_egg)) return FALSE - if(blacklist & autotransfer_flags_list["Remains"]) + if(blacklist & autotransfer_flags_list_items["Remains"]) if(istype(prey, /obj/item/weapon/digestion_remains)) return FALSE - if(blacklist & autotransfer_flags_list["Indigestible Items"]) + if(blacklist & autotransfer_flags_list_items["Indigestible Items"]) if(prey in items_preserved) return FALSE - - if(whitelist == 0) return TRUE - if(whitelist & autotransfer_flags_list["Creatures"]) - if(isliving(prey)) return TRUE - if(whitelist & autotransfer_flags_list["Absorbed"]) - if(isliving(prey)) - var/mob/living/L = prey - if(L.absorbed) return TRUE - if(whitelist & autotransfer_flags_list["Carbon"]) - if(iscarbon(prey)) return TRUE - if(whitelist & autotransfer_flags_list["Silicon"]) - if(issilicon(prey)) return TRUE - if(whitelist & autotransfer_flags_list["Mobs"]) - if(istype(prey, /mob/living/simple_mob)) return TRUE - if(whitelist & autotransfer_flags_list["Animals"]) - if(istype(prey, /mob/living/simple_mob/animal)) return TRUE - if(whitelist & autotransfer_flags_list["Mice"]) - if(ismouse(prey)) return TRUE - if(whitelist & autotransfer_flags_list["Dead"]) - if(isliving(prey)) - var/mob/living/L = prey - if(L.stat == DEAD) return TRUE - if(whitelist & autotransfer_flags_list["Digestable Creatures"]) - if(isliving(prey)) - var/mob/living/L = prey - if(L.digestable) return TRUE - if(whitelist & autotransfer_flags_list["Absorbable Creatures"]) - if(isliving(prey)) - var/mob/living/L = prey - if(L.absorbable) return TRUE - if(whitelist & autotransfer_flags_list["Items"]) - if(isitem(prey)) return TRUE - if(whitelist & autotransfer_flags_list["Trash"]) - if(istype(prey, /obj/item/trash)) return TRUE - if(whitelist & autotransfer_flags_list["Eggs"]) - if(istype(prey, /obj/item/weapon/storage/vore_egg)) return TRUE - if(whitelist & autotransfer_flags_list["Remains"]) - if(istype(prey, /obj/item/weapon/digestion_remains)) return TRUE - if(whitelist & autotransfer_flags_list["Indigestible Items"]) - if(prey in items_preserved) return TRUE + if(blacklist & autotransfer_flags_list_items["Recyclable Items"]) + if(isitem(prey)) + var/obj/item/I = prey + if(I.matter) return FALSE + if(blacklist & autotransfer_flags_list_items["Ores"]) + if(istype(prey, /obj/item/weapon/ore)) return FALSE + if(blacklist & autotransfer_flags_list_items["Clothes and Bags"]) + if(istype(prey, /obj/item/clothing) || istype(prey, /obj/item/weapon/storage)) return FALSE + if(blacklist & autotransfer_flags_list_items["Food"]) + if(istype(prey, /obj/item/weapon/reagent_containers/food)) return FALSE + if(whitelist == 0) return TRUE + if(whitelist & autotransfer_flags_list_items["Items"]) + if(isitem(prey)) return TRUE + if(whitelist & autotransfer_flags_list_items["Trash"]) + if(istype(prey, /obj/item/trash)) return TRUE + if(whitelist & autotransfer_flags_list_items["Eggs"]) + if(istype(prey, /obj/item/weapon/storage/vore_egg)) return TRUE + if(whitelist & autotransfer_flags_list_items["Remains"]) + if(istype(prey, /obj/item/weapon/digestion_remains)) return TRUE + if(whitelist & autotransfer_flags_list_items["Indigestible Items"]) + if(prey in items_preserved) return TRUE + if(whitelist & autotransfer_flags_list_items["Recyclable Items"]) + if(isitem(prey)) + var/obj/item/I = prey + if(I.matter) return TRUE + if(whitelist & autotransfer_flags_list_items["Ores"]) + if(istype(prey, /obj/item/weapon/ore)) return TRUE + if(whitelist & autotransfer_flags_list_items["Clothes and Bags"]) + if(istype(prey, /obj/item/clothing) || istype(prey, /obj/item/weapon/storage)) return TRUE + if(whitelist & autotransfer_flags_list_items["Food"]) + if(istype(prey, /obj/item/weapon/reagent_containers/food)) return TRUE return FALSE //CHOMPEdit end // Belly copies and then returns the copy diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 8e4459a679..046a5d81b2 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -21,7 +21,8 @@ for(var/atom/movable/M in contents) if(!M || !M.autotransferable) continue // If the prey can't pass the filter of at least one transfer location, skip it - if(!(autotransfer_filter(M, autotransfer_secondary_whitelist, autotransfer_secondary_blacklist) || autotransfer_filter(M, autotransfer_whitelist, autotransfer_blacklist))) continue + 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 autotransferables += M diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index 5bd17bb73f..d69b397288 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -4,6 +4,8 @@ // Ye default implementation. /obj/item/proc/digest_act(atom/movable/item_storage = null, touchable_amount, splashing = 0) //CHOMPEdit + if(!digestable) //CHOMPAdd + return FALSE //CHOMPAdd if(istype(item_storage, /obj/item/device/dogborg/sleeper)) if(istype(src, /obj/item/device/pda)) var/obj/item/device/pda/P = src @@ -206,6 +208,13 @@ return FALSE . = ..() +/obj/item/ore_chunk/digest_act(atom/movable/item_storage = null) //CHOMPAdd + if(isbelly(item_storage)) + var/obj/belly/B = item_storage + if(istype(B) && B.recycling) + return FALSE + . = ..() + ///////////// // Some more complicated stuff ///////////// diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 3e2a4c1b0f..7ad4602d53 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -352,6 +352,16 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", if(selected.autotransfer_blacklist & selected.autotransfer_flags_list[flag_name]) at_blacklist.Add(flag_name) selected_list["autotransfer"]["autotransfer_blacklist"] = at_blacklist + var/list/at_whitelist_items = list() + for(var/flag_name in selected.autotransfer_flags_list_items) + if(selected.autotransfer_whitelist_items & selected.autotransfer_flags_list_items[flag_name]) + at_whitelist_items.Add(flag_name) + selected_list["autotransfer"]["autotransfer_whitelist_items"] = at_whitelist_items + var/list/at_blacklist_items = list() + for(var/flag_name in selected.autotransfer_flags_list_items) + if(selected.autotransfer_blacklist_items & selected.autotransfer_flags_list_items[flag_name]) + at_blacklist_items.Add(flag_name) + selected_list["autotransfer"]["autotransfer_blacklist_items"] = at_blacklist_items var/list/at_secondary_whitelist = list() for(var/flag_name in selected.autotransfer_flags_list) if(selected.autotransfer_secondary_whitelist & selected.autotransfer_flags_list[flag_name]) @@ -362,6 +372,16 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", if(selected.autotransfer_secondary_blacklist & selected.autotransfer_flags_list[flag_name]) at_secondary_blacklist.Add(flag_name) selected_list["autotransfer"]["autotransfer_secondary_blacklist"] = at_secondary_blacklist + var/list/at_secondary_whitelist_items = list() + for(var/flag_name in selected.autotransfer_flags_list_items) + if(selected.autotransfer_secondary_whitelist_items & selected.autotransfer_flags_list_items[flag_name]) + at_secondary_whitelist_items.Add(flag_name) + selected_list["autotransfer"]["autotransfer_secondary_whitelist_items"] = at_secondary_whitelist_items + var/list/at_secondary_blacklist_items = list() + for(var/flag_name in selected.autotransfer_flags_list_items) + if(selected.autotransfer_secondary_blacklist_items & selected.autotransfer_flags_list_items[flag_name]) + at_secondary_blacklist_items.Add(flag_name) + selected_list["autotransfer"]["autotransfer_secondary_blacklist_items"] = at_secondary_blacklist_items //CHOMPAdd END selected_list["disable_hud"] = selected.disable_hud @@ -2853,6 +2873,35 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", return FALSE host.vore_selected.autotransfer_secondary_blacklist ^= host.vore_selected.autotransfer_flags_list[toggle_addon] . = TRUE + . = TRUE + if("b_autotransfer_whitelist_items") + var/list/menu_list = host.vore_selected.autotransfer_flags_list_items.Copy() + var/toggle_addon = tgui_input_list(usr, "Toggle Whitelist", "Whitelist Choice", menu_list) + if(!toggle_addon) + return FALSE + host.vore_selected.autotransfer_whitelist_items ^= host.vore_selected.autotransfer_flags_list_items[toggle_addon] + . = TRUE + if("b_autotransfer_blacklist_items") + var/list/menu_list = host.vore_selected.autotransfer_flags_list_items.Copy() + var/toggle_addon = tgui_input_list(usr, "Toggle Blacklist", "Blacklist Choice", menu_list) + if(!toggle_addon) + return FALSE + host.vore_selected.autotransfer_blacklist_items ^= host.vore_selected.autotransfer_flags_list_items[toggle_addon] + . = TRUE + if("b_autotransfer_secondary_whitelist_items") + var/list/menu_list = host.vore_selected.autotransfer_flags_list_items.Copy() + var/toggle_addon = tgui_input_list(usr, "Toggle Whitelist", "Whitelist Choice", menu_list) + if(!toggle_addon) + return FALSE + host.vore_selected.autotransfer_secondary_whitelist_items ^= host.vore_selected.autotransfer_flags_list_items[toggle_addon] + . = TRUE + if("b_autotransfer_secondary_blacklist_items") + var/list/menu_list = host.vore_selected.autotransfer_flags_list_items.Copy() + var/toggle_addon = tgui_input_list(usr, "Toggle Blacklist", "Blacklist Choice", menu_list) + if(!toggle_addon) + return FALSE + host.vore_selected.autotransfer_secondary_blacklist_items ^= host.vore_selected.autotransfer_flags_list_items[toggle_addon] + . = TRUE if("b_autotransfer_min_amount") var/autotransfer_min_amount_input = input(user, "Set the minimum amount of items your belly can belly auto-transfer at once. Set to 0 for no limit.", "Auto-Transfer Min Amount") as num|null if(!isnull(autotransfer_min_amount_input)) diff --git a/modular_chomp/code/game/objects/items.dm b/modular_chomp/code/game/objects/items.dm index c0b9b85ea3..1dd2847a25 100644 --- a/modular_chomp/code/game/objects/items.dm +++ b/modular_chomp/code/game/objects/items.dm @@ -3,6 +3,7 @@ var/list/ckeys_allowed_itemspawn = list() var/user_vars_to_edit //fun times :3 - pretty much just grabbed from tg immabehonest - list(variable_name = variable_value) eg list("name" = "Wizardly Wizard", "real_name" = "Wizardly Wizard") var/user_vars_remembered //not needed for manual editing, just stores the original vars from the above list to make sure they go back to normal later + var/digestable = TRUE /obj/item/proc/item_tf_spawnpoint_set() if(!item_tf_spawn_allowed) @@ -48,3 +49,11 @@ if(user.vars[variable] == user_vars_to_edit[variable]) user.vars[variable] = user_vars_remembered[variable] user_vars_remembered = initial(user_vars_remembered) + +/obj/item/verb/toggle_digestable() + set category = "Object" + set name = "Toggle Digestable" + set desc = "Toggle item's digestability." + digestable = !digestable + if(!digestable) + to_chat(usr, "[src] is now protected from digestion.") \ No newline at end of file diff --git a/modular_chomp/code/modules/vore/eating/exportpanel_ch.dm b/modular_chomp/code/modules/vore/eating/exportpanel_ch.dm index 914400d2a2..4439f061ac 100644 --- a/modular_chomp/code/modules/vore/eating/exportpanel_ch.dm +++ b/modular_chomp/code/modules/vore/eating/exportpanel_ch.dm @@ -260,6 +260,16 @@ if(B.autotransfer_blacklist & B.autotransfer_flags_list[flag_name]) at_blacklist.Add(flag_name) belly_data["autotransfer_blacklist"] = at_blacklist + var/list/at_whitelist_items = list() + for(var/flag_name in B.autotransfer_flags_list_items) + if(B.autotransfer_whitelist_items & B.autotransfer_flags_list_items[flag_name]) + at_whitelist_items.Add(flag_name) + belly_data["autotransfer_whitelist_items"] = at_whitelist_items + var/list/at_blacklist_items = list() + for(var/flag_name in B.autotransfer_flags_list_items) + if(B.autotransfer_blacklist_items & B.autotransfer_flags_list_items[flag_name]) + at_blacklist_items.Add(flag_name) + belly_data["autotransfer_blacklist_items"] = at_blacklist_items var/list/at_secondary_whitelist = list() for(var/flag_name in B.autotransfer_flags_list) if(B.autotransfer_secondary_whitelist & B.autotransfer_flags_list[flag_name]) @@ -270,6 +280,16 @@ if(B.autotransfer_secondary_blacklist & B.autotransfer_flags_list[flag_name]) at_secondary_blacklist.Add(flag_name) belly_data["autotransfer_secondary_blacklist"] = at_secondary_blacklist + var/list/at_secondary_whitelist_items = list() + for(var/flag_name in B.autotransfer_flags_list_items) + if(B.autotransfer_secondary_whitelist_items & B.autotransfer_flags_list_items[flag_name]) + at_secondary_whitelist_items.Add(flag_name) + belly_data["autotransfer_secondary_whitelist_items"] = at_secondary_whitelist_items + var/list/at_secondary_blacklist_items = list() + for(var/flag_name in B.autotransfer_flags_list_items) + if(B.autotransfer_secondary_blacklist_items & B.autotransfer_flags_list_items[flag_name]) + at_secondary_blacklist_items.Add(flag_name) + belly_data["autotransfer_secondary_blacklist_items"] = at_secondary_blacklist_items // Liquid Options belly_data["show_liquids"] = B.show_liquids diff --git a/tgui/packages/tgui_ch/interfaces/VorePanel.js b/tgui/packages/tgui_ch/interfaces/VorePanel.js index b1c1b186d4..687daadf80 100644 --- a/tgui/packages/tgui_ch/interfaces/VorePanel.js +++ b/tgui/packages/tgui_ch/interfaces/VorePanel.js @@ -1603,7 +1603,7 @@ const VoreSelectedBellyInteractions = (props, context) => { } /> - + {(autotransfer.autotransfer_whitelist.length && autotransfer.autotransfer_whitelist.join(', ')) || 'Everything'} @@ -1617,7 +1617,21 @@ const VoreSelectedBellyInteractions = (props, context) => { icon="plus" /> - + + {(autotransfer.autotransfer_whitelist_items.length && + autotransfer.autotransfer_whitelist_items.join(', ')) || + 'Everything'} + ",et+='
',et+='
',et+="Addons:
"+function(e){var t=[];return null==e||e.forEach((function(e){t.push(''+e+"")})),0===t.length&&t.push("No Addons Set"),t}(p)+"

",et+="== Descriptions ==
",et+="Vore Verb:
"+a+"

",et+="Release Verb:
"+i+"

",et+='Description:
"'+o+'"

',et+='Absorbed Description:
"'+r+'"

',et+="
",et+="== Messages ==
",et+='
',et+='
",et+='
',et+='
',et+='
',null==M||M.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==E||E.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==O||O.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==P||P.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==F||F.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==D||D.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==R||R.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==j||j.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==W||W.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==z||z.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==U||U.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==H||H.forEach((function(e){et+=e+"
"})),et+="
",et+="
",et+="
",et+="
",et+="
= Idle Messages =

",et+="

Idle Messages (Hold):

",null==G||G.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Hold Absorbed):

",null==K||K.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Digest):

",null==q||q.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Absorb):

",null==Y||Y.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Unabsorb):

",null==te||te.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Drain):

",null==X||X.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Heal):

",null==$||$.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Size Steal):

",null==Q||Q.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Shrink):

",null==Z||Z.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Grow):

",null==ee||ee.forEach((function(e){et+=e+"
"})),et+="


",et+="
Idle Messages (Encase In Egg):

",null==J||J.forEach((function(e){et+=e+"
"})),et+="


",et+="


",et+="
",et+='
',et+='
',et+='

',et+='

",et+='
',et+='
',et+='
    ',et+='
  • Can Taste: '+(N?'Yes':'No')+"
  • ",et+='
  • Feedable: '+(g?'Yes':'No')+"
  • ",et+='
  • Contaminates: '+(V?'Yes':'No')+"
  • ",et+='
  • Contamination Flavor: '+v+"
  • ",et+='
  • Contamination Color: '+_+"
  • ",et+='
  • Nutritional Gain: '+y+"%
  • ",et+='
  • Required Examine Size: '+100*k+"%
  • ",et+='
  • Display Absorbed Examines: '+(x?'True':'False')+"
  • ",et+='
  • Save Digest Mode: '+(w?'True':'False')+"
  • ",et+='
  • Idle Emotes: '+(L?'Active':'Inactive')+"
  • ",et+='
  • Idle Emote Delay: '+B+" seconds
  • ",et+='
  • Shrink/Grow Size: '+100*S+"%
  • ",et+='
  • Vore Spawn Blacklist: '+(I?'Yes':'No')+"
  • ",et+='
  • Egg Type: '+T+"
  • ",et+='
  • Selective Mode Preference: '+A+"
  • ",et+="
",et+="
",et+='
',et+='

',et+='

",et+='
',et+='
',et+='
    ',et+='
  • Fleshy Belly: '+(ne?'Yes':'No')+"
  • ",et+='
  • Internal Loop: '+(oe?'Yes':'No')+"
  • ",et+='
  • Use Fancy Sounds: '+(re?'Yes':'No')+"
  • ",et+='
  • Vore Sound: '+ae+"
  • ",et+='
  • Release Sound: '+ie+"
  • ",et+="
",et+="
",et+='
',et+='

',et+='

",et+='
",et+='
',et+="Vore Sprites",et+='
    ',et+='
  • Affect Vore Sprites: '+(ce?'Yes':'No')+"
  • ",et+='
  • Count Absorbed prey for vore sprites: '+(le?'Yes':'No')+"
  • ",et+='
  • Animation when prey resist: '+(de?'Yes':'No')+"
  • ",et+='
  • Vore Sprite Size Factor: '+se+"
  • ",et+='
  • Belly Sprite to affect: '+ue+"
  • ",et+="
",et+="Belly Fullscreens Preview and Coloring",et+='
    ',et+='
  • Color: '+me+"",et+="
",et+="Vore FX",et+='
    ',et+='
  • Disable Prey HUD: '+(pe?'Yes':'No')+"
  • ",et+="
",et+="
",et+='
',et+='

',et+='

",et+='
',et+='
',et+="Belly Interactions ("+(he?'Enabled':'Disabled')+")",et+='
    ',et+='
  • Escape Chance: '+fe+"%
  • ",et+='
  • Escape Time: '+Ce/10+"s
  • ",et+='
  • Transfer Chance: '+be+"%
  • ",et+='
  • Transfer Location: '+Ne+"
  • ",et+='
  • Secondary Transfer Chance: '+ge+"%
  • ",et+='
  • Secondary Transfer Location: '+Ve+"
  • ",et+='
  • Absorb Chance: '+ve+"%
  • ",et+='
  • Digest Chance: '+_e+"%
  • ",et+="
",et+="
",et+="Auto-Transfer Options ("+(Be?'Enabled':'Disabled')+")",et+='
    ',et+='
  • Auto-Transfer Time: '+ye/10+"s
  • ",et+='
  • Auto-Transfer Min Amount: '+Se+"
  • ",et+='
  • Auto-Transfer Max Amount: '+Ie+"
  • ",et+='
  • Auto-Transfer Primary Chance: '+ke+"%
  • ",et+='
  • Auto-Transfer Primary Location: '+xe+"
  • ",et+='
  • Auto-Transfer Primary Whitelist: '+m(Te,!0)+"
  • ",et+='
  • Auto-Transfer Primary Blacklist: '+m(Ae,!1)+"
  • ",et+='
  • Auto-Transfer Secondary Chance: '+we+"%
  • ",et+='
  • Auto-Transfer Secondary Location: '+Le+"
  • ",et+='
  • Auto-Transfer Secondary Whitelist: '+m(Me,!0)+"
  • ",et+='
  • Auto-Transfer Secondary Blacklist: '+m(Ee,!1)+"
  • ",et+="
",et+="
",et+='
',et+='

',et+='

",et+='
',et+='
',et+='
    ',et+='
  • Generate Liquids: '+(Pe?'On':'Off')+"
  • ",et+='
  • Liquid Type: '+Fe+"
  • ",et+='
  • Liquid Name: '+De+"
  • ",et+='
  • Transfer Verb: '+Re+"
  • ",et+='
  • Generation Time: '+je+"
  • ",et+='
  • Liquid Capacity: '+We+"
  • ",et+='
  • Slosh Sounds: '+(ze?'On':'Off')+"
  • ",et+='
  • Liquid Addons: '+function(e){var t=[];return null==e||e.forEach((function(e){t.push(''+e+"")})),0===t.length&&t.push("No Addons Set"),t}(Ue)+"
  • ",et+="
",et+="
",et+='
',et+='

',et+='

",et+='
',et+='
',et+='
',et+='
",et+='
',et+='
',et+='
',null==$e||$e.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==Xe||Xe.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==Qe||Qe.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==Je||Je.forEach((function(e){et+=e+"
"})),et+="
",et+='
',null==Ze||Ze.forEach((function(e){et+=e+"
"})),et+="
",et+="
",et+="
",et+="
",et+="
",et+="
"},h=function(e,t){var n,o=(0,r.useBackend)(e),a=(o.act,o.data),i=a.db_version,c=a.db_repo,l=a.mob_name,d=a.bellies,s=function(){var e=new Date,t=String(e.getHours());t.length<2&&(t="0"+t);var n=String(e.getMinutes());n.length<2&&(n="0"+n);var o=String(e.getDate());o.length<2&&(o="0"+o);var r=String(e.getMonth()+1);return r.length<2&&(r="0"+r)," "+String(e.getFullYear())+"-"+r+"-"+o+" ("+t+" "+n+")"}(),u=l+s+t;if(".html"===t){n=new Blob([''+d.length+" Exported Bellies (DB_VER: "+c+"-"+i+')

Bellies of '+l+'

Generated on: '+s+'

'],{type:"text/html;charset=utf8"}),d.forEach((function(e,t){n=new Blob([n,p(e,t)],{type:"text/html;charset=utf8"})})),n=new Blob([n,"
",'