Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 06d6277

Browse files
authored
eww someone else bit this food (#22748)
1 parent 0cd1e57 commit 06d6277

File tree

8 files changed

+51
-9
lines changed

8 files changed

+51
-9
lines changed

code/__DEFINES/traits/declarations.dm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
/// This person is crying
6060
#define TRAIT_CRYING "crying"
6161
/// you cannot put this in any container, backpack, box etc
62-
#define TRAIT_NO_STORAGE "no-storage"
62+
#define TRAIT_NO_STORAGE "no-storage"
6363
/// Crafts items using the crafting menu faster
6464
#define TRAIT_CRAFTY "crafty"
6565
/// Gets a more detailed reagent breakdown when examining
@@ -130,6 +130,7 @@
130130
#define TRAIT_DIGITIGRADE "digitigrade" // the funny lizard legs
131131
/// If the legs are to be displayed like regular legs
132132
#define TRAIT_DIGI_SQUISH "didi_squish"
133+
#define TRAIT_IGNORE_SHAREDFOOD "ignore_shared_food" // don't get negative moodlet from sharing a plate
133134

134135
////////////////////////////////////////////////////////////////////////////////////
135136
//---------------------------------Quirk defines----------------------------------//

code/datums/mood_events/needs_events.dm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@
7777
mood_change = -4
7878
timeout = 4 MINUTES
7979

80+
/datum/mood_event/shared_food
81+
description = "<span class='warning'>I'm eating scraps like an animal...</span>\n"
82+
mood_change = -2
83+
timeout = 4 MINUTES
84+
8085
/datum/mood_event/breakfast
8186
description = "<span class='nicegreen'>Nothing like a hearty breakfast to start the shift.</span>\n"
8287
mood_change = 2

code/modules/food_and_drinks/food.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
/obj/item/reagent_containers/food/proc/checkLiked(fraction, mob/M)
4444
if(last_check_time + 50 < world.time)
45+
. = TRUE
4546
if(ishuman(M))
4647
var/mob/living/carbon/human/H = M
4748
if(!HAS_TRAIT(H, TRAIT_AGEUSIA))
@@ -64,5 +65,7 @@
6465
if((foodtype & BREAKFAST) && world.time - SSticker.round_start_time < STOP_SERVING_BREAKFAST)
6566
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "breakfast", /datum/mood_event/breakfast)
6667
last_check_time = world.time
68+
else
69+
return FALSE
6770

6871
#undef STOP_SERVING_BREAKFAST

code/modules/food_and_drinks/food/snacks.dm

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,15 @@ All foods are distributed among various categories. Use common sense.
5252
var/list/bonus_reagents //the amount of reagents (usually nutriment and vitamin) added to crafted/cooked snacks, on top of the ingredients reagents.
5353
var/customfoodfilling = 1 // whether it can be used as filling in custom food
5454
var/list/tastes // for example list("crisps" = 2, "salt" = 1)
55+
var/list/datum/weakref/who_bit
5556

5657
//Placeholder for effect that trigger on eating that aren't tied to reagents.
5758

59+
/obj/item/reagent_containers/food/snacks/Initialize(mapload)
60+
. = ..()
61+
if(who_bit == null)
62+
who_bit = list()
63+
5864
/obj/item/reagent_containers/food/snacks/add_initial_reagents()
5965
if(tastes && tastes.len)
6066
if(list_reagents)
@@ -70,6 +76,7 @@ All foods are distributed among various categories. Use common sense.
7076
/obj/item/reagent_containers/food/snacks/proc/On_Consume(mob/living/eater)
7177
if(!eater)
7278
return
79+
who_bit |= WEAKREF(eater)
7380
if(!reagents.total_volume)
7481
var/mob/living/location = loc
7582
var/obj/item/trash_item = generate_trash(location)
@@ -137,6 +144,16 @@ All foods are distributed among various categories. Use common sense.
137144

138145
return 0
139146

147+
/obj/item/reagent_containers/food/snacks/checkLiked(fraction, mob/M)
148+
. = ..()
149+
if(.)
150+
// ewww someone else bit this
151+
var/someone_else_bit = islist(who_bit) && ((length(who_bit) > 0 && who_bit[1].resolve() != M) || length(who_bit) > 1)
152+
// (most) junky snacks are meant to be shared!
153+
if(someone_else_bit && !HAS_TRAIT(M, TRAIT_AGEUSIA) && !HAS_TRAIT(M, TRAIT_IGNORE_SHAREDFOOD) && junkiness <= 0)
154+
to_chat(M, span_notice("Eww... Someone else bit this..."))
155+
SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "shared_food", /datum/mood_event/shared_food)
156+
140157
/obj/item/reagent_containers/food/snacks/examine(mob/user)
141158
. = ..()
142159
switch (bitecount)
@@ -148,6 +165,9 @@ All foods are distributed among various categories. Use common sense.
148165
. += "[src] was bitten [bitecount] times!"
149166
else
150167
. += "[src] was bitten multiple times!"
168+
var/someone_else_bit = islist(who_bit) && ((length(who_bit) > 0 && who_bit[1].resolve() != user) || length(who_bit) > 1)
169+
if(someone_else_bit && junkiness <= 0)
170+
. += span_notice("You recognize some bites as not your own.")
151171

152172
/obj/item/reagent_containers/food/snacks/attackby(obj/item/W, mob/user, params)
153173
if(istype(W, /obj/item/storage))

code/modules/food_and_drinks/food/snacks_pastry.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
mood.add_event(null, "fav_food", /datum/mood_event/favorite_food)
4848
last_check_time = world.time
4949
return
50-
..()
50+
. = ..()
5151

