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 20.01.2025 #1028

Merged
merged 24 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
04a6723
Grillable foods grill in hot air (#88914)
Jacquerel Jan 18, 2025
63f4281
Automatic changelog for PR #88914 [ci skip]
tgstation-ci[bot] Jan 18, 2025
4f14df1
Redo of the Geyser Code: Second Attempt (#89111)
Chowder-McArthor Jan 18, 2025
d1e3444
Automatic changelog for PR #89111 [ci skip]
tgstation-ci[bot] Jan 18, 2025
8c721d1
Small and tiny mobs no longer trigger the squeak component (#89100)
Absolucy Jan 18, 2025
1f270ee
Automatic changelog for PR #89100 [ci skip]
tgstation-ci[bot] Jan 18, 2025
ed54b22
Automatic changelog compile [ci skip]
tgstation-ci[bot] Jan 19, 2025
85f1199
Resprites default and mirage grenades (#89118)
SmArtKar Jan 19, 2025
e1c8779
Touches up the unholy water flask (#89117)
SmArtKar Jan 19, 2025
d28db31
Automatic changelog for PR #89118 [ci skip]
tgstation-ci[bot] Jan 19, 2025
622f8de
Automatic changelog for PR #89117 [ci skip]
tgstation-ci[bot] Jan 19, 2025
90b67b0
A Small Circuit Expansion: Wallmounts, Undertiles, and Wire Bundles (…
Y0SH1M4S73R Jan 19, 2025
ff5a9ec
Automatic changelog for PR #89122 [ci skip]
tgstation-ci[bot] Jan 19, 2025
3986b5d
Fixes Engine Diagnostic surgery (#89131)
RengaN02 Jan 19, 2025
60a56f7
Automatic changelog for PR #89131 [ci skip]
tgstation-ci[bot] Jan 19, 2025
cbc7437
Removes the from from from from (#89127)
vinylspiders Jan 19, 2025
4b512f1
makes mimics into basicmobs (#88910)
mc-oofert Jan 19, 2025
192b698
Automatic changelog for PR #88910 [ci skip]
tgstation-ci[bot] Jan 19, 2025
2d156a0
Cancelling stray admin configured syndicate cargo-pods actually works…
NamelessFairy Jan 20, 2025
1ad83be
Automatic changelog compile [ci skip]
tgstation-ci[bot] Jan 20, 2025
1bf9e41
Automatic changelog for PR #89047 [ci skip]
tgstation-ci[bot] Jan 20, 2025
059d17a
Fixes HFR moderator overflow runtime. (#89095)
Pickle-Coding Jan 20, 2025
66858d8
Automatic changelog for PR #89095 [ci skip]
tgstation-ci[bot] Jan 20, 2025
ccfeda3
Merge branch 'master' into merge-upstream
m-dzianishchyts Jan 20, 2025
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
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
Loading