mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
ends multiproccing on butchering
This commit is contained in:
@@ -9,17 +9,23 @@
|
||||
|
||||
var/list/butchery_loot // Associated list, path = number.
|
||||
|
||||
var/being_butchered = FALSE // No multiproccing
|
||||
|
||||
// Harvest an animal's delicious byproducts
|
||||
/mob/living/proc/harvest(var/mob/user, var/obj/item/I)
|
||||
if(meat_type && meat_amount>0 && (stat == DEAD))
|
||||
if(meat_type && meat_amount>0 && (stat == DEAD) && !being_butchered)
|
||||
being_butchered = TRUE
|
||||
while(meat_amount > 0 && do_after(user, 0.5 SECONDS * (mob_size / 10), src))
|
||||
var/obj/item/meat = new meat_type(get_turf(src))
|
||||
meat.name = "[src.name] [meat.name]"
|
||||
new /obj/effect/decal/cleanable/blood/splatter(get_turf(src))
|
||||
meat_amount--
|
||||
being_butchered = FALSE
|
||||
|
||||
if(!meat_amount)
|
||||
if(!meat_amount && !being_butchered)
|
||||
being_butchered = TRUE
|
||||
handle_butcher(user, I)
|
||||
being_butchered = FALSE
|
||||
|
||||
/mob/living/proc/can_butcher(var/mob/user, var/obj/item/I) // Override for special butchering checks.
|
||||
if(((meat_type && meat_amount) || LAZYLEN(butchery_loot)) && stat == DEAD)
|
||||
|
||||
Reference in New Issue
Block a user