Skip to content

Commit

Permalink
Merge Upstream 20.01.2025 (#1028)
Browse files Browse the repository at this point in the history
This pull request merges upstream/master. Resolve possible conflicts
manually and make sure all the changes are applied correctly.

## Changelog
:cl: tgstation
add: Яйца (и вся другая съедобная еда), оставленные в горячем месте,
будут жариться. <!-- Eggs (and all other edible food) left in a hot
place will fry. (www.github.com/tgstation/tgstation/pull/88914) -->
qol: В названии "странных гейзеров" (Strange geysers) теперь
указывается, что они производят. <!-- Strange geysers now say in their
name what they produce. (www.github.com/tgstation/tgstation/pull/89111)
-->
qol: Маленькие и крошечные мобы больше не вызывают писка объектов,
проходя по ним. <!-- Small and tiny mobs no longer trigger squeaking
objects when walking over them.
(www.github.com/tgstation/tgstation/pull/89100) -->
image: Перерисованы стандартные и миражные гранаты. <!-- Resprited
default and mirage grenades
(www.github.com/tgstation/tgstation/pull/89118) -->
image: Фляга с нечистой водой (unholy water) стала темнее. <!-- Made the
unholy water flask darker
(www.github.com/tgstation/tgstation/pull/89117) -->
refactor: Провода и сборки были переработаны, чтобы добавить им
направленность. Теперь сборки могут подключаться только к тем проводам,
к которым это логически уместно. <!-- Wires and assemblies have been
refactored to have directionality to them. This mostly makes it so that
assemblies can only be attached to wires it would make sense for them to
be attached to. (www.github.com/tgstation/tgstation/pull/89122) -->
qol: Напольные панели теперь могут принимать воспламенители (igniters),
конденсаторы (condensers), вспышки (flashes), корпуса сборок (assembly
shells) и контроллеры дверей (door controllers). <!-- Pressure plates
can now also accept igniters, condensers, flashes, assembly shells, and
door controllers. (www.github.com/tgstation/tgstation/pull/89122) -->
add: Подплиточные корпуса схем (undertile circuit shells). Они работают,
только если находятся под напольной плиткой, поддерживают USB-кабели и
используют энергию АПЦ вместо батарей. <!-- Undertile circuit shells.
They only work when placed under floor tiles, but support USB cables and
use APC power instead of cell power.
(www.github.com/tgstation/tgstation/pull/89122) -->
add: Настенные корпуса схем. Большие корпуса, поддерживающие USB-кабели
и использующие энергию АПЦ вместо батарей. <!-- Wallmounted circuit
shells. Large shells that support USB cables and use APC power instead
of cell power. (www.github.com/tgstation/tgstation/pull/89122) -->
add: Компонент "пучок проводов" (wire bundle component). Добавляет
количество проводов в схему пропорционально емкости корпуса, что
позволяет использовать сборки в логике схем. <!-- Wire bundle component.
Adds a number of wires to the circuit proportional to the capacity of
the shell, allowing you to use assemblies in circuit logic.
(www.github.com/tgstation/tgstation/pull/89122) -->
fix: Исправлена операция "диагностика двигателя" (Engine Diagnostic).
<!-- Fixed Engine Diagnostic surgery
(www.github.com/tgstation/tgstation/pull/89131) -->
refactor: Мимики (оживленные предметы, созданные с помощью bolt of
animation, malf ai Machine Override и так далее) теперь относятся к
basicmobs (будет более продвинутый ИИ у мобов). <!-- mimics (bolt of
animation, malf ai Machine Override, etc) are basicmobs
(www.github.com/tgstation/tgstation/pull/88910) -->
fix: Мимики в форме ящиков теперь можно открывать. <!-- crate mimics may
now be opened (www.github.com/tgstation/tgstation/pull/88910) -->
fix: Случайно запущенные администраторами грузовые капсулы Синдиката
больше не игнорируют команд администраторов іи не запускаются, если их
отменили. <!-- Admin fired stray syndicate cargo pods will not rebel
against admin whims and launch themselves when cancelled.
(www.github.com/tgstation/tgstation/pull/89047) -->
admin: Администраторам добавлены новые категории для наполнения капсул
Синдиката. <!-- Admins have new categories to fill syndicate cargo pods
with. (www.github.com/tgstation/tgstation/pull/89047) -->
fix: Исправлена неправильная утечка модератора HFR при трещинах деталей.
<!-- Fixes HFR moderator leaking not leaking properly when a part is
cracked. (www.github.com/tgstation/tgstation/pull/89095) -->
/:cl:

## Summary by Sourcery

Fry food by leaving it in hot places. Determine the contents of strange
geysers from their name. Prevent small mobs from triggering squeaking
objects. Update the sprites for standard and mirage grenades, and darken
the unholy water flask. Refactor wires and assemblies to add
directionality. Allow pressure plates to accept more devices. Add
undertile and wall-mounted circuit shells, and introduce a wire bundle
component for circuit logic. Fix engine diagnostic surgery, make mimics
basic mobs, and allow crate mimics to be opened. Prevent admin-fired
syndicate cargo pods from rebelling against admin commands. Add new
categories for admins to fill syndicate cargo pods. Fix HFR moderator
leaking improperly when a part is cracked.

New Features:
- Fry food by leaving it in hot places.
- Add undertile and wall-mounted circuit shells, and introduce a wire
bundle component for circuit logic.
- Admins have new categories to fill syndicate cargo pods.

Tests:
- Fix engine diagnostic surgery.
  • Loading branch information
Gaxeer authored Jan 20, 2025
2 parents 2cd71fd + ccfeda3 commit aa82cd0
Show file tree
Hide file tree
Showing 61 changed files with 1,026 additions and 541 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@
/obj/structure/railing/corner{
dir = 4
},
/mob/living/simple_animal/hostile/mimic/crate,
/mob/living/basic/mimic/crate,
/turf/open/floor/plating/snowed/icemoon,
/area/icemoon/underground/explored)
"fO" = (
Expand Down Expand Up @@ -2073,7 +2073,7 @@
/turf/open/floor/plating/snowed/smoothed/icemoon,
/area/icemoon/underground/explored)
"KV" = (
/mob/living/simple_animal/hostile/mimic/crate,
/mob/living/basic/mimic/crate,
/turf/open/floor/plating/snowed/icemoon,
/area/icemoon/underground/explored)
"KY" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/Birdshot/birdshot.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -26116,7 +26116,7 @@
/turf/open/floor/iron/smooth_large,
/area/station/science/robotics/mechbay)
"iPU" = (
/mob/living/simple_animal/hostile/mimic/crate,
/mob/living/basic/mimic/crate,
/turf/open/floor/plating,
/area/station/maintenance/fore/lesser)
"iPW" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/wawastation/wawastation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
/obj/effect/decal/cleanable/blood/old{
icon_state = "gib3-old"
},
/mob/living/simple_animal/hostile/mimic,
/mob/living/basic/mimic/crate,
/turf/open/floor/iron/white,
/area/station/maintenance/aft/upper)
"anu" = (
Expand Down
12 changes: 4 additions & 8 deletions _maps/virtual_domains/psyker_shuffle.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@
/turf/template_noop,
/area/template_noop)
"r" = (
/mob/living/simple_animal/hostile/mimic,
/turf/open/indestructible/dark,
/area/virtual_domain)
"s" = (
/mob/living/simple_animal/hostile/mimic/crate,
/mob/living/basic/mimic/crate,
/turf/open/indestructible/dark,
/area/virtual_domain)
"t" = (
Expand Down Expand Up @@ -767,7 +763,7 @@ Y
Q
Q
Q
s
r
M
Q
Q
Expand Down Expand Up @@ -878,11 +874,11 @@ o
Y
a
Q
s
r
Y
Y
Y
s
r
Q
Q
Q
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/ai/monsters.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,5 @@
#define BB_TURTLE_HEADBUTT_VICTIM "turtle_headbutt_victim"
///flore we must smell
#define BB_TURTLE_FLORA_TARGET "turtle_flora_target"

#define BB_GUNMIMIC_GUN_EMPTY "BB_GUNMIMIC_GUN_EMPTY"
16 changes: 13 additions & 3 deletions code/__DEFINES/dcs/signals/signals_object.dm
Original file line number Diff line number Diff line change
Expand Up @@ -558,19 +558,29 @@
#define COMSIG_ASSEMBLY_DETACHED "assembly_detached"

/*
* The following two signals are separate from the above two because buttons don't set the holder of the inserted assembly.
* The following four signals are separate from the above two because buttons and pressure plates don't set the holder of the inserted assembly.
* This causes subtle behavioral differences that future handlers for these signals may need to account for,
* even if none of the currently implemented handlers do.
*/

/// Sent from /obj/machinery/button/assembly_act(obj/machinery/button/button, mob/user)
/// Sent when an assembly is added to a button : (obj/machinery/button/button, mob/user)
#define COMSIG_ASSEMBLY_ADDED_TO_BUTTON "assembly_added_to_button"

/// Sent from /obj/machinery/button/remove_assembly(obj/machinery/button/button, mob/user)
/// Sent when an assembly is removed from a button : (obj/machinery/button/button, mob/user)
#define COMSIG_ASSEMBLY_REMOVED_FROM_BUTTON "assembly_removed_from_button"

/// Sent when an assembly is added to a pressure plate : (obj/item/pressureplate/pressure_plate, mob/user)
#define COMSIG_ASSEMBLY_ADDED_TO_PRESSURE_PLATE "assembly_added_to_pressure_plate"

/// Sent when an assembly is removed from a pressure plate : (obj/item/pressureplate/pressure_plate, mob/user)
#define COMSIG_ASSEMBLY_REMOVED_FROM_PRESSURE_PLATE "assembly_removed_from_pressure_playe"

/// Sent from /datum/powernet/add_cable()
#define COMSIG_CABLE_ADDED_TO_POWERNET "cable_added_to_powernet"

/// Sent from /datum/powernet/remove_cable()
#define COMSIG_CABLE_REMOVED_FROM_POWERNET "cable_removed_from_powernet"

/// Sent from /datum/wires/attach_assembly() : (atom/holder)
#define COMSIG_ASSEMBLY_PRE_ATTACH "assembly_pre_attach"
#define COMPONENT_CANCEL_ATTACH (1<<0)
3 changes: 3 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1424,4 +1424,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Mob doesn't get closed eyelids overlay when it gets knocked out cold or dies
#define TRAIT_NO_EYELIDS "no_eyelids"

/// Trait applied when the wire bundle component is added to an [/obj/item/integrated_circuit]
#define TRAIT_COMPONENT_WIRE_BUNDLE "component_wire_bundle"

// END TRAIT DEFINES
26 changes: 26 additions & 0 deletions code/__DEFINES/wires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@
#define COMSIG_CUT_WIRE(wire) "cut_wire [wire]"
#define COMSIG_MEND_WIRE(wire) "mend_wire [wire]"

/// from base of /datum/wires/proc/on_pulse : (wire, mob/user)
#define COMSIG_PULSE_WIRE "pulse_wire"

// Directionality of wire pulses

/// The wires interact with their holder when pulsed
#define WIRES_INPUT (1<<0)
/// The wires have a reason to toggle whether attached assemblies are armed
#define WIRES_TOGGLE_ARMED (1<<1)
/// The wires only want to activate assemblies that do something other than (dis)arming themselves
#define WIRES_FUNCTIONAL_OUTPUT (1<<2)
/// The holder can both pulse its wires and be affected by its wires getting pulsed
#define WIRES_ALL (WIRES_INPUT | WIRES_TOGGLE_ARMED | WIRES_FUNCTIONAL_OUTPUT)

/// The assembly can pulse a wire it is attached to
#define ASSEMBLY_INPUT (1<<0)
/// The assembly toggles whether it will pulse the attached wire when it is pulsed by the attached wire
#define ASSEMBLY_TOGGLE_ARMED (1<<1)
/// The assembly does something other than just (dis)arming itself when it is pulsed by the wire it is attached to
#define ASSEMBLY_FUNCTIONAL_OUTPUT (1<<2)
/// The assembly can both pulse the wire it is attached to, and (dis)arms itself when pulsed by the wire
#define ASSEMBLY_TOGGLEABLE_INPUT (ASSEMBLY_INPUT | ASSEMBLY_TOGGLE_ARMED)
#define ASSEMBLY_ALL (ASSEMBLY_TOGGLEABLE_INPUT | ASSEMBLY_FUNCTIONAL_OUTPUT)

//retvals for attempt_wires_interaction
#define WIRE_INTERACTION_FAIL 0
#define WIRE_INTERACTION_SUCCESSFUL 1
Expand Down Expand Up @@ -72,3 +96,5 @@
#define AI_WIRE_DISABLED 1
#define AI_WIRE_HACKED 2
#define AI_WIRE_DISABLED_HACKED -1

#define MAX_WIRE_COUNT 17
2 changes: 1 addition & 1 deletion code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ GLOBAL_LIST_INIT(abstract_mob_types, list(
/mob/living/simple_animal/hostile/asteroid/elite,
/mob/living/simple_animal/hostile/asteroid,
/mob/living/simple_animal/hostile/megafauna,
/mob/living/simple_animal/hostile/mimic, // Cannot exist if spawned without being passed an item reference
/mob/living/basic/mimic, // Cannot exist if spawned without being passed an item reference
/mob/living/simple_animal/hostile/retaliate,
/mob/living/simple_animal/hostile,
/mob/living/simple_animal/soulscythe, // As mimic, can't exist if spawned outside an item
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CIRCUIT_UI_OPEN" = TRAIT_CIRCUIT_UI_OPEN,
"TRAIT_CIRCUIT_UNDUPABLE" = TRAIT_CIRCUIT_UNDUPABLE,
"TRAIT_COMPONENT_MMI" = TRAIT_COMPONENT_MMI,
"TRAIT_COMPONENT_WIRE_BUNDLE" = TRAIT_COMPONENT_WIRE_BUNDLE,
),
/obj/item/modular_computer = list(
"TRAIT_MODPC_HALVED_DOWNLOAD_SPEED" = TRAIT_MODPC_HALVED_DOWNLOAD_SPEED,
Expand Down
80 changes: 71 additions & 9 deletions code/datums/components/grillable.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#define IDEAL_GRILLING_TEMPERATURE 200 + T0C

/datum/component/grillable
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS // So you can change grill results with various cookstuffs
///Result atom type of grilling this object
Expand All @@ -14,6 +16,12 @@
var/who_placed_us
/// Reagents that should be added to the result
var/list/added_reagents
/// Open turf we were last placed on, to check temperature
var/turf/open/listening_turf
/// Are we grilling right now?
var/is_grilling = FALSE
/// What's our current air temperature?
var/current_temperature = 0

/datum/component/grillable/Initialize(cook_result, required_cook_time, positive_result, use_large_steam_sprite, list/added_reagents)
. = ..()
Expand All @@ -32,14 +40,20 @@
RegisterSignal(parent, COMSIG_ITEM_GRILL_TURNED_OFF, PROC_REF(on_grill_turned_off))
RegisterSignal(parent, COMSIG_ITEM_GRILL_PROCESS, PROC_REF(on_grill))
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_location_changed))
on_location_changed(parent)

/datum/component/grillable/UnregisterFromParent()
if (listening_turf)
UnregisterSignal(listening_turf, COMSIG_TURF_EXPOSE)

UnregisterSignal(parent, list(
COMSIG_ATOM_EXAMINE,
COMSIG_ITEM_GRILL_TURNED_ON,
COMSIG_ITEM_GRILL_TURNED_OFF,
COMSIG_ITEM_GRILL_PROCESS,
COMSIG_ITEM_GRILL_PLACED,
COMSIG_MOVABLE_MOVED
))

// Inherit the new values passed to the component
Expand All @@ -55,26 +69,52 @@
if(use_large_steam_sprite)
src.use_large_steam_sprite = use_large_steam_sprite

/datum/component/grillable/Destroy(force)
. = ..()
STOP_PROCESSING(SSmachines, src)
listening_turf = null

/// Signal proc for [COMSIG_MOVABLE_MOVED], our location has changed and we should register for temperature information
/datum/component/grillable/proc/on_location_changed(atom/source)
SIGNAL_HANDLER

if (is_grilling)
on_grill_turned_off(source)
STOP_PROCESSING(SSmachines, src)

if (listening_turf)
UnregisterSignal(listening_turf, COMSIG_TURF_EXPOSE)

if (isnull(source))
return

var/turf/open/current_turf = source.loc
if (!isopenturf(current_turf))
return
listening_turf = current_turf
RegisterSignal(current_turf, COMSIG_TURF_EXPOSE, PROC_REF(on_turf_atmos_changed))
on_turf_atmos_changed(current_turf, current_turf.air, current_turf.air?.temperature || 0)

/// Signal proc for [COMSIG_ITEM_GRILL_PLACED], item is placed on the grill.
/datum/component/grillable/proc/on_grill_placed(datum/source, mob/griller)
SIGNAL_HANDLER

if(griller && griller.mind)
who_placed_us = REF(griller.mind)

RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_moved))

/// Signal proc for [COMSIG_ITEM_GRILL_TURNED_ON], starts the grilling process.
/datum/component/grillable/proc/on_grill_turned_on(datum/source)
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, PROC_REF(add_grilled_item_overlay))

is_grilling = TRUE
var/atom/atom_parent = parent
atom_parent.update_appearance()

/// Signal proc for [COMSIG_ITEM_GRILL_TURNED_OFF], stops the grilling process.
/datum/component/grillable/proc/on_grill_turned_off(datum/source)
UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS)

is_grilling = FALSE
var/atom/atom_parent = parent
atom_parent.update_appearance()

Expand Down Expand Up @@ -138,15 +178,37 @@
else
examine_list += span_danger("[parent] should probably not be put on the grill.")

///Ran when an object moves from the grill
/datum/component/grillable/proc/on_moved(atom/source, atom/OldLoc, Dir, Forced)
/datum/component/grillable/proc/add_grilled_item_overlay(datum/source, list/overlays)
SIGNAL_HANDLER

UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS)
UnregisterSignal(parent, COMSIG_MOVABLE_MOVED)
source.update_appearance()
overlays += mutable_appearance('icons/effects/steam.dmi', "[use_large_steam_sprite ? "steam_triple" : "steam_single"]", ABOVE_OBJ_LAYER)

