optimizes transfer (#18943)

* limits belly contetns to 200 items

* there too

* this too

* don't strip blacklisted things

* .

* sometime later

* no remains if belly is full

* this

* just warn for now

* .

* .

* .

* .

* .

* -

* .

* .

* linter

* faster

* .

* .

* optimize

* fix that

* 20 should be ok

* nom atom

* .

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Kashargul
2026-01-04 15:49:25 +01:00
committed by GitHub
co-authored by Cameron Lennox
parent 732a9f218d
commit fb068c5c62
35 changed files with 141 additions and 95 deletions
+7 -3
View File
@@ -9,7 +9,7 @@
slot_flags = SLOT_BELT | SLOT_BACK
var/vac_power = 0
var/output_dest = null
var/list/vac_settings = list(
var/static/list/vac_settings = list(
"power off" = 0,
"dust and grime" = 1,
"tiny objects" = 2,
@@ -79,8 +79,6 @@
return
if(!output_dest)
return
if(istype(target,/obj/structure/window) || istype(target,/obj/structure/grille))
target = get_turf(target) // Windows can be clicked to clean their turf
if(istype(output_dest,/obj/item/storage/bag/trash))
if(get_turf(output_dest) != get_turf(user))
vac_power = 0
@@ -111,6 +109,8 @@
output_dest = null
to_chat(user, span_warning("Target destination not found. Shutting down."))
return
if(istype(target,/obj/structure/window) || istype(target,/obj/structure/grille))
target = get_turf(target) // Windows can be clicked to clean their turf
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
var/auto_setting = 1
if(isturf(target))
@@ -238,6 +238,10 @@
if(target_item.drop_sound)
playsound(src, target_item.drop_sound, vac_power * 5, 1, -1)
playsound(src, 'sound/rakshasa/corrosion3.ogg', auto_setting * 15, 1, -1)
if(isbelly(output_dest))
var/obj/belly/output_belly = output_dest
output_belly.nom_atom(target)
return
target.forceMove(output_dest)
/obj/item/vac_attachment/resolve_attackby(atom/A, mob/user, var/attack_modifier = 1, var/click_parameters)
+2 -2
View File
@@ -6,7 +6,7 @@
if(H.species.trashcan == 1)
playsound(src,'sound/items/eatfood.ogg', rand(10,50), 1)
user.drop_item()
forceMove(H.vore_selected)
H.vore_selected.nom_atom(src)
balloon_alert(H, "you can taste the flavor of garbage. Wait what?")
return
@@ -15,7 +15,7 @@
if(R.module.type == /obj/item/robot_module/robot/janitor) // You can now feed the trash borg yay.
playsound(src,'sound/items/eatfood.ogg', rand(10,50), 1)
user.drop_item()
forceMove(R.vore_selected)
R.vore_selected.nom_atom(src)
R.balloon_alert_visible("[user] feeds [R] with [src]!", "you feed [R] \the [src]!")
return
..()
@@ -104,7 +104,7 @@
if(!can_food_vore(M, F))
F.forceMove(get_turf(src))
else
F.forceMove(M.vore_selected)
M.vore_selected.nom_atom(F)
if(M == user)
if(!M.can_eat(loaded))
return
+1 -1
View File
@@ -267,7 +267,7 @@
if(gargoyle.adminbus_trash || is_type_in_list(W, GLOB.edible_trash) && W.trash_eatable && !is_type_in_list(W, GLOB.item_vore_blacklist))
to_chat(user, span_warning("You slip [W] into [gargoyle]'s [lowertext(gargoyle.vore_selected.name)] ."))
user.drop_item()
W.forceMove(gargoyle.vore_selected)
gargoyle.vore_selected.nom_atom(W)
return
else if(!(W.flags & NOBLUDGEON))
user.setClickCooldown(user.get_attack_speed(W))