mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Makes player simplemobs able to finish off snacks.
No more endless futile nibbling. Tested working fine.
This commit is contained in:
@@ -29,7 +29,8 @@
|
|||||||
|
|
||||||
//Placeholder for effect that trigger on eating that aren't tied to reagents.
|
//Placeholder for effect that trigger on eating that aren't tied to reagents.
|
||||||
/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M)
|
/obj/item/weapon/reagent_containers/food/snacks/proc/On_Consume(var/mob/M)
|
||||||
if(!usr) return
|
if(!usr)
|
||||||
|
usr = M
|
||||||
if(!reagents.total_volume)
|
if(!reagents.total_volume)
|
||||||
M.visible_message("<span class='notice'>[M] finishes eating \the [src].</span>","<span class='notice'>You finish eating \the [src].</span>")
|
M.visible_message("<span class='notice'>[M] finishes eating \the [src].</span>","<span class='notice'>You finish eating \the [src].</span>")
|
||||||
usr.drop_from_inventory(src) //so icons update :[
|
usr.drop_from_inventory(src) //so icons update :[
|
||||||
@@ -224,7 +225,7 @@
|
|||||||
return
|
return
|
||||||
user.visible_message("<b>[user]</b> nibbles away at \the [src].","You nibble away at \the [src].")
|
user.visible_message("<b>[user]</b> nibbles away at \the [src].","You nibble away at \the [src].")
|
||||||
bitecount++
|
bitecount++
|
||||||
if(reagents && user.reagents)
|
if(reagents)
|
||||||
reagents.trans_to_mob(user, bitesize, CHEM_INGEST)
|
reagents.trans_to_mob(user, bitesize, CHEM_INGEST)
|
||||||
spawn(5)
|
spawn(5)
|
||||||
if(!src && !user.client)
|
if(!src && !user.client)
|
||||||
|
|||||||
Reference in New Issue
Block a user