/datum/component/grillable/proc/add_grilled_item_overlay(datum/source, list/overlays)
/// Signal proc for [COMSIG_TURF_EXPOSE], atmosphere might be hot enough for grilling.
/datum/component/grillable/proc/on_turf_atmos_changed(turf/open/source, datum/gas_mixture/air, exposed_temperature)
SIGNAL_HANDLER

overlays += mutable_appearance('icons/effects/steam.dmi', "[use_large_steam_sprite ? "steam_triple" : "steam_single"]", ABOVE_OBJ_LAYER)
if (!is_grilling)
if (exposed_temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
return
on_grill_turned_on(source)
START_PROCESSING(SSmachines, src)
current_temperature = exposed_temperature
else
if (exposed_temperature >= FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
current_temperature = exposed_temperature
return
on_grill_turned_off(source)
STOP_PROCESSING(SSmachines, src)

// Grill while exposed to hot air
/datum/component/grillable/process(seconds_per_tick)
var/atom/atom_parent = parent

// Grill faster as we approach 200 degrees celsius
var/check_temperature = clamp(current_temperature, FIRE_MINIMUM_TEMPERATURE_TO_EXIST, IDEAL_GRILLING_TEMPERATURE)
var/temp_scale = (check_temperature - FIRE_MINIMUM_TEMPERATURE_TO_EXIST) / (IDEAL_GRILLING_TEMPERATURE - FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
var/speed_modifier = LERP(0.5, 1, temp_scale)

on_grill(parent, atom_parent.loc, seconds_per_tick * speed_modifier)

#undef IDEAL_GRILLING_TEMPERATURE
12 changes: 8 additions & 4 deletions code/datums/components/squeak.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
var/step_delay = 1

// This is to stop squeak spam from inhand usage
var/last_use = 0
var/use_delay = 20
COOLDOWN_DECLARE(spam_cooldown)
var/use_delay = 2 SECONDS

///extra-range for this component's sound
var/sound_extra_range = -1
Expand Down Expand Up @@ -102,15 +102,19 @@
return
if(ismob(arrived) && !arrived.density) // Prevents 10 overlapping mice from making an unholy sound while moving
return
if(isliving(arrived))
var/mob/living/living_arrived = arrived
if(living_arrived.mob_size < MOB_SIZE_HUMAN)
return
var/atom/current_parent = parent
if(isturf(current_parent?.loc))
play_squeak()

/datum/component/squeak/proc/use_squeak()
SIGNAL_HANDLER

if(last_use + use_delay < world.time)
last_use = world.time
if(COOLDOWN_FINISHED(src, spam_cooldown))
COOLDOWN_START(src, spam_cooldown, use_delay)
play_squeak()

/datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot)
Expand Down
Loading

0 comments on commit aa82cd0

Please sign in to comment.