Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- attack(mob/M as mob, mob/user as mob, def_zone)
- if(!reagents.total_volume) //Shouldn't be needed but it checks to see if it has anything left in it.
- user << "\red None of [src] left, oh no!"
- del(src)
- return 0
- if(istype(M, /mob/living/carbon))
- if(M == user) //If you're eating it yourself.
- if(!M.wear_mask)
- var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
- if (fullness <= 50)
- M << "\red You hungrily chew out a piece of [src] and gobble it!"
- if (fullness > 50 && fullness <= 150)
- M << "\blue You hungrily begin to eat [src]."
- if (fullness > 150 && fullness <= 350)
- M << "\blue You take a bite of [src]."
- if (fullness > 350 && fullness <= 550)
- M << "\blue You unwillingly chew a bit of [src]."
- if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat
- M << "\red You cannot force any more of [src] to go down your throat."
- return 0
- else
- user << "\blue You have mask, take off it"
- return 0
- else
- if(!istype(M, /mob/living/carbon/metroid)) //If you're feeding it to someone else.
- if(!M.wear_mask)
- var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
- if (fullness <= (550 * (1 + M.overeatduration / 1000)))
- for(var/mob/O in viewers(world.view, user))
- O.show_message("\red [user] attempts to feed [M] [src].", 1)
- else
- for(var/mob/O in viewers(world.view, user))
- O.show_message("\red [user] cannot force anymore of [src] down [M]'s throat.", 1)
- return 0
- if(!do_mob(user, M)) return
- M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: \ref[reagents]</font>")
- user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [M.name] by [M.name] ([M.ckey]) Reagents: \ref[reagents]</font>")
- log_admin("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
- message_admins("ATTACK: [user] ([user.ckey]) fed [M] ([M.ckey]) with [src].")
- log_attack("<font color='red'>[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
- for(var/mob/O in viewers(world.view, user))
- O.show_message("\red [user] feeds [M] [src].", 1)
- else
- user << "\blue This creature have mask, take off it"
- return 0
- else
- user << "This creature does not seem to have a mouth!"
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement