Skip to content

Commit

Permalink
Merge upstream 03.12.24 (#838)
Browse files Browse the repository at this point in the history
## About The Pull Request
мерге
  • Loading branch information
larentoun authored Dec 3, 2024
2 parents aad92ba + afa6935 commit e215418
Show file tree
Hide file tree
Showing 33 changed files with 199 additions and 141 deletions.
2 changes: 1 addition & 1 deletion code/__HELPERS/logging/attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@

GLOB.bombers += bomb_message
var/area/bomb_area = get_area(bomb)
if(message_admins && !(bomb_area.area_flags & QUIET_LOGS)) // Don't spam the logs with deathmatch bombs
if(message_admins && !(bomb_area?.area_flags & QUIET_LOGS)) // Don't spam the logs with deathmatch bombs
message_admins("[user ? "[ADMIN_LOOKUPFLW(user)] at [ADMIN_VERBOSEJMP(user)] " : ""][details][bomb ? " [bomb.name] at [ADMIN_VERBOSEJMP(bomb)]": ""][additional_details ? " [additional_details]" : ""].")
4 changes: 2 additions & 2 deletions code/datums/components/parry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@

parried = TRUE
if (source.firer != user)
if (abs(source.angle - dir2angle(user)) < 15)
if (abs(source.angle - dir2angle(user.dir)) < 15)
source.set_angle((source.angle + 180) % 360 + rand(-3, 3))
else
source.set_angle(dir2angle(user) + rand(-3, 3))
source.set_angle(dir2angle(user.dir) + rand(-3, 3))
user.visible_message(span_warning("[user] expertly parries [source] with [user.p_their()] bare hand!"), span_warning("You parry [source] with your hand!"))
else
user.visible_message(span_warning("[user] boosts [source] with [user.p_their()] bare hand!"), span_warning("You boost [source] with your hand!"))
Expand Down
2 changes: 1 addition & 1 deletion code/datums/quirks/negative_quirks/addict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
gain_text = span_danger("You suddenly feel the craving for... something? You're not sure what it is.")
medical_record_text = "Patient has a history with SOMETHING but he refuses to tell us what it is."
abstract_parent_type = /datum/quirk/item_quirk/addict
quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_PROCESSES
var/datum/reagent/reagent_type //!If this is defined, reagent_id will be unused and the defined reagent type will be instead.
var/datum/reagent/reagent_instance //! actual instanced version of the reagent
var/where_drug //! Where the drug spawned
Expand Down Expand Up @@ -86,7 +87,6 @@
gain_text = span_danger("You suddenly feel the craving for drugs.")
medical_record_text = "Patient has a history of hard drugs."
hardcore_value = 4
quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_PROCESSES
mail_goodies = list(/obj/effect/spawner/random/contraband/narcotics)
drug_flavour_text = "Better hope you don't run out..."

Expand Down
7 changes: 3 additions & 4 deletions code/datums/status_effects/debuffs/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
/datum/status_effect/incapacitating/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
duration = set_duration
return ..()

/datum/status_effect/incapacitating/on_apply()
. = ..()
if(!.)
return
if(needs_update_stat || issilicon(owner))
owner.update_stat()
return TRUE

/datum/status_effect/incapacitating/on_remove()
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
Expand Down
7 changes: 3 additions & 4 deletions code/game/objects/items/devices/broadcast_camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@
/obj/item/broadcast_camera/Destroy(force)
QDEL_NULL(internal_radio)
QDEL_NULL(internal_camera)

return ..()

/obj/item/broadcast_camera/update_icon_state()
icon_state = "[base_icon_state]0"
icon_state = "[base_icon_state][active]"
return ..()

/obj/item/broadcast_camera/attack_self(mob/user, modifiers)
Expand Down Expand Up @@ -80,7 +79,7 @@
if(!iscarbon(loc))
return
active = TRUE
icon_state = "[base_icon_state][active]"
update_icon_state()
/// The carbon who wielded the camera, allegedly
var/mob/living/carbon/wielding_carbon = loc

Expand All @@ -103,7 +102,7 @@
/// When deactivating the camera
/obj/item/broadcast_camera/proc/on_deactivating()
active = FALSE
icon_state = "[base_icon_state][active]"
update_icon_state()
QDEL_NULL(internal_camera)
QDEL_NULL(internal_radio)

Expand Down
30 changes: 17 additions & 13 deletions code/game/objects/structures/plaques/static_plaques.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@

//Current stations

// Birdshot: added Apr 29, 2023 (#74371)
/obj/structure/plaque/static_plaque/golden/commission/birdshot
desc = "Spinward Sector Station SS-13\n'Birdshot' Class Outpost\nCommissioned 29/04/2563\n'Shooting for the Stars'"

// Deltastation: added Dec 17, 2016 (#22066)
/obj/structure/plaque/static_plaque/golden/commission/delta
desc = "Spinward Sector Station SS-13\n'Delta' Class Outpost\nCommissioned 17/12/2556\n'Efficiency Through Redundancy'"

// Icebox Station: added May 13, 2020 (#51090)
/obj/structure/plaque/static_plaque/golden/commission/icebox
desc = "Spinward Sector Station SS-13\n'Box' Class Outpost (Revision 2.2: 'Icebox')\nCommissioned 13/05/2560\n'Cold Reliable'"
Expand All @@ -123,25 +131,17 @@
/obj/structure/plaque/static_plaque/golden/commission/meta
desc = "Spinward Sector Station SS-13\n'Meta' Class Outpost\nCommissioned 11/03/2553\n'Theseus' Station'"

// Deltastation: added Dec 17, 2016 (#22066)
/obj/structure/plaque/static_plaque/golden/commission/delta
desc = "Spinward Sector Station SS-13\n'Delta' Class Outpost\nCommissioned 17/12/2556\n'Efficiency Through Redundancy'"
// Nebulastation: added Nov 6, 2024 (#84826)
/obj/structure/plaque/static_plaque/golden/commission/nebula
desc = "Spinward Sector Station SS-13\n'Nebula' Class Outpost\nCommissioned 06/11/2564\n'The New Future'"

// Tramstation: added Mar 11, 2021 (#56509)
/obj/structure/plaque/static_plaque/golden/commission/tram
desc = "Spinward Sector Station SS-13\n'Tram' Class Outpost\nCommissioned 11/03/2561\n'Making Moves'"

// Wawastation: added add date here
// Wawastation: added Jun 4, 2024 (#82298)
/obj/structure/plaque/static_plaque/golden/commission/wawa
desc = "Spinward Sector Station SS-13\n'Wawa' Class Outpost\nCommissioned 11/03/add here\n'Forever Vertical'"

// North Star: added Apr 13, 2023 (#74371)
/obj/structure/plaque/static_plaque/golden/commission/northstar
desc = "Spinward Sector Ship SS-13\n'North Star' Class Vessel\nCommissioned 13/04/2563\n'New Opportunities'"

// Birdshot: added Apr 29, 2023 (#74371)
/obj/structure/plaque/static_plaque/golden/commission/birdshot
desc = "Spinward Sector Station SS-13\n'Birdshot' Class Outpost\nCommissioned 29/04/2563\n'Shooting for the Stars'"
desc = "Spinward Sector Station SS-13\n'Wawa' Class Outpost\nCommissioned 04/06/2564\n'Forever Vertical'"

//Removed stations

Expand Down Expand Up @@ -189,6 +189,10 @@
/obj/structure/plaque/static_plaque/golden/commission/mini
desc = "Spinward Sector Station SS-08\n'Mini' Class Outpost\nCommissioned 29/01/2554\nDecommissioned 27/12/2556\n'The Littlest Station'"

// North Star: added Apr 13, 2023 (#74371), removed Nov 25, 2024 (#87937)- 1 year, 7 months, 12 days
/obj/structure/plaque/static_plaque/golden/commission/northstar
desc = "Spinward Sector Ship SS-13\n'North Star' Class Vessel\nCommissioned 13/04/2563\nDecommissioned 25/11/2564\n'New Opportunities'"

// Omegastation: added Dec 27, 2016 (#22453), removed Sep 20, 2018 (#40352)- 1 year, 8 months, 24 days
/obj/structure/plaque/static_plaque/golden/commission/omega
desc = "Spinward Sector Station SS-09\n'Omega' Class Outpost\nCommissioned 27/12/2556\nDecommissioned 20/09/2558\n'Tiny Take Two'"
Expand Down
12 changes: 8 additions & 4 deletions code/modules/atmospherics/machinery/air_alarm/_air_alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
/// Current alert level of our air alarm.
/// [AIR_ALARM_ALERT_NONE], [AIR_ALARM_ALERT_MINOR], [AIR_ALARM_ALERT_SEVERE]
var/danger_level = AIR_ALARM_ALERT_NONE
/// Current alert level of the area of our air alarm.
var/area_danger = FALSE

/// Currently selected mode of the alarm. An instance of [/datum/air_alarm_mode].
var/datum/air_alarm_mode/selected_mode
Expand Down Expand Up @@ -247,7 +249,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
data["siliconUser"] = HAS_SILICON_ACCESS(user)
data["emagged"] = (obj_flags & EMAGGED ? 1 : 0)
data["dangerLevel"] = danger_level
data["atmosAlarm"] = !!my_area.active_alarms[ALARM_ATMOS]
data["atmosAlarm"] = !!area_danger
data["fireAlarm"] = my_area.fire
data["faultStatus"] = my_area.fault_status
data["faultLocation"] = my_area.fault_location
Expand Down Expand Up @@ -525,7 +527,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
var/color
if(danger_level == AIR_ALARM_ALERT_HAZARD)
color = "#FF0022" // red
else if(danger_level == AIR_ALARM_ALERT_WARNING || my_area.active_alarms[ALARM_ATMOS])
else if(danger_level == AIR_ALARM_ALERT_WARNING || area_danger)
color = "#FFAA00" // yellow
else
color = "#00FFCC" // teal
Expand Down Expand Up @@ -555,7 +557,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
var/state
if(danger_level == AIR_ALARM_ALERT_HAZARD)
state = "alarm1"
else if(danger_level == AIR_ALARM_ALERT_WARNING || my_area.active_alarms[ALARM_ATMOS])
else if(danger_level == AIR_ALARM_ALERT_WARNING || area_danger)
state = "alarm2"
else
state = "alarm0"
Expand All @@ -575,6 +577,8 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)

var/old_danger = danger_level
danger_level = AIR_ALARM_ALERT_NONE
var/old_area_danger = area_danger
area_danger = my_area.active_alarms[ALARM_ATMOS]

var/total_moles = environment.total_moles()
var/pressure = environment.return_pressure()
Expand Down Expand Up @@ -626,7 +630,7 @@ GLOBAL_LIST_EMPTY_TYPED(air_alarms, /obj/machinery/airalarm)
alarm_manager.clear_alarm(ALARM_ATMOS)
warning_message = null

if(old_danger != danger_level)
if(old_danger != danger_level || old_area_danger != area_danger)
update_appearance()

selected_mode.replace(my_area, pressure)
Expand Down
10 changes: 7 additions & 3 deletions code/modules/escape_menu/leave_body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
stack_trace("The leave body menu was opened before the atoms SS. This shouldn't be possible, as the leave body menu should only be accessible when you have a body.")

page_holder.give_screen_object(new /atom/movable/screen/escape_menu/leave_body_button(
src,
null,
/* hud_owner = */ null,
"Suicide",
"Perform a dramatic suicide in game",
/* pixel_offset = */ -105,
Expand All @@ -19,7 +20,8 @@

page_holder.give_screen_object(
new /atom/movable/screen/escape_menu/leave_body_button(
src,
null,
/* hud_owner = */ null,
"Ghost",
"Exit quietly, leaving your body",
/* pixel_offset = */ 0,
Expand All @@ -30,7 +32,8 @@

page_holder.give_screen_object(
new /atom/movable/screen/escape_menu/leave_body_button(
src,
null,
/* hud_owner = */ null,
"Back",
/* tooltip_text = */ null,
/* pixel_offset = */ 105,
Expand Down Expand Up @@ -84,6 +87,7 @@

/atom/movable/screen/escape_menu/leave_body_button/Initialize(
mapload,
datum/hud/hud_owner,
button_text,
tooltip_text,
pixel_offset,
Expand Down
38 changes: 19 additions & 19 deletions code/modules/mapfluff/ruins/spaceruin_code/hilbertshotel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -525,25 +525,25 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
worn_icon_state = "analyzer"

/obj/item/analyzer/hilbertsanalyzer/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
if(istype(interacting_with, /obj/item/hilbertshotel))
if(!Adjacent(interacting_with))
to_chat(user, span_warning("It's to far away to scan!"))
return ITEM_INTERACT_BLOCKING
var/obj/item/hilbertshotel/sphere = interacting_with
if(sphere.activeRooms.len)
to_chat(user, "Currently Occupied Rooms:")
for(var/roomnumber in sphere.activeRooms)
to_chat(user, roomnumber)
else
to_chat(user, "No currenty occupied rooms.")
if(sphere.storedRooms.len)
to_chat(user, "Vacated Rooms:")
for(var/roomnumber in sphere.storedRooms)
to_chat(user, roomnumber)
else
to_chat(user, "No vacated rooms.")
return ITEM_INTERACT_SUCCESS
return ..()
if(!istype(interacting_with, /obj/item/hilbertshotel))
return ..()
if(!user.CanReach(interacting_with))
to_chat(user, span_warning("It's to far away to scan!"))
return ITEM_INTERACT_BLOCKING
var/obj/item/hilbertshotel/sphere = interacting_with
if(sphere.activeRooms.len)
to_chat(user, "Currently Occupied Rooms:")
for(var/roomnumber in sphere.activeRooms)
to_chat(user, roomnumber)
else
to_chat(user, "No currenty occupied rooms.")
if(sphere.storedRooms.len)
to_chat(user, "Vacated Rooms:")
for(var/roomnumber in sphere.storedRooms)
to_chat(user, roomnumber)
else
to_chat(user, "No vacated rooms.")
return ITEM_INTERACT_SUCCESS

/obj/effect/landmark/transport/transport_id/hilbert
specific_transport_id = HILBERT_LINE_1
Expand Down
33 changes: 15 additions & 18 deletions code/modules/mob/living/carbon/emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,31 +87,28 @@
key = "meow"
key_third_person = "meows"
vary = TRUE
sound = SFX_CAT_MEOW
message = "meows!"
message_mime = "meows silently."
emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE

/datum/emote/living/carbon/meow/run_emote(mob/user, params, type_override, intentional)
. = ..()
if(istype(user.get_organ_slot(ORGAN_SLOT_TONGUE), /obj/item/organ/tongue/cat))
sound = SFX_CAT_MEOW
message = "meows!"
emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE
else
to_chat(user, span_warning("You can't quite make the sound."))
return
/datum/emote/living/carbon/meow/can_run_emote(mob/living/carbon/user, status_check = TRUE , intentional, params)
if(!iscarbon(user) || (!istype(user.get_organ_slot(ORGAN_SLOT_TONGUE), /obj/item/organ/tongue/cat)))
return FALSE
return ..()

/datum/emote/living/carbon/purr
key = "purr"
key_third_person = "purrs"
vary = TRUE
sound = SFX_CAT_PURR
message = "purrs."
emote_type = EMOTE_AUDIBLE

/datum/emote/living/carbon/purr/run_emote(mob/user, params, type_override, intentional)
. = ..()
if(istype(user.get_organ_slot(ORGAN_SLOT_TONGUE), /obj/item/organ/tongue/cat))
sound = SFX_CAT_PURR
message = "purrs."
emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE
else
to_chat(user, span_warning("You can't quite make the sound."))
return
/datum/emote/living/carbon/purr/can_run_emote(mob/living/carbon/user, status_check = TRUE , intentional, params)
if(!iscarbon(user) || (!istype(user.get_organ_slot(ORGAN_SLOT_TONGUE), /obj/item/organ/tongue/cat)) || HAS_MIND_TRAIT(user, TRAIT_MIMING))
return FALSE
return ..()

/datum/emote/living/carbon/moan
key = "moan"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
cut_overlays()
SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays)
icon_state = model.cyborg_base_icon
if(stat != DEAD && !(HAS_TRAIT(src, TRAIT_KNOCKEDOUT) || IsStun() || IsParalyzed() || low_power_mode)) //Not dead, not stunned.
if(stat < UNCONSCIOUS && !HAS_TRAIT(src, TRAIT_KNOCKEDOUT) && !IsStun() && !IsParalyzed() && !low_power_mode) //Not dead, not stunned.
if(!eye_lights)
eye_lights = new()
if(lamp_enabled || lamp_doom)
Expand Down
32 changes: 25 additions & 7 deletions code/modules/mod/modules/modules_antag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,16 @@

/obj/item/mod/module/stealth/wraith
name = "MOD Wraith Cloaking Module"
desc = "A more destructive adaptation of the stealth module."
desc = "A more destructive adaptation of the stealth module. Incompatible with armor modules"
icon_state = "cloak_traitor"
stealth_alpha = 30
module_type = MODULE_ACTIVE
cooldown_time = 2 SECONDS
incompatible_modules = list(/obj/item/mod/module/stealth, /obj/item/mod/module/armor_booster)
/// How much time before we are able to cloak again after the cloak is broken (not disabled)
COOLDOWN_DECLARE(recloak_timer)
/// If the stealth portion of the module is active
var/stealth_active = FALSE

/obj/item/mod/module/stealth/wraith/on_select_use(atom/target)
. = ..()
Expand All @@ -592,28 +597,41 @@
if(disrupted.on_saboteur(src, 1 MINUTES))
mod.add_charge(DEFAULT_CHARGE_DRAIN * 250)

/obj/item/mod/module/stealth/wraith/on_activation()
return // Don't activate stealth when the module is activated because the stealth portion of the module is fully passive

/obj/item/mod/module/stealth/wraith/on_deactivation(display_message = TRUE, deleting = FALSE)
. = ..()
UnregisterSignal(mod.wearer, list(COMSIG_LIVING_MOB_BUMP, COMSIG_ATOM_BUMPED, COMSIG_MOB_FIRED_GUN))

/obj/item/mod/module/stealth/wraith/on_part_activation()
start_stealth()

/obj/item/mod/module/stealth/wraith/on_part_deactivation(deleting)
if(bumpoff)
UnregisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP)
UnregisterSignal(mod.wearer, list(COMSIG_LIVING_UNARMED_ATTACK, COMSIG_MOB_ITEM_ATTACK, COMSIG_ATOM_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_BULLET_ACT, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED))
UnregisterSignal(mod.wearer, list(COMSIG_LIVING_UNARMED_ATTACK, COMSIG_MOB_ITEM_ATTACK, COMSIG_ATOM_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_BULLET_ACT, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED, COMSIG_LIVING_MOB_BUMP, COMSIG_ATOM_BUMPED, COMSIG_MOB_FIRED_GUN))
animate(mod.wearer, alpha = 255, time = 1.5 SECONDS)
stealth_active = FALSE

/obj/item/mod/module/stealth/wraith/proc/start_stealth()
if(bumpoff)
RegisterSignal(mod.wearer, COMSIG_LIVING_MOB_BUMP, PROC_REF(unstealth))
if(!COOLDOWN_FINISHED(src, recloak_timer)) // Prevents being able to bypass the cooldown by disabling and re-enabling the module
addtimer(CALLBACK(src, PROC_REF(start_stealth)), recloak_timer)
return
RegisterSignals(mod.wearer, list(COMSIG_LIVING_MOB_BUMP, COMSIG_ATOM_BUMPED, COMSIG_MOB_FIRED_GUN), PROC_REF(unstealth))
RegisterSignal(mod.wearer, COMSIG_LIVING_UNARMED_ATTACK, PROC_REF(on_unarmed_attack))
RegisterSignal(mod.wearer, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act))
RegisterSignals(mod.wearer, list(COMSIG_MOB_ITEM_ATTACK, COMSIG_ATOM_ATTACKBY, COMSIG_ATOM_ATTACK_HAND, COMSIG_ATOM_HITBY, COMSIG_ATOM_HULK_ATTACK, COMSIG_ATOM_ATTACK_PAW, COMSIG_CARBON_CUFF_ATTEMPTED), PROC_REF(unstealth))
animate(mod.wearer, alpha = stealth_alpha, time = 1.5 SECONDS)
drain_power(use_energy_cost)
stealth_active = TRUE

/obj/item/mod/module/stealth/wraith/unstealth(datum/source)
if(!stealth_active)
return
. = ..()
if(mod.active)
addtimer(CALLBACK(src, PROC_REF(start_stealth)), 5 SECONDS)
COOLDOWN_START(src, recloak_timer, 20 SECONDS)
addtimer(CALLBACK(src, PROC_REF(start_stealth)), 20 SECONDS)
stealth_active = FALSE

/obj/item/mod/module/stealth/wraith/examine_more(mob/user)
. = ..()
Expand Down
Loading

0 comments on commit e215418

Please sign in to comment.