5252
/obj/item/reagent_containers/food/snacks/donut/chaos
5353
name = "chaos donut"

code/modules/mob/living/carbon/human/species_types/lizardpeople.dm

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
say_mod = "hisses"
99
default_color = "00FF00"
1010
species_traits = list(MUTCOLORS,EYECOLOR,DIGITIGRADE,LIPS,HAS_FLESH,HAS_BONE,HAS_TAIL)
11-
inherent_traits = list(TRAIT_COLDBLOODED)
11+
inherent_traits = list(TRAIT_COLDBLOODED, TRAIT_IGNORE_SHAREDFOOD)
1212
inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_REPTILE
1313
mutant_bodyparts = list("tail_lizard", "snout", "spines", "horns", "frills", "body_markings")
1414
mutanttongue = /obj/item/organ/tongue/lizard
@@ -175,7 +175,14 @@
175175
/datum/species/lizard/create_pref_temperature_perks()
176176
var/list/to_add = list()
177177

178-
to_add += list(list(
178+
to_add += list(
179+
list(
180+
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
181+
SPECIES_PERK_ICON = "hamburger",
182+
SPECIES_PERK_NAME = "Communal Eater",
183+
SPECIES_PERK_DESC = "Due to the communal nature of Vuulen, they are unbothered by the thought of sharing a meal.",
184+
),
185+
list(
179186
SPECIES_PERK_TYPE = SPECIES_NEUTRAL_PERK,
180187
SPECIES_PERK_ICON = "thermometer-half",
181188
SPECIES_PERK_NAME = "Cold-Blooded",

code/modules/research/xenobiology/crossbreeding/_misc.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Slimecrossing Items
240240
mood.add_event(null,"gross_food", /datum/mood_event/gross_food)
241241
last_check_time = world.time
242242
return
243-
..()
243+
. = ..()
244244

245245
//Ice stasis block - Chilling Dark Blue
246246
/obj/structure/ice_stasis
@@ -335,6 +335,6 @@ Slimecrossing Items
335335
electrocute_mob(carbie, get_area(src), src)
336336
qdel(src)
337337
return
338-
338+
339339
stack_item.add(amt)
340340
qdel(src)

yogstation/code/modules/mob/living/carbon/human/species_types/vox.dm

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
is_dimorphic = FALSE
66
generate_husk_icon = TRUE
77
species_traits = list(EYECOLOR, HAS_TAIL, HAS_FLESH, HAS_BONE, HAIRCOLOR, FACEHAIRCOLOR, MUTCOLORS, MUTCOLORS_SECONDARY) // Robust, but cannot be cloned easily.
8-
inherent_traits = list(TRAIT_RESISTCOLD, TRAIT_NOCLONE)
8+
inherent_traits = list(TRAIT_RESISTCOLD, TRAIT_NOCLONE, TRAIT_IGNORE_SHAREDFOOD)
99
mutant_bodyparts = list("vox_quills", "vox_body_markings", "vox_facial_quills", "vox_tail", "vox_tail_markings")
1010
default_features = list("vox_quills" = "None", "vox_facial_quills" = "None", "vox_body_markings" = "None", "vox_tail" = "lime", "vox_tail_markings" = "None", "vox_skin_tone" = "lime")
1111
attack_verbs = list("scratch", "claw")
@@ -48,7 +48,7 @@
4848
These bioengineered, reptilian, beaked, and quilled beings have a physiological caste system and follow 'The Inviolate' tenets. \
4949
Breathing pure nitrogen, they need specialized masks and tanks for survival outside their arkships. \
5050
Their insular nature limits their involvement in broader galactic affairs, maintaining a distinct, yet isolated presence away from other species."
51-
51+
5252
/datum/species/vox/get_species_lore()
5353
return list("Vox have no colonies of their own to speak of. Most Vox originate from a location known as the Shoal, a sprawling, labyrinth-like space megalith of debris and asteroids fused together over countless orbits. It is there where their cutthroat and opportunistic behavior stems from.",\
5454
"Little is known of Vox history itself, as the Vox do not keep many records beyond personal accomplishments and tales of profit and triumph. They have lived among the Shoal and the stars as long as they or anyone else can remember.",\
@@ -77,7 +77,7 @@
7777
vox.dna.update_uf_block(DNA_VOX_FACIAL_QUILLS_BLOCK)
7878
vox.dna.update_uf_block(DNA_VOX_QUILLS_BLOCK)
7979
vox.update_hair()
80-
80+
8181
/datum/species/vox/survival_box_replacement(mob/living/carbon/human/box_holder, obj/item/storage/box/survival_box, list/soon_deleted_items, list/soon_added_items)
8282
var/mask_to_replace = /obj/item/clothing/mask/breath/vox
8383
if(mask_to_replace in soon_added_items)
@@ -154,6 +154,12 @@
154154
SPECIES_PERK_NAME = "Imperishable Organs",
155155
SPECIES_PERK_DESC = "Vox organs contain advanced cybernetics that prevent them from decaying.",
156156
),
157+
list(
158+
SPECIES_PERK_TYPE = SPECIES_POSITIVE_PERK,
159+
SPECIES_PERK_ICON = "hamburger",
160+
SPECIES_PERK_NAME = "Communal Eater",
161+
SPECIES_PERK_DESC = "Due to their tribal background, Vox are unbothered by the thought of sharing a meal.",
162+
),
157163
list(
158164
SPECIES_PERK_TYPE = SPECIES_NEGATIVE_PERK,
159165
SPECIES_PERK_ICON = "bolt",

0 commit comments

Comments
 (0)