Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream 29.11.24 #826

Merged
merged 51 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
34d35c6
Adds a bunch of interaction related unit tests (#88210)
MrMelbert Nov 27, 2024
d3a84ad
Automatic changelog compile [ci skip]
tgstation-ci[bot] Nov 28, 2024
b7c8a02
Teleporting while leaning now makes you fall on your face (#88215)
optimumtact Nov 28, 2024
c55a4c4
Automatic changelog for PR #88215 [ci skip]
tgstation-ci[bot] Nov 28, 2024
d2e709d
Fix missing returns in limb dislocation treatment code (#88234)
TealSeer Nov 28, 2024
03a9d25
Automatic changelog for PR #88234 [ci skip]
tgstation-ci[bot] Nov 28, 2024
3114566
Prevents bounty pads from sending holographic and abstract items. Tid…
necromanceranne Nov 28, 2024
38e1c4f
Automatic changelog for PR #88242 [ci skip]
tgstation-ci[bot] Nov 28, 2024
8b9da26
Digitigrade code refactor and shoes + explorer suit (Using GAGS and z…
Runi-c Nov 28, 2024
69830bb
Automatic changelog for PR #88096 [ci skip]
tgstation-ci[bot] Nov 28, 2024
115609c
Adds a new item to the chef traitor's uplink: Molt'Obeso sauce. (#87103)
paganiy Nov 28, 2024
fffdcd1
Automatic changelog for PR #87103 [ci skip]
tgstation-ci[bot] Nov 28, 2024
b419209
[NO GBP] Fixing the profound fisher component. (#88204)
Ghommie Nov 28, 2024
7c1765c
Automatic changelog for PR #88204 [ci skip]
tgstation-ci[bot] Nov 28, 2024
2e429ce
Fixing/reworking explosive interactions with organ manip and fishing …
Ghommie Nov 28, 2024
a9fe2fe
Automatic changelog for PR #88232 [ci skip]
tgstation-ci[bot] Nov 28, 2024
fe7c8e1
Adds some Fish Content (#88213)
carlarctg Nov 28, 2024
603bf8e
Automatic changelog for PR #88213 [ci skip]
tgstation-ci[bot] Nov 28, 2024
2522791
Adds some tips for most of my changes to the game (#88186)
carlarctg Nov 29, 2024
1c8daf9
Automatic changelog for PR #88186 [ci skip]
tgstation-ci[bot] Nov 29, 2024
e0f7f3e
Replaces scarves station trait with scryers (#88167)
carlarctg Nov 29, 2024
b6d9576
Automatic changelog for PR #88167 [ci skip]
tgstation-ci[bot] Nov 29, 2024
f198a55
Added 'loose hat' functionality to the hat stabilizing component, use…
carlarctg Nov 29, 2024
0c4cf8b
Automatic changelog for PR #88030 [ci skip]
tgstation-ci[bot] Nov 29, 2024
0c5da39
[NO GBP] Various CvH tweaks & fixes (#88168)
carlarctg Nov 29, 2024
edecc23
Automatic changelog for PR #88168 [ci skip]
tgstation-ci[bot] Nov 29, 2024
36ee0a4
Automatic changelog compile [ci skip]
tgstation-ci[bot] Nov 29, 2024
36212e5
Adds in the modulo operator to the circuit arithmetic component. (#88…
CRITAWAKETS Nov 29, 2024
6d423d2
Automatic changelog for PR #88253 [ci skip]
tgstation-ci[bot] Nov 29, 2024
a17ad68
Fix double-encode in AI shuttle call reasons (#88245)
Absolucy Nov 29, 2024
d313ec0
Automatic changelog for PR #88245 [ci skip]
tgstation-ci[bot] Nov 29, 2024
3cba7e2
Fixes Nebula's robotics fabricators being obstructed roundstart (#88236)
SmArtKar Nov 29, 2024
ccc2533
Automatic changelog for PR #88236 [ci skip]
tgstation-ci[bot] Nov 29, 2024
1dff5f6
Aquariums are now potential fishing spots. (#88243)
Ghommie Nov 29, 2024
5cada13
Automatic changelog for PR #88243 [ci skip]
tgstation-ci[bot] Nov 29, 2024
c2413a0
Fix hands/clothes still getting covered in blood with light step (#88…
Absolucy Nov 29, 2024
f176db3
Automatic changelog for PR #88247 [ci skip]
tgstation-ci[bot] Nov 29, 2024
499874f
Moves damage overlay disabling into a separate trait for the numb qui…
SmArtKar Nov 29, 2024
6fa9dc5
Automatic changelog for PR #88281 [ci skip]
tgstation-ci[bot] Nov 29, 2024
3c40876
Fix itchy skillchip status effect "Curse of Mundanity", adds unit tes…
MrMelbert Nov 29, 2024
55fdc79
Automatic changelog for PR #88240 [ci skip]
tgstation-ci[bot] Nov 29, 2024
da9d492
[NO GBP] Fixes projectile parrying (#88269)
SmArtKar Nov 29, 2024
b9a17e9
Automatic changelog for PR #88269 [ci skip]
tgstation-ci[bot] Nov 29, 2024
f60f5b8
Fix admin local sound (#88214)
MrMelbert Nov 29, 2024
0b45aec
Automatic changelog for PR #88214 [ci skip]
tgstation-ci[bot] Nov 29, 2024
c9099d0
[no gbp] attribution mishaps (#88246)
Sadboysuss Nov 29, 2024
6b54347
Aquarium kits can now be printed + other tweaks. (#88068)
Ghommie Nov 29, 2024
546254e
Automatic changelog for PR #88068 [ci skip]
tgstation-ci[bot] Nov 29, 2024
192f235
Icemoon lavaloops now look different. (#88235)
Ghommie Nov 29, 2024
4a1c1c8
Automatic changelog for PR #88235 [ci skip]
tgstation-ci[bot] Nov 29, 2024
25a2530
Merge branch 'upstream-master' into merge-upstream
larentoun Nov 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions _maps/map_files/NebulaStation/NebulaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -23929,6 +23929,13 @@
/obj/effect/turf_decal/delivery,
/turf/open/floor/iron/dark,
/area/station/command/teleporter)
"dAP" = (
/obj/effect/turf_decal/delivery,
/obj/machinery/mecha_part_fabricator{
drop_direction = 1
},
/turf/open/floor/iron/dark,
/area/station/science/robotics/lab)
"dAT" = (
/obj/effect/spawner/random/entertainment/toy_figure{
pixel_y = 37;
Expand Down Expand Up @@ -141153,7 +141160,7 @@
/area/station/hallway/primary/central)
"uYT" = (
/obj/machinery/mecha_part_fabricator{
dir = 1
drop_direction = 1
},
/obj/effect/turf_decal/delivery,
/turf/open/floor/iron/dark,
Expand Down Expand Up @@ -263701,7 +263708,7 @@ juD
iZk
vqW
jyY
uYT
dAP
xGM
mVH
xGM
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_mob/signals_mob_living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
#define COMSIG_LIVING_SLAM_TABLE "living_slam_table"
///from /obj/item/hand_item/slapper/attack(): (source=mob/living/slapper, mob/living/slapped)
#define COMSIG_LIVING_SLAP_MOB "living_slap_mob"
///from /obj/item/hand_item/slapper/attack(): (source=mob/living/slapper, mob/living/slapped)
#define COMSIG_LIVING_SLAPPED "living_slapped"
/// from /mob/living/*/UnarmedAttack(), before sending [COMSIG_LIVING_UNARMED_ATTACK]: (mob/living/source, atom/target, proximity, modifiers)
/// The only reason this exists is so hulk can fire before Fists of the North Star.
/// Note that this is called before [/mob/living/proc/can_unarmed_attack] is called, so be wary of that.
Expand Down Expand Up @@ -288,6 +290,8 @@

///From mob/living/carbon/proc/throw_mode_on and throw_mode_off
#define COMSIG_LIVING_THROW_MODE_TOGGLE "living_throw_mode_toggle"
/// From mob/living/proc/on_fall
#define COMSIG_LIVING_THUD "living_thud"
///From /datum/component/happiness()
#define COMSIG_MOB_HAPPINESS_CHANGE "happiness_change"
/// From /obj/item/melee/baton/baton_effect(): (datum/source, mob/living/user, /obj/item/melee/baton)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@
///sent to targets during the process_hit proc of projectiles
#define COMSIG_PROJECTILE_PREHIT "com_proj_prehit"
#define PROJECTILE_INTERRUPT_HIT (1<<0)
#define PROJECTILE_INTERRUPT_HIT_PHASE (1<<1)
///from /obj/projectile/process_movement(): ()
#define COMSIG_PROJECTILE_MOVE_PROCESS_STEP "projectile_move_process_step"
///sent to self during the process_hit proc of projectiles
Expand Down
10 changes: 3 additions & 7 deletions code/__DEFINES/fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
///The breeding timeout for newly instantiated fish is multiplied by this.
#define NEW_FISH_BREEDING_TIMEOUT_MULT 2
///The last feeding timestamp of newly instantiated fish is multiplied by this: ergo, they spawn 50% hungry.
#define NEW_FISH_LAST_FEEDING_MULT 0.5
#define NEW_FISH_LAST_FEEDING_MULT 0.33

//IF YOU ADD ANY NEW FLAG, ADD IT TO THE RESPECTIVE BITFIELD in _globalvars/bitfields.dm TOO!

Expand All @@ -187,7 +187,6 @@
///Flag added when in an aquarium with the right fluid type.
#define FISH_FLAG_SAFE_FLUID (1<<7)


#define MIN_AQUARIUM_TEMP T0C
#define MAX_AQUARIUM_TEMP (T0C + 100)
#define DEFAULT_AQUARIUM_TEMP (T0C + 24)
Expand Down Expand Up @@ -260,11 +259,8 @@
#define FISH_SOURCE_FLAG_EXPLOSIVE_MALUS (1<<0)
/// The fish source is not elegible for random rewards from bluespace fishing rods
#define FISH_SOURCE_FLAG_NO_BLUESPACE_ROD (1<<1)
/**
* If present, fish that can be caught from this source won't be included in the 'fish caught' score, unless
* present in other sources without this flag as well.
*/
#define FISH_SOURCE_FLAG_SKIP_CATCHABLES (1<<2)
/// When examined by someone with enough fishing skill, this will also display fish that doesn't have FISH_FLAG_SHOW_IN_CATALOG
#define FISH_SOURCE_FLAG_IGNORE_HIDDEN_ON_CATALOG (1<<2)

/**
* A macro to ensure the wikimedia filenames of fish icons are unique, especially since there're a couple fish that have
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ DEFINE_BITFIELD(no_equip_flags, list(
/// The sprite works fine for digitigrade legs as-is.
#define CLOTHING_DIGITIGRADE_VARIATION_NO_NEW_ICON (1<<2)
/// Auto-generates the leg portion of the sprite with GAGS
/// Suggested that you set [/obj/item/var/digitigrade_greyscale_config_worn] when using this flag
#define CLOTHING_DIGITIGRADE_MASK (1<<3)

/// All variation flags which render "correctly" on a digitigrade leg setup
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
#define MOB_PLANT (1 << 10)
///The mob is a goopy creature, probably coming from xenobiology.
#define MOB_SLIME (1 << 11)
/// Mob is fish or water-related.
#define MOB_AQUATIC (1 << 12)

//Lung respiration type flags
#define RESPIRATION_OXYGEN (1 << 0)
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
/// Use in status effect "tick_interval" to prevent it from calling tick()
#define STATUS_EFFECT_NO_TICK -1

/// Indicates this status effect is an abstract type, ie not instantiated
/// Doesn't actually do anything in practice, primarily just a marker / used in unit tests,
/// so don't worry if your abstract status effect doesn't actually set this
#define STATUS_EFFECT_ID_ABSTRACT "abstract"

///Processing flags - used to define the speed at which the status will work
///This is fast - 0.2s between ticks (I believe!)
#define STATUS_EFFECT_FAST_PROCESS 0
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_EMOTEMUTE "emotemute"
#define TRAIT_DEAF "deaf"
#define TRAIT_FAT "fat"
/// Always hungry. They can eat as much as they want without eating slowdown.
#define TRAIT_GLUTTON "glutton"
#define TRAIT_HUSK "husk"
///Blacklisted from being revived via defibrillator
#define TRAIT_DEFIB_BLACKLISTED "defib_blacklisted"
Expand Down Expand Up @@ -507,6 +509,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_USER_SCOPED "user_scoped"
/// Mob is unable to feel pain
#define TRAIT_ANALGESIA "analgesia"
/// Mob does not get a damage overlay from brute/burn
#define TRAIT_NO_DAMAGE_OVERLAY "no_damage_overlay"
/// Mob has a scar on their left/right eye
#define TRAIT_RIGHT_EYE_SCAR "right_eye_scar"
#define TRAIT_LEFT_EYE_SCAR "left_eye_scar"
Expand Down
3 changes: 3 additions & 0 deletions code/__HELPERS/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/proc/cmp_name_dsc(atom/a, atom/b)
return sorttext(a.name, b.name)

/proc/cmp_init_name_asc(atom/a, atom/b)
return sorttext(initial(b.name), initial(a.name))

/proc/cmp_records_asc(datum/record/a, datum/record/b)
return sorttext(b.name, a.name)

Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FAST_CUFFING" = TRAIT_FAST_CUFFING,
"TRAIT_FAST_TYING" = TRAIT_FAST_TYING,
"TRAIT_FAT" = TRAIT_FAT,
"TRAIT_GLUTTON" = TRAIT_GLUTTON,
"TRAIT_FEARLESS" = TRAIT_FEARLESS,
"TRAIT_FENCE_CLIMBER" = TRAIT_FENCE_CLIMBER,
"TRAIT_FINGERPRINT_PASSTHROUGH" = TRAIT_FINGERPRINT_PASSTHROUGH,
Expand Down Expand Up @@ -380,6 +381,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOSOFTCRIT" = TRAIT_NOSOFTCRIT,
"TRAIT_NO_AUGMENTS" = TRAIT_NO_AUGMENTS,
"TRAIT_NO_BLOOD_OVERLAY" = TRAIT_NO_BLOOD_OVERLAY,
"TRAIT_NO_DAMAGE_OVERLAY" = TRAIT_NO_DAMAGE_OVERLAY,
"TRAIT_NO_DEBRAIN_OVERLAY" = TRAIT_NO_DEBRAIN_OVERLAY,
"TRAIT_NO_DNA_COPY" = TRAIT_NO_DNA_COPY,
"TRAIT_NO_DNA_SCRAMBLE" = TRAIT_NO_DNA_SCRAMBLE,
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/admin_tooling.dm
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
"TRAIT_FAST_CUFFING" = TRAIT_FAST_CUFFING,
"TRAIT_FAST_TYING" = TRAIT_FAST_TYING,
"TRAIT_FAT" = TRAIT_FAT,
"TRAIT_GLUTTON" = TRAIT_GLUTTON,
"TRAIT_FEARLESS" = TRAIT_FEARLESS,
"TRAIT_FENCE_CLIMBER" = TRAIT_FENCE_CLIMBER,
"TRAIT_FISH_EATER" = TRAIT_FISH_EATER,
Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,10 @@ INITIALIZE_IMMEDIATE(/atom/movable/screen/splash)
state = HUNGER_STATE_FAT
return

if(HAS_TRAIT(hungry, TRAIT_GLUTTON))
state = HUNGER_STATE_HUNGRY // Can't get enough
return

switch(hungry.nutrition)
if(NUTRITION_LEVEL_FULL to INFINITY)
state = HUNGER_STATE_FULL
Expand Down
45 changes: 24 additions & 21 deletions code/controllers/subsystem/processing/fishing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ PROCESSING_SUBSYSTEM_DEF(fishing)
cached_fish_icons = list()
cached_unknown_fish_icons = list()
fish_properties = list()
catchable_fish = list()

var/icon/questionmark = icon('icons/effects/random_spawners.dmi', "questionmark")
var/list/mark_dimension = get_icon_dimensions(questionmark)
for(var/obj/item/fish/fish_type as anything in subtypesof(/obj/item/fish))
var/list/spawned_fish = list()
var/list/fish_subtypes = sortTim(subtypesof(/obj/item/fish), GLOBAL_PROC_REF(cmp_init_name_asc))
for(var/obj/item/fish/fish_type as anything in fish_subtypes)
var/list/fish_dimensions = get_icon_dimensions(fish_type::icon)
var/icon/fish_icon = icon(fish_type::icon, fish_type::icon_state, frame = 1, moving = FALSE)
cached_fish_icons[fish_type] = icon2base64(fish_icon)
Expand All @@ -35,6 +38,7 @@ PROCESSING_SUBSYSTEM_DEF(fishing)
cached_unknown_fish_icons[fish_type] = icon2base64(unknown_icon)

var/obj/item/fish/fish = new fish_type(null, FALSE)
spawned_fish += fish
var/list/properties = list()
fish_properties[fish_type] = properties
properties[FISH_PROPERTIES_FAV_BAIT] = fish.favorite_bait.Copy()
Expand Down Expand Up @@ -67,36 +71,35 @@ PROCESSING_SUBSYSTEM_DEF(fishing)

properties[FISH_PROPERTIES_BEAUTY_SCORE] = beauty_score

qdel(fish)

catchable_fish = list()
var/list/all_catchables = list()
for(var/source_type as anything in GLOB.preset_fish_sources)
var/datum/fish_source/source = GLOB.preset_fish_sources[source_type]
if(!(source.fish_source_flags & FISH_SOURCE_FLAG_SKIP_CATCHABLES))
all_catchables |= source.fish_table
for(var/thing in all_catchables)
if(!ispath(thing, /obj/item/fish))
continue
var/obj/item/fish/fishie = thing
var/fish_id = initial(fishie.fish_id)
var/fish_id
if(fish.fish_id_redirect_path)
var/obj/item/fish/other_path = fish.fish_id_redirect_path
if(!ispath(other_path, /obj/item/fish))
stack_trace("[fish.type] has a set 'fish_id_redirect_path' variable but it isn't a fish path but [other_path]")
continue
fish_id = initial(other_path.fish_id)
else
fish_id = fish.fish_id
if(!fish_id)
stack_trace("[fishie] doesn't have a set 'fish_id' variable despite being a catchable fish")
stack_trace("[fish.type] doesn't have a set 'fish_id' variable despite being a catchable fish")
continue
if(fish.fish_id_redirect_path)
continue
if(catchable_fish[fish_id])
stack_trace("[fishie] has a 'fish_id' value already assigned to [catchable_fish[fish_id]]. fish_id: [fish_id]")
stack_trace("[fish.type] has a 'fish_id' value already assigned to [catchable_fish[fish_id]]. fish_id: [fish_id]")
continue
catchable_fish[fish_id] = fishie
catchable_fish[fish_id] = fish.type

///init the list of things lures can catch
lure_catchables = list()
var/list/fish_types = subtypesof(/obj/item/fish)
for(var/lure_type in typesof(/obj/item/fishing_lure))
var/obj/item/fishing_lure/lure = new lure_type
lure_catchables[lure_type] = list()
for(var/obj/item/fish/fish_type as anything in fish_types)
if(lure.is_catchable_fish(fish_type, fish_properties[fish_type]))
lure_catchables[lure_type] += fish_type
for(var/obj/item/fish/fish as anything in spawned_fish)
if(lure.is_catchable_fish(fish, fish_properties[fish.type]))
lure_catchables[lure_type] += fish.type
qdel(lure)

QDEL_LIST(spawned_fish)

return SS_INIT_SUCCESS
7 changes: 7 additions & 0 deletions code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,13 @@ SUBSYSTEM_DEF(shuttle)

return TRUE

/**
* Calls the emergency shuttle.
*
* Arguments:
* * user - The mob that called the shuttle.
* * call_reason - The reason the shuttle was called, which should be non-html-encoded text.
*/
/datum/controller/subsystem/shuttle/proc/requestEvac(mob/user, call_reason)
if (!check_backup_emergency_shuttle())
return
Expand Down
12 changes: 6 additions & 6 deletions code/datums/components/_component.dm
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,13 @@
for(var/component_key in dc)
var/component_or_list = dc[component_key]
if(islist(component_or_list))
for(var/datum/component/I in component_or_list)
if(I.can_transfer)
target.TakeComponent(I)
for(var/datum/component/component in component_or_list)
if(component.can_transfer)
target.TakeComponent(component)
else
var/datum/component/C = component_or_list
if(C.can_transfer)
target.TakeComponent(C)
var/datum/component/component = component_or_list
if(!QDELETED(component) && component.can_transfer)
target.TakeComponent(component)

/**
* Return the object that is the host of any UI's that this component has
Expand Down
41 changes: 37 additions & 4 deletions code/datums/components/aquarium.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@
RegisterSignal(movable, COMSIG_ATOM_UI_INTERACT, PROC_REF(interact))

movable.AddElement(/datum/element/relay_attackers)
movable.AddComponent(/datum/component/fishing_spot, /datum/fish_source/aquarium)


movable.flags_1 |= HAS_CONTEXTUAL_SCREENTIPS_1
RegisterSignal(movable, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, PROC_REF(on_requesting_context_from_item))

for(var/atom/movable/content as anything in movable.contents)
if(content.flags_1 & INITIALIZED_1)
Expand All @@ -143,13 +148,15 @@
COMSIG_ATOM_ATTACK_ROBOT_SECONDARY,
COMSIG_ATOM_ATTACK_HAND_SECONDARY,
COMSIG_ATOM_UI_INTERACT,
COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM,
))
if(movable.reagents)
UnregisterSignal(movable, COMSIG_REAGENTS_NEW_REAGENT)
STOP_PROCESSING(SSobj, src)
beauty_by_content = null
tracked_fish_by_type = null
movable.remove_traits(list(TRAIT_IS_AQUARIUM, TRAIT_AQUARIUM_PANEL_OPEN, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH), AQUARIUM_TRAIT)
qdel(movable.GetComponent(/datum/component/fishing_spot))
REMOVE_KEEP_TOGETHER(movable, AQUARIUM_TRAIT)

/datum/component/aquarium/PreTransfer(atom/movable/new_parent)
Expand Down Expand Up @@ -214,7 +221,7 @@
source.balloon_alert(user, "fed the fish")
return ITEM_INTERACT_SUCCESS

if(!HAS_TRAIT(item, TRAIT_AQUARIUM_CONTENT))
if(!HAS_TRAIT(item, TRAIT_AQUARIUM_CONTENT) || (!isitem(parent) && user.combat_mode))
return //proceed with normal interactions

var/broken = source.get_integrity_percentage() <= source.integrity_failure
Expand All @@ -238,6 +245,10 @@

///Feed the fish at defined intervals until the feed storage is empty.
/datum/component/aquarium/process(seconds_per_tick)
//safe mode, no need to feed the fishes
if(HAS_TRAIT_FROM(parent, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH, AQUARIUM_TRAIT))
last_feeding += seconds_per_tick SECONDS
return
var/atom/movable/movable = parent
if(!movable.reagents?.total_volume)
if(movable.reagents)
Expand All @@ -253,6 +264,7 @@
/datum/component/aquarium/proc/on_plunger_act(atom/movable/source, obj/item/plunger/plunger, mob/living/user, reinforced)
SIGNAL_HANDLER
if(!HAS_TRAIT(source, TRAIT_AQUARIUM_PANEL_OPEN))
source.balloon_alert(user, "open panel first!")
return
INVOKE_ASYNC(src, PROC_REF(do_plunging), source, user)
return COMPONENT_NO_AFTERATTACK
Expand Down Expand Up @@ -461,7 +473,7 @@
var/atom/movable/aquarium = parent
.["fluidType"] = fluid_type
.["temperature"] = fluid_temp
.["allowBreeding"] = HAS_TRAIT_FROM(aquarium, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH, AQUARIUM_TRAIT)
.["safe_mode"] = !HAS_TRAIT_FROM(aquarium, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH, AQUARIUM_TRAIT)
.["fishData"] = list()
.["feedingInterval"] = feeding_interval / (1 MINUTES)
.["propData"] = list()
Expand Down Expand Up @@ -510,8 +522,8 @@
if(params["fluid"] != fluid_type && (params["fluid"] in fluid_types))
set_fluid_type(params["fluid"])
. = TRUE
if("allow_breeding")
if(HAS_TRAIT(movable, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH))
if("safe_mode")
if(HAS_TRAIT_FROM(movable, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH, AQUARIUM_TRAIT))
REMOVE_TRAIT(movable, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH, AQUARIUM_TRAIT)
else
ADD_TRAIT(movable, TRAIT_STOP_FISH_REPRODUCTION_AND_GROWTH, AQUARIUM_TRAIT)
Expand Down Expand Up @@ -561,5 +573,26 @@
else if(dead_fish > 0)
user.add_mood_event("aquarium", morb ? /datum/mood_event/morbid_aquarium_good : /datum/mood_event/aquarium_negative)

/datum/component/aquarium/proc/on_requesting_context_from_item(atom/source, list/context, obj/item/held_item, mob/user)
SIGNAL_HANDLER
var/open_panel = HAS_TRAIT(source, TRAIT_AQUARIUM_PANEL_OPEN)
if(!held_item)
var/isitem = isitem(source)
if(!isitem || open_panel)
context[SCREENTIP_CONTEXT_LMB] = open_panel ? "Adjust settings" : "Admire"
if(isitem)
context[SCREENTIP_CONTEXT_RMB] = "Admire"
context[SCREENTIP_CONTEXT_ALT_LMB] = "[open_panel ? "Open" : "Close"] settings panel"
return CONTEXTUAL_SCREENTIP_SET
if(istype(held_item, /obj/item/plunger))
context[SCREENTIP_CONTEXT_LMB] = "Empty feed storage"
return CONTEXTUAL_SCREENTIP_SET
if(istype(held_item, /obj/item/reagent_containers/cup/fish_feed) && (!source.reagents || !open_panel))
context[SCREENTIP_CONTEXT_LMB] = "Feed fishes"
return CONTEXTUAL_SCREENTIP_SET
if(HAS_TRAIT(held_item, TRAIT_AQUARIUM_CONTENT))
context[SCREENTIP_CONTEXT_LMB] = "Insert in aquarium"
return CONTEXTUAL_SCREENTIP_SET

#undef MIN_AQUARIUM_BEAUTY
#undef MAX_AQUARIUM_BEAUTY
Loading
Loading