Merge remote-tracking branch 'upstream/dev-freeze' into dev

Conflicts:
	code/modules/mob/living/carbon/human/human_helpers.dm
	code/modules/reagents/reagent_containers/food/snacks.dm
This commit is contained in:
PsiOmegaDelta
2015-10-25 20:07:22 +01:00
7 changed files with 82 additions and 55 deletions

View File

@@ -68,37 +68,24 @@
M << "<span class='danger'>You cannot force any more of [src] to go down your throat.</span>"
return 0
else
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
if(!istype(M, /mob/living/carbon/slime)) //If you're feeding it to someone else.
if (fullness <= (550 * (1 + M.overeatduration / 1000)))
user.visible_message("<span class='danger'>[user] attempts to feed [M] [src].</span>")
else
user.visible_message("<span class='danger'>[user] cannot force anymore of [src] down [M]'s throat.</span>")
return 0
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
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: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
user.visible_message("<span class='danger'>[user] feeds [M] [src].</span>")
else
user << "This creature does not seem to have a mouth!"
if(!M.can_force_feed(user, src))
return
if (fullness <= (550 * (1 + M.overeatduration / 1000)))
user.visible_message("<span class='danger'>[user] attempts to feed [M] [src].</span>")
else
user.visible_message("<span class='danger'>[user] cannot force anymore of [src] down [M]'s throat.</span>")
return 0
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
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: [reagentlist(src)]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]</font>")
msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
user.visible_message("<span class='danger'>[user] feeds [M] [src].</span>")
if(reagents) //Handle ingestion of the reagent.
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
if(reagents.total_volume)

View File

@@ -21,16 +21,8 @@
//TODO: replace with standard_feed_mob() call.
if(M == user)
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? You don't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
return
if(!M.can_eat(src))
return
M << "<span class='notice'>You swallow \the [src].</span>"
M.drop_from_inventory(src) //icon update
@@ -40,14 +32,7 @@
return 1
else if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(!H.check_has_mouth())
user << "Where do you intend to put \the [src]? \The [H] doesn't have a mouth!"
return
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
if(!M.can_force_feed(user, src))
return
user.visible_message("<span class='warning'>[user] attempts to force [M] to swallow \the [src].</span>")