mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Glorious Return Update:
- Adjusted OnConsume proc in food so that it occurs before the check to see if the item is finished (so that you can do triggers whenever you take a bite rather then only when it's completely eaten). Adjusted existing food items so that they still work the same. - Eating popcorn now has a random chance of having the user accidentally bite on an un-popped kernel. This doesn't do anything other then give the user a message though. - Kabobs now return the bar used to make them. - New atom flag: NOREACT. Reagents stored in objects, mobs, and turfs that have this flag do not react. Right now, only the microwave and mobs have this effect (only mobs had this effect before). It's intended to simplify devices that use reagents. ADMIN NOTE: You can remove this flag from people if you feel like being a dick. - NOREACT flag automatically gets removed on death. (Commented out for now) - Removed a flag on certain mobs that wasn't actually doing anything. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1459 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -72,7 +72,7 @@ datum
|
||||
trans_data = current_reagent.data
|
||||
R.add_reagent(current_reagent.id, (current_reagent_transfer * multiplier), trans_data)
|
||||
src.remove_reagent(current_reagent.id, current_reagent_transfer)
|
||||
|
||||
|
||||
src.update_total()
|
||||
R.update_total()
|
||||
R.handle_reactions()
|
||||
@@ -129,7 +129,7 @@ datum
|
||||
update_total()
|
||||
|
||||
handle_reactions()
|
||||
if(ismob(my_atom)) return //No reactions inside mobs :I
|
||||
if(my_atom.flags & NOREACT) return //Yup, no reactions here. No siree.
|
||||
|
||||
for(var/A in typesof(/datum/chemical_reaction) - /datum/chemical_reaction)
|
||||
var/datum/chemical_reaction/C = new A()
|
||||
|
||||
@@ -928,6 +928,7 @@
|
||||
var/bitesize = 1
|
||||
var/bitecount = 0
|
||||
|
||||
//Placeholder for effects that trigger on eating that aren't tied to reagents.
|
||||
proc/On_Consume()
|
||||
return
|
||||
|
||||
@@ -986,10 +987,10 @@
|
||||
else
|
||||
reagents.trans_to(M, reagents.total_volume)
|
||||
bitecount++
|
||||
On_Consume()
|
||||
if(!reagents.total_volume)
|
||||
if(M == user) user << "\red You finish eating [src]."
|
||||
else user << "\red [M] finishes eating [src]."
|
||||
On_Consume()
|
||||
del(src)
|
||||
playsound(M.loc,'eatfood.ogg', rand(10,50), 1)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user