mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
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:
@@ -1,8 +1,46 @@
|
||||
#define HUMAN_EATING_NO_ISSUE 0
|
||||
#define HUMAN_EATING_NO_MOUTH 1
|
||||
#define HUMAN_EATING_BLOCKED_MOUTH 2
|
||||
|
||||
#define add_clothing_protection(A) \
|
||||
var/obj/item/clothing/C = A; \
|
||||
flash_protection += C.flash_protection; \
|
||||
equipment_tint_total += C.tint;
|
||||
|
||||
/mob/living/carbon/human/can_eat(var/food, var/feedback = 1)
|
||||
var/status = can_eat_status()
|
||||
if(status == HUMAN_EATING_NO_ISSUE)
|
||||
return 1
|
||||
if(feedback)
|
||||
if(status == HUMAN_EATING_NO_MOUTH)
|
||||
src << "Where do you intend to put \the [food]? You don't have a mouth!"
|
||||
else if(status == HUMAN_EATING_BLOCKED_MOUTH)
|
||||
src << "<span class='warning'>\The [blocked] is in the way!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/can_force_feed(var/feeder, var/food, var/feedback = 1)
|
||||
var/status = can_eat_status()
|
||||
if(status == HUMAN_EATING_NO_ISSUE)
|
||||
return 1
|
||||
if(feedback)
|
||||
if(status == HUMAN_EATING_NO_MOUTH)
|
||||
feeder << "Where do you intend to put \the [food]? \The [src] doesn't have a mouth!"
|
||||
else if(status == HUMAN_EATING_BLOCKED_MOUTH)
|
||||
feeder << "<span class='warning'>\The [blocked] is in the way!</span>"
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/can_eat_status()
|
||||
if(!check_has_mouth())
|
||||
return HUMAN_EATING_NO_MOUTH
|
||||
var/obj/item/blocked = check_mouth_coverage()
|
||||
if(blocked)
|
||||
return HUMAN_EATING_BLOCKED_MOUTH
|
||||
return HUMAN_EATING_NO_ISSUE
|
||||
|
||||
#undef HUMAN_EATING_NO_ISSUE
|
||||
#undef HUMAN_EATING_NO_MOUTH
|
||||
#undef HUMAN_EATING_BLOCKED_MOUTH
|
||||
|
||||
/mob/living/carbon/human/proc/update_equipment_vision()
|
||||
flash_protection = 0
|
||||
equipment_tint_total = 0
|
||||
|
||||
@@ -91,6 +91,14 @@ var/global/list/robot_modules = list(
|
||||
return
|
||||
|
||||
/obj/item/weapon/robot_module/proc/respawn_consumable(var/mob/living/silicon/robot/R, var/rate)
|
||||
var/obj/item/device/flash/F = locate() in src.modules
|
||||
if(F.broken)
|
||||
F.broken = 0
|
||||
F.times_used = 0
|
||||
F.icon_state = "flash"
|
||||
else if(F.times_used)
|
||||
F.times_used--
|
||||
|
||||
if(!synths || !synths.len)
|
||||
return
|
||||
|
||||
@@ -271,7 +279,6 @@ var/global/list/robot_modules = list(
|
||||
..()
|
||||
|
||||
/obj/item/weapon/robot_module/medical/crisis/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = locate() in src.modules
|
||||
if(S.mode == 2)
|
||||
S.reagents.clear_reagents()
|
||||
@@ -423,13 +430,7 @@ var/global/list/robot_modules = list(
|
||||
..()
|
||||
|
||||
/obj/item/weapon/robot_module/security/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
|
||||
var/obj/item/device/flash/F = locate() in src.modules
|
||||
if(F.broken)
|
||||
F.broken = 0
|
||||
F.times_used = 0
|
||||
F.icon_state = "flash"
|
||||
else if(F.times_used)
|
||||
F.times_used--
|
||||
..()
|
||||
var/obj/item/weapon/gun/energy/taser/mounted/cyborg/T = locate() in src.modules
|
||||
if(T.power_supply.charge < T.power_supply.maxcharge)
|
||||
T.power_supply.give(T.charge_cost * amount)
|
||||
@@ -462,6 +463,7 @@ var/global/list/robot_modules = list(
|
||||
..()
|
||||
|
||||
/obj/item/weapon/robot_module/janitor/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
|
||||
..()
|
||||
var/obj/item/device/lightreplacer/LR = locate() in src.modules
|
||||
LR.Charge(R, amount)
|
||||
if(src.emag)
|
||||
@@ -544,6 +546,7 @@ var/global/list/robot_modules = list(
|
||||
..()
|
||||
|
||||
/obj/item/weapon/robot_module/general/butler/respawn_consumable(var/mob/living/silicon/robot/R, var/amount)
|
||||
..()
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/enzyme/E = locate() in src.modules
|
||||
E.reagents.add_reagent("enzyme", 2 * amount)
|
||||
if(src.emag)
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
emote_see = list("jiggles", "bounces in place")
|
||||
var/colour = "grey"
|
||||
|
||||
/mob/living/simple_animal/slime/can_force_feed(var/feeder, var/food, var/feedback)
|
||||
if(feedback)
|
||||
feeder << "Where do you intend to put \the [food]? \The [src] doesn't have a mouth!"
|
||||
return 0
|
||||
|
||||
/mob/living/simple_animal/adultslime
|
||||
name = "pet slime"
|
||||
desc = "A lovable, domesticated slime."
|
||||
|
||||
@@ -498,6 +498,12 @@ proc/is_blind(A)
|
||||
/mob/proc/is_client_active(var/active = 1)
|
||||
return client && client.inactivity < active MINUTES
|
||||
|
||||
/mob/proc/can_eat()
|
||||
return 1
|
||||
|
||||
/mob/proc/can_force_feed()
|
||||
return 1
|
||||
|
||||
#define SAFE_PERP -50
|
||||
/mob/living/proc/assess_perp(var/obj/access_obj, var/check_access, var/auth_weapons, var/check_records, var/check_arrest)
|
||||
if(stat == DEAD)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>")
|
||||
|
||||
Reference in New Issue
Block a user