Files
Paradise/code/game/objects/structures/kitchen_spike.dm
johnsonmt88@gmail.com 1a8fb7c09e Another small chunk of reorganizing objects.
I've cleared out most of the .dm files in code/game/objects/ and put it into appropriate files/folders. The stuff I've left is stuff I believe may conflict with carn's work and some code for stuff that does not have a home yet.

TODO:
- Files that were left in code/game/objects that may conflict with carns work
- Go through all the files in all the subfolders of code/game/objects.
- Move all the defines from /defines/ to their proper spots

Not much right?

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4520 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-22 21:55:46 +00:00

69 lines
2.4 KiB
Plaintext

//////Kitchen Spike
/obj/structure/kitchenspike
attack_paw(mob/user as mob)
return src.attack_hand(usr)
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(!istype(G, /obj/item/weapon/grab))
return
if(istype(G.affecting, /mob/living/carbon/monkey))
if(src.occupied == 0)
src.icon_state = "spikebloody"
src.occupied = 1
src.meat = 5
src.meattype = 1
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
del(G.affecting)
del(G)
else
user << "\red The spike already has something on it, finish collecting its meat first!"
else if(istype(G.affecting, /mob/living/carbon/alien))
if(src.occupied == 0)
src.icon_state = "spikebloodygreen"
src.occupied = 1
src.meat = 5
src.meattype = 2
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
del(G.affecting)
del(G)
else
user << "\red The spike already has something on it, finish collecting its meat first!"
else
user << "\red They are too big for the spike, try something smaller!"
return
// MouseDrop_T(var/atom/movable/C, mob/user)
// if(istype(C, /obj/mob/carbon/monkey)
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/metroid))
// else if(istype(C, /obj/livestock/spesscarp
attack_hand(mob/user as mob)
if(..())
return
if(src.occupied)
if(src.meattype == 1)
if(src.meat > 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc )
usr << "You remove some meat from the monkey."
else if(src.meat == 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc)
usr << "You remove the last piece of meat from the monkey!"
src.icon_state = "spike"
src.occupied = 0
else if(src.meattype == 2)
if(src.meat > 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc )
usr << "You remove some meat from the alien."
else if(src.meat == 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc)
usr << "You remove the last piece of meat from the alien!"
src.icon_state = "spike"
src.occupied = 0