Skip to content

Commit

Permalink
Merge upstream 06.12.24 (#848)
Browse files Browse the repository at this point in the history
## About The Pull Request
мерге
  • Loading branch information
larentoun authored Dec 6, 2024
2 parents 18a51f9 + 34e43ad commit ef05602
Show file tree
Hide file tree
Showing 53 changed files with 2,059 additions and 1,998 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
touch dmdoc/.nojekyll
echo codedocs.tgstation13.org > dmdoc/CNAME
- name: Deploy
uses: JamesIves/[email protected].1
uses: JamesIves/[email protected].2
with:
branch: gh-pages
clean: true
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
#define MODE_VOCALCORDS "cords"
#define MODE_KEY_VOCALCORDS "x"

/// Automatically playing a set of lines
#define MODE_SEQUENTIAL "sequential"

#define MODE_MAFIA "mafia"

/// Applies singing characters to the message
Expand Down
10 changes: 10 additions & 0 deletions code/__DEFINES/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#define ENGINE_COEFF_MIN 0.5
#define ENGINE_COEFF_MAX 2
#define ENGINE_DEFAULT_MAXSPEED_ENGINES 5
#define ENGINE_START_TIME 100

// Alert level related
#define ALERT_COEFF_AUTOEVAC_NORMAL 2.5
Expand Down Expand Up @@ -120,3 +121,12 @@
#define SHUTTLE_EVENT_MISS_SHUTTLE 1 << 0
///spawned stuff should hit the shuttle
#define SHUTTLE_EVENT_HIT_SHUTTLE 1 << 1

// Hijack stages

#define HIJACK_NOT_BEGUN 0
#define HIJACK_STAGE_1 1
#define HIJACK_STAGE_2 2
#define HIJACK_STAGE_3 3
#define HIJACK_STAGE_4 4
#define HIJACK_COMPLETED 5
52 changes: 52 additions & 0 deletions code/__HELPERS/shuttle.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/// Helper proc that tests to ensure all whiteship templates can spawn at their docking port, and logs their sizes
/// This should be a unit test, but too much of our other code breaks during shuttle movement, so not yet, not yet.
/proc/test_whiteship_sizes()
var/obj/docking_port/stationary/port_type = /obj/docking_port/stationary/picked/whiteship
var/datum/turf_reservation/docking_yard = SSmapping.request_turf_block_reservation(
initial(port_type.width),
initial(port_type.height),
1,
)
var/turf/bottom_left = docking_yard.bottom_left_turfs[1]
var/turf/spawnpoint = locate(
bottom_left.x + initial(port_type.dwidth),
bottom_left.y + initial(port_type.dheight),
bottom_left.z,
)

var/obj/docking_port/stationary/picked/whiteship/port = new(spawnpoint)
var/list/ids = port.shuttlekeys
var/height = 0
var/width = 0
var/dheight = 0
var/dwidth = 0
var/delta_height = 0
var/delta_width = 0
for(var/id in ids)
var/datum/map_template/shuttle/our_template = SSmapping.shuttle_templates[id]
// We do a standard load here so any errors will properly runtimes
var/obj/docking_port/mobile/ship = SSshuttle.action_load(our_template, port)
if(ship)
ship.jumpToNullSpace()
ship = null
// Yes this is very hacky, but we need to both allow loading a template that's too big to be an error state
// And actually get the sizing information from every shuttle
SSshuttle.load_template(our_template)
var/obj/docking_port/mobile/theoretical_ship = SSshuttle.preview_shuttle
if(theoretical_ship)
height = max(theoretical_ship.height, height)
width = max(theoretical_ship.width, width)
dheight = max(theoretical_ship.dheight, dheight)
dwidth = max(theoretical_ship.dwidth, dwidth)
delta_height = max(theoretical_ship.height - theoretical_ship.dheight, delta_height)
delta_width = max(theoretical_ship.width - theoretical_ship.dwidth, delta_width)
theoretical_ship.jumpToNullSpace()
qdel(port, TRUE)
log_world("Whiteship sizing information. Use this to set the docking port, and the map size\n\
Max Height: [height] \n\
Max Width: [width] \n\
Max DHeight: [dheight] \n\
Max DWidth: [dwidth] \n\
The following are the safest bet for map sizing. Anything smaller then this could in the worst case not fit in the docking port\n\
Max Combined Width: [height + dheight] \n\
Max Combinded Height [width + dwidth]")
4 changes: 2 additions & 2 deletions code/game/objects/items/devices/radio/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@
if(isliving(talking_movable))
var/mob/living/talking_living = talking_movable
var/volume_modifier = (talking_living.client?.prefs.read_preference(/datum/preference/numeric/sound_radio_noise))
if(radio_noise && talking_living.can_hear() && volume_modifier && signal.frequency != FREQ_COMMON)
var/sound/radio_noise = sound(sound('sound/items/radio/radio_talk.ogg', volume = volume_modifier))
if(radio_noise && talking_living.can_hear() && volume_modifier && signal.frequency != FREQ_COMMON && !LAZYACCESS(message_mods, MODE_SEQUENTIAL))
var/sound/radio_noise = sound('sound/items/radio/radio_talk.ogg', volume = volume_modifier)
radio_noise.frequency = get_rand_frequency_low_range()
SEND_SOUND(talking_living, radio_noise)

Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/devices/taperecorder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@
balloon_alert(usr, "recording ended")
stoplag(1 SECONDS) //prevents multiple balloon alerts covering each other
break
say("[mytape.storedinfo[i]]", sanitize=FALSE)//We want to display this properly, don't double encode
say("[mytape.storedinfo[i]]", sanitize=FALSE, message_mods = list(MODE_SEQUENTIAL = TRUE))//We want to display this properly, don't double encode
if(mytape.storedinfo.len < i + 1)
playsleepseconds = 1
sleep(1 SECONDS)
else
playsleepseconds = mytape.timestamp[i + 1] - mytape.timestamp[i]
if(playsleepseconds > 14 SECONDS)
sleep(1 SECONDS)
say("Skipping [playsleepseconds/10] seconds of silence.")
say("Skipping [playsleepseconds/10] seconds of silence.", message_mods = list(MODE_SEQUENTIAL = TRUE))
playsleepseconds = 1 SECONDS
i++

Expand Down
35 changes: 35 additions & 0 deletions code/game/objects/items/inducer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@
/obj/item/inducer/examine(mob/living/user)
. = ..()

. += examine_hints(user)

/**
* Gives description for this inducer
* Arguments
*
* * mob/living/user - the mob we are returning the description to
*/
/obj/item/inducer/proc/examine_hints(mob/living/user)
PROTECTED_PROC(TRUE)
SHOULD_BE_PURE(TRUE)

. = list()

var/obj/item/stock_parts/power_store/our_cell = get_cell(src, user)
if(!QDELETED(our_cell))
. += span_notice("Its display shows: [display_energy(our_cell.charge)].")
Expand Down Expand Up @@ -231,3 +245,24 @@
desc = "A tool for inductively charging internal power cells. This one has a suspicious colour scheme, and seems to be rigged to transfer charge at a much faster rate."
power_transfer_multiplier = 2 // 2x the base speed
powerdevice = /obj/item/stock_parts/power_store/battery/super

/obj/item/inducer/cyborg
name = "internal inducer"
icon = 'icons/obj/tools.dmi'
icon_state = "inducer-engi"
powerdevice = null

/obj/item/inducer/cyborg/add_context(atom/source, list/context, obj/item/held_item, mob/user)
return NONE

/obj/item/inducer/cyborg/examine_hints(mob/living/user)
return list()

/obj/item/inducer/cyborg/get_cell(atom/movable/interface, mob/living/silicon/robot/silicon_friend)
return istype(silicon_friend) ? silicon_friend.cell : null

/obj/item/inducer/cyborg/screwdriver_act(mob/living/user, obj/item/tool)
return ITEM_INTERACT_FAILURE

/obj/item/inducer/cyborg/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
return ITEM_INTERACT_FAILURE
19 changes: 0 additions & 19 deletions code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -647,27 +647,8 @@
require_model = TRUE
model_type = list(/obj/item/robot_model/engineering, /obj/item/robot_model/saboteur)
model_flags = BORG_MODEL_ENGINEERING

items_to_add = list(/obj/item/inducer/cyborg)

/obj/item/inducer/cyborg
name = "Internal inducer"
icon = 'icons/obj/tools.dmi'
icon_state = "inducer-engi"
powerdevice = null

/obj/item/inducer/cyborg/get_cell()
var/obj/item/robot_model/possible_model = loc
var/mob/living/silicon/robot/silicon_friend = istype(possible_model) ? possible_model.robot : possible_model
if(istype(silicon_friend))
. = silicon_friend.cell

/obj/item/inducer/cyborg/screwdriver_act(mob/living/user, obj/item/tool)
return NONE

/obj/item/inducer/cyborg/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
return ITEM_INTERACT_FAILURE

/obj/item/borg/upgrade/pinpointer
name = "medical cyborg crew pinpointer"
desc = "A crew pinpointer module for the medical cyborg. Permits remote access to the crew monitor."
Expand Down
1 change: 1 addition & 0 deletions code/modules/lost_crew/recovered_crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
show_to_ghosts = FALSE
silent = TRUE
block_midrounds = FALSE
show_in_roundend = FALSE
1 change: 0 additions & 1 deletion code/modules/mapfluff/ruins/spaceruin_code/meateor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
/datum/reagent/medicine/c2/penthrite = 5,
/datum/reagent/consumable/vinegar = 5,
)
drink_type = NONE
age_restricted = FALSE

/// Abstract holder object for shared behaviour
Expand Down
10 changes: 5 additions & 5 deletions code/modules/mob/living/silicon/silicon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@

if (lawcache_zeroth)
if (force || (lawcache_zeroth in lawcache_lawcheck))
say("[radiomod] 0. [lawcache_zeroth]", forced = forced_log_message)
say("[radiomod] 0. [lawcache_zeroth]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE))
sleep(1 SECONDS)

for (var/index in 1 to length(lawcache_hacked))
Expand All @@ -273,7 +273,7 @@
if (length(law) <= 0)
continue
if (force || (law in lawcache_hackedcheck))
say("[radiomod] [num]. [law]", forced = forced_log_message)
say("[radiomod] [num]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE))
sleep(1 SECONDS)

for (var/index in 1 to length(lawcache_ion))
Expand All @@ -282,7 +282,7 @@
if (length(law) <= 0)
return
if (force || (law in lawcache_ioncheck))
say("[radiomod] [num]. [law]", forced = forced_log_message)
say("[radiomod] [num]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE))
sleep(1 SECONDS)

var/number = 1
Expand All @@ -291,7 +291,7 @@
if (length(law) <= 0)
continue
if (force || (law in lawcache_lawcheck))
say("[radiomod] [number]. [law]", forced = forced_log_message)
say("[radiomod] [number]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE))
number++
sleep(1 SECONDS)

Expand All @@ -301,7 +301,7 @@
if (length(law) <= 0)
continue
if (force || (law in lawcache_lawcheck))
say("[radiomod] [number]. [law]", forced = forced_log_message)
say("[radiomod] [number]. [law]", forced = forced_log_message, message_mods = list(MODE_SEQUENTIAL = TRUE))
number++
sleep(1 SECONDS)

Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/reagent_containers/cups/_cup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
. = ..()
if(drink_type)
var/list/types = bitfield_to_list(drink_type, FOOD_FLAGS)
. += span_notice("It is [LOWER_TEXT(english_list(types))].")
. += span_notice("The label says it contains [LOWER_TEXT(english_list(types))] ingredients.")

/**
* Checks if the mob actually liked drinking this cup.
Expand Down
Loading

0 comments on commit ef05602

Please sign in to comment.