Advertisement
EditorRUS

Eat-n-mask

Sep 30th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. attack(mob/M as mob, mob/user as mob, def_zone)
  2. if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
  3. user << "\red None of [src] left, oh no!"
  4. del(src)
  5. return 0
  6. if(istype(M, /mob/living/carbon))
  7. if(M == user) //If you're eating it yourself.
  8. if(!M.wear_mask)
  9. var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
  10. if (fullness <= 50)
  11. M << "\red You hungrily chew out a piece of [src] and gobble it!"
  12. if (fullness > 50 && fullness <= 150)
  13. M << "\blue You hungrily begin to eat [src]."
  14. if (fullness > 150 && fullness <= 350)
  15. M << "\blue You take a bite of [src]."
  16. if (fullness > 350 && fullness <= 550)
  17. M << "\blue You unwillingly chew a bit of [src]."
  18. if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat
  19. M << "\red You cannot force any more of [src] to go down your throat."
  20. return 0
  21. else
  22. user << "\blue You have mask, take off it"
  23. return 0
  24. else
  25. if(!istype(M, /mob/living/carbon/metroid)) //If you're feeding it to someone else.
  26. if(!M.wear_mask)
  27. var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
  28. if (fullness <= (550 * (1 + M.overeatduration / 1000)))
  29. for(var/mob/O in viewers(world.view, user))
  30. O.show_message("\red [user] attempts to feed [M] [src].", 1)
  31. else
  32. for(var/mob/O in viewers(world.view, user))
  33. O.show_message("\red [user] cannot force anymore of [src] down [M]'s throat.", 1)
  34. return 0
  35.  
  36. if(!do_mob(user, M)) return
  37.  
  38. M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
  39. user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
  40. log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
  41. message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
  42.  
  43. log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
  44.  
  45. for(var/mob/O in viewers(world.view, user))
  46. O.show_message("\red [user] feeds [M] [src].", 1)
  47. else
  48. user << "\blue This creature have mask, take off it"
  49. return 0
  50. else
  51. user << "This creature does not seem to have a mouth!"
  52. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement