mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +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:
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/mob/living/carbon/alien/larva
|
||||
name = "alien larva"
|
||||
icon_state = "larva"
|
||||
flags = 258.0
|
||||
//flags = 258.0
|
||||
|
||||
health = 25
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'monkey.dmi'
|
||||
icon_state = "monkey1"
|
||||
gender = NEUTER
|
||||
flags = 258.0
|
||||
//flags = 258.0
|
||||
|
||||
var/obj/item/weapon/card/id/wear_id = null // Fix for station bounced radios -- Skie
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
density = 1
|
||||
layer = 4.0
|
||||
animate_movement = 2
|
||||
flags = NOREACT
|
||||
var/datum/mind/mind
|
||||
|
||||
var/uses_hud = 0
|
||||
|
||||
@@ -594,7 +594,7 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = OPENCONTAINER //Temporary holder while it counts what's in it.
|
||||
flags = OPENCONTAINER | NOREACT
|
||||
|
||||
|
||||
/obj/machinery/processor
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
icon_state = "banana"
|
||||
item_state = "banana"
|
||||
On_Consume()
|
||||
if(!reagents.total_volume)
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/bananapeel/W = new /obj/item/weapon/bananapeel( M )
|
||||
M << "\blue You peel the banana."
|
||||
@@ -469,6 +470,12 @@
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 8)
|
||||
bitesize = 2
|
||||
On_Consume()
|
||||
if(!reagents.total_volume)
|
||||
var/mob/M = usr
|
||||
var/obj/item/stack/rods/W = new /obj/item/stack/rods( M )
|
||||
M << "\blue You lick clean the rod."
|
||||
M.put_in_hand(W)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/monkeykabob
|
||||
name = "Meat-kabob"
|
||||
@@ -478,6 +485,12 @@
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 8)
|
||||
bitesize = 2
|
||||
On_Consume()
|
||||
if(!reagents.total_volume)
|
||||
var/mob/M = usr
|
||||
var/obj/item/stack/rods/W = new /obj/item/stack/rods( M )
|
||||
M << "\blue You lick clean the rod."
|
||||
M.put_in_hand(W)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tofukabob
|
||||
name = "Tofu-kabob"
|
||||
@@ -487,6 +500,12 @@
|
||||
..()
|
||||
reagents.add_reagent("nutriment", 8)
|
||||
bitesize = 2
|
||||
On_Consume()
|
||||
if(!reagents.total_volume)
|
||||
var/mob/M = usr
|
||||
var/obj/item/stack/rods/W = new /obj/item/stack/rods( M )
|
||||
M << "\blue You lick clean the rod."
|
||||
M.put_in_hand(W)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cubancarp
|
||||
name = "Cuban Carp"
|
||||
@@ -503,10 +522,17 @@
|
||||
name = "Popcorm" //not a typo
|
||||
desc = "Now let's find some cinema."
|
||||
icon_state = "popcorn"
|
||||
var/unpopped = 0
|
||||
New()
|
||||
..()
|
||||
unpopped = rand(1,10)
|
||||
reagents.add_reagent("nutriment", 2)
|
||||
bitesize = 0.1 //this snack is supposed to be eating during looooong time. And this it not dinner food! --rastaf0
|
||||
On_Consume()
|
||||
if(prob(unpopped))
|
||||
usr << "\red You bite down on an un-popped kernel!"
|
||||
unpopped = max(0, unpopped-1)
|
||||
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sosjerky
|
||||
name = "Scaredy's Private Reserve Beef Jerky"
|
||||
@@ -598,6 +624,7 @@
|
||||
reagents.add_reagent("nutriment", 3)
|
||||
bitesize = 2
|
||||
On_Consume()
|
||||
if(!reagents.total_volume)
|
||||
var/mob/M = usr
|
||||
var/obj/item/weapon/paper/paper = locate() in src
|
||||
M.visible_message( \
|
||||
@@ -618,7 +645,7 @@
|
||||
bitesize = 1
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatstake
|
||||
name = "Meat stake"
|
||||
name = "Meat steak"
|
||||
desc = "A piece of hot spicy meat."
|
||||
icon_state = "meatstake"
|
||||
New()
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
if (istype(src.wear_suit, /obj/item/clothing/suit/space/space_ninja)&&src.wear_suit:initialize)
|
||||
var/location = src.loc
|
||||
explosion(location, 1, 2, 3, 4)
|
||||
|
||||
//src.flags = 0
|
||||
//reagents.handle_reactions() //No magic stomach for corpses.
|
||||
src.canmove = 0
|
||||
if(src.client)
|
||||
src.blind.layer = 0
|
||||
|
||||
@@ -107,12 +107,12 @@
|
||||
|
||||
#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc
|
||||
|
||||
//#define EXTRACT_CONTAINER 4095 //Container may have reagents removed from it.
|
||||
//#define INSERT_CONTAINER 4096 //Container may have reagents added to it.
|
||||
#define OPENCONTAINER 4096 // is an open container for chemistry purposes
|
||||
|
||||
#define ONESIZEFITSALL 8192 // can be worn by fatties (or children? ugh)
|
||||
|
||||
#define NOREACT 16384 //Reagents dont' react inside this container.
|
||||
|
||||
|
||||
// bitflags for clothing parts
|
||||
#define HEAD 1
|
||||
|
||||
Reference in New Issue
Block